HP B6960-96008 Manual do Utilizador Página 68

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
Vista de página 67
Integrating Oracle and Data Protector
Configuring an Oracle Backup
Chapter 146
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
startup
EOF
echo "Oracle database \"$DB_NAME\" started."
exit 0
else
echo "Cannot find Oracle SQLPLUS
Vista de página 67
1 2 ... 63 64 65 66 67 68 69 70 71 72 73 ... 395 396

Comentários a estes Manuais

Sem comentários