We had a scenario when refreshing a test system from Production, all the production control files got removed due to a human error.
Below are the steps the sequence of steps that cause the issue:
1) Logged into Production system, took control file to trace. The file was copied to a shared drive.
2) Logged into Test system, build the controlfile from the production trace file for the clone instance.
3) The datafiles are copied to the test system from Production Snapshot using storage technology. The next step is to remove the control file from the test system. Switching between production and test putty sessions , the production control files are accidentally removed instead of that of the test system. The script that removes the control file don't check for hostname validation.
4) Database gets hung, alert log reports error that control file is missing.
ORA-00210: cannot open the specified control file
ORA-00202: control file: '/u02/XXXXXX/cntrl01.dbf'
ORA-27041: unable to open file
HPUX-ia64 Error: 2: No such file or directory
Additional information: 3
System Info:
Oracle 11g Enterprise Edition on HP UX Itanium 11.31 - Single Instance with Standby.
Solution:
We know for sure that there were no structural change (tablespace/datafile) since we took trace of the controlfile and all the redologs were intact. Therefore we decided to recreate the control file and recover the database with NORESETLOGS.
1. Edit the backup control file from trace to
CREATE CONTROLFILE REUSE DATABASE "SID" NORESETLOGS ARCHIVELOG..
..
..
2. Shutdown abort the hung database. Shutdown Immediate won't work as it will look for the control file.
3. Startup Nomount the database.
4. Create control file using the script we modified in step 1. Once the control file is created the instance gets mounted.
5. Recover the database. Make sure you do not specify the USING BACKUP CONTROLFILE clause.
Recover Database;
6. Open the database after the recovery. You do not have to use RESETLOGS option.
Alter Database Open;
7. Add the temporary files, standby redo log files, enable block change tracking, enable force logging if needed.
Reference:
http://docs.oracle.com/cd/E11882_01/backup.112/e10642/osadvsce.htm#BRADV90045
No comments:
Post a Comment