Specify a command or RMAN script that will be started by
ob2rman.pl on the Oracle Server system before the backup
(pre-exec) or after it (post-exec). RMAN scripts must
have the .rman extension. Do not use double quotes.
For example, you can provide scripts to shut down and start
an Oracle instance. 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 92.
Provide the pathname of the command or RMAN script.
Pre-exec, Post-exec
Select this option to perform an offline ZDB session. This
option stops the database before creating a replica, and
restarts it after the replica is created. See Figure
25 on page 89.
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
Data Protector Oracle ZDB integration92