HP B6960-96008 Bedienungsanleitung Seite 68

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 396
  • Inhaltsverzeichnis
  • FEHLERBEHEBUNG
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 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
Seitenansicht 67
1 2 ... 63 64 65 66 67 68 69 70 71 72 73 ... 395 396

Kommentare zu diesen Handbüchern

Keine Kommentare