可以看到,刪除了一個控制文件之後,數據庫照常運行,甚至在發現一個控制文件丟失之後,數據庫實例仍然處於打開狀態,檢查一下alert文件:
Thread 1 advanced to log sequence 21 (LGWR switch)
Current log# 3 seq# 21 mem# 0: /u01/Oracle/oradata/db01/redo03.log
Sun May 24 13:00:58 2009
Errors in file /u01/Oracle/diag/rdbms/db01/db01/trace/db01_m002_27935.trc:
ORA-00210: cannot open the specifIEd control file
ORA-00202: control file: '/u01/Oracle/oradata/db01/control02.ctl'
ORA-27041: unable to open file
Linux Error: 2: No such file or directory
Additional information: 3
Sun May 24 13:24:09 2009
Errors in file /u01/Oracle/diag/rdbms/db01/db01/trace/db01_m000_27986.trc:
ORA-00210: cannot open the specifIEd control file
ORA-00202: control file: '/u01/Oracle/oradata/db01/control02.ctl'
ORA-27041: unable to open file
Linux Error: 2: No such file or directory
Additional information: 3
Sun May 24 14:01:49 2009
Errors in file /u01/Oracle/diag/rdbms/db01/db01/trace/db01_m002_28082.trc:
ORA-00210: cannot open the specifIEd control file
ORA-00202: control file: '/u01/Oracle/oradata/db01/control02.ctl'
ORA-27041: unable to open file
Linux Error: 2: No such file or directory
Additional information: 3
Sun May 24 14:24:59 2009
Errors in file /u01/Oracle/diag/rdbms/db01/db01/trace/db01_m000_28132.trc:
ORA-00210: cannot open the specifIEd control file
ORA-00202: control file: '/u01/Oracle/oradata/db01/control02.ctl'
ORA-27041: unable to open file
Linux Error: 2: No such file or directory
Additional information: 3
Sun May 24 14:59:29 2009
Errors in file /u01/Oracle/diag/rdbms/db01/db01/trace/db01_m000_28204.trc:
ORA-00210: cannot open the specifIEd control file
ORA-00202: control file: '/u01/Oracle/oradata/db01/control02.ctl'
ORA-27041: unable to open file
Linux Error: 2: No such file or directory
Additional information: 3
雖然Oracle認識到一個控制文件出現了異常,但是Oracle並沒有關閉當前實例。測試發現,即使刪除了所有當前的控制文件,當前實例依然處於打開的狀態,並且只有需要訪問控制文件的操作會報錯,其他操作仍然可以運行。
Oracle既然不會自動關閉,那麼萬一出現了控制文件誤刪除的情況,一定不要手工關閉當前的實例,只要實例不關閉,就可以輕松的查詢數據庫中的數據文件、日志文件等信息來重建控制文件,而一旦關閉了實例,由於缺失控制文件,實例將無法啟動,這時候要找到所有控制文件中包含的信息就比較困難了。