HP P6000 Replication Solutions Manager Administrator Guide (T3680-96069, June 2012)

// NOTE: Please remove the archive logfile Switch, Add, and Snap commands below if
this job is not backing up archive log files
//
// Force a log switch to get the most current archive logs.
SwitchOracleArchiveLogFilesUsingRepository ( $repository ) onerror pauseat E3:
// OPTION: Add the archive logs
AddOracleArchiveLogFilesToRepository ( $repository ) onerror pauseat E3:
// Replicate the items in the repository.
SnapshotOracleUsingRepository ( $repository, FULLY_ALLOCATED, SAME,
ORACLE_ARCHIVE_LOG_FILE, NOWAIT ) onerror pauseat E3:
//
// Wait for user to initiate rollback.
Pause ( )
//
// Rollback.
E3: DeleteStorageVolumesUsingRepository ( $repository, REPLICATED ) onerror pauseat E3:
//
// Delete the repository.
E2: DeleteOracleRepository ( $repository ) onerror pauseat E2:
//
Exit ( SUCCESS )
//
// Failure exit - no rollback needed.
E1: Exit ( FAILURE )
After upgrading to HP Replication Solutions Manager 5.1 or later
The following example creates a new job using the Replicate host volume(s) job template.
In the example:
The ORCL.REGRESS.RDBMS.DEV.US.ORACLE.COM database, SYSTEM tablespace, and
Oracle repository Catalog 20091106.030426 are located on the G: drive of host
15.146.153.141.
The data files for the tablespace SYSTEM are located as follows:
Volume E: SYSTEMorc1.ora Data file #1 for SYSTEM
Volume F: SYSTEMorc2.ora Data file #2 for SYSTEM
Volume G: WEBorc4.ora Data file #3 for SYSTEM
Volume H: Archived redo logs only
To capture all of the data files for the SYSTEM tablespace, a replication manager job must
create replicas for E:, F:, and G:; because the tablespace has data files located on all three
volumes.
Oracle is running on a host with an IP address of 15.146.153.141. This host should be added
in the replication manager as an enabled host.
suspend_oracle_database.bat suspends the Oracle database on E:, F:, and G: drives.
[See Example 1 “Suspend Oracle database batch file.]
resume_oracle_database.bat resumes the Oracle database on E:, F:, and G: drives
after the snapshots are done. [See Example 2 “Resume Oracle database batch file.]
The number of volumes to replicate is set to 3.
Suspend source before replication and Launch backup after replication
check boxes are selected.
// Replicate host volume(s).
//
// Assign some variables that will be used in this job.
$source_host = SetVariable ( "15.146.153.141" )
$source_hostvol_unc1 = SetVariable ( "\\15.146.153.141\E:\" )
$source_hostvol_unc2 = SetVariable ( "\\15.146.153.141\F:\" )
$source_hostvol_unc3 = SetVariable ( "\\15.146.153.141\G:\" )
//
// Validate that resources are as expected.
ValidateHost ( $source_host )
ValidateHostVolume ( $source_hostvol_unc3 )
ValidateHostVolume ( $source_hostvol_unc2 )
ValidateHostVolume ( $source_hostvol_unc1 )
Migrating Oracle jobs 63