IBM Support

DB2 Rollforward command in HADR environment returns SQL1744N

Technical Blog Post


Abstract

DB2 Rollforward command in HADR environment returns SQL1744N

Body

In HADR environment, after takeover on Standby, you may find some tablespaces in rollforward pending state.

However, if you attempt to do rollforward on these tablespaces, SQL1744N may be returned.

For example,

$ db2 rollforward db sample to end of logs tablespace '(ts1)' online
SQL1774N  Table space restore or rollforward cannot be issued on an HADR
primary or HADR standby database.


$ db2 rollforward db sample to end of logs
SQL1774N  Table space restore or rollforward cannot be issued on an HADR
primary or HADR standby database.

 

To resolve the problem, you can either reinitialize the HADR or stop HADR then perform rollforward :

1). Stop HADR on the standby database:
 

 $ db2 deactivate db sample
 $ db2 stop hadr on db sample

2). Restore the backup image of the primary database to the standby database:
 

 $ db2 restore db sample from /dir replace history file

3). After the database is restored to the standby, HADR related configuration parameters(HADR_*) now have the values set as the primary database. These need to be reset to the standby values appropriately.

4). Start HADR on the standby database:
 

 $ db2 start hadr on db sample as standby

 

Alternatively, you can stop HADR, then rollforward:

 

 

 $ db2 deactivate db sample
 $ db2 stop hadr on db sample

  $ db2 rollforward db sample to end of logs

 

[{"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Product":{"code":"SSEPGG","label":"DB2 for Linux, UNIX and Windows"},"Component":"","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"","Edition":"","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

UID

ibm13286347