資料庫恢復

2021-08-31 01:56:56 字數 1144 閱讀 1089

如果有備份,直接從備份恢復即可。

否則,借助第三方工具log explorer

log explorer

解壓縮密碼 www.heibai.net

序號產生器產生的是註冊碼,是兩個

用解壓縮密碼解開後,壓縮包裡也有乙個序號產生器的

開啟log explorer file=>attach log file->選擇伺服器和登陸方式->connect->

選擇資料庫->attach->左面對話方塊中browse->view log->就可以看到log記錄了

想恢復的話: 右鍵log記錄 undo transation->選擇儲存檔名和路徑->然後開啟該檔案到查詢分析器裡執行

t-sql**就可以了

例如 如果log是delete table where ...的話,生成的檔案**就是insert table ....

log explorer使用的幾個問題

1)對資料庫做了完全 差異 和日誌備份

備份時選用了刪除事務日誌中不活動的條目

再用log explorer打試圖看日誌時

提示no log recorders found that match the filter,would you like to view unfiltered data

選擇yes 就看不到剛才的記錄了

如果不選用了刪除事務日誌中不活動的條目

再用log explorer打試圖看日誌時,就能看到原來的日誌

2)修改了其中乙個表中的部分資料,此時用log explorer看日誌,可以作日誌恢復

3)然後恢復備份,(注意:恢復是斷開log explorer與資料庫的連線,或連線到其他資料上,

否則會出現資料庫正在使用無法恢復)

恢復完後,再開啟log explorer 提示no log recorders found that match the filter,would you like to view unfiltered data

選擇yes 就看不到剛才在2中修改的日誌記錄,所以無法做恢復.

3)不要用sql的備份功能備份,搞不好你的日誌就破壞了.

正確的備份方法是:

停止sql服務,複製資料檔案及日誌檔案進行檔案備份.

然後啟動sql服務,用log explorer恢復資料

出處:

資料庫恢復

3.中斷的事務 3.2 undo redo日誌恢復 4.檢查點技術 查詢和更新資料庫時,由於某些問題 故障 發生可能會導致資料庫被破壞或影響資料庫中資料的一致性。資料庫恢復技術將資料庫從錯誤狀態恢復到某個一致狀態,它是資料庫可靠性的保證。事務故障 內部原因 介質故障 物理原因 系統故障 其他原因 存...

資料庫恢復

若選用prod1為catalog目錄庫 sqlplus sys oracle prod1 as sysdba create user catalog identified by oracle grant connect,recovery catalog owner to catalog alter ...

資料庫恢復

1.正在用的current中redo段日誌被刪除,只能啟動到mount狀態,如何啟庫 首先啟動到mount階段 sql select member from v logfile sql alter database clear unarchived logfile group 1 sql alter...