Veritas NetBackup™ for Microsoft SQL Server Administrator's Guide
- Introducing NetBackup for SQL Server
- Installing NetBackup for SQL Server
- Instance Management for SQL Server Intelligent Policies
- Viewing the SQL Server instances and instance groups in instance management
- About registering SQL Server instances
- Configuring SQL Server backups with SQL Server Intelligent Policy
- Configuring NetBackup for SQL Server
- Performing restores of SQL Server
- Redirecting a SQL Server database to a different host
- Restoring multistreamed SQL Server backups
- Protecting SQL Server data with VMware backups
- About protecting SQL Server data with VMware backups
- Using NetBackup for SQL Server with Snapshot Client
- Using copy-only snapshot backups to affect how differentials are based
- About SQL Server agent grouped backups (legacy SQL Server policies)
- Protecting SQL Server in high availability (HA) environments
- About using NetBackup to protect SQL Server availability groups
- About protecting the preferred replica in a SQL Server availability group (legacy backup policies)
- About protecting a specific node in a SQL Server availability group (legacy backup policies)
- About NetBackup for SQL Server with database mirroring
- Backup and recovery concepts
- Overview of SQL Server backup and recovery concepts
- About recovery factors for SQL Server
- Using NetBackup for SQL Server with multiple NICs
- Configuring backups with legacy SQL Server policies using clients and batch files
- About using batch files with NetBackup for SQL Server
- About schedule properties (legacy SQL Server policies)
- Backing up read-only filegroups (legacy SQL Server backup policies)
- Performing user-directed operations with dbbackex
- Using bplist to retrieve a list of SQL Server backups
- SQL Server backups and restores in an SAP environment (legacy SQL Server policies)
- About SQL Server backups and restores in an SAP environment
- Troubleshooting
- About debug logging for SQL Server troubleshooting
- Disaster recovery of a SQL Server
- NetBackup for SQL dialog box topics
- NetBackup for SQL dialog box fields
- Appendix A. Sample batch files
- About sample backup batch files for legacy SQL Server policies
- About sample restore batch files
- About sample backup batch files for legacy SQL Server policies
- Appendix B. Multiplexed backups
- Appendix C. Register authorized locations
About using batch files with NetBackup for SQL Server
NetBackup for SQL Server uses batch files to initiate backup and restore operations. A batch file uses the .bch extension and is typically executed from the install_path\DbExt\MsSql\ directory.
You must create a batch file if you start operations in any of the following ways:
Manage Scripts dialog box
dbbackex command line
Automatically scheduled backups that use batch files and clients
Review the following information before you create and use batch files:
Ensure that the batch file resides on the client.
See Registering authorized locations used by a NetBackup database script-based policy.
Batch files are in Unicode text.
A batch file consists of a series of operations that run in sequence. For legacy SQL Server backup policies, you create batch files for backup operations and restore operations. For SQL Server Intelligent Policy, you create the batch files for restore operations in the same way.
Each operation consists of a series of <keyword value> pairs, which completely define the total operation.
The keyword is not case-sensitive but the value is. Generally, you can code both the keyword and value in uppercase. The exception is the NBIMAGE keyword option. The value must be specified exactly as it appears in the NetBackup server.
Operations are not nested.
With the exception of the BATCHSIZE, GROUPSIZE, RESTARTTYPE, NUMRESTARTS, and RESTARTWAITSECONDS parameters, <keyword value> pairs are not global. If you use BATCHSIZE, GROUPSIZE, RESTARTTYPE, NUMRESTARTS, or RESTARTWAITSECONDS then it must appear only once in your batch file and it must appear in the first operation.
If SQLINSTANCE $ALL is used, then it must appear in the first operation of the batch file. Each operation in the batch file is performed for all SQL Server instances on the client where the batch file is executed. Also, it is not necessary to specify an SQLHOST or SQLINSTANCE on any subsequent operations.
Within an operation, the <keyword value> pairs may appear in any order except that you must terminate each operation with ENDOPER TRUE.
You can include comment lines in your batch file by placing a hash mark ('#') in the first column.
STOPAT, RESTORETOMARK, RESTORETOMARKAFTERTIME, RESTOREBEFOREMARK, and RESTOREBEFOREMARKAFTERTIME are mutually exclusive restore parameters. If either RESTORETOMARKAFTERTIME or RESTOREBEFOREMARKAFTERTIME are used, then the batch file must also specify a datetime string with the keyword STOPAFTER.
If you remove the MAXTRANSFERSIZE keyword from the batch file, the default is 0 or a maximum transfer size of 64 KB. If you remove the BLOCKSIZE keyword from the batch file, the default is 0 or a block size of .5 KB. A default value of 0 is also applied if you manually create a batch file without these keywords.