Results 1 to 7 of 7
  1. #1
    Join Date
    Aug 2008
    Location
    Toronto, Canada
    Posts
    2,367

    Unanswered: new log chain during hadr takeover

    Does/should db2 always create a new log chain during hadr takeover?

  2. #2
    Join Date
    Nov 2010
    Posts
    14
    Behind the scenes HADR takeover is a combination of log truncation at the current primary and rollforward at the current standby database. The case of rollforward to end of logs, due to undo phase of in-flight transactions DB2 creates a new log chain.

    Thanks,
    SK Chandra

  3. #3
    Join Date
    Aug 2001
    Location
    UK
    Posts
    4,650
    Белла, Though I have seen multiple log chains after few HADR takeovers, I haven't taken interest in checking log chains for each TAKEOVER type , so unable to give a definitive answer.

    TAKEOVER BY FORCE should most certainly create a new log chain. The standby at the point of TAKEOVER BY FORCE is not guranteed to have all log records from Primary, which is similar to a PIT recovery, thereby needing a new log chain.

    A normal TAKEOVER, ideally should not require a new log chain as the Primary and Standby are guranteed to be in sync. But don't know how works is reality.

    HTH
    Visit the new-look IDUG Website , register to gain access to the excellent content.

  4. #4
    Join Date
    Aug 2008
    Location
    Toronto, Canada
    Posts
    2,367
    Without HADR, a new log chain is created by a database rollforward to PIT, or a database restore without rolling forward.
    Rollforward to end of log should not create a new log chain.

    With HADR, I'm not really sure what's supposed to happen. It seems like a new chain is created after every takeover (forced or non-forced).



    Another question I havee:
    Based on your experience, is it better for primary and standby to use the same location for archived logs (unique NFS mount point) or not?
    I'm aware that log archival only happens on primary

  5. #5
    Join Date
    Aug 2001
    Location
    UK
    Posts
    4,650
    I recommend a shared location. Makes it easier to manage(backup and delete files)
    Also helps local catchup---bypasses asking primary for log files.
    Even if it tries to do a remote catchup, you can stop hadr, do a rollforward to end of logs and start hadr as standby.
    Last edited by sathyaram_s; 08-19-11 at 13:41.

  6. #6
    Join Date
    Nov 2010
    Posts
    14
    HADR standby database is a database is in "rollforward pending" status. The standby database is in sync with the primary database by rolling forward continuously thru logs.

    As Sathyaram mentioned, forced takeover does not guarantee having all log files from primary (log gap occurs). Similarly during non-forced takeover, primary database does log truncation (hence there might be a log gap) and then ships log to the standby database.

    HADR Takeover (forced or non-forced) operation makes the standby database rolls forward to end of logs and stops. Hence, there is a new log chain.
    /* SK Chandra */

  7. #7
    Join Date
    Aug 2008
    Location
    Toronto, Canada
    Posts
    2,367
    Quote Originally Posted by db2girl View Post
    a new chain is created after every takeover (forced or non-forced).
    This is expected in the current releases.

Posting Permissions

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