HP Application Recovery Manager software Integration guide (March 2008)
For example, you can provide scripts to shut down and start
an Oracle instance or you can provide a post-exec script
that will back up the archive logs and control file to tape
using an RMAN backup script or third–party backup
software. For examples of shut-downing and starting an
Oracle instance on UNIX, see “Examples of pre-exec and
post-exec scripts on UNIX” on page 115.
Provide the pathname of the command or RMAN script.
Select this option to perform an offline backup session. This
option stops the database before creating a replica, and
restarts it after the replica is created. See Figure
31 on page 113.
Backup offline
Examples of pre-exec and post-exec scripts on UNIX
Pre-exec example
The following is an example of a script that shuts down an Oracle instance:
#!/bin/sh
export ORACLE_HOME=$2
export ORACLE_SQLNET_NAME=$1
if [ -f $ORACLE_HOME/bin/sqlplus ]; then
$ORACLE_HOME/bin/sqlplus << EOF
connect sys/manager@$ORACLE_SQLNET_NAME as sysdba
shutdown
EOF
echo "Oracle database \"$DB_NAME\" shut down."
exit 0
else
echo "Cannot find Oracle SQLPLUS ($ORACLE_HOME/bin/sqlplus)."
exit 1
fi
Post-exec example
The following is an example of a script that starts an Oracle instance:
#!/bin/sh
export ORACLE_HOME=$2
export ORACLE_SQLNET_NAME=$1
if [ -f $ORACLE_HOME/bin/sqlplus ]; then
$ORACLE_HOME/bin/sqlplus << EOF
connect sys/manager@$ORACLE_SQLNET_NAME as sysdba
Integration guide 115