差異處
這裏顯示兩個版本的差異處。
| 兩邊的前次修訂版前次修改 下次修改 | 前次修改 | ||
| sybase:cmd [2010/10/13 02:52] – jal | sybase:cmd [2010/11/15 05:10] (目前版本) – jal | ||
|---|---|---|---|
| 行 1: | 行 1: | ||
| - | ====== 指令時間 ====== | + | ====== |
| ===== 指令模式開啟 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 不備份 |
| + | </ | ||
| + | |||
| + | ===== 還原 database ===== | ||
| + | 先確認無任何人連線於該資料庫中,建議先請該使用者離線,不得已時再使用 kill 指令剔除該 User | ||
| + | <code sql> | ||
| + | load database DBName from '/ | ||
| + | </ | ||
| + | |||
| + | ===== 還原 database transaction ===== | ||
| + | 於還原完 database 後,在 database online 前執行,若 online database 即無法執行此指令 | ||
| + | <code sql> | ||
| + | load tran DBName from '/ | ||
| + | </ | ||
| + | 還原完所有 transaction log 後再將 database online | ||
| + | |||
| + | ===== 檢視 table 筆數 ===== | ||
| + | 直接抓取系統 tabel 裡的紀錄值 | ||
| + | <code sql> | ||
| + | select O.name, | ||
| + | where I.id = O.id and I.indid = 1 and O.type = ' | ||
| + | order by RecCnt desc | ||
| </ | </ | ||
| \\ | \\ | ||
| <fbl> | <fbl> | ||