IQ Study Notes

Source: Internet
Author: User
Tags sybase

-- Start IQ management> start_iq-N utility_db> dbisql-c "uid = DBA; Pwd = SQL; Eng = utility_db; DBN = utility_db"
-- Create database '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 password 'SQL'
-- Start mydb start_iq mydb
-- Connect to mydb dbisql-c "uid = DBA; Pwd = SQL; Eng = mydb; DBN = mydb" -- add dbfile alter dbspace iq_system_temp add file ds_tmp 'd for temp dbspace: \ sylabs \ data \ mydb_temp 'size 200; -- create a user dbspace and add dbfile create 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 a test table and add the data create table test1 (f_id int, f_name varchar (32) in user_ds; insert into test1 values (101, 'foo '); insert into test1 values (102, 'bar ');
/* Remove dbfile */-- first set the dbfile attribute to readonly alter dbspace user_ds alter file ds_f1 readonly; -- dbfile sp_iqemptyfile ds_f1 to be removed by empty; -- delete dbfile alter dbspace user_ds Drop File ds_f1;
-- View dbfile information sp_iqfile;

-- View options sp_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 '20140901 ';
-- Add user U2 with the password Sybase sp_iqaddlogin 'u2 'and 'sybase'

-- Database backup and recovery
/* Version information a version is generated for each client operation, and the commit version is submitted and eliminated. */-- View the otherversion information sp_iqversionuse;
/** Execute sp_iqversionuse * to view the current version information when the IQ performance degrades due to excessive IQ versions. * then execute sp_iqconnection * to view the IQ connection information connid; * Run sp_iqcontext * to check whether a connection has been executed. If not, use the drop connection * Statement to disconnect the connection. */
/* Multiplex IQ cluster * set the IQ cluster on a single node and convert the local database to multiplex */-- start_iq to start Coordinator> start_iq @ Params. CFG-N mpxnode_c-X "TCPIP {Port = 2763}" mydb. DB
-- Connect to Coordinator> dbisql-c "uid = DBA; Pwd = SQL; Eng = mpxnode_c; DBN = mydb"
-- Create multiplex server mpxnode_w1 database 'd: \ sylabs \ data2 \ mydb. DB 'host' localhost' port 2957 role writer status terminated DED
-- Restart Coordinator> start_iq @ Params. cfg-N mpxnode_c-X "TCPIP {Port = 2763}" mydb. DB
-- Backup catalog information> dbbackup-y-D-c "uid = DBA; Pwd = SQL; links = TCPIP {Port = 2763}; Eng = mpxnode_c" D: \ sylabs \ data2
-- Enter the directory where the node dB is located, and reset the log information> Cd D: \ sylabs \ data2> dblog-r-t mydb. Log mydb. DB
-- Start the node dB> start_iq @ Params. cfg-N mpxnode_w1-X "TCPIP {Port = 2957}" mydb. DB
-- Connect to the node IQ dbisql-c "uid = DBA; Pwd = SQL; Eng = mpxnode_w1; links = TCPIP {Port = 2957 }"
-- Add the temporary dbspace file alter dbspace iq_system_temp add file mpxnode_w1_temp 'w1 _ temp1.iqtmp 'size 100

-- Mydb is used later, and the multiplex mode start_iq @ Params. cfg-N mydb. D is not used
-- Enable the 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

IQ store: dbspaces: iq_system_main has only one dbspace by default. Additional authorization is required if the database is added.
Catalog store: Catalog. DB file; Catalog. log file; the files required to restore the database for the above two files cannot be deleted or modified !!!
Must be placed on the file system. IQ temporary store:
Params. cfg:
-C catalog cache-lower limit configuration and Cl cache. the size of DB files is the same-the Maximum Cache size of CH is 4 to 8 times the size of-Cl-iqtc-iqmc-iqlm (about 80% of the system memory is selected, and the recommended memory size is)

IQ Study Notes

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.