Views

Thursday, September 21, 2017

Oracle Backup and Restore Case Scenarios - Case Study 2

Oracle Backup and Restore Case Scenarios - Case Study 2

Case 2: Restoring Lost Copy of Multiplexed Control File

Steps followed:
1. Shutdown database.
2. Delete one copy of multiplexed control file
3. Try to startup (which will fail)
4. Create new copy of control file from remaining good copy
5. Connect to the target database using sqlplus or rman
6. Startup

Connect to sqlplus and check control files.

[oracle@localhost dbs]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.4.0 Production on Thu Sep 21 23:43:27 2017

Copyright (c) 1982, 2013, Oracle.  All rights reserved.


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> show parameter control_files

NAME                         TYPE   VALUE
------------------------------------ ----------- --------------------------
control_files       string    /u01/app/oracle/oradata/ORADB1/control01.ctl,
                     /u01/app/oracle/fast_recovery_area/ORADB1/control02.ctl

Shutdown database.

SQL> shut immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.

Exit from sqlplus.

SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

Delete one copy of multiplexed control file.

[oracle@localhost dbs]$ rm /u01/app/oracle/fast_recovery_area/ORADB1/control02.ctl

Try to start the database. It will fail with error shown below.

SQL> startup
ORACLE instance started.

Total System Global Area  835104768 bytes
Fixed Size            2257840 bytes
Variable Size             520096848 bytes
Database Buffers    310378496 bytes
Redo Buffers                2371584 bytes
ORA-00205: error in identifying control file, check alert log for more info

Create new copy of control file at same location by copying from good copy.

[oracle@localhost dbs]$ ls /u01/app/oracle/fast_recovery_area/ORADB1/control02.ctl
ls: cannot access /u01/app/oracle/fast_recovery_area/ORADB1/control02.ctl: No such file or directory

[oracle@localhost dbs]$ cp /u01/app/oracle/oradata/ORADB1/control01.ctl /u01/app/oracle/fast_recovery_area/ORADB1/control02.ctl

[oracle@localhost dbs]$ ls /u01/app/oracle/fast_recovery_area/ORADB1/control02.ctl
/u01/app/oracle/fast_recovery_area/ORADB1/control02.ctl

Startup again.

[oracle@localhost dbs]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.4.0 Production on Thu Sep 21 23:48:32 2017

Copyright (c) 1982, 2013, Oracle.  All rights reserved.


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> startup;
ORA-01081: cannot start already-running ORACLE - shut it down first

SQL> shut abort;
ORACLE instance shut down.

SQL> startup;
ORACLE instance started.

Total System Global Area  835104768 bytes
Fixed Size            2257840 bytes
Variable Size             520096848 bytes
Database Buffers    310378496 bytes
Redo Buffers                2371584 bytes
Database mounted.

Database opened.

No comments:

Post a Comment

Leave a Reply...