?? informix筆記.txt.bak
字號:
1 當load大的文本文件時候,會出現以下錯誤:
----------------------------------
458: Long transaction aborted.
847: Error in load file line 146342.
Error in line 1
Near character position 60
---------------------------長事務
解決辦法;
剛才是日志空間不夠了,我現在讓數據庫不記日志了。
ontape -N gjj //關閉日志
這個命令要在沒有用戶用數據庫的時候用,就是onstat -g sql時看不到任何session
去掉日志:
ontape -s -N gjj
加日志
ontape -s -U gjj
不能加在shell中,因為不能有人用數據庫.
2
dbaccess gjj <<!
drop table t1;
//在這個位置如何引用外部建表文件,比如t1.sql ??
load from t1.txt insert into t1;
!
--------->
答:不能這么用,應該這樣寫
test.sh
============================================
dbaccess gjj <<!
drop table t1;
!
dbaccess gjj t1.sql
dbaccess gjj <<!
load from t1.txt insert into t1;
!
============================================
3 dbschema -d gjj -t $tabname t_$tabname.sql
-d 數據庫名
-t 表名 "all" for all tables
4 onstat -g sql的使用方法,顯示當前庫使用情況
比如:
===================================================
Sess SQL Current Iso Lock SQL ISAM F.E.
Id Stmt type Database Lvl Mode ERR ERR Vers
115 SELECT gjj NL Not Wait 0 0 9.03
107 SELECT gjj NL Not Wait 0 0 9.03
=====================================================
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -