2016年4月13日 星期三

[ORACLE][RMAN] ControlFile毀損情境三之利用沒問題Control file置換有問題的Control file

情境:
Control File至少還有一個是好的,其他都有問題

環境準備:
1. 確認Control file位置
SQL> select value from v$parameter where name like 'control_files%';

VALUE
--------------------------------------------------------------------------------
control_files
/u01/app/oracle/oradata/orclnofra/control01.ctl, /u01/app/oracle/oradata/orclnof
ra/control02.ctl

2. 刪除一個Control file
[oracle@nofra orclnofra]$ rm control01.ctl

完整執行過程:
1. 啟動資料庫
SQL> startup;
ORACLE instance started.

Total System Global Area 3340451840 bytes
Fixed Size      2257840 bytes
Variable Size   1879051344 bytes
Database Buffers  1442840576 bytes
Redo Buffers     16302080 bytes
ORA-00205: error in identifying control file, check alert log for more info

2. 查看ALERT LOG確認哪個Control File有問題
LOG路徑:/u01/app/oracle/diag/rdbms/orclnofra/orclnofra/trace
部分錯誤訊息如下
starting up 1 dispatcher(s) for network address '(ADDRESS=(PARTIAL=YES)(PROTOCOL
=TCP))'...
starting up 1 shared server(s) ...
ORACLE_BASE from environment = /u01/app/oracle
Wed Apr 13 10:21:50 2016
ALTER DATABASE   MOUNT
ORA-00210: cannot open the specified control file
ORA-00202: control file: '/u01/app/oracle/oradata/orclnofra/control01.ctl'
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
ORA-205 signalled during: ALTER DATABASE   MOUNT...

3. 把有問題的Control file用好的置換掉
[oracle@nofra orclnofra]$ cp control02.ctl control01.ctl

4. 將資料庫開在mount
SQL> alter database mount;

Database altered.

5.  將資料庫開在OPEN
SQL> alter database open;

Database altered.

沒有留言:

張貼留言