Quantcast
Channel: James Allen » HADR
Viewing all articles
Browse latest Browse all 2

Setting up DB2 HADR

$
0
0

Business Continuity and High Availability seem to be the at the top of customer priority lists at the moment. I previously blogged about the ability to use failover options on JDBC connections from within WAS. Continuing on from this I thought I would capture the high level points for setting up DB2 HADR for your CM8 or FileNet ECM system.

High Level overview of the main steps required to enable DB/2 HADR: 
  • enabled databases for archival logging or circular with logretain = ON
  • update o/s servcies files to contain the DB2 HADR Services eg, db2_hadr_01 …. port50011
  • set HADR db cfg parameters as below > db2 update db cfg for filenet using hadr_local_host SERVERB
    > db2 update db cfg for filenet using hadr_remote_host SERVERA
    > db2 update db cfg for filenet using hadr_local_svc DB2_HADR_24
    > db2 update db cfg for filenet using hadr_remote_svc DB2_HADR_23
    > db2 update db cfg for filenet using hadr_remote_inst DB2
    > db2 update db cfg for filenet using hadr_timeout 120
    > db2 update db cfg for filenet using hadr_syncmode SYNC
    > db2 update db cfg for filenet using logretain on
    > db2 update db cfg for filenet using LOGINDEXBUILD on
  • Set the alternate server in the db directory as follows:

> db2 update alternate server for database filenet using hostname SERVERA port 50000

  • Make a backup copy of the database
  • Copy to standby server
  • Restore backup as follows:

> db2 restore database filenet from e:\db2backups replace history file

  • Update the db cfg by reversing the foregoing update db cfg commands so the local service is now standby and remote service is primarystart standby first
  • NB: Standby database should be roll forward state of pending before being able to activate hadr

> db2 rollforward db iccdb query status

  • Activate the restored database:

> db2 activate database filenet

  • Now you are ready to enable HADR on the standby – always do the standby first
    > db2 start hadr on db filenet as standby
  • Now enable HADR on the primary as follows:
    > db2 start hadr on db filenet as primary
  • Useful commands to check the status are:

> db2 get snapshot for db on filenet | grep Role
> db2 get snapshot for db on filenet | grep State

  • You can stop HADR using the following command on either server
    > db2 stop hadr on db filenet
  • To initiate a takeover of the primary from the standby issue the following:
> db2 takeover hadr on db iccdb
> db2 takeover hadr on db iccdb by force (Force failover of Automatic reroute client becareful as requires set up again to reactivate primary)


Viewing all articles
Browse latest Browse all 2

Trending Articles