DB2 HADR Configuration Reminder

This one is a reminder for me more than anything:

When setting up DB2 HADR, for IBM Connections, IBM Sametime, or anything, don’t forget to make sure you’ve set the logging for the database before trying to configure the standby database.

It’s easy to do when you’re working with the number of databases that Connections involves and that’s what happened here. We somehow skipped over one of them, even though we were using the DB2 directory as a guide. We were trying to start the database as a standby - one of the final steps - and got the SQL1767N error, reason code=1. This indicates that the database wasn’t in a roll-forward pending state which is what we want for setting up the standby.

After looking around I decided to check the log folder on the primary server and found that there weren’t any folders for this database in the archive log folder. So this meant that since the database wasn’t configured for logging, it wouldn’t be in the state we wanted after a restore.

This was a quick fix of just running the commands we needed to setup the database for logging on the primary side and then taking a new offline backup and restore it on the standby server and run the commands. Lo and behold - it did what we expected - started as the HADR standby.

I should probably work on scripting this out to avoid this in the future.

Hope this helps someone else!


See also