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.
Белла, 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.
Visit the new-look IDUG Website , register to gain access to the excellent content.
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
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.
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.