Prior to v9.5, to find the minimum recovery time of the database backup, I had to issue a the following command:
$ db2 rollforward db SAMPLE to 2008-07-24 and stop
SQL1275N The stoptime passed to roll-forward must be greater than or equal to
"2008-07-24-09.07.22.000000 UTC", because database "SAMPLE" on node(s) "0"
contains information later than the specified time.
Here 2008-07-24 was an arbitrary timestamp to find the first recoverable point-in-time. I generally used the backup timestamp here. This gave the correct minimum PIT to rollforward the database to. The subsequent command finally performed the rollforward.
$ db2 rollforward db SAMPLE to 2008-07-24-09.07.22.000000 and stop
DB20000I The ROLLFORWARD command completed successfully.
In v9.5, IBM finally made is simpler to rollforward the database by introducing the much needed "END of BACKUP" option with the rollforward command.
Now with v9.5 if you just want to rollforward your database to the minumum PIT just give the following command:
$ db2 rollforward db SAMPLE to end of backup and stop
This is even more useful in partitioned databases where it can be difficult to find the minumum PIT across all partitions.
Moreover, it is now easy to incorporate the rollforward to point-in-time operation in a script.
Be lazy, write a script and let it be known as automation :)
| Comments |
|
|
|||||||||||
|
|||||||||||
Powered by !JoomlaComment 3.25





