IBM V7.2 User Manual

Page 35

Advertising
background image

Standby Database Scenario

29

6. Start the DB2 instance db2ts1 on the Backup server:

db2start

7. Place the Backup database into a rollforward pending state, and take it out of its

suspended state:

db2inidb ts1 as standby

8. As DB2 log files are successfully getting archived to the archive directory on the

Primary database, make them available to the retrieve path for the Backup
database. Be careful not to roll forward through a log file on the Backup server
that is only partially copied to the retrieve directory.

9. On the Backup database, roll forward through the DB2 logs that have been

archived from the Primary database. The

rollforward

command gives you

the options to roll forward to end of logs or to a point in time. Rolling forward to a
point in time can be useful if the intention is to keep the Backup database a
constant amount of time behind the Primary database:

db2 “rollforward database ts1 to end of logs”

or

db2 “rollforward database ts1 to 2000-06-19- 19.56.00.0000”

Note: The retrieved log files are copied to

/db2/TS1/log_dir

by DB2

during the rollforward, which is the current mount point for the log directory.
Ensure that the instance owner has write access to this directory and that the
directory is large enough. When the log logical volume is copied, and

/db2/TS1/log_dir

is mounted, the contents of the

/db2/TS1/log_dir

mount point will no longer be visible. This does not cause a problem, because
any log files that may have been in this directory can still be retrieved from the
retrieve path.

10. Continue with iterations of the previous

rollforward

commands until the

Primary database fails, a database application logic error occurs, or until use of
the Backup database is desired.

If you do not need to roll forward through the most current logs from the Primary
system, then proceed to step 16.

11. At this point, ensure all log files that have been archived on the Primary server

are available to the Backup server.

12. Copy the log pair from the Primary server:

/usr/opt/ibm2105cli/rsExecuteTask.sh –v –s ESSCSS

ts1dblog

and wait for FlashCopy task to finish.

13. Mount the log filesystem on the Backup server:

mount /db2/TS1/log_dir

14. Issue a rollforward stop command on the Backup database. If a database

application logic error occurred, the user must rollforward to a point-in-time

Advertising