GENERAL ERROR: The error message "NetBackup cannot generate a move script for <database_name>. The database may be inaccessible." is displayed when attempting to create a SQL MOVE script for a backup set which includes both a full backup and a differential incremental backup.

Article:TECH37874  |  Created: 2005-01-16  |  Updated: 2013-10-24  |  Article URL http://www.symantec.com/docs/TECH37874
Article Type
Technical Solution

Product(s)

Environment

Issue



GENERAL ERROR: The error message "NetBackup cannot generate a move script for . The database may be inaccessible." is displayed when attempting to create a SQL MOVE script for a backup set which includes both a full backup and a differential incremental backup.

Error



Netbackup cannot generate a move script for . The database may be inaccessible.

Solution



Overview: While attempting to create a SQL MOVE script and selecting a differential incremental backup, NetBackup generates the message "A full recovery set for database '<database_name>' has been found.  This set is comprised of the following images: ", as shown below:

 

When attempting to save a MOVE template, the following error message appears:

 

Troubleshooting: Try selecting only the full backup to see if a SQL MOVE template is created.  Additionally, the user can create a restore script for the differential incremental, just not a MOVE script.  

Logs Files: No error messages appear in the NetBackup logs on master server, media server, or SQL client.

Resolution Overview:

1. Create a restore MOVE template for only the database full backup.
2. Create a restore script for just the differential incremental backup
3. Merge the two scripts together, creating a single script which can be executed on the destination SQL server.

Detailed Resolution:

First, create the MOVE script on the source SQL server using only the full backup, as shown in the following image:

 

After creating the MOVE script from step 1., it should look similar to the following:

#  
#  This is a template for the database MOVE command.
#  
OPERATION RESTORE
OBJECTTYPE DATABASE
#  
#  Replace the database name in the following line with the name of the database that you
#  want to move to. Also remove the hash mark <#> which precedes the keyword <DATABASE>.
#  
#DATABASE "<database_name>"
#
#  Replace the file path <C:\mssql2k\MSSQL\data\<database_name>.mdf>
#  with a new file path. Also remove the hash mark <#> which precedes the keyword <TO>.
#  The target of the MOVE keyword must be "Northwind".
MOVE  "Northwind"
#TO  "C:\mssql2k\MSSQL\data\<database_name>.mdf"
#
#
#  Replace the file path <C:\mssql2k\MSSQL\data\<database_name>.ldf>
#  with a new file path. Also remove the hash mark <#> which precedes the keyword <TO>.
#  The target of the MOVE keyword must be "Northwind_log".
MOVE  "Northwind_log"
#TO  "C:\mssql2k\MSSQL\data\<database_name>.ldf"
#
NBIMAGE "server_name.MSSQL7.SERVER_NAME.db.<database_name>.~.7.001of001.20050316093713..C"
SQLHOST "SERVER_NAME"
NBSERVER "MASTER_SERVER_NAME"
BROWSECLIENT "SOURCE_SERVER_NAME"
MAXTRANSFERSIZE 0
BLOCKSIZE 7
RESTOREOPTION REPLACE
RECOVEREDSTATE NOTRECOVERED
ENDOPER TRUE

Next, create a restore script for the differential incremental backup.  Select the differential incremental backup in the NetBackup SQL GUI, and then under "Recovery options using transaction logs" select the "Restore only the differential that you selected" option, and then select the "Save for later execution" option under "Restore script".  Name this script differently than the MOVE script in step 1.

 

This should create a restore script similar to the following:

OPERATION RESTORE
OBJECTTYPE DATABASE
DUMPOPTION INCREMENTAL
DATABASE "<database_name>"
NBIMAGE "server_name.MSSQL7.SERVER_NAME.inc.<database_name>.~.7.001of001.20050316093745..C"
SQLHOST "SERVER_NAME"
NBSERVER "MASTER_SERVER_NAME"
BROWSECLIENT "SERVER_NAME"
MAXTRANSFERSIZE 0
BLOCKSIZE 7
RESTOREOPTION REPLACE
RECOVEREDSTATE RECOVERED
ENDOPER TRUE

Now edit the MOVE template as directed to by the sections commented out with the hash (#) mark.  The modified template should look like the following:

OPERATION RESTORE
OBJECTTYPE DATABASE
DATABASE "<restored_database_name>"
MOVE  "Northwind"
TO  "C:\mssql2k\MSSQL\data\<restored_database_name>.mdf"
MOVE  "Northwind_log"
TO  "C:\mssql2k\MSSQL\data\<restored_database_name>.ldf"
NBIMAGE "server_name.MSSQL7.SERVER_NAME.db.<database_name>.~.7.001of001.20050316093713..C"
SQLHOST "SERVER_NAME"
NBSERVER "MASTER_SERVER_NAME"
BROWSECLIENT "SOURCE_SERVER_NAME"
MAXTRANSFERSIZE 0
BLOCKSIZE 7
RESTOREOPTION REPLACE
RECOVEREDSTATE NOTRECOVERED
ENDOPER TRUE

Copy and paste the restore script created for the differential incremental backup, making sure to modify the DATABASE line to reflect the new name of the database.  The final restore script should look like the following:

OPERATION RESTORE
OBJECTTYPE DATABASE
DATABASE "<restored_database_name>"
MOVE  "Northwind"
TO  "C:\mssql2k\MSSQL\data\<restored_database_name>.mdf"
MOVE  "Northwind_log"
TO  "C:\mssql2k\MSSQL\data\<restored_database_name>.ldf"
NBIMAGE "server_name.MSSQL7.SERVER_NAME.db.<database_name>.~.7.001of001.20050316093713..C"
SQLHOST "SERVER_NAME"
NBSERVER "MASTER_SERVER_NAME"
BROWSECLIENT "SOURCE_SERVER_NAME"
MAXTRANSFERSIZE 0
BLOCKSIZE 7
RESTOREOPTION REPLACE
RECOVEREDSTATE NOTRECOVERED
ENDOPER TRUE

OPERATION RESTORE
OBJECTTYPE DATABASE
DUMPOPTION INCREMENTAL
DATABASE "<restored_database_name>"
NBIMAGE "server_name.MSSQL7.SERVER_NAME.inc.<database_name>.~.7.001of001.20050316093745..C"
SQLHOST "SERVER_NAME"
NBSERVER "MASTER_SERVER_NAME"
BROWSECLIENT "SERVER_NAME"
MAXTRANSFERSIZE 0
BLOCKSIZE 7
RESTOREOPTION REPLACE
RECOVEREDSTATE RECOVERED
ENDOPER TRUE

This newly created script can be run from the NetBackup SQL GUI, using the "Actions" > "Batch files" option.


Legacy ID



275780


Article URL http://www.symantec.com/docs/TECH37874


Terms of use for this information are found in Legal Notices