Sybase Commands PDF
Sybase Commands PDF
^ attributes = [AUTHORIZATION { ON | OFF } ] [ SECURE { ON | OFF } +DROP DATABASE db-filename [ KEY key-spec ]
] [ USER { user-name | NULL } [ ] URL [ PATH ] { ON | OFF | ELEMENTS } DROP EXTERNLOGIN login-name TO remote-server
] [ USING { SOAP-prefix | NULL } ]
DROP SERVER server-name
^ service-type-string = { 'RAW ' | 'HTML ' | 'XML ' | 'SOAP ' | ' DISH ' }
^DROP SERVICE service-name
+CREATE [ GLOBAL TEMPORARY ] TABLE [ owner.]table-name
( column-definition [ column-constraint ] DROP STATEMENT [ owner.]statement-name
[, column-definition [ column-constraint ]... ]
DROP VARIABLE identifier
[, table-constraint ]... )
[ { IN | ON } dbspace-name ] EXECUTE ( string-expression )
[ ON COMMIT { DELETE | PRESERVE } ROWS ]
| NOT TRANSACTIONAL] EXECUTE statement-name
[ AT location-string ] [ { USING DESCRIPTOR sqlda-name | USING host-variable-list } ]
[ { INTO DESCRIPTOR into-sqlda-name | INTO into-host-variable-list ]
location-string = { remote-server-name .[db-name ].[owner].object-name [ ARRAY :nnn } ]
| remote-server-name ;[db-name ];[owner];object-name }
EXECUTE [ @return_status = ] [owner.]procedure_name
See ALTER TABLE for column-constraint and table-constraint { [ @parameter-name = ] expression | [ @parameter-name = ]
@variable [ output ] } ,...
CREATE VARIABLE identifier data-type
+EXECUTE IMMEDIATE [ execute-option ] string-expression
CREATE VIEW [ owner.]view-name [ ( column-name [, ...] ) ]
AS select-without-order-by { EXIT | QUIT | BYE }
[ WITH CHECK OPTION ]
FETCH
DEALLOCATE DESCRIPTOR descriptor-name :string { NEXT | PRIOR | FIRST | LAST | ABSOLUTE row-count | RELATIVE row-count }
cursor-name
EXEC SQL BEGIN DECLARE SECTION;
{ [ INTO host-variable-list ] | USING DESCRIPTOR sqlda-name
C declarations
| INTO variable-list }
EXEC SQL END DECLARE SECTION;
[ PURGE ] [ BLOCK n ] [ ARRAY fetch-count ]
DECLARE variable_name data-type INTO variable-list
IQ CACHE row-count
+DECLARE cursor-name
[ { SCROLL | NO SCROLL | DYNAMIC SCROLL } ] [ statement-label: ]
CURSOR FOR { select-statement | statement-name FOR for-loop-name AS cursor-name
[ FOR {READ ONLY | UPDATE [ OF column-name-list ] } ] CURSOR FOR statement
| USING variable-name } [ { FOR UPDATE | FOR READ ONLY } ]
DECLARE cursor-name CURSOR DO statement-list
FOR select-statement END FOR [ statement-label ]
[ FOR { READ ONLY | UPDATE } ] FORWARD TO server-name { sql-statement }
DECLARE LOCAL TEMPORARY TABLE table-name FORWARD TO [ server-name ]
( column-definition [ column-constraint ]...
[, column-definition [ column-constraint ]... ] GET DESCRIPTOR descriptor-name
[, table-constraint ]... ) { hostvar = COUNT } | VALUE n assignment [, ...] }
[ ON COMMIT { DELETE | PRESERVE } ROWS NOT TRANSACTIONAL ]
Sybase® IQ™ 12.6 Quick Reference Guide Page 4a Sybase® IQ™ 12.6 Quick Reference Guide Page 4b
label: +LOAD [ INTO ] TABLE [ owner ].table-name
GOTO label ( load -specification [, ...] )
FROM { 'filename -string' | filename -variable } [, ...]
GRANT CONNECT TO userid [, ...] IDENTIFIED BY password [, ...]
[ CHECK CONSTRAINTS { ON | OFF }
GRANT IGNORE CONSTRAINT constrainttype [, ...] ]
{ DBA QUOTES OFF
| GROUP ESCAPES OFF
| MEMBERSHIP IN GROUP userid [, ...] [ FORMAT { 'ascii' | 'binary' } ]
| RESOURCE [ DELIMITED BY 'string' ]
| ALL [ STRIP { ON | OFF } ]
} [ WITH CHECKPOINT { ON | OFF } ]
TO userid [, ...] [ { BLOCK FACTOR number | BLOCK SIZE number } ]
[ BYTE ORDER { NATIVE | HIGH | LOW } ]
GRANT [ LIMIT number-of-rows ]
{ ALL [ PRIVILEGES ] [ NOTIFY number-of-rows ]
| ALTER [ ON FILE ERROR { ROLLBACK | FINISH | CONTINUE} ]
| DELETE [ PREVIEW { ON | OFF } ]
| INSERT [ ROW DELIMITED BY 'delimiter-string' ]
| REFERENCES [ ( column-name [, ...] ) ] [ SKIP number-of-rows ]
| SELECT [ ( column-name [, ...] ) ] [ START ROW ID number ]
| UPDATE [ ( column-name ,... ) ] [ UNLOAD FORMAT ]
} [ IGNORE CONSTRAINT constrainttype [, ...] ]
ON [ owner.]table-name TO userid [, ...] [ WITH GRANT OPTION ] [ MESSAGE LOG ‘string’ ROW LOG ‘string’ [ ONLY LOG logwhat [, ...] ]
GRANT EXECUTE ON [ owner.]procedure-name TO userid [, ...] [ LOG DELIMITED BY ‘string’ ]
GRANT INTEGRATED LOGIN TO user_profile_name [, ...] AS USER userid load-specification = { column-name [ column-spec ] | FILLER ( filler-type ) }
INSTALL JAVA [ install-mode ] [ JAR jar-name ] FROM source PARAMETERS parameter1, parameter2 , ...
SET DESCRIPTOR descriptor-name Approximate numeric datatypes (Can’t have CMP, HNG, WD, DATE, TIME or
{ COUNT = { integer | hostvar } | VALUE n assignment [, ...] } DTTM indexes : HG not recommended)
SET [ EXISTING ] [ TEMPORARY ] OPTION double ±2.2250738585072e
-308
to ±1.79769313486231e
+308
[ userid.| PUBLIC.]option-name = [ option-value ]
float As for real
SET PERMANENT
float (precision) As for real or double, depending upon precision
SET SQLCA sqlca
-38 +38
real ±1.175494351e to ±3.402823466e
SIGNAL exception-name
+START DATABASE database-file Money datatypes (Can’t have WD, DATE, TIME or DTTM indexes)
[ AS database-name ]
[ ON engine-name ] smallmoney numeric (10, 4) -999,999.9999 to 999,999.9999
[ AUTOSTOP { YES | NO } ] money numeric (19, 4) -999,999,999,999,999.9999 to 999,999,999,999,999.9999
[ KEY key ]
START ENGINE AS engine-name [ STARTLINE command-string ] Date / time datatypes (Can’t have WD index. DATE index only on date. TIME index
only on time. DTTM index only on datetime, smalldatetime
START JAVA and timestamp)
STOP DATABASE database-name [ ON engine-name ] [ UNCONDITIONALLY ] date 0001 to 9999
STOP ENGINE engine-name [ UNCONDITIONALLY ] datetime As for timestamp
STOP JAVA smalldatetime As for timestamp
SYNCHRONIZE JOIN INDEX [ join-index-name [, join-index-name [, … ] ] ] time 00:00:00.000000 to 23:59:59.999999
TRIGGER EVENT event-name [ ( parm = value, ... ) ] timestamp 0001-01-01 00:00:00.000000 to 9999-12-31 23:59:59.999999
TRUNCATE TABLE [ owner.]table-name
Sybase® IQ™ 12.6 Quick Reference Guide Page 6a Sybase® IQ™ 12.6 Quick Reference Guide Page 6b
IQ 12.6 Functions
Character datatypes (Can’t have DATE, TIME or DTTM indexes if up to 255 bytes,
only default, WD & CMP indexes possible if more than 255 ABS ( numeric-expr )
bytes) ACOS ( numeric-expr )
ARGN ( integer-expr, expression [ , ...] )
character char 32,767 bytes or fewer ASCII ( string-expr )
character varying varchar 32,767 bytes or fewer ASIN ( numeric-expr )
ATAN ( numeric-expr )
^uniqueidentifierstr Implemented as char (36) ATAN2 ( numeric-expr1, numeric-expr2 )
^long varchar Character Large Object : Separately licensed option : AVG ( { DISTINCT column-name | numeric-expr } )
allows data with a length up to 512 TB for 128 KB page ^BIT_LENGTH ( column-name )
size or 2 PB for 512 KB page size BYTE_LENGTH ( string-expr )
CAST ( expression AS datatype )
Binary datatypes (Can’t have HNG, WD, DATE, TIME or DTTM indexes) CEILING ( numeric-expr )
CHAR ( integer-expr )
binary 255 bytes or fewer CHAR_LENGTH ( string-expr )
varbinary 32,767 bytes or fewer (only default & CMP indexes CHARINDEX ( string-expr1, string-expr2 )
possible if more than 255 bytes) COALESCE ( expression, expression [ , expression ...] )
COL_LENGTH ( table-name, column-name )
^long binary Binary Large Object : Separately licensed option : allows COL_NAME ( table-id, column-id [ , database-id ] )
data with a length up to 512 TB for 128 KB page size or 2 CONNECTION_PROPERTY ( { property-id | property-name } ... [ , connection-id ] )
PB for 512 KB page size CONVERT ( datatype, expression [ , format-style ] )
^image As for long binary COS ( numeric-expr )
COT ( numeric-expr )
Bit datatype (Can only have default index) COUNT ( * )
COUNT ( { DISTINCT column-name | expression } )
bit 0, 1 or NULL DATALENGTH ( expression )
DATE ( expression )
Java to SQL data type conversion DATEADD ( date-part, numeric-expression, date-expr )
DATEDIFF ( date-part, date-expr1, date-expr2 )
Java Type SQL Type DATEFORMAT ( datetime-expr, string-expr )
String CHAR DATENAME ( date-part, date-expr )
String VARCHAR DATEPART ( date-part, date-expr )
String TEXT DATETIME ( expression )
java.math.BigDecimal NUMERIC DAY ( date-expr )
Java.math.BigDecimal MONEY DAYNAME ( date-expr )
Boolean BIT DAYS ( date-expr )
Byte TINYINT DAYS ( date-expr, date-expr )
Short SMALLINT DAYS ( date-expr, integer-expr )
Int INTEGER DB_ID ( [ database-name ] )
Long BIGINT DB_NAME ( [ database-id ] )
Float REAL DB_PROPERTY ( { property-id | property-name } ... [ , {database-id | database-name } ] )
DEGREES ( numeric-expr )
Double DOUBLE
DENSE_RANK ()
java.sql.Date DATE
DIFFERENCE ( string-expr1, string-expr2 )
java.sql.Time TIME DOW ( date-expr )
java.sql.Timestamp TIMESTAMP EVENT_CONDITION ( condition-name )
java.lang.Double DOUBLE EVENT_CONDITION_NAME ( integer )
java.lang.Float REAL EVENT_PARAMETER ( context-name )
java.lang.Integer INTEGER EXP ( numeric-expr )
java.lang.Long INTEGER FLOOR ( numeric-expr )
GETDATE ()
SQL to Java data type conversion
HEXTOINT ( hexadecimal-string )
SQL Type Java Type HOUR ( datetime-expr )
CHAR String HOURS ( datetime-expr )
VARCHAR String HOURS ( datetime-expr, datetime-expr )
NUMERIC java.math.BigDecimal HOURS ( datetime-expr, integer-expr )
DECIMAL java.math.BigDecimal ^HTTP_DECODE ( string )
MONEY java.math.BigDecimal ^HTTP_ENCODE ( string )
BIT boolean ^HTTP_VARIABLE ( var-name [ [ , instance ] , header-field ] )
TINYINT byte IFNULL ( expression1, expression2 [ , expression3 ] )
INDEX_COL ( table-name, index-id, key_# [ , user-id ] )
SMALLINT short
INSERTSTR ( numeric-expr, string-expr1, string-expr2 )
INTEGER int
INTTOHEX ( integer-expr )
BIGINT long ^ISDATE ( string )
REAL float ISNULL ( expression, expression [ , expression ...] )
FLOAT double ^ISNUMERIC ( string )
DOUBLE double LCASE ( string-expr )
DATE java.sql.Date LEFT ( string-expr, numeric-expr )
TIME java.sql.Time LENGTH ( string-expr )
TIMESTAMP java.sql.Timestamp LOCATE ( string-expr1, string-expr2 [ , numeric-expr ] )
Sybase® IQ™ 12.6 Quick Reference Guide Page 7a Sybase® IQ™ 12.6 Quick Reference Guide Page 7b
LOG ( numeric-expr ) TRIM ( string-expr )
LOG10 ( numeric-expr ) “TRUNCATE” ( numeric-expr, integer-expr )
LOWER ( string-expr ) TRUNCNUM ( numeric-expression, integer-expression )
LTRIM ( string-expr ) UCASE ( string-expr )
MAX ( { DISTINCT column-name | expression } ) UPPER ( string-expr )
MIN ( { DISTINCT column-name | expression } ) USER_ID ( [ user-name ] )
MINUTE ( datetime-expr ) USER_NAME ( [ user-id ] )
MINUTES ( datetime-expr ) +VARIANCE ( [ ALL ] expression )
MINUTES ( datetime-expr, datetime-expr ) WEEKS ( date-expr )
MINUTES ( datetime-expr, integer-expr ) WEEKS ( date-expr, date-expr )
MOD ( dividend, divisor ) WEEKS ( date-expr, integer-expr )
MONTH ( date-expr ) YEAR ( date-expr )
MONTHNAME ( date-expr ) YEARS ( date-expr )
MONTHS ( date-expr ) YEARS ( date-expr, date-expr )
MONTHS ( date-expr, date-expr ) YEARS ( date-expr, integer-expr )
MONTHS ( date-expr, integer-expr ) YMD ( year-num, month-num, day-num )
NEXT_CONNECTION ( { NULL | connection-id } )
NEXT_DATABASE ( { NULL | database-id } ) For all following procedures, parameters can be enclosed in ( and ) when ‘call’ used
^NEXT_HTTP_HEADER header-name
^NEXT_HTTP_VARIABLE var-name IQ 12.6 System Procedures
NOW ( * )
sp_iqaddlogin loginname, password [, number_of_connections ]
NTILE ( integer )
[ , password_expiration ]
NULLIF ( expression1, expression2 )
sp_iqcheckdb ’ mode target [...] [ resources resource-percent ]’
NUMBER ( * )
sp_iqcheckoptions
OBJECT_ID ( object-name )
sp_iqcolumn [ table_name ] [, table_owner ]
OBJECT_NAME ( object-id [ , database-id ] )
sp_iqcolumn [ table_name=’tablename ’ ] [, table_owner=’tableowner’ ]
^OCTET_LENGTH ( column-name )
sp_iqcommandstats [ verbosity_level | search_string ]
PATINDEX ( '%pattern%', string_expr )
sp_iqconnection [ connhandle ]
PERCENT_RANK ()
sp_iqconstraint [ table-name ] [ , column-name ] [ , table-owner ]
PERCENTILE_CONT ( numeric-expr )
sp_iqcontext [ connhandle ]
PERCENTILE_DISC ( numeric-expr )
+sp_iqdbsize [ main | local ]
PI ( * )
^sp_iqdbspace [ dbspace-name ]
POWER ( numeric-expr1, numeric-expr2 )
^sp_iqdbspaceinfo [ ‘dbspace-name-pattern ’ ] [ , ’local’]
PROPERTY ( { property-number | property-name } )
sp_iqdbstatistics
PROPERTY_DESCRIPTION ( { property-number | property-name } )
sp_iqdroplogin userid
PROPERTY_NAME ( property-number )
sp_iqestdbspaces db_size_in_bytes, iq_page_size,
PROPERTY_NUMBER ( property-name )
min_#_of_bytes, max_#_of_bytes ]
QUARTER ( date-expr )
sp_iqestjoin table1_name , table1_row_#, table2_name , table2_row_# ,
RADIANS ( numeric-expr )
relation , iq_page_size
RAND ( [ integer-expr ] )
sp_iqestspace table_name , #_of_rows, iq_page_size
RANK ()
sp_iqindex [ table_name ] [ , column_name ] [ , table_owner ]
REMAINDER ( numeric-expr, numeric-expr )
sp_iqindex [ table_name=’tablename ’ ]
REPEAT ( string-expr, numeric-expr )
[ , column_name=’columnname ’ ] [ , table_owner=’tableowner’ ]
REPLACE ( original-string, search-string, replace-string )
sp_iqindex_alt [ table_name ] [ , column_name ] [ , table_owner ]
REPLICATE ( string-expr, integer-expr )
sp_iqindex_alt [ table_name=’tablename ’ ]
RIGHT ( string-expr, numeric-expr )
[ , column_name=’columnname ’ ] [ , table_owner=’tableowner’ ]
ROUND ( numeric-expr, integer-expr )
^dbo.sp_iqindexfragmentation ‘target‘
ROWID ( table-name )
^sp_iqindexinfo ‘{ database | local | [ table table-name | index index-name ] [...] }
RTRIM ( string-expr )
[ resources resource-percent ]’
SECOND ( datetime-expr )
sp_iqindexsize [ [ owner.]table.]index_name
SECONDS ( datetime-expr )
sp_iqjoinindexsize join_index_name
SECONDS ( datetime-expr, datetime-expr )
sp_iqlistexpiredpasswords
SECONDS ( datetime-expr, integer-expr )
sp_iqlistlockedusers
SIGN ( numeric-expr )
sp_iqlistpasswordexpirations
SIMILAR ( string-expr1, string-expr2 )
sp_iqlocklogin loginname , ‘{ lock | unlock }’
SIN ( numeric-expr )
sp_iqlocks [ connection, ] [ [ owner.]table_name , ] [ max_locks, ] [ sort_order ]
SORTKEY ( string_expr [ collation-name ] )
sp_iqmodifyadmin ‘{ [ enable | disable | user_connections |
SOUNDEX ( string-expr )
db_connections | password_expiration | password_warning ] }’ [ , value ]
SPACE ( integer-expr )
sp_iqmodifylogin ‘{ loginname | all overrides }’, ‘option ’, value
SQRT ( numeric-expr )
sp_iqpassword caller_password , new_password [ , loginname ]
+STDDEV ( [ ALL ] expression )
sp_iq_process_login
STR ( numeric_expr [ , length [ , decimal ] ] )
^sp_iqrebuildindex table_name , index_clause
STRING ( string1 [ , string2, ..., string99 ] )
^sp_iqrelocate ‘target [ maxsize nMB ] [ resources resource-percent ]’
STUFF ( string-expr1, start, length, string-expr2 )
^sp_iq_reset_identity table_name , table_owner , value
SUBSTRING ( string-expr, integer-expr [ , integer-expr ] )
^dbo.sp_iqrowdensity ‘target ‘
SUM ( { DISTINCT column-name | expression } )
+sp_iqspaceinfo [ ‘main | local | [ table table-name | index index-name ] [...] ‘]
SUSER_ID ( [ user-name ] )
sp_iqspaceused out mainKB unsigned bigint, out mainKBUsed unsigned bigint,
SUSER_NAME ( [ user-id ] )
out tempKB unsigned bigint, out tempKBUsed unsigned bigint
TAN ( numeric-expr )
sp_iqstatus
TODAY ( * )
sp_iqtable [ table_name ] [ , table_owner ] [ , table_type ]
Sybase® IQ™ 12.6 Quick Reference Guide Page 8a Sybase® IQ™ 12.6 Quick Reference Guide Page 8b
sp_iqtable [ table_name=’tablename ’ ] dbo.sp_iqmpxmakeclean ()
[ , ] [ table_owner=’tableowner’ ] [ , ] [ table_type=’tabletype’ ] ^sp_iqmpxpassthrough ( IN sqlcmd VARCHAR(1024) )
sp_iqtablesize [ table_owner.]table_name sp_iqmpxpostsyncqueryserver ()
sp_iqtransaction sp_iqmpxprotectexec ( IN _cmd VARCHAR(1024) )
sp_iqview [ view_name ],[view_owner ],[view_type ] sp_iqmpxreplacewriteserver ( IN l_new_server_name VARCHAR(30) )
sp_iqview [view_name=’viewname ’ ] [ , ] sp_iqmpxresetquerysubscription ( IN l_server_name VARCHAR(30) )
[ view_owner=’viewowner’ ] [ , ] [ view_type=’viewtype ’ ] sp_iqmpxretryexec ( IN _cmd VARCHAR(1024), IN _msg VARCHAR(1024) )
sp_iqmpxsetpublisher ( IN l_server_name VARCHAR(30) default NULL )
IQ 12.6 Catalogue Procedures sp_iqmpxstopdbremote ()
^sa_audit_string string sp_iqmpxsubscribeuser ( IN _user VARCHAR(30),
sa_checkpoint_execute ’shell_commands’ IN _path LONG VARCHAR default NULL,
^sa_conn_activity IN _perm VARCHAR(15) default ‘REMOTE’ )
sa_conn_info [ connection-id ] sp_iqmpxunsubscribeuser ( IN _user VARCHAR(30) )
sa_conn_properties [ connection-id ] dbo.sp_iqmpxvalidate ( IN _show_msgs CHAR(1) DEFAULT ‘Y’ )
sa_conn_properties_by_conn [ property-name ] sp_iqmpxversionfetch ( out CatalogID unsigned bigint, out VersionID unsigned bigint,
sa_conn_properties_by_name [ connection-id ] out OAVID unsigned bigint, out ServerType char(1),
sa_db_info [ database-id ] out CatalogSync char(1), out WCatalogID unsigned bigint,
sa_db_properties [ database-id ] out WVersionID unsigned bigint )
^sa_disable_auditing_type [ 'string’ ] sp_iqmpxversioninfo ()
^sa_enable_auditing_type [ 'string’ ] IQ 12.6 ASE Compatability System Procedures
sa_eng_properties
sa_flush_cache sp_addgroup group-name
^sa_make_object objtype, objname [ , owner [ , tabname ] sp_addlogin userid, password [, defdb [, deflanguage [, fullname ] ] ]
sa_server_option option_name , option_value sp_addmessage messagenum, message_text [, language ]
^sa_set_http_header field-name , value sp_addtype typename, datatype, [, "identity" | nulltype ]
^sa_set_http_option option-name , value sp_adduser login_name [, name_in_db [, group-name ] ]
^sa_validate [ tbl_name ] [ , owner_name [ , check_type ] sp_changegroup new-group-name, userid
sp_login_environment sp_dboption [ dbname, optname, { true | false } ]
sp_remote_columns servername [ , tablename ] [ , owner ] [ , database ] sp_dropgroup group-name
sp_remote_exported_keys server_name , sp_name [ , sp_owner ] sp_droplogin userid
[ , sp_qualifier ] sp_dropmessage messagenumber [, language ]
sp_remote_imported_keys server_name , sp_name [ , sp_owner ] sp_droptype typename
[ , sp_qualifier ] sp_dropuser userid
^sp_remote_primary_keys server_name [ , table_name ] sp_getmessage message-num, @msg-var output [, language ]
[ , table_owner ] [ , table_qualifier] sp_helptext ’owner.object-name ’ – Must supply owner
+sp_remote_tables servername [, tablename ] [ , owner ] [ , table_qualifier ] sp_password caller_passwd, new_passwd [, userid ]
[ , with_table_type ]
sp_servercaps servername IQ 12.6 ASE Compatability Catalogue Procedures
sp_tsql_environment sp_columns [ table-name [, table-owner ] [, table-qualifier ] [, column-name ] ]
IQ 12.6 Multiplex System Procedures (Read the Ref Guide before using) sp_fkeys [ pktable_name [, pktable-owner ] [, pktable-qualifier ] [, fktable-name ]
[, fktable_owner ] [, fktable-qualifier ] ]
dbo.sp_iq_mpx_init () <Do not invoke this procedure> sp_pkeys table-name [, table-owner ] [, table-qualifier ]
sp_iqendmpx sp_special_columns table-name [, table-owner ] [, table-qualifier ] [, col-type ]
dbo.sp_iqendmpx () sp_sproc_columns proc-name [, proc-owner ] [, proc-qualifier ] [, column-name ]
“DBA”.sp_iqevbegintxn () sp_stored_procedures [ sp-name [, sp-owner ] [, sp-qualifier ] ]
sp_iqmakempx ( IN l_host_name VARCHAR (40), sp_tables [ table-name [, table-owner ] [, table-qualifier ] [, table-type ] ]
IN l_server_name VARCHAR (30),
IN l_db_path VARCHAR (1024), IQ 12.6 Extended Procedures
IN l_port_number VARCHAR (40) ) xp_cmdshell ( command [ , ‘no_output’ ] )
“DBA”.sp_iqmpxaddremoteusers ( IN l_server_name VARCHAR (30) default NULL, xp_msver ( option )
IN qName VARCHAR (30) default NULL ) xp_read_file ( file-name )
“DBA”.sp_iqmpxaliasdbspace ( IN _dbspace_name VARCHAR (128), xp_scanf ( input-string , format-string [ , param1 … [ , param50 ] ] )
IN _server VARCHAR (30), +xp_sendmail recipient, [ subject ] [ , cc_recipient ] [ , bcc_recipient ] [ , “message” ]
IN _path VARCHAR (255) default NULL, [ , include_file ]
IN _fromserver VARCHAR (30) default ‘ ‘, xp_sprintf ( output-string, format-string [ , param1 … [ , param50 ] ] )
IN _offset UNSIGNED BIGINT default NULL ) xp_startmail [ mail_user, mail_password ]
dbo.sp_iqmpxcountdbremote () ^xp_startsmtp smtp_sender, smtp_server [ , smtp_port ] [ , timeout ]
sp_iqmpxcreatepublication ( IN l_newserver VARCHAR (255) default NULL ) xp_stopmail ()
sp_iqmpxcreatequeryserver ( IN l_host_name VARCHAR (40), ^xp_stopsmtp ()
IN l_server_name VARCHAR (30), xp_write_file ( file-name , file-contents )
IN l_db_path VARCHAR (1024),
IN l_port_number VARCHAR (40) )
sp_iqmpxdropdbspace ( IN l_dbspace_name varchar(128) )
sp_iqmpxdroppublication ()
sp_iqmpxdropqueryserver ( IN l_server_name VARCHAR(30) )
sp_iqmpxdropserverdbspaces ( IN ln_server_name varchar(30) )
sp_iqmpxdumptlvlog ()
sp_iqmpxexcludeserver ( IN _server VARCHAR(30), IN _reqStat VARCHAR(10) )
^sp_iqmpxgetconnversion ()
Sybase® IQ™ 12.6 Quick Reference Guide Page 9a Sybase® IQ™ 12.6 Quick Reference Guide Page 9b
IQ 12.6 General Database Options ( * = change with care ) General Database Option Values Default
To view options from every section together, enter SET in DBISQL with nothing else JAVA_HEAP_SIZE integer 1,000,000
JAVA_NAMESPACE_SIZE integer 4,000,000
General Database Option Values Default JOIN_EXPANSION_FACTOR 0 to 100 30
AGGREGATION_PREFERENCE -3 to 3 0 JOIN_OPTIMIZATION ON, OFF ON
APPEND_LOAD ON, OFF OFF JOIN_PREFERENCE -7 to 7 0
^AUDITING ON, OFF OFF JOIN_SIMPLIFICATION_THRESHOLD 1 to 64 15
BACKUP_EXEC_CMD n/a n/a LARGE_DOUBLES_ACCUMULATOR ON, OFF OFF
BIT_VECTOR_PINNABLE_CACHE_ 0 to 100 40 LF_BITMAP_CACHE_KB 1 to 8 4
PERCENT* +LOAD_MEMORY_MB 0 to 2,000 0
BLOCKING OFF OFF ^LOCAL_RESERVED_DBSPACE_MB integer > 0 in MB 200
^BT_PREFETCH_MAX_MISS 0 to 1,000 2 LOG_CONNECT ON, OFF ON
BT_PREFETCH_SIZE 0 to 100 10 LOG_CURSOR_OPERATIONS ON, OFF OFF
CACHE_PARTITIONS power of 2, 0 to 64 0 LOGIN_MODE STANDARD, STANDARD
CHECKPOINT_TIME number of minutes 60 MIXED,
CIS_ROWSET_SIZE integer 50 INTEGRATED
COMMAND_STATS ON, OFF OFF LOGIN_PROCEDURE string sp_iq_process_
CONVERT_HG_TO_1242 ON, OFF OFF login
CONVERT_VARCHAR_TO_1242 ON, OFF OFF MAIN_CACHE_MEMORY_MB 1 to 4,194,303 16
COOPERATIVE_COMMIT_TIMEOUT integer 250 ^MAIN_KB_PER_STRIPE integer > 0 in KB 1
COOPERATIVE_COMMITS ON, OFF ON MAIN_RESERVED_DBSPACE_MB integer > 0 in MB 200
CURSOR_WINDOW_ROWS 20 to 100,000 200 MAX_CARTESIAN_RESULT integer 10,000,000
DATE_FIRST_DAY_OF_WEEK 0 to 6 0 ^MAX_CLIENT_NUMERIC_PRECISION 0 to 126 0
DATE_FORMAT string ’YYYY-MM-DD’ ^MAX_CLIENT_NUMERIC_SCALE 0 to 126 0
DATE_ORDER ’YMD’, ’DMY’, ’YMD’ MAX_CUBE_RESULT 0 to 250,000,000 10,000,000
’MDY’ MAX_CURSOR_COUNT integer 50
^DBCC_LOG_PROGRESS ON, OFF OFF MAX_HASH_ROWS integer to 2,500,000
DBCC_PINNABLE_CACHE_ 0 to 100 50 250,000,000
PERCENT MAX_IQ_THREADS_PER_ 2 to 1,000 72
^DDL_OPTIONS2 0 to 3 0 CONNECTION
^DEBUG_MESSAGES ON, OFF OFF ^MAX_IQ_THREADS_PER_TEAM 1 to 1,000 48
^DEDICATED_TASK ON, OFF OFF MAX_JOIN_ENUMERATION 1 to 64 15
^DEFAULT_LIKE_MATCH_SELECTIVITY 0 to 100 15 MAX_QUERY_PARALLELISM integer <= # CPUs 24
^DEFAULT_LIKE_RANGE_SELECTIVITY 0 to 100 15 ^MAX_QUERY_TIME 0 to 2^32 – 1 0 (disabled)
DELAYED_COMMIT_TIMEOUT integer 500 +MAX_STATEMENT_COUNT integer 100
DELAYED_COMMITS OFF OFF MAX_WARNINGS integer 2^64 - 1
DISABLE_RI_CHECK ON, OFF OFF ^MIN_NLPDJ_TABLE_SIZE 1 to 4,294,967,295 10,000
DISK_STRIPING ON, OFF ON MIN_PASSWORD_LENGTH integer >= 0 0 characters
^EARLY_PREDICATE_EXECUTION ON, OFF ON ^MIN_SMPDJ_OR_HPDJ_FILTERED_ 1 to 4,294,967,295 25,000
EXTENDED_JOIN_SYNTAX ON, OFF ON SIZE
^FLATTEN_SUBQUERIES ON, OFF OFF ^MIN_SMPDJ_OR_HPDJ_INDIRECT_ 1 to 4,294,967,295 500,000
FORCE_DROP ON, OFF OFF SIZE
FORCE_NO_SCROLL_CURSORS ON, OFF OFF ^MIN_SMPDJ_OR_HPDJ_TABLE_SIZE 1 to 4,294,967,295 100,000
^FORCE_UPDATABLE_CURSORS ON, OFF OFF MINIMIZE_STORAGE ON, OFF OFF
^FPL_EXPRESSION_MEMORY_KB 0 to 20000 1024 ^MONITOR_OUTPUT_DIRECTORY string database
FP_PREDICATE_WORKUNIT_PAGES integer 400 directory
FP_PREFETCH_SIZE 0 to 100 10 NOEXEC ON, OFF OFF
NON_ANSI_NULL_VARCHAR ON, OFF OFF
GARRAY_FILL_FACTOR_PERCENT 0 to 1000 25
NOTIFY_MODULUS integer 100,000
GARRAY_INSERT_PREFETCH_SIZE 0 to 100 3
^ODBC_DISTINGUISH_CHAR_AND_ ON, OFF OFF
GARRAY_RO_PREFETCH_SIZE 0 to 100 10
VARCHAR
HASH_PINNABLE_CACHE_ 0 to 100 20
PERCENT*
^ON_CHARSET_CONVERSION_ string IGNORE
HASH_THRASHING_PERCENT 0 to 100 10
FAILURE
HG_DELETE_METHOD 0, 1, or 2 0
OS_FILE_CACHE_BUFFERING ON, OFF OFF
HG_SEARCH_RANGE integer 10
OUT_OF_DISK_MESSAGE_REPEAT integer 120
^IDENTITY_ENFORCE_UNIQUENESS ON, OFF OFF
OUT_OF_DISK_WAIT_TIME integer 30
^IDENTITY_INSERT = 'tablename' =''
PARALLEL_GBH_ENABLED ON, OFF ON
^INDEX_ADVISOR ON, OFF OFF
^PARALLEL_GBH_MIN_ROWS_PER_ 0 to 4,294,967,295 3,000,000
INDEX_PREFERENCE -10 to 10 0
UNIT
^INFER_SUBQUERY_PREDICATES ON, OFF OFF
PARALLEL_GBH_UNITS 0 to 100 0
^IN_SUBQUERY_PREFERENCE -3 to 3 0
PRECISION 126 126
^IQGOVERN_MAX_PRIORITY 1 to 3 2
PREFETCH ON, OFF ON
^IQGOVERN_PRIORITY 1 to 3 2 PREFETCH_BUFFER_LIMIT integer 0
^IQGOVERN_PRIORITY_TIME 1 to 1,000,000 secs 0 (disabled)
PREFETCH_BUFFER_PERCENT 0 to 100 40
+IQMSG_LENGTH_MB 0 to 2047 0 (no limit) PREFETCH_FP_PERCENT 0 to 100 50
ISOLATION_LEVEL 0, 1, 2, 3 0
PREFETCH_GARRAY_PERCENT 0 to 100 60
Sybase® IQ™ 12.6 Quick Reference Guide Page 10a Sybase® IQ™ 12.6 Quick Reference Guide Page 10b
IQ 12.6 Server Properties ( Use with the function “property” or use Server Property Description
sa_eng_properties to view all properties ) ^IsJavaAvailable Returns YES if the JavaVM is installed, and NO if the
JavaVM is not installed. This property only indicates if
Server Property Description the Java VM is available, not whether it is currently
ActiveReq The number of server threads that are currently being used.
handling a request. IsNetworkServer Returns YES if connected to a network database
AvailIO Reserved server, and NO if connected to a personal database
BuildChange Reserved server.
BuildClient Reserved IsRuntimeServer Returns YES if connected to the limited desktop
BuildProduction Undocumented runtime database server, and NO otherwise.
BuildReproducible Reserved JavaGlobFix Java VM global fixed size.
BytesReceived The number of bytes received during client/server ^JavaObjectsEnabled Undocumented
communications. Language The locale language for the server.
^BytesReceivedUncomp The number of bytes that would have been received LegalCopyright The copyright string for the software.
during client/server communications if compression LegalTrademarks Trademark information for the software.
was disabled. (This value is the same as the value for LicenseCount The number of licensed seats or processors.
BytesReceived if compression is disabled.) LicensedCompany The name of the licensed company.
BytesSent The number of bytes sent during client/server LicensedUser The name of the licensed user.
communications. ^LicensesInUse The number of concurrent users currently connected
^BytesSentUncomp The number of bytes that would have been sent to the network server, as determined by the number
during client/server communications if compression of unique client network addresses connected to the
was disabled. (This value is the same as the value for server.
BytesSent if compression is disabled.) LicenseType The license type. Can be networked seat (per-seat)
C2 Returns YES if the -sc option was used when the or cpu-based.
server was started. Otherwise, returns NO. LivenessTimeout The client liveness timeout default.
CacheHitsEng The number of database page lookups. LockedHeapPages The number of heap pages locked in the cache.
^CachePinned Undocumented ^MachineName The name or IP address of the computer running a
CacheReadEng Undocumented database server.
CacheReplacements The number of pages in the cache that have been MainHeapBytes The number of bytes used for global server data
replaced. structures.
CharSet The character set in use by the database server. MainHeapPages The number of pages used for global server data
^CommandLine The command line that was used to start the server. structures.
If the encryption key for a database was specified ^MapPhysicalMemoryEng Undocumented
using the -ek option, the key is replaced with a MaxCacheSize The maximum allowed cache size, in kilobytes.
constant string of asterisks in the value returned by MaxMessage The current maximum line number that can be
this property. (If you need to specify the encryption retrieved from the server’s message window. This
key, you can start the database server with the -ep
represents the most recent message displayed in the
option to be prompted for the key, or use the START
server’s message window.
DATABASE statement. As well, if the database can
+Message, linenumber A line from the server’s message window, prefixed by
be autostarted, the key can be provided in the
the date and time the message appeared. The
DBKEY connection parameter.)
second parameter specifies the line number. The
^CompactPlatformVer A condensed version of the PlatformVer property. value returned by PROPERTY ( "message" ) is the
CompanyName The name of the company owning this software. first line of output that was written to the Server
ConnsDisabled The number of connections disabled. Messages window. Calling PROPERTY ( "message",
^ConsoleLogFile Returns the name of the file where messages from i ) returns the i-th line of server output (with zero
the database server window are logged if the –o being the first line). The buffer is finite, so as
option was specified, otherwise returns an empty messages are generated, the first lines are dropped
string. and may no longer be available in memory. In this
CurrentCacheSize The current cache size, in kilobytes. case, NULL is returned.
DefaultCollation For IQ databases, a reasonable alternative to the ^MessageText, The text associated with the specified line number in
default collation. ISO_BINENG is the default collation linenumber the server’s message window, without a date and
for all IQ databases created as of version 12.4.2. This time prefix. The second parameter specifies the line
behavior differs from Adaptive Server Anywhere, number.
where the DefaultCollation server property shows the ^MessageTime, The date and time associated with the specified line
collation that would be used for new databases, if linenumber number in the server’s message window. The second
none is explicitly specified. parameter specifies the line number.
DiskReadEng Undocumented ^MessageWindowSize The maximum number of lines that can be retrieved
^FipsMode Returns YES if the -fips option was specified when from the server’s message window.
the database server was started, and NO otherwise. MinCacheSize The minimum allowed cache size, in kilobytes.
Not output by sa_eng_properties. MultiPacketsReceived The number of multi-packet deliveries received during
FreeBuffers The number of available network buffers. client/server communications.
^FunctionName Undocumented MultiPacketsSent The number of multi-packet deliveries sent during
^IdleTimeout The default idle timeout. client/server communications.
^IsFipsAvailable Returns YES if the FIPS DLL is installed, and NO Name The name of the server.
otherwise. Not output by sa_eng_properties.
^IsIQ Returns YES if the server is an IQ server.
Sybase® IQ™ 12.6 Quick Reference Guide Page 12a Sybase® IQ™ 12.6 Quick Reference Guide Page 12b
Disclaimer
The information contained in this quick reference guide has been copied verbatim from the IQ 12.6
Technical Library’s Reference Manual. The only changes made were for formatting and correcting
obvious mistakes; and validating the procedures and server, database and connection properties
information. The information above could still contain errors, so please do not hold the information as
gospel.
Sources
The template for this quick reference guide was the Replication Server quick reference guide created by
Rob Verschoor (see http://www.sypron.nl/).
1. Print the file (paper size should be A4). You may need to adjust the page margins or the space
between the columns if it doesn't print correctly; there should be about 7 millimetres (~ 5/12 inch) free
space at the left and right margins (if you can't get it printed correctly, you can always change the lay-
out to 1 column/page, and so some manual cut-and-pasting).
3. Fold the printed pages, so that there is one column on each folded side.
6. If you don't like the sight of those staples, cover them with a bit of sticky tape.
page 3a
1b page 2a
page 1a page 1b page 1a page 1a
(discard)