SYBASE ASA數(shù)據(jù)庫恢復(fù)方法
SYBASE ASA數(shù)據(jù)庫當(dāng)遇到不正常關(guān)機(jī)時(shí),很容易出現(xiàn)異常,如:表或索引出錯(cuò),麻煩的是用drop table t_name刪除表時(shí)數(shù)據(jù)庫就會(huì)DOWN下。下面是我常用的兩種恢復(fù)方法:
一、用備份數(shù)據(jù)庫恢復(fù):
1、用備份數(shù)據(jù)庫啟動(dòng)
2、翻譯出錯(cuò)數(shù)據(jù)庫的日志(可能有多個(gè)文件)
3、按順序執(zhí)行翻譯出的日志文件,read 文件
二、沒有備份數(shù)據(jù)庫
現(xiàn)象:
set rowcount 10
select * from table_name時(shí)數(shù)據(jù)down下
用dbvalid檢查此表時(shí)報(bào)錯(cuò)
檢查處理方法:
1、刪除table_name的發(fā)布、視圖
2、dbunload -c "uid=dba;pwd=sql;dbf=d:\sybdata\dbname.db" -e table_name -an d:\db_new\dbname.db"
3、用新數(shù)據(jù)庫啟動(dòng) 4、重建table_name表(沒有數(shù)據(jù))
本文中就為大家總結(jié)這兩種恢復(fù)方法,如果大家有更多更好的方法,歡迎拿出來與大家一起分享,不要獨(dú)吞哦。




















