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

Using the replication manager to back up an Oracle database
The general sequence of steps for implementing snapshot- or snapclone-based backups of an
Oracle database using the replication manager is as follows:
1. Determine which tablespaces need to be backed up.
2. Create the batch and script files to suspend and resume the desired tablespaces.
3. Determine which volumes need to be replicated.
4. Construct the replication manager job to replicate the volumes identified in step 3.
5. Test the process.
Determining which tablespaces need to be backed up
Consider the following when choosing the tablespaces to be backed up:
Any tablespace can be placed in online backup mode, but only those tablespaces whose
data files reside entirely on storage that can be replicated by the replication manager can be
backed up using snapshot, snapclone, or fractured mirrorclone methods.
A snapshot, snapclone, or fractured mirrorclone is a point-in-time copy of an entire physical
disk; therefore, it is important to understand that the snapshot copies may contain data from
other tablespaces that may not have been placed in online backup mode before the snapshot
was created. Only those data files belonging to tablespaces that were placed in online backup
mode will be useful for recovery purposes.
Creating the batch and script files
When you know which tablespaces will be replicated, you can create the batch files that will take
the tablespaces into and out of online backup mode. Two batch files are required: a pre.bat
file to place the tablespaces into online backup mode, and a post.bat file to take them back
out. The actual names of the batch files can be different; the examples in this appendix use pre.bat
and post.bat.
The following examples show the two methods that you can use. You will need to verify the
effectiveness and suitability of these batch files for their intended application.
Sample PRE routine
HP recommends using the Oracle SQL *Plus utility in command-line mode to issue the following
SQL scripts. The following command shows an example of executing the SQL script BC-pre.sql
on Windows:
c:\orant\bin\sqlplus "@BC-pre" > pre.log
This command should be placed in the pre.bat file. It specifies the path to the SQL *Plus utility,
passes the BC-pre.sql file as an input, and redirects the output to the pre.log file. Redirecting
the output to a log file is an important step, as described later.
The actual SQL commands that are issued to Oracle are located in the BC-pre.sql file. The
following samples can be used as a starting point for developing your own.
For example, to back up tablespaces USR and WEB, a command file might look like this:
**** connect internal/letmein; archive log list; alter tablespace USR
begin backup; alter tablespace WEB begin backup; quit; ****
68 Using the replication manager with Oracle tools