shutdown.sh
#!/bin/bash export TMP=/tmp export TMPDIR=$TMP export PATH=/usr/sbin:/usr/local/bin:$PATH export ORACLE_HOSTNAME=orc1 export ORACLE_UNQNAME=DB1 export ORACLE_BASE=/oracle export ORACLE_HOME=$ORACLE_BASE/product/12.1.0.2/db_1 export ORACLE_SID=DB1 ORAENV_ASK=NO . oraenv ORAENV_ASK=YES # Stop Database sqlplus / as sysdba << EOF SHUTDOWN IMMEDIATE; EXIT; EOF # Stop Listener lsnrctl stop