SYBASE:SAP IQ Study notes-start IQ management >> start_iq-n utility_db-n utility_db>> dbisql-c "Uid=dba;pwd=sql;eng=utility_ db;dbn=utility_db " --Creating database" Create databases ' d:\\sylabs\\data\\mydb ' case ignore PAGE SIZE 4096 BLANK PADDING on iq PATH ' d:\\sylabs\\data\\mydb ' IQ size 200 iq PAGE size 131072 DBA USER ' dba ' &N Bsp DBA PASSWORD ' sql ' --start Mydbstart_iq mydb --connect to Mydbdbisql-c "Uid=dba;pwd=sql;eng=mydb;dbn=mydb" -- Add Dbfilealter dbspace for the TEMP dbspace iq_system_temp add FILE ds_tmp ' d:\\sylabs\\data\\mydb_temp ' SIZE 200;--create user DBSPACE, and add dbfilecreate DBSPACE user_ds USING FILE ds_f1 ' d:\\sylabs\\data\\ds_f1 ' SIZE 200; ALTER DBSPACE user_ds Add FILE ds_f2 ' d:\\sylabs\\data\\df_f2 ' SIZE 200; --Create test table, add data create TABLE TEST1 (f_id INT, f_ NAME VARCHAR (+)) in User_ds;insert to TEST1 values (101, ' FOO '); INSERT into TEST1 values (102, ' BAR '); /* Remove DBFile * /--first sets the DBFile property to remove to Readonlyalter DBSPACE user_ds ALTER FILE ds_f1 READonly;--empty to remove dbfilesp_iqemptyfile ds_f1;--delete dbfilealter DBSPACE user_ds DROP FILE ds_f1; --view dbfile information sp_ iqfile; --View Optionssp_iqcheckoptions;sa_conn_properties;sa_conn_options; set OPTION public. Force_no_scroll_cursors= ' on '; SET OPTION public. string_rtruncation= ' OFF '; SET OPTION public. Default_dbspace= ' User_ds '; SET OPTION public. Index_advisor= ' on '; SET OPTION public. index_advisor_max_rows=1000; sp_iqcheckoptions; --Grant user Grant CONNECT to U1 identified by ' 123456 '; --Add user U2, Password Sybasesp_iqaddlogin ' U2 ', ' Sybase ' --database backup and Recovery */version Info Each client operation will produce a version that performs a commit version commit elimination. */--View otherversion Information sp_iqversionuse; /* * perform sp_iqversionuse * when IQ version is too large to cause IQ performance to degrade View current version information; * then perform sp_iqconnection * to view IQ connection information connid; * then sp_iqcontext* see if the connection has a task in execution, If not, you can disconnect the connection by using the drop CONNECTION* statement. */ /* Multiplex IQ Cluster * set up an IQ cluster on a single node, convert the local database to multiplex*/--Start_iq start coordinator>> Start_iq@params. Cfg-n mpxnode_c-x "tcpip{port=2763}" mydb.db --connected to coordinator>> dbisql-c "uid=dba;pwd=sql;eng= Mpxnode_c;dbn=mydb " --Create multiplex servercreate multiplex SERVER mpxnode_w1 DATABASE ' d:\\sylabs\\data2\\ Mydb.db ' HOST ' localhost ' PORT 2957 ROLE WRITER STATUS included --restart coordinator>> start_iq @params. Cfg-n MPX Node_c-x "tcpip{port=2763}" mydb.db --Backup catalog info >> dbbackup-y-d-c "uid=dba;pwd=sql;links=tcpip{port= 2763};eng=mpxnode_c "d:\\sylabs\\data2 --into the directory where node db is located, reset log info >> cd d:\\sylabs\\data2>> dblog-r-T Mydb.log mydb.db --boot node db>> start_iq @params. Cfg-n mpxnode_w1-x "tcpip{port=2957}" mydb.db -- Connect to Node Iqdbisql-c "uid=dba;pwd=sql;eng=mpxnode_w1;links=tcpip{port=2957}" --add temporary dbspace file alter Dbspace iq_ System_temp ADD FILE mpxnode_w1_temp ' w1_temp1.iqtmp ' SIZE 100 --use mydb, do not use multiplex mode Start_iq @params. cfg-n MyDB mydb.d --Enable IQ query plan set temporary option query_plan= ' on '; set temPorary option query_detail= ' on '; Set temporary option query_plan_after_run= ' on '; Set temporary option query_plan_as_html = ' on ', set temporary option query_plan_as_html_directory= ' d:\\temp '; Set temporary option query_timing= ' on ';
IQ Store:
Dbspaces:iq_system_main has only one dbspace by default, and additional authorization is required if added.
Catalog Store:catalog.db file; catalog.log file; the files required to recover the database from the above 2 files cannot be deleted or modified!!! Must be placed on the file system. IQ Temporary Store:params.cfg:-C Catalog Cache-CL cache lower configuration and file size of. DB-ch Cache upper configuration and-CL size 4 to 8 times times-IQT C-IQMC-IQLM (select system memory around 80%, three memory allocation recommended for 1:1:1)
SYBASE:SAP IQ Study Notes