Vous êtes sur la page 1sur 2

Description of Activity

Full Database backup of Primary Database before the activity


Set the required database configuration parameters. Turn on archive logging and
update the LOGRETAIN parameter: db2 update database configuration for <SID> using
LOGRETAIN recovery Set the LOGINDEXBUILD parameter, so that index creation,re-
creation, or reorganization operations are logged: db2 update database
configuration for <SID> using LOGINDEXBUILD ON
Full Database backup of Primary Database after the parameter changes
Update the following fields in the services file on the primary system(ho-dbpr1)for
HADR communication: � Service name: DB2_HADR_1 � Port number: 55001 � Service name:
DB2_HADR_2 � Port number: 55002
Update the following fields in the services file on the standby system (dr-dbpr)
for HADR communication: � Service name: DB2_HADR_1 � Port number: 55001 � Service
name: DB2_HADR_2 � Port number: 55002
Restoration of Database on Standby Server by backup taken on step 3

Update the HADR database configuration parameters on the primary database(<SID>) ;

db2 update db cfg for <SID> using HADR_LOCAL_HOST HO-DBPR1

db2 update db cfg for <SID> using HADR_LOCAL_SVC DB2_HADR_1

db2 update db cfg for <SID> using HADR_REMOTE_HOST DR-DBPR

db2 update db cfg for <SID> using HADR_REMOTE_SVC DB2_HADR_2

db2 update db cfg for <SID> using HADR_REMOTE_INST DB2<SID>

db2 update db cfg for <SID> using HADR_SYNCMODE NEARSYNC

db2 update db cfg for <SID> using HADR_TIMEOUT 120

db2 update db cfg for <SID> using HADR_PEER_WINDOW 120

db2 connect to <SID>

db2 quiesce database immediate force connections

db2 unquiesce database db2 connect reset

Update the HADR database configuration parameters on the standby database(<SID>);

db2 update db cfg for <SID> using HADR_LOCAL_HOST DR-DBPR

db2 update db cfg for <SID> using HADR_LOCAL_SVC DB2_HADR_2

db2 update db cfg for <SID> using HADR_REMOTE_HOST HO-DBPR1

db2 update db cfg for <SID> using HADR_REMOTE_SVC DB2_HADR_1

db2 update db cfg for <SID> using HADR_REMOTE_INST DB2<SID>

db2 update db cfg for <SID> using HADR_SYNCMODE NEARSYNC

db2 update db cfg for <SID> using HADR_TIMEOUT 120

db2 update db cfg for <SID> using HADR_PEER_WINDOW 120


Start HADR on the standby database on dr-dbpr db2 deactivate database <SID> db2
start hadr on database <SID> as standby
Start HADR on the primary database on ho-dbpr1 db2 deactivate database <SID> db2
start hadr on database <SID> as primary

1 -> On the PRIMARY system (ho-dbpr1)

(a) Check that the alternate server has been set up.
db2 list db directory
(b) Check that the database configuration values.
db2 get db cfg for <SID>
(c) Get the snapshot report.
>db2 get snapshot for db on <SID>
(d) Check the entries in the services file.

2 --> On the STANDBY system (dr-dbpr)


(a) Check that the alternate server has been set up.
db2 list db directory
(b) Check that the database configuration values
db2 get db cfg for <SID>
(c) Get the snapshot report.
>db2 get snapshot for db on <SID>
(d) Check the entries in the services file.

Test Applications

Backup Plan

Switch-Over Testing

1 ---> On the STANDBY(dr-dbpr)


>db2 takeover hadr on db <SID> >db2 get snapshot for db on <SID> (the output should
show dr-dbpr running as primary server)

2 ----> On the ho-dbpr1


>db2 get snapshot for db on <SID> (the output should show ho-dbpr1 running as
standby server)

Vous aimerez peut-être aussi