Database Reference
In-Depth Information
# --------------------------------------------------------------------------------------------------
# Run-time Procedure
# --------------------------------------------------------------------------------------------------
# Source the function library
. ${FUNCTION_LIB}
# Verify that SID was passed on command line
if [ ${#1} -eq 0 ]; then
if tty -s; then
read thisSID? "Please provide the name of the database: "
else
echo "The database name was not provided on the command line"
ExitCleanly
fi
read thisSID?"Enter the name of the database to be monitored: "
else
thisSID=`print $@ | awk '{print$NF}' | tr '[A-Z]' '[a-z]'`
fi
BO_NAME=scripted_blackout_${thisSID}
CleanUpFiles
CreateBlackout
ExitCleanly
Sample Script: emcli_stop_blackout.ksh
#!/bin/ksh
# ==============================================================================
# File: emcli_stop_blackout.ksh
# Purpose: Stop and delete a named OEM blackout
# Parameters: Database name
# ==============================================================================
# Enter the path to your shell script repository for OEM
FUNCTION_LIB=< Your shared script directory>/emcli_functions.lib
# WORKFILE is one of several file name variables cleaned up by the function library
export WORKFILE=/tmp/create_em_blackout_$PPID.lst
# --------------------------------------------------------------------------------------------------
# Run-time Procedure
# --------------------------------------------------------------------------------------------------
# Source the function library
. ${FUNCTION_LIB}
# Verify that SID was passed on command line
if [ ${#1} -eq 0 ]; then
if tty -s; then
read thisSID?"Please provide the name of the database: "
else
echo "The database name was not provided on the command line"
ExitCleanly
Search WWH ::




Custom Search