This discussion is archived
8 Replies Latest reply: Feb 19, 2013 5:55 AM by UweHesse RSS

When do the ORLs get created in Standby DB Creation ?

Tom Newbie
Currently Being Moderated
11.2.0.3/RHEL 5.4

This is how I create my Physical standby (high level steps)

Step1. Take the hot of the primary using
RMAN > BACKUP DATABASE PLUS ARCHIVELOG;
Step2. Create the standby control file in Primary
alter database create standby controlfile as '/some/path/file'
and then restore it in standby side. My question is on restores using RMAN DUPLICATE or normal RMAN restore.

RMAN doesn't backup or restore online redo logs.In normal restore, recover the ORLs are created when you issue
ALTER DATABASE OPEN RESETLOGS; 
Similarly , in physical standby DB creation , at what stage do the Online Redo logs get created (not standby redo logs) for the standby DB ?
  • 1. Re: When do the ORLs get created in Standby DB Creation ?
    CKPT Guru
    Currently Being Moderated
    This is how I create my Physical standby (high level steps)

    Step1. Take the hot of the primary using
    RMAN > BACKUP DATABASE PLUS ARCHIVELOG;
    Step2. Create the standby control file in Primary
    alter database create standby controlfile as '/some/path/file'
    So this procedure is not RMAN duplicate.
    and then restore it in standby side. My question is on restores using RMAN DUPLICATE or normal RMAN restore.

    RMAN doesn't backup or restore online redo logs.In normal restore, recover the ORLs are created when you issue
    ALTER DATABASE OPEN RESETLOGS; 
    Similarly , in physical standby DB creation , at what stage do the Online Redo logs get created (not standby redo logs) for the standby DB ?
    If you perform RMAN duplicate the ORL or SRLs will be created on standby , But ORL's are not used when the role of database is standby
    If in case you perform switchovers, then the role will be changed to primary. Then these ORL's will be used. Until that time ORL files will be idle.

    If you are using real-time apply, then only SRLs will be used.
  • 2. Re: When do the ORLs get created in Standby DB Creation ?
    Shivananda Rao Guru
    Currently Being Moderated
    Hello,
    Similarly , in physical standby DB creation , at what stage do the Online Redo logs get created (not standby redo logs) for the standby DB ?
    Online redo logs would be created based on the information available in the controlfile when you open the database with resetlogs. But, since this is not possible for the standby database, you may have to copy the ORL from the primary database.

    Hope this helps you out http://thetendjee.wordpress.com/2007/10/16/manually-create-a-standby-database/

    As mentioned earlier, ORLs on standby would not be used on the standby until you perform switchover.


    Regards,
    Shivananda
  • 3. Re: When do the ORLs get created in Standby DB Creation ?
    Tom Newbie
    Currently Being Moderated
    Thanks for that info CKPT.
    My question was on what stage is the ORLs created if I am using RMAN Duplicate or not ?
  • 4. Re: When do the ORLs get created in Standby DB Creation ?
    Tom Newbie
    Currently Being Moderated
    Thank you shivananda.

    One more question .
    Lets say during the initial setup I copy the ORLs from primary to standby as mentioned in the link. After few months , When the switchover happens and Standby assumes the role of Primary, these ORLs will be useless . Right ? Will oracle cleanup these ORLs so that the new Primary DB (ex standby) can start using it ?
  • 5. Re: When do the ORLs get created in Standby DB Creation ?
    Shivananda Rao Guru
    Currently Being Moderated
    When the switchover happens and Standby assumes the role of Primary, these ORLs will be useless . Right ?
    ORLs are used only when the database is running in Primary role. SRLs would be used only when the database is running in Standby role. So, when you do a switchover, your current standby database will start operating in Primary role which requires the ORLs. So ORLs are required when your database is running in primary mode.

    Hope it is clear.


    Regards,
    Shivananda
  • 6. Re: When do the ORLs get created in Standby DB Creation ?
    Tom Newbie
    Currently Being Moderated
    Thanks Shivananda. But that is not quite what I asked. Let me rephrase my question

    Lets say on March 2012 I created the Physical Standby DB and ORLs from the primary were copied to the standby during the initial setup.
    These ORLs in standby remains idle. On November 2012, I want to do a switchover. But the redo entries in these ORLs in the standby are from March 2012. What should I do to cleanup these ORLs so that the new Primary DB (ex standby) can start using it ?
  • 7. Re: When do the ORLs get created in Standby DB Creation ?
    CKPT Guru
    Currently Being Moderated
    Tom wrote:
    Thanks Shivananda. But that is not quite what I asked. Let me rephrase my question

    Lets say on March 2012 I created the Physical Standby DB and ORLs from the primary were copied to the standby during the initial setup.
    These ORLs in standby remains idle. On November 2012, I want to do a switchover. But the redo entries in these ORLs in the standby are from March 2012. What should I do to cleanup these ORLs so that the new Primary DB (ex standby) can start using it ?
    There will be no information in the ORLs on standby database, Once the role is changed then only they will be active. You no need to cleanup anything either and no need to worry. :)
  • 8. Re: When do the ORLs get created in Standby DB Creation ?
    UweHesse Expert
    Currently Being Moderated
    When you create your Standby Database with the RMAN command duplicate target database for standby as recommended, Online Redo Logs are created automatically.
    There is no need to copy them from the Primary.

    Standby Logs are created on the Standby by RMAN too, if you create them on the Primary first. You'll need them on the Primary anyways to support subsequent switchovers.

    Kind regards
    Uwe Hesse

    "Don't believe it, test it!"
    http://uhesse.com

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points