User script example, Script1.txt (used for data mining) – HP Serveur lame HP ProLiant BL465c Gen8 User Manual
Page 386
• The copy groups are composed of the following two generations:
Generation 1 (
VG01
,
VOL11
and
VG01
,
VOL12
): Used for data mining
Generation 2 (
VG02
,
VOL21
and
VG02
,
VOL22
): Used for backup
User script example
The following two user scripts are used in this example:
script1.txt (used for data mining)
LOCAL_BACKUP=YES
#Pre-backup user script section
[PRE_PROC]
#The Protection Manager service will be started.
[CMD]
CMDLINE=C:\user\detach_databases.bat
END_CODE=TERMINATE_NZ
TIMEOUT=600
LOCATION=REMOTE
PARENT_STAT=NORMAL
#Post-backup user script section
[POST_PROC]
#Normal case
[CMD]
CMDLINE=C:\user\remote_sqlrestore.bat
END_CODE=1
TIMEOUT=600
LOCATION=REMOTE
PARENT_STAT=NORMAL
[PRE_PROC]
: Executes the
detach_databases.bat
batch file. The contents of
detach_databases.bat
detach the database (created in the previous operation) on the secondary
volume and unmount the secondary volume.
•
detach_databases.bat
@echo off
@osql -E -S DBServer2\instB -i "C:\user\detach_userdbs.sql"
if NOT "%ERRORLEVEL%"=="0" GOTO ABEND
@drmumount -copy_group VG01,VOL11
if NOT "%ERRORLEVEL%"=="0" GOTO ABEND
@drmumount -copy_group VG01,VOL12
if NOT "%ERRORLEVEL%"=="0" GOTO ABEND
GOTO END
:ABEND
exit 1
:END
exit 0
Operation for SQL Server databases
386