Hi Ove,
And I'm finding the route to validate a backup a bit cumbersome. First make a copy of the last full backup, and all the incremental transaction log files. Then apply all transactions log files.
Just a quick note that you do not neccessarily have to do this specific procedure today to validate the database and transaction log files:
- The database backup can be validated without applying the incremental transaction log files. The incremental transaction log files can be validated separately by using the Log Translation Utility (dbtran) - if the log files translate successfully through the utility, they are valid. As Jason mentions in the link above, the exit code of dbtran will reflect the success of the translation.
- You can directly validate the original backup in read-only mode (without a second copy) if you ensure that there are no open transactions on the database to be recovered when you create the backup via the BACKUP statement or the Backup Utility (dbbackup). You can do this with one of the following syntax options:
BACKUP DATABASE DIRECTORY 'c:\\backup'
WAIT BEFORE START
WITH CHECKPOINT LOG NO COPYBACKUP DATABASE DIRECTORY 'c:\\backup'
WAIT BEFORE START
WITH CHECKPOINT LOG RECOVERdbbackup -wb -k nocopy ...
dbbackup -wb -k recover ...
You can then directly start the backup database in read-only mode and validate it:dbsrv12 -n validate_engine c:\backup\mydatabase.db -r
Be aware of the differences in backup behaviour though by choosing this syntax - notably the "WAIT BEFORE START" clause will force the backup to wait until all open transactions have been closed.
Regards,
Jeff Albion
SAP Active Global Support