3 # Create table t1 in Target DB with 3 fields say (f1 int, f2 smallint, f3 int).
4 # Create composite index on f1 and f3 field.
5 # Set CACHE_TABLE=true in csql.conf
7 # She Catalog tool displays the composite key index informations or not
9 CSQL_CONF
=${PWD}/cache
/CacheTable
/csql.conf
11 if [ -s "$CSQL_CONF" ]
13 REL_PATH
=${PWD}/cache
/CacheTable
17 cp $REL_PATH/csql.conf
/tmp
18 export CSQL_CONFIG_FILE
=/tmp
/csql.conf
20 echo DSN
=$DSN >>$CSQL_CONFIG_FILE
21 DS
="$DSN $DBUSER $PASSWORD"
22 rm -f /tmp
/csql
/csqlds.conf
23 touch /tmp
/csql
/csqlds.conf
24 $CSQL_INSTALL_ROOT/bin
/csqlds
-U $DBUSER -P $PASSWORD -D $DSN -N $TDB -a
32 mkdir
-p /tmp
/CSQL
/log
33 mkdir
-p /tmp
/CSQL
/log
/csql
36 cp /tmp
/csql.conf
/tmp
/CSQL
/
37 echo SYS_DB_KEY
=2288 >>/tmp
/CSQL
/csql.conf
38 echo USER_DB_KEY
=3377 >>/tmp
/CSQL
/csql.conf
39 echo LOG_FILE
=/tmp
/CSQL
/log
/csql
/log.out
>>/tmp
/CSQL
/csql.conf
40 echo DATABASE_FILE
=/tmp
/CSQL
/db
>>/tmp
/CSQL
/csql.conf
41 echo CACHE_TABLE
=true
>>/tmp
/CSQL
/csql.conf
42 echo SITE_ID
=1 >>/tmp
/CSQL
/csql.conf
43 echo TABLE_CONFIG_FILE
=/tmp
/CSQL
/csqltable.conf
>>/tmp
/CSQL
/csql.conf
45 echo CREATING TABLE t1 and INSERTING
1 RECORDS IN TARGET DB
46 echo "CREATE TABLE t1(f1 int, f2 smallint, f3 int);" >${REL_PATH}/t1create_compo.sql
47 echo "CREATE INDEX idx1 on t1(f1,f3)" >>${REL_PATH}/t1create_compo.sql
49 isql
$DS < ${REL_PATH}/t1create_compo.sql
52 rm -f ${REL_PATH}/t1create_compo.sql
53 isql
$DS < ${REL_PATH}/drop_t1.sql
57 # Setup Environment For CSQL
58 export CSQL_CONFIG_FILE
=/tmp
/CSQL
/csql.conf
59 rm -f /tmp
/CSQL
/csqltable.conf
60 touch /tmp
/CSQL
/csqltable.conf
62 # RUN CSQL SERVER at CSQL
63 $CSQL_INSTALL_ROOT/bin
/csqlserver
>/dev
/null
2>&1 &
67 $CSQL_INSTALL_ROOT/bin
/cachetable
-t t1
70 rm -f ${REL_PATH}/t1create_compo.sql
71 isql
$DS < ${REL_PATH}/drop_t1.sql
76 $CSQL_INSTALL_ROOT/bin
/catalog
-l
79 $CSQL_INSTALL_ROOT/bin
/cachetable
-t t1
-u
80 rm -f ${REL_PATH}/t1create_compo.sql
81 isql
$DS < ${REL_PATH}/drop_t1.sql
86 $CSQL_INSTALL_ROOT/bin
/cachetable
-t t1
-u
89 rm -f ${REL_PATH}/t1create_compo.sql
90 isql
$DS < ${REL_PATH}/drop_t1.sql
95 isql
$DS < ${REL_PATH}/drop_t1.sql
105 ipcrm
-M 2288 -M 3377