Thursday 10 October 2013

Re create control file for standby database

To create a control file, you have to do the following on the Primary server...

SQL> startup mount;
SQL> alter database create standby controlfile as ‘<file-name>’;
SQL> alter database open;

Then you have to copy the file you created to the Standby server in the corresponding directory (control_files parameter in the init.ora file) with the database in shutdown mode. Start it up and it will be Standby again.


Hope that helps!


make as many copy of this control file as much you have define in pfile or spfile ;


Second method 

sql>startup nomount;

take backup of control file by rman, copy this to standby server.
  1. RMAN> restore standby controlfile from '/tmp/control01.ctl';  
  2.   
  3. Starting restore at 08-JUN-10  
  4. using target database control file instead of recovery catalog  
  5. allocated channel: ORA_DISK_1  
  6. channel ORA_DISK_1: sid=1082 instance=biodb1 devtype=DISK  
  7.   
  8. channel ORA_DISK_1: copied control file copy  
  9. output filename=+DATADG/control01.ctl  
  10. output filename=+FRADG/control02.ctl  
  11. output filename=+DATADG/control03.ctl  
  12. Finished restore at 08-JUN-10  
  13.   
  14. RMAN> exit  
  1. SQL> alter database mount standby database;  
  2.   
  3. Database altered.  

No comments:

Post a Comment