Shudown db w/Dataguard when will log get appplied
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 9 of 9

Thread: Shudown db w/Dataguard when will log get appplied

  1. #1
    Join Date
    Aug 2002
    Location
    Atlanta
    Posts
    1,187

    Shudown db w/Dataguard when will log get appplied

    We are running RAC ot single instance standby (9i data guard on windooze)

    If I shutdown primary I assume new arc logs will be produced if necessary so that after the shutdown I have all the logs necessary for complete recovery. When will those logs get shipped/applied to the standby, on shutdown?

    Will the standby be completly up-to date after the shutdown or shortly thereafter (accounting for time it takes to copy log to remote dest)

    Thanks

    Steve
    I'm stmontgo and I approve of this message

  2. #2
    Join Date
    Oct 2002
    Posts
    807
    If you have standby redologs configured with the LGWR as your transport process, all the changes are already there (on the standby). If you don't have SRLs, and use ARCH process - you never receive changes in the primary's online redo logs (until the logswitch). It all boils down to your protection modes - maximum availability or maximum performance.

    If I shutdown primary I assume new arc logs will be produced if necessary so that after the shutdown I have all the logs necessary for complete recovery.
    AFAIk, no such thing happens.

  3. #3
    Join Date
    Aug 2002
    Location
    Atlanta
    Posts
    1,187
    yeah except during testing, i am going to shutdown primary, backup up standby and then failover standby. Afterwards restoring the standby backup
    I'm stmontgo and I approve of this message

  4. #4
    Join Date
    Oct 2002
    Posts
    807
    Originally posted by stmontgo
    yeah except during testing, i am going to shutdown primary, backup up standby and then failover standby. Afterwards restoring the standby backup
    Huh? I'm not sure I understand. What does this have to do with your initial question?

    I assume your initial question has been addressed. If not, what is the question now?

  5. #5
    Join Date
    Aug 2002
    Location
    Atlanta
    Posts
    1,187
    For disaster recovery testing I will

    1.Shutdown the primary
    2.Shutdown standby and take a backup of standby
    3.Put standby back in managed recovery mode and initiate procedures
    to open it through a failover process
    4. Do testing
    5. After testing restore backup from step 2

    So, when I shut down the primary can I be assured all logs will be sent to standby and applied? (No standby log files) Or do I have to go and grab the log files from the primary, take the standby out of managed recovery mode, manually apply the logs from the primary and then proceed with step 2
    I'm stmontgo and I approve of this message

  6. #6
    Join Date
    Oct 2002
    Posts
    807
    So, when I shut down the primary can I be assured all logs will be sent to standby and applied? (No standby log files) Or do I have to go and grab the log files from the primary, take the standby out of managed recovery mode, manually apply the logs from the primary and then proceed with step 2
    If you don't have SRLs, stuff from your primary's online redologs will not get applied to the standby. You can choose to manually copy the redologs from the primary (after it was shutdown), and manually apply it to the standby. But why would you do that? It doesn't make sense to me.

    1. If you don't use SRLs, your SLA pretty much states (implicitly) you don't care about the transactions in the online redologs.
    2. After testing, once you perform step 5 - and put the standby in a managed recovery mode, it will continue from where it left off. Ofcourse, if there were any logswitches that occurred on the primary in step 3, you'd have to manually copy / apply them.

    IMO, copying / applying online redo logs from primary to your standby in this case, doesn't really serve a purpose.

  7. #7
    Join Date
    Aug 2002
    Location
    Atlanta
    Posts
    1,187
    ok, configing a test env, i'll let you know what happens, thanks for the feedback.

    In the end I just want to make sure If I have archive log X
    on the primary as being the highest log after the shutdown I want that log applied to the standby be it through managed recovery or manuall application

    tks

    steve
    I'm stmontgo and I approve of this message

  8. #8
    Join Date
    Oct 2002
    Posts
    807
    The act of shutting down a database (the primary in this case) by itself does not cause a log switch or generate any additional archivelogs.

    In the end I just want to make sure If I have archive log X on the primary as being the highest log after the shutdown I want that log applied to the standby be it through managed recovery or manuall application
    If you have X on primary *before* shutdown, and it was transferred successfully to standby previously, you are obviously set. You are fine that is.

    If X was say 100M big, and was generated just before the shutdown primary was issued, and was thus incompletely transferred to the standby - no worries again. GAP recovery will take over once you bring up the standby again later.

  9. #9
    Join Date
    Aug 2002
    Location
    Atlanta
    Posts
    1,187
    Originally posted by Axr2
    The act of shutting down a database (the primary in this case) by itself does not cause a log switch or generate any additional archivelogs.
    I was hoping for this but alas reality set in ;-)

    So what I'll do for the test is

    shutdown immediate
    startup restrict
    alter system archive log current on both nodes
    wait for the logs to be sent to the standby
    shutdown immediate
    process with the test

    thanks for the feedback!
    I'm stmontgo and I approve of this message

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width