If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > new log chain during hadr takeover

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 08-18-11, 17:31
db2girl db2girl is offline
∞∞∞∞∞∞
 
Join Date: Aug 2008
Location: Toronto, Canada
Posts: 1,816
new log chain during hadr takeover

Does/should db2 always create a new log chain during hadr takeover?
Reply With Quote
  #2 (permalink)  
Old 08-19-11, 08:09
skchandra skchandra is offline
Registered User
 
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
Reply With Quote
  #3 (permalink)  
Old 08-19-11, 08:13
sathyaram_s sathyaram_s is offline
Super Moderator
 
Join Date: Aug 2001
Location: UK
Posts: 4,534
Белла, 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.
Reply With Quote
  #4 (permalink)  
Old 08-19-11, 12:02
db2girl db2girl is offline
∞∞∞∞∞∞
 
Join Date: Aug 2008
Location: Toronto, Canada
Posts: 1,816
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
Reply With Quote
  #5 (permalink)  
Old 08-19-11, 12:36
sathyaram_s sathyaram_s is offline
Super Moderator
 
Join Date: Aug 2001
Location: UK
Posts: 4,534
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 12:41.
Reply With Quote
  #6 (permalink)  
Old 08-20-11, 12:47
skchandra skchandra is offline
Registered User
 
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 */
Reply With Quote
  #7 (permalink)  
Old 08-25-11, 21:41
db2girl db2girl is offline
∞∞∞∞∞∞
 
Join Date: Aug 2008
Location: Toronto, Canada
Posts: 1,816
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.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On