Restoring an sql server database – HP Serveur lame HP ProLiant BL465c Gen8 User Manual

Page 294

Advertising
background image

Restoring an SQL Server database to a primary volume

This section provides an example of recovering an SQL Server database when the backup data is
stored on the secondary volume. This example restores the data from the secondary volume to the
primary volume by resynchronizing the volumes. The operation ID is

Operation_A

.

Restoring an SQL Server database

To restore the SQL Server database:

1.

Check the backup ID of the backup you want to use for restoration.

Check the backup ID of the backup data to be used for restoring. To check the backup ID, execute
the

drmsqlcat

command on the database server. Here, the predetermined instance (default)

is used as the instance name of SQL Server.

DBServer >drmsqlcat default

INSTANCE: default

BACKUP-ID: 0000000001 BACKUP-MODE: ONLINE INSTANCE: default ORIGINAL-ID: 0000000001

START-TIME:2002/06/01 10:00:00 END-TIME: 2002/06/01 10:03:00 HOSTNAME: DBServer

T DB OBJECT FILE FS DG DEVICE COPY-GROUP

M DB1 METAFILE D:\MSSQL\DBServer\INSTANCE_1\META D: - - -

D DB1 DATAFILE E:\SQL\data1 E: - Harddisk1 VG01,sqlvol01

T DB1 TRANSACT E:\SQL\tlog E: - Harddisk2 VG01,sqlvol01

:

If you perform restoration in units of instances, including a specific database, by executing the
restoration command with the

-target

option specified, check the restoration target.

2.

Create a backup ID file.

To create a backup ID file, execute

EX_DRM_BACKUPID_SET

with the backup ID.

DBServer > EX_DRM_BACKUPID_SET Operation_A -backup_id 0000000001

3.

Restore the data from the secondary volume to the primary volume.

Restore the data by resynchronizing the primary and secondary volumes. To restore the data,
execute

EX_DRM_SQL_RESTORE

on the database server.

DBServer > EX_DRM_SQL_RESTORE Operation_A -resync

When

EX_DRM_SQL_RESTORE

is executed with the

-undo

option specified, restoration is

performed while the database is in the standby status, in which the database is read-only. If the

-undo

option is omitted, after restoration, the status of the database changes to loading, and

the database cannot be viewed. Note that the

-undo

option cannot be used unless the UNDO

file storage directory has been set using the

drmsqlinit

command.

Also, do not connect to SQL Server while executing

EX_DRM_SQL_RESTORE

.

4.

Recover the SQL Server database.

To recover the SQL Server database, execute the

drmsqlrecover

or

drmsqlrecovertool

command on the database server.

The following shows an example of the

drmsqlrecover

command and

drmsqlrecovertool

dialog box. For details on the

drmsqlrecover

command or the

drmsqlrecovertool

dialog box,

see the HP P9000 Replication Manager Software Application Agent CLI Reference Guide.

Operation for SQL Server databases

294

Advertising