記一次redo和undo的損壞問題

2021-12-30 09:50:25 字數 1181 閱讀 5570

今天資料庫啟動時遇到這個錯誤:

ora-00283: 恢復會話因錯誤而取消

ora-00368: 重做日誌塊中的校驗和錯誤

ora-00353: 日誌損壞接近塊 138240 更改 925634142 時間 12/16/2013 11:39:30

ora-00334: 歸檔日誌: 'd:\oracle\oradata\onlinelog\redo01.log'

原來是redo檔案損壞了,由於是測試資料,沒有歸檔也沒有備份, 資料不太重要

解決如下:

1.設定初始化引數 _allow_resetlogs_corruption = true

注意如果使用的是spfile,需要修改spfile

2.startup mount

recover database using backup controlfile until cancel;

執行恢復後敲cancel

3.alter database open resetlogs;

開啟資料庫

4.如果能正常開啟資料庫就ok了。

可能打不開,那麼嘗試shutdown immediate以後,再startup

5.修改引數檔案去掉_allow_resetlogs_corruption引數

本以為ok了,但是開發那邊一試,說又連不上了

我一看確實,資料庫可以起來但是隨便執行乙個查詢就又掛了,這是咋回事?

看alert日誌發現:

ora-00600: internal error code, arguments: [4194], [62], [53], , , , ,

網上一搜說這種錯誤表示undo表空間有問題

所以重建undo:

create undo tablespace undotbs2 datafile 'd:\oracle\product\10.2.0\oradata\hyd\undotbs02.dbf' size 625m;

alter system set undo_tablespace = undotbs2

drop tablespace "undotbs1" including contents and datafiles

show parameter undo

ok!怪不得資料可以起來,但是一執行操作就掛。

這是redo 和 undo 一起壞了,很慶幸資料檔案是完好的。

記一次redo和undo的損壞問題

今天資料庫啟動時遇到這個錯誤 ora 00283 恢復會話因錯誤而取消 ora 00368 重做日誌塊中的校驗和錯誤 ora 00353 日誌損壞接近塊 138240 更改 925634142 時間 12 16 2013 11 39 30 ora 00334 歸檔日誌 d oracle oradat...

redo和undo的區別

redo undo datafile insert一條記錄時,表跟undo的資訊都會放進 redo 中,在commit 或之前,redo 的資訊會放進硬碟上.故障時,redo 便可恢復那些已經commit 了的資料.redo 每次操作都先記錄到redo日誌中,當出現例項故障 像斷電 導致資料未能更新...

redo和undo的區別

redo undo datafile insert一條記錄時,表跟undo的資訊都會放進 redo 中,在commit 或之前,redo 的資訊會放進硬碟上.故障時,redo 便可恢復那些已經commit 了的資料.redo 每次操作都先記錄到redo日誌中,當出現例項故障 像斷電 導致資料未能更新...