Please enter search query.
Search <product_name> all support & community content...
Article: 100017060
Last Published: 2017-11-27
Ratings: 6 4
Product(s): NetBackup & Alta Data Protection
Problem
How to configure NetBackup for Microsoft SQL Server backups and restores
Solution
In addition to the installation of the NetBackup client software on the SQL server (on which the SQL database extension is installed by default), there is configuration within NetBackup which is required for SQL backups to run correctly. This article outlines those steps.
Initial Configuration - NetBackup Client Service:
Most backup operations are scheduled on the master server and execute through a NetBackup SQL policy. For this to work correctly, the NetBackup Client Service on the SQL server can start with the local system account, but it does need specific rights.
Initial Configurations - NetBackup MS SQL Client Software:
After setting up the NetBackup Client Service, start the NetBackup Client software on the SQL server, by selecting Start > Programs > Veritas NetBackup > NetBackup Agents > NetBackup MS SQL Client with "Run as Administrator"
When the NetBackup MS SQL Client launches for the first time, there is usually a prompt like the one shown in Figure 1 to select login credentials for the SQL server.
Figure 1
If SQL integrated security is used, the Windows account of the currently logged in user is used for authentication. If integrated security is not used, login parameters are required, and are entered in the dialog box shown below. This is necessary because frequently, SQL maintains a separate identification for users, as an additional layer of security. Please see the related article (below) for the SQL rights required for backup and restore of databases, and confirm the account specified has those rights. After clicking OK to the informational message about setting the database login parameters, the "Set database login parameters" window is displayed (Figure 2).
Figure 2
Confirm the host name is the name of the SQL server. In most installations, there is only one SQL instance, so default is correct for the "Instance" option. Confirm this with the SQL database administrator prior to attempting to configure the NetBackup SQL GUI. Finally, confirm the user ID and passwords. By clicking on the " Apply" button, the NetBackup SQL GUI attempts to connect to the SQL server using the credentials provided. If successful, the SQL Server version, Security and Host type changes from unknown to the information specific to the listed server. Once the login parameters are successfully entered, click on " Close" to close the "Set database login parameters" window. At this point, the GUI is configured for backups and restores. The next step is to create a batch file for the backup of the databases which reside on the SQL server.
Creating batch file/script:
From the " Actions" menu, select " Backup", and the " Backup Microsoft SQL Server Objects" dialog is presented (Figure 3).
Figure 3
In the right-hand window, select the databases to include in the backup script. In the "Backup script" section, confirm the " Save for later execution" option is selected. Note in the lower left-hand section of the window, there are options to backup only the selected databases, all except the selected databases, or all the databases. These options can be selected to alter which databases are included in the backup script.
After making the necessary selections, click the " OK" button, and a standard save dialog is presented. Provide a name for the script, and click " Save" (Figure 4).
Figure 4
The script is plain text, and can be opened in Notepad, or some similar text editor. If the file is opened, refer to the NetBackup for Microsoft SQL Server Administrator's Guide for information on the various keywords and their values used in the script. The next step after the NetBackup Backup, Archive, and Restore is configured and a batch file/script created, is updating the NetBackup SQL policy.
Policy Configuration:
The NetBackup SQL policy configuration is similar to any other NetBackup policy. The following items are unique to SQL policies
- Confirm on the Policy type on the Attributes tab is "MS-SQL-Server"
- Under Backup Selections, enter the name of the script created on the client. If the file was saved into the default location of <INSTALL_PATH\veritas\netbackup\dbext\mssql, only the name of the script needs to be entered on the Backup Selections tab. Otherwise, enter the full directory path and file name.
- On the Schedules tab, a schedule of type " Application Backup" is created by default, and is open 24x7. Do not modify this schedule, or there is a risk of backups failing to run. This schedule created a window in which backups can run, but does not define WHEN the backup runs.
- On the Schedules tab, create a new schedule of type " Automatic Backup", and schedule it for when the backups should run.
Note: While there are Retention options for both the Application Backup schedule and the Automatic Backup schedule, it is the one on the Application Backup schedule which determines how long the images are maintained in the NetBackup images database and on tape.
Initial Configuration - NetBackup Client Service:
Most backup operations are scheduled on the master server and execute through a NetBackup SQL policy. For this to work correctly, the NetBackup Client Service on the SQL server can start with the local system account, but it does need specific rights.
Initial Configurations - NetBackup MS SQL Client Software:
After setting up the NetBackup Client Service, start the NetBackup Client software on the SQL server, by selecting Start > Programs > Veritas NetBackup > NetBackup Agents > NetBackup MS SQL Client with "Run as Administrator"
When the NetBackup MS SQL Client launches for the first time, there is usually a prompt like the one shown in Figure 1 to select login credentials for the SQL server.
Figure 1

If SQL integrated security is used, the Windows account of the currently logged in user is used for authentication. If integrated security is not used, login parameters are required, and are entered in the dialog box shown below. This is necessary because frequently, SQL maintains a separate identification for users, as an additional layer of security. Please see the related article (below) for the SQL rights required for backup and restore of databases, and confirm the account specified has those rights. After clicking OK to the informational message about setting the database login parameters, the "Set database login parameters" window is displayed (Figure 2).
Figure 2

Confirm the host name is the name of the SQL server. In most installations, there is only one SQL instance, so default is correct for the "Instance" option. Confirm this with the SQL database administrator prior to attempting to configure the NetBackup SQL GUI. Finally, confirm the user ID and passwords. By clicking on the " Apply" button, the NetBackup SQL GUI attempts to connect to the SQL server using the credentials provided. If successful, the SQL Server version, Security and Host type changes from unknown to the information specific to the listed server. Once the login parameters are successfully entered, click on " Close" to close the "Set database login parameters" window. At this point, the GUI is configured for backups and restores. The next step is to create a batch file for the backup of the databases which reside on the SQL server.
Creating batch file/script:
From the " Actions" menu, select " Backup", and the " Backup Microsoft SQL Server Objects" dialog is presented (Figure 3).
Figure 3

In the right-hand window, select the databases to include in the backup script. In the "Backup script" section, confirm the " Save for later execution" option is selected. Note in the lower left-hand section of the window, there are options to backup only the selected databases, all except the selected databases, or all the databases. These options can be selected to alter which databases are included in the backup script.
After making the necessary selections, click the " OK" button, and a standard save dialog is presented. Provide a name for the script, and click " Save" (Figure 4).
Figure 4

The script is plain text, and can be opened in Notepad, or some similar text editor. If the file is opened, refer to the NetBackup for Microsoft SQL Server Administrator's Guide for information on the various keywords and their values used in the script. The next step after the NetBackup Backup, Archive, and Restore is configured and a batch file/script created, is updating the NetBackup SQL policy.
Policy Configuration:
The NetBackup SQL policy configuration is similar to any other NetBackup policy. The following items are unique to SQL policies
- Confirm on the Policy type on the Attributes tab is "MS-SQL-Server"
- Under Backup Selections, enter the name of the script created on the client. If the file was saved into the default location of <INSTALL_PATH\veritas\netbackup\dbext\mssql, only the name of the script needs to be entered on the Backup Selections tab. Otherwise, enter the full directory path and file name.
- On the Schedules tab, a schedule of type " Application Backup" is created by default, and is open 24x7. Do not modify this schedule, or there is a risk of backups failing to run. This schedule created a window in which backups can run, but does not define WHEN the backup runs.
- On the Schedules tab, create a new schedule of type " Automatic Backup", and schedule it for when the backups should run.
Note: While there are Retention options for both the Application Backup schedule and the Automatic Backup schedule, it is the one on the Application Backup schedule which determines how long the images are maintained in the NetBackup images database and on tape.