3 # create table t1 and t2in target DB with 10 records.
4 # Recover the two tables from target db with -R option.
5 # The contains in the csqltable.conf file will be like this :
7 # 2:t2 t2f1<15 t2f1,t2f3,t2f5
9 #AUTHOR : Jitendra Lenka
10 input
=${PWD}/cache
/CacheTable
/
14 REL_PATH
=${PWD}/cache
/CacheTable
17 cp $CSQL_CONFIG_FILE /tmp
18 export CSQL_CONFIG_FILE
=/tmp
/csql.conf
20 # create table t1,t2 in target DB.
21 echo CACHE_TABLE
=true
>>$CSQL_CONFIG_FILE
22 echo DSN
=$DSN >>$CSQL_CONFIG_FILE
23 DS
="$DSN $DBUSER $PASSWORD"
24 rm -f /tmp
/csql
/csqlds.conf
25 touch /tmp
/csql
/csqlds.conf
26 $CSQL_INSTALL_ROOT/bin
/csqlds
-U $DBUSER -P $PASSWORD -D $DSN -N $TDB -a
32 isql
$DS < ${REL_PATH}/fmodecreate.sql
>/dev
/null
2>&1
38 echo Table t1 and t2 created
in target DB.
40 rm -f /tmp
/csql
/csqltable.conf
41 touch /tmp
/csql
/csqltable.conf
43 echo "1 t1 NULL NULL NULL $DSN" >/tmp
/csql
/csqltable.conf
44 echo "2 t2 NULL t2f1<15 t2f1,t2f3,t2f5 $DSN" >>/tmp
/csql
/csqltable.conf
46 # caching with -R option
47 $CSQL_INSTALL_ROOT/bin
/cachetable
-R
52 $CSQL_INSTALL_ROOT/bin
/csql
-s $REL_PATH/selectstar.sql
55 $CSQL_INSTALL_ROOT/bin
/csql
-s ${REL_PATH}/dropt1t2.sql
> /dev
/null
2>&1
56 isql
$DS < ${REL_PATH}/dropt1t2.sql
>/dev
/null
2>&1
57 rm -f /tmp
/csql
/csqltable.conf
58 touch /tmp
/csql
/csqltable.conf
62 rm -f /tmp
/csql
/csqltable.conf
63 touch /tmp
/csql
/csqltable.conf
64 $CSQL_INSTALL_ROOT/bin
/csql
-s ${REL_PATH}/dropt1t2.sql
> /dev
/null
2>&1
65 isql
$DS < ${REL_PATH}/dropt1t2.sql
>/dev
/null
2>&1