SnapManager 2.1 for Microsoft SQL Server includes the ability to automatically run your own program or script after a backup or database verification operation finishes. This feature, called Run Command After Operation, is typically used to automatically archive a backup. See the following topics for more information:
When you start a SnapManager backup or database verification operation, you have the option to automatically run a command after the operation is finished. If you choose this option, you will be prompted to specify the following information before the backup or database verification operation can begin:
Because the command (your own program or script) is invoked from within the context of a specific backup or database verification, you can pass the command information about the components of that operation. In your script, any occurrence of the text string %1 corresponds to the first parameter passed; the text string %2 corresponds to the second parameter, and so on.
After you have finished specifying the command and parameters, you can start the backup or database verification operation.
Note
The command or script is run only after a successful backup or verification. If the backup is not completed successfully, or if the verification fails, the command or script is not run.
The Run Command After Operation feature supports the following variables, which can pass operation-specific information to your program or script.
Note
Both the $SnapInfoPath and $LogBackupFile variables are automatically enclosed within double quotes so that the actual path name can contain spaces without affecting the script invocation on the Windows command-line. If you do not want the double quotes to appear in your command-line, remove them from the Command Arguments field in the Run Command After Operation window.
Each SnapManager operation that supports the Run Command After Operation feature (full backup, transaction log backup, and database verification) parses only the variables that apply to the operation as you have specified it.
The following table shows which of the command variables are available to the Run Command After Operation feature, depending on which SnapManager operation is used to invoke the feature.
SnapManager operation that is used to invoke the Run Command After Operation feature |
|||
|---|---|---|---|
| 1Full backup: In the case of multiple databases, repeat the arguments passed for each database included in the backup. 2Verification of full backup: In the case of multiple databases, repeat the arguments passed for each database included in the verification. Additionally, variables are parsed and replaced with the most recent backup that is verified as part of this job. 3Full backup with the Run Transaction Log Backup option selected: The $LogBackupFile variable is parsed only when the transaction logs are backed up after full backup. | |||
There are two ways to open the Run Command After Operation dialog box while starting or scheduling a backup or database verification operation.
To open the Run Command After Operation dialog box while specifying an operation in the Backup and Verification tab, complete the following steps.
To open the Run Command After Operation dialog box while specifying an operation in the Backup Wizard, complete the following steps.
Note
If you want to simply change the default values specified in the Run Command After Operation dialog box--without starting or scheduling a database backup, transaction log only backup, or database verification--you can open the Run Command After Operation dialog box from the Option menu. This is described in Run Command After Operation default settings.
From within the context of a SnapManager backup or verification operation, you can use the Run Command After Operation dialog box to do the following:
Note
If you want to simply change the default values specified in the Run Command After Operation dialog box--without starting or scheduling a database backup, transaction log only backup, or database verification--you can open the Run Command After Operation dialog box from the Option menu. This is described in Run Command After Operation default settings.
To use the Run Command After Operation dialog box, complete the following steps.
| 1 |
Open the Run Command After Operation dialog box. For details, see How to open the Run Command After Operation dialog box. |
|
| 2 |
In the "Specify a computer where..." box, enter or browse to the name of the host on which your program or script resides. |
|
| 3 |
In the "Specify the full path..." box, browse to your program or script. |
|
| 4 |
Form the command input string in the Command Arguments box. You can do this using any combination of the following methods:
|
|
| 5 |
Repeat Step 4 as needed until the Command Arguments box contains the arguments you want to pass to your program or script. |
|
| 6 |
If you want to save the current settings as the new default values, select the Save as default option. |
|
| 7 |
Click OK to apply your changes and close the Run Command After Operation dialog box. |
|
If SnapManager is installed on a Windows Server 2003 system, then attempting to launch a script from a UNC (Uniform Naming Convention) path might cause SnapManager to hang. If this occurs, the log file shows no indication of the failure other than it is missing the last line of text: "The specified command has been launched successfully."
Windows Server 2003 ships with Internet Explorer's Enhanced Internet Explorer Security Configuration enabled. This setting is restrictive and prevents batch files located on a network share from running. The network location will need to be added to Internet Explorer's list of trusted sites.
To run a script from a UNC path on a Windows Server 2003 system, complete the following steps.
| 1 |
Log in to the Windows Server 2003 system that will be running the script.
|
|
| 2 | ||
| 3 |
In the menu bar, select Tools > Internet Options. Result |
|
| 4 |
In the Internet Options dialog box, do the following: Result |
|
| 5 |
In the Local Intranet dialog box, do the following: Result |
|
| 6 | ||
| 7 | ||
| 8 |
To verify your changes, browse to the network location where the script resides and launch the script. ResultThe script should now run normally without security prompts. Note |
|
Copyright © 1994-2006, Network Appliance, Inc. All rights
reserved.
Part No. 215-01752_A0
File: bkptool2.htm
Last updated: 01-Sep-2006 07:41:26