差異處

這裏顯示兩個版本的差異處。

連向這個比對檢視

兩邊的前次修訂版前次修改
下次修改
前次修改
sybase:cmd [2010/10/13 02:52] jalsybase:cmd [2010/11/15 05:10] (目前版本) jal
行 1: 行 1:
-====== 指令時間 ======+====== Sybase 指令時間 ======
  
 ===== 指令模式開啟 isql ===== ===== 指令模式開啟 isql =====
行 44: 行 44:
 /* 備份 transaction segment 到檔案去 */ /* 備份 transaction segment 到檔案去 */
 OR OR
-dump tran DBName with truncate_only */ +dump tran DBName with truncate_only 
-/* 清除 log 不備份+/* 清除 log 不備份 */
 OR OR
-dump tran DBName with no_log */ +dump tran DBName with no_log 
-/* 清除 log 不備份+/* 清除 log 不備份 */ 
 +</code> 
 + 
 +===== 還原 database ===== 
 +先確認無任何人連線於該資料庫中,建議先請該使用者離線,不得已時再使用 kill 指令剔除該 User 
 +<code sql> 
 +load database DBName from '/opt/sybase/dump/20101030/DBName_20101030060101.dmp' 
 +</code> 
 + 
 +===== 還原 database transaction ===== 
 +於還原完 database 後,在 database online 前執行,若 online database 即無法執行此指令 
 +<code sql> 
 +load tran DBName from '/opt/sybase/dump/20101030/DBName_trans_20101030060101.dmp' 
 +</code> 
 +還原完所有 transaction log 後再將 database online 
 + 
 +===== 檢視 table 筆數 ===== 
 +直接抓取系統 tabel 裡的紀錄值 
 +<code sql> 
 +select O.name,rowcnt(I.doampg) RecCnt from sysobjects as O,sysindexes as I 
 +where I.id = O.id and I.indid = 1 and O.type = 'U' 
 +order by RecCnt desc
 </code> </code>
  
 \\ \\
 <fbl> <fbl>
sybase/cmd.txt · 上一次變更: 2010/11/15 05:10 由 jal
上一頁 | 下一頁 | 回首頁 | RSS Feed | Facebook