在 Oracle 9i 環境中,若資料庫因非正常關機(如斷電、強制關機)導致重做日志與控制檔案不一致,啟動時常會拋出 ORA-00600: internal error code, arguments: [kcratr1_lostwrt] 錯誤。這屬於內部錯誤,通常意味著資料塊寫入遺失,需透過媒體恢復來修復。
C:\> sqlplus / as sysdba
SQL*Plus: Release 9.2.0.1.0 - Production
Connected to:
Oracle9i Enterprise Edition Release 9.2.0.1.0 - Production
SQL> startup
ORA-01081: cannot start already-running Oracle - shut it down first
SQL> shutdown abort
Oracle instance shut down.
SQL> startup
ORACLE instance started.
Total System Global Area 135338868 bytes
...
Database mounted.
ORA-00600: internal error code, arguments: [kcratr1_lostwrt], [], [], [], [], [], [], []
SQL> shutdown immediate
ORA-01109: database not open
Database dismounted.
Oracle instance shut down.
SQL> startup mount
ORACLE instance started.
Database mounted.
SQL> recover database;
Media recovery complete.
SQL> alter database open;
Database altered.
kcratr1_lostwrt 表示重做日志記錄的寫入操作在磁碟上遺失,通常發生於非正常關機導致緩衝區未刷新至磁碟。recover database 會應用線上/歸檔重做日志,將資料檔案推進至一致狀態,修復遺失的寫入。
shutdown abort 作為常規關機方式,優先使用 shutdown immediate 或 shutdown transactional。