Sybase IQ 基本语法
Sybase IQ 基本语法
?
dbisql?
??
dbisql -c "uid=DBA;pwd=SQL" -host 10.42.75.236 -port 2648 -nogui "select top 1 * from waprpt.time_date_dim"
?
?
?
开启默认的iq demo数据库:
?
cd /home/sybiq/ASIQ-12_7/demo
start_asiq @asiqdemo.cfg asiqdemo.db
?
关闭脚本:
stop_asiq -stop all
?
?
cfg文件:
sybiq@wapatca3wap6:~/ASIQ-12_7/demo> more asiqdemo.cfg # asiqdemo.cfg# ------------------------# Default startup parameters for the ASIQ demo database# -------------------------n wapatca3wap6_asiqdemo --服务名-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 --目录存储高速缓存大小-cl 50m-ch 128m-gc 20 --检查点时间间隔-gd all --允许所有用户通过连接启动数据库-gl all --允许所有用户装载或卸载表-gm 10 --缺省连接数-gp 4096 --目录存储页大小-ti 4400 --客户端超时设置为 72 小时。防止进行长查询操作的用户在周末长假中被注销。-iqmc 600 -iqtc 900-zr none-zo /home/aa.log --指定日志路径
?
?
创建新数据库
首先登录IQ客户端
?
CREATE DATABASE '/home/sybiq/data/test/test.db'TRANSACTION LOG ON '/home/sybiq/data/test/test.log'CASE RESPECTCOLLATION 'ISO_BINENG'BLANK PADDING ONJAVA ONJCONNECT ONIQ PATH '/home/sybiq/data/test/test_maindev1'IQ PAGE SIZE 131072MESSAGE PATH '/home/sybiq/data/test/test.iqmsg'TEMPORARY PATH '/home/sybiq/data/test/test_tempdev1';
?
?