beautypg.com

Determining which volumes need to be replicated, Single sql server database – HP P6000 Continuous Access Software User Manual

Page 13

background image

The following example shows a

pre.bat

file for this configuration.

@ echo off

rem pre.bat file for suspending multiple SQL Server databases

cd \dbutil

dbutil –mfreeze 1 of 3 Server1 TestDB1

dbutil –mfreeze 2 of 3 Server1 TestDB2

dbutil –mfreeze 3 of 3 Server1 TestDB3

The following example shows a

post.bat

file for this configuration.

@ echo off

rem post.bat file for thawing multiple suspended SQL Server databases

cd \dbutil

dbutil –mthaw 3

Determining which volumes need to be replicated

A full database backup includes all data and log files that are associated with that database. A simple
way to determine precisely the needed files is to execute the

sp_dbhelp

stored procedure as

follows:

exec sp_helpdb

This procedure returns a list of files used by the database. The snapshots and snapclones of all the
volumes identified in this step must be created at the same time and by the same job. Using multiple
jobs to create the snapshots or snapclones would result in the files being captured at different times
and would invalidate the backup. Repeat this procedure to determine the volumes that need to be
replicated for each database.

The following examples expand the examples used in the previous step.

Single SQL Server database

To determine where the data and log files for the

TestDB

database are located, execute the

sp_helpdb

procedure:

exec sp_helpdb TestDB

testdb_Data F:\SQLdata\testdb_Data.MDF

testdb_Log E:\SQLlogs\testdb_Log.LDF

In this case, the database is a single data file located on the

E:

drive and a single log file located

on the

F:

drive. A backup of this database requires snapshots or snapclones of both

E:

and

F:

.

Three SQL Server databases on a common set of volumes

To determine where the data and log files for the

TestDB1

,

TestDB2

, and

TestDB3

databases are

located, execute the

sp_helpdb

procedure for each database:

exec sp_helpdb TestDB1

testdb1_Data F:\SQLdata\testdb1_Data.MDF

testdb1_Log E:\SQLlogs\testdb1_Log.LDF

exec sp_helpdb TestDB2

testdb2_Data G:\SQLdata\testdb2_Data.MDF

testdb2_Log E:\SQLlogs\testdb2_Log.LDF

HP StorageWorks DButil user guide

13