InfoScale™ 9.0 Storage Foundation Quick Recovery Solutions Guide for Microsoft SQL Server - Windows
- Introducing Quick Recovery for SQL Server
- Methods of implementing Quick Recovery snapshots for SQL Server
- About the components used in Quick Recovery
- Preparing to implement Quick Recovery for SQL Server
- Implementing Quick Recovery for SQL Server with the configuration wizard
- About the Quick Recovery Configuration Wizard
- Scheduling SQL Server snapshot sets
- Scheduling or creating an individual snapshot set for SQL Server
- Maintaining or troubleshooting snapshots
- Recovering a SQL Server database
- Recovering missing volumes
- Vxsnap utility command line reference for SQL Server
Creating a one-time snapshot set
Creating a one-time snapshot or snapshot set is a two-step process as follows:
The first step is to prepare the snapshot mirrors for the database volume or volumes. If you are creating a snapshot set after a snapback to refresh existing snapshot mirrors, you can skip this step.
The second step uses either the VSS SQL Snapshot Wizard or the vxsnap create command to create the snapshot set by detaching the snapshot mirrors from the original volumes. This step creates separate on-host snapshot volumes as well as a snapshot set XML file to store the application and snapshot volume metadata.
The VSS SQL Snapshot Wizard and vxsnap create command integrate with VSS to quiesce the database and then simultaneously snapshot the volumes in the database. This snapshot is done while the database is online and without disrupting the database operations. The resulting snapshot set provides a complete picture of the database at the point in time the command is issued.
The VSS SQL Snapshot Wizard can be run from either a local system or a remote node. The vxsnap utility must be run from the local system.
To create the snapshot set from the VEA console
- From the VEA console, navigate to the system where the production volumes and snapshots mirrors are located.
- Expand the SQLServerWriter node.
- Expand the system node, the Storage Agent node, and the Applications node. If the SQL node is not shown, start the SQL Server VSS Writer service and then select the Storage Agent node and refresh the VEA display (Actions > Refresh).
- Expand the SQL node.
- Right-click the instance and click VSS Snapshot.
- In the wizard, review the Welcome page and click Next.
- Specify the snapshot set parameters as follows and then click Next:
Select Component for snapshot operation
Select the database for the snapshot set.
Directory
The wizard creates the snapshot set metadata XML file. The XML metadata file is stored by default in the directory shown on the screen.
Note:
The XML file for the snapshot must be stored separately from the volumes that are included in the snapshots, otherwise a restore will fail.
There are two ways to change the XML file location.
First, edit the directory path in the Directory field for this wizard screen. Second, change the XML file location. Use a text editor to create a text file named
redirect.txt
. This text file should contain a single text line specifying the Universal Naming Convention (UNC) path to the location of the XML file, for example,\\ServerName\SharedFolderName
. Save theredirect.txt
file in the default directoryC:\Program Files\Veritas\Veritas Volume Manager\VSSXML
.If the product is installed on the D drive, then the path will be the same as above, but on the D drive.
Note:
You must not use the volume name or volume path in the redirect.txt file that is involved in the snapshot. If the volume name or path for the snapshot is used, then a restore will fail.
Snapshot set
Enter a name for the snapshot set, for example, billing or accept the default name. The wizard generates a default snapshot set name that includes the term "SnapshotSet", component name, date, and time.
Select snapshot type
Select the snapshot type.
You can specify that snapshots be created as either a Full backup or Copy backup type. Either type can be used to restore a database. However, if you want to replay logs in SQL Server as part of restoring a database, a Full backup needs to have been created earlier. When replaying logs, you can replay from the time of the last Full backup. A Copy backup does not affect this sequence of log replay and therefore is often used as an "out of band" copy for purposes such as testing or data mining.
- In the Change Attributes panel, optionally change the attributes for the snapshot volumes and click Next:
Volume Name
Displays the name of the volume.
Snapshot Volume Label
Displays the read-only label for the snapshot volume.
Drive Letter
Optionally, click a drive letter and select a new choice from the drop-down menu.
Plex
Optionally, click a plex and select a new choice from the drop-down menu.
- On the Synchronized Snapshot panel (Volume Replicator only), select the secondary hosts for which you want to create synchronized snapshots. Either double-click on the host name or click the Add option to move the host into the Selected Secondary Hosts pane. To select all the available hosts, click the Add All option. The VSS wizard creates synchronized snapshots on all the selected secondary hosts.
This panel is displayed only in an environment using Volume Replicator (Volume Replicator). Otherwise, you will be directly taken to the Schedule Information panel.
See Volume Replicator Administrator's Guide.
- Review the specifications of the snapshot set and click Finish.
To create the snapshot set from the command line
- Type the command, as in the following example:
> vxsnap -x billing_DB.xml create source=L:/Newvol=billing_data source=M:/Newvol=billing_log writer=SQLServerWriter component=billing_DB backuptype=full
where billing_DB.xml is a name you assign the metadata file that is used to reattach the snapshot set or to recover using that snapshot set.
The complete syntax of the vxsnap create command is:
vxsnap -x filename create [-gDynamicDiskGroupName] source=Volume [/DriveLetter=DriveLetter] [/DrivePath=DrivePath] [/Newvol=NewVolName][/Plex=PlexName]... writer=WriterName component=ComponentName [server=ServerName] [instance=InstanceName] [backuptype=FULL|COPY][-O]
The WriterName and ComponentName are required. The component name is the name of the SQL database. The option to assign drive letters or mount points is useful for tracking volumes and for scripting purposes. You can use either a Full backup or Copy backup for restoring from a snapshot (recovery). However, if you want to replay logs in SQL Server as part of restoring a database, a Full backup needs to have been created earlier. When replaying logs, you can replay from the time of the last Full backup. A Copy backup does not affect this sequence of log replay and therefore is often used as an "out of band" copy for purposes such as testing or data mining.
Note:
Any text string that contains spaces must be enclosed in quotation marks.