How to restore a Microsoft SQL Full Backup using a MOVE script

Article: 100018137
Last Published: 2017-11-27
Ratings: 13 1
Product(s): NetBackup & Alta Data Protection

Description

This article describes the abbreviated steps to restore a SQL database with a MOVE script using NetBackup for SQL Server.  For an in depth description of SQL backups and restores, please refer to the NetBackup (tm) 6.0 for Microsoft SQL Server System Administrator's Guide (see Related Documents below).

1. Logon to the SQL client using an account with administrator rights on the SQL server.

2. If the logon parameters for the NetBackup MS SQL Client are configured, please proceed to Step 6

3. Click on StartProgramsVeritas NetBackup> NetBackup agentsNetBackup MS SQL client. If this is the first time the NetBackup database extension is opened, the message "Please select login parameters from the 'Set database login parameters' window." is received.

4. Otherwise, click on FileSet SQL Server connection properties.

Figure 1

Image

5. Enter the database login parameters using either standard security or integrated security.
6. Enter a user ID with administrator rights on all databases. The user ID can use either standard or integrated security. In the following example (Figure 2), the user account is a domain account with administrator rights on the SQL server.

Figure 2

Image

7. From the NetBackup Database Extension; select FileRestore SQL server objects.

Figure 3

Image
 
A. Specify the correct SQL server the databases where were originally backed up.  
B. If the SQL server does not appear in the drop down (A), manually add it in the "source client" drop down.  
C. This indicates the master server containing the images for restore.

8. After clicking on "OK", the administrator can view the images backed up from the specified SQL server.

Figure 4

Image
 
A. Select the database for restore and the correct date of backup desired.
B. Specifying "Create a move template" creates a MOVE script for the restore to an alternate client.  It also allows for the creating of a copy of the database to the production server, renaming the recovered database.
C. The Replace option uses the Microsoft Replace option.
D.  Use the "Recovered" option only when this is the last restore of the database, and additional transaction logs or a differential database does not need to be restored on top of the recovered database. When restoring from a full database backup without transaction logs, use this option.  

9. The MOVE script needs to be modified as follows:

Figure 5

Image

A. If the database is being restored to the production server, rename the database (in this case the production database was pubs, renamed to pubs1).
B. Confirm the path exists for the .mdf file. Additionally, if restoring to the production server, change the name of the .mdf file.  In this case it was renamed to pub1.mdf.
C. Confirm the path exists for the log ( .ldf) file.  Additionally, if restoring to the production server, change the name of the .ldf file.  In this case it was renamed to pubs_log1.ldf.
D. In this example, the database is being restored to the second instance on the SQL server.
E. NBServer is the master server that contains the images.

10. From the NetBackup SQL Database extension select FileManage script files.

Figure 6

Image

A. Select the restore batch file.
B. Start the restore.

11. After the restore completes check the Microsoft Management Studio for the recovered database.

Figure 7

Image

A. Check the correct target SQL server (in this case the server is the second instance).
B. Check for the restored database.

If the database shows as "Loading" in Microsoft Management Studio and is inaccessible, see the Related Documents section for information on how to complete the restore and bring the database on-line.

Was this content helpful?