function oracle_start(){ # Start the Oracle databases: echo "-------------------------------------------------" date +" %T %a %D : Starting Oracle Databases as part of system up." echo "-------------------------------------------------" ${ORACLE_HOME}/bin/sqlplus /nolog << EOF conn / as sysdba startup alter pluggable database all open; exit EOF echo "Done."
# Start the Listener: echo "-------------------------------------------------" date +" %T %a %D : Starting Oracle Listeners as part of system up." echo "-------------------------------------------------" ${ORACLE_HOME}/bin/lsnrctl start echo "Done." echo "-------------------------------------------------" date +" %T %a %D : Finished." echo "-------------------------------------------------" }
function oracle_stop(){ # Stop the Oracle Listener: echo "-------------------------------------------------" date +" %T %a %D : Stoping Oracle Listener as part of system down." echo "-------------------------------------------------" ${ORACLE_HOME}/bin/lsnrctl stop echo "Done." # Stop the Oracle Database: echo "-------------------------------------------------" date +" %T %a %D : Stoping Oracle Databases as part of system down." echo "-------------------------------------------------" ${ORACLE_HOME}/bin/sqlplus /nolog << EOF conn / as sysdba alter pluggable database all close immediate; shutdown immediate exit EOF echo "Done." echo "" echo "-------------------------------------------------" date +" %T %a %D : Finished." echo "-------------------------------------------------"
近期评论