How and when to disable SQL Optimized Restore

book

Article ID: 100060169

calendar_today

Updated On:

Description

Backup Exec 22.2 onwards - Optimize restore Logic for SQL Database recoveryA Transaction log file (i.e. ldf file) of the SQL database is backed up fully when a snapshot based incremental backup is performed with Backup Exec.

  • Backup Exec (BE) backs up data files (mdf and ndf) for block level incremental changes because it understands what has changed since the last full/incremental backup. 
  • Since Backup Exec cannot understand the changes in the case of the ldf log file, it carries out a full backup of that; i.e. it is backed up completely during the incremental backup.
  • The downside of backing up the ldf file fully is seen during restoration. Each time an incremental set is restored, the previously restored ldf file is overwritten until the last one from the latest incremental set is restored.


SQL Optimized Restore logic - In order to avoid restoring and overwriting the fully backed up ldf file multiple times, a flag is set for all incremental sets (snapshot backup) except the latest incremental set, so that the ldf log file is restored only once. This can significantly improve SQL Restore performance.

Caveat to above SQL Optimized Restore logic - If different backup sets, have a varied number of DBs (i.e. if some databases were added to or removed from the selections during each run of the job) then SQL Optimized Restore Logic can fail, which would result in the SQL restore job failing as well.

To summarize, if the same databases are present in all the restore selections, then the current optimization can work and would improve the performance significantly, especially if the size of the DB is large.


If the restore fails with either of the errors below, check the restore destination.

0xe000fe2d - One or more items could not be read correctly during the backup.
0xe0008443 - One or more SQL Database consistency checks have failed.

If an ldf file of 0 bytes has been restored, add the Dword Registry value shown below to disable optimization (Value set to 1) and rerun the restore job. With this setting, SQL Optimized Restore Logic is disabled and the restore will write the ldf file multiple times during restore, but the restore should complete successfully. 


Warning: Incorrect use of the Windows registry editor may prevent the operating system from functioning properly. Great care should be taken when making changes to a Windows registry. Registry modifications should only be carried-out by persons experienced in the use of the registry editor application. It is recommended that a complete backup of the registry and workstation be made prior to making any registry changes.


Registry Information:

Registry Path => "HKEY_LOCAL_MACHINE\SOFTWARE\Veritas\Backup Exec For Windows\Backup Exec\Engine\Restore"
DWord Value Name =>   "Disable Optimized Restore"

Value set to  0    enables Optimized Restore Logic
Value set to  1    disables Optimized Restore Logic
 

Issue/Introduction

How and when to disable SQL Optimized Restore

Additional Information

ETrack: 4111285