Tuesday, July 17, 2018

Shutdown and Startup Script

=====Shutdown Script====
#!/bin/bash

export TMP=/tmp
export TMPDIR=$TMP
export PATH=/usr/sbin:/usr/local/bin:$PATH
export ORACLE_HOSTNAME=qpaydb.nblbd.com
export ORACLE_UNQNAME=remitdb
export ORACLE_HOME=/u01/app/oracle/product/11.2.0.4.0/dbhome_1

export ORACLE_SID=remitdb
ORAENV_ASK=NO
. oraenv
ORAENV_ASK=YES

# Stop Database
sqlplus / as sysdba << EOF
SHUTDOWN IMMEDIATE;
EXIT;
EOF

# Stop Listener
lsnrctl stop

# stop the Enterprise Manager db console
$ORACLE_HOME/bin/emctl stop dbconsole


=====Startup Script====
#!/bin/bash
export TMP=/tmp
export TMPDIR=$TMP
export PATH=/usr/sbin:/usr/local/bin:$PATH
export ORACLE_HOSTNAME=qpaydb.nblbd.com
export ORACLE_UNQNAME=remitdb
export ORACLE_HOME=/u01/app/oracle/product/11.2.0.4.0/dbhome_1

export ORACLE_SID=remitdb
ORAENV_ASK=NO
. oraenv
ORAENV_ASK=YES

# Start Listener
lsnrctl start

# Start Database
sqlplus / as sysdba << EOF
STARTUP;
EXIT;
EOF

# start the Enterprise Manager db console
$ORACLE_HOME/bin/emctl start dbconsole


No comments:

Post a Comment