IBM Support

Load operations in HADR

Question & Answer


Question

As LOAD does not log the data into transaction logs, how can I run load and make the data sync correctly on standby in HADR?

Answer

Load has the following 3  options and it behaves differently. The table below shows the difference of the load options in a database with archive logging.
Load operation
load copy image generated tablespace state after load Comments
with copy no option no backup pending Need bakcup tablespace
with copy yes option yes normal Make sure load copy image is still available during rollforward, otherwise the tablespace will be restore pending
nonrecoverable yes normal After rollforward, the table cannot be accessed(SQL1477N)
In HADR, the table below  shows the result of replay of the load operation with different options.
Load operation on primary replay on standby
with copy yes option standby needs to be able to access this load copy image, otherwise the tablespace will be restore pending
with copy no option the table cannot be accessed(SQL1477N)
nonrecoverable the table cannot be accessed(SQL1477N)
From the table above, we know we should use copy yes option for load operation in HADR.
HADR replicates load with certain restrictions. Because load data is not embedded in the log stream, the standby can only get the data from a load copy. Thus load is replicated only if there is a load copy. The copy must be available to the standby when it replays the load. The standby may attempt to access the copy any time after the primary completes the load.
It is recommended that a shared copy device such as NFS is used. If you transfer the copy by means like physically transferring a tape, it is recommended that the standby be stopped ("db2 deactivated database") before the primary starts the load. Once the primary finishes the load and the copy is available to the standby, restart the standby ("db2 activate database"). The standby will then reconnect to the primary and replay the load.

[{"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SSEPGG","label":"Db2 for Linux, UNIX and Windows"},"Component":"","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"All Versions","Edition":"","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

Document Information

Modified date:
30 September 2019

UID

ibm11076391