IBM Support

What transaction logs does DB2 use at the end of a restore?

Technical Blog Post


What transaction logs does DB2 use at the end of a restore?


Answer:  "It depends"  :-)  This question came up again recently, so I thought I might do a short post on it.

    An offline backup does not require any logs at the end of the a restore but you can still apply them if you leave off the "WITHOUT ROLLING FORWARD" syntax.  The "WITHOUT ROLLING FORWARD" syntax only applies to the restore of an offline backup and will generate a warning if you try to use it during the restore of an online backup.  Of course, the restore of an online backup needs, at a minimum the logs, that spanned the backup to complete a rollforward to the MRT (Minimum Recovery Time - i.e. "END OF BACKUP").   
    In either of those cases, when you want to apply logs at the end of the restore, the RF will first try to find the logs in the active log path , if not found there it will check the OVERFLOW LOG PATH (if specified) and then will attempt to retrieve the logs via the log archive method.  Log retrieval logic will always choose the highest log chain available whether it's getting them from disk or from TSM (or some other 3rd party storage manager).  If you do not want it to retrieve any logs and/or you want to manage what logs are used (i.e. you want to use a diff log chain or just the included logs from the backup image), you can use the NORETRIEVE syntax to prevent DB2 from going out to the log archival method to retrieve the logs.


Please leave a comment if you have any questions or feedback.

Thank you,

[{"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Product":{"code":"SSEPGG","label":"DB2 for Linux, UNIX and Windows"},"Component":"","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"","Edition":"","Line of Business":{"code":"LOB10","label":"Data and AI"}}]