Skip to content
Home » Oracle Database » Building a Physical Standby Database (09/14) - Copy standby controlfile into standby database

Building a Physical Standby Database (09/14) - Copy standby controlfile into standby database

Building a Physical Standby Database (08/14) - Copy data files into standby database
Copying a standby controlfile into the standby database is the same as copying individual data files into a standby database. So here we introduce only RMAN operations.
  1. Copy the standby controlfile from the primary server to either node of the standby RAC.
  2. [oracle@primary01 ~]$ scp /tmp/standby.ctl standby01:/tmp/standby.ctl
  3. Startup the standby database to nomount state.
  4. [oracle@standby01 ~]$ srvctl stop database -d comp
    [oracle@standby01 ~]$ srvctl start database -d comp -o nomount

  5. Restore controlfile
    1. Restore the standby control file prepared by yourself.
    2. [oracle@standby01 ~]$ rman target /
      ...
      RMAN> restore controlfile from '/tmp/standby.ctl';

      Starting restore at 09-NOV-12
      using target database control file instead of recovery catalog
      allocated channel: ORA_DISK_1
      channel ORA_DISK_1: SID=33 instance=standb1 device type=DISK

      channel ORA_DISK_1: copied control file copy
      output file name=+DATA/compdb/controlfile/current.260.761849575
      Finished restore at 09-NOV-12

      In 10g database, you must indicate the destination in "to" clause like this:
      RMAN> restore controlfile to '/u01/app/oracle/oradata/standb/control01.ctl' from '/tmp/standby.ctl';
      RMAN> restore controlfile to '/u01/app/oracle/oradata/standb/control02.ctl' from '/tmp/standby.ctl';
      RMAN> restore controlfile to '/u01/app/oracle/oradata/standb/control03.ctl' from '/tmp/standby.ctl';

    3. Restore the standby controlfile prepared by RMAN.
    4. As we mentioned in the step (08/14), in general case during duplication, RMAN will duplicate the controlfile into database, but sometimes won't, in such case, you must restore the controlfile by yourself. Just restore the controlfile that prepared by RMAN.
      RMAN>  restore controlfile from '/u01/app/oracle/product/11.2.0/db_1/dbs/cntrlstandb1.dbf';

      Starting restore at 09-NOV-12
      using target database control file instead of recovery catalog
      allocated channel: ORA_DISK_1
      channel ORA_DISK_1: SID=32 instance=standb1 device type=DISK

      channel ORA_DISK_1: copied control file copy
      output file name=+DATA/compdb/controlfile/current.260.761849575
      Finished restore at 09-NOV-12

Building a Physical Standby Database (10/14) - Create standby redo logs on standby database

Leave a Reply

Your email address will not be published. Required fields are marked *