Sybase IQ Guide

Building new installation

This is quite straight forward, simply put the CD into the drive and run the installation script, select to create the demo database, it’s always quite usefull.



Starting the server

The following command can be used;


start_asiq @/tore/mjolner_iq/ASIQ-12_6/demo/asiqdemo.cfg

the contents of the .cfg file could be something like;

>>>>>>>>>>>>>>>>>>>>>>>>

# asiqdemo.cfg

# ————————————————————

# Default startup parameters for the ASIQ demo database

# ————————————————————

-n  mjolner_asiqdemo /tore/mjolner_iq/ASIQ-12_6/demo/asiqdemo.db

-x  tcpip{port=2638}

# The following parameters are also found in the configuration file

# $ASDIR/scripts/default.cfg.  Any parameters not specified below

# and not in the start up parameter list, will be added by start_asiq

# using default.cfg as a guide.

-c  48m

-gc 20

-gd all

-gl all

-gm 10

-gp 4096

-ti 4400

>>>>>>>>>>>>>>>>>>>>>>>

note that the –n parameter gives the name of the iq server followed by the path to the database file.



Connecting to database/server

from unix type ;


dbisql -nogui -host mjolner -port 2639 -jConnect -c “uid=DBA;pwd=SQL”



or if you want the gui version omit the –nogui option, you need to set the display first though.


From Windows use Interactive SQL or Sybase central



Useful commands


sp_iqstatus Display the current status of the IQ server/database incl used space etc.

sp_iqdbsize Displays the size of the current database

select * from sysiqfile Display information on the dbspaces



Creating a new database

The easiest place to do this from is using Interactive SQL logged into asiqdemo and then type the following;


create database ‘/tore/mjolner_iq/ASIQ-12_6/iq1/iq1.db’

IQ PATH ‘/tore/mjolner_iq/ASIQ-12_6/iq1/iq1.iq’

IQ SIZE 12000

message path ‘/tore/mjolner_iq/ASIQ-12_6/iq1/iq1.iqmsg’

temporary path ‘/tore/mjolner_iq/ASIQ-12_6/iq1/iq1.iqtmp’

temporary size 6000

page size 4096;



Importing data

To import a table from ASE into IQ use the following sequence;


1)         Extract the ddl for the table you want to transfer and create the table in the IQ database

2)         bcp out the data with a command like;

bcp murex2000db.MUREXDB.MPY_GLOB_DBF out MPY_GLOB_DBF.out -c -Usybufji –P<password> -SCIDS_DEV_SQL1 -t \|

3)         From a dbisql or interactive SQL session execute a command like;

load TABLE MPY_GLOB_DBF

(

TIMESTAMP    ‘|’,

M_IDENTITY   ‘|’,

M_VTYP       ‘|’,

M_VINT       ‘|’,

M_MLAB0      ‘|’,

M_SLAB0      ‘|’,

M_MLAB1      ‘|’,

M_SLAB1      ‘|’,

M_VDAT       ‘|’,

M_VREF       ‘|’,

M_VVAL       ‘|’,

M__INDEX_    ‘|’,

M__REPLICAT_ ‘\n’

)

FROM ‘/tore/MPY_GLOB_DBF.out’

ESCAPES OFF

QUOTES OFF;


Note that there may be some problems if the original table has timestamp or identity columns, but these can be worked around.