1. Set to Auto Start & Shutdown in file of the / etc / oratab.
{SID}: / data / oracle / product / 9i: y
2. Touch a file script to start & shutdown the Oralce Under /etc/rc.d/init.d/.
Case "$ 1" instart) echo "Starting Oracle Databases ..." echo "--------------------------------- ---------------- ">> / var / log / oracledate "% T% a% D: Starting Oracle Databasee As Part of System Up. ">> / var / log / oracleecho "----------------------------------------------- - ">> / var / log / oraclesu - Oracle-C" DBStart ">> / var / log / oracleecho" DONE. "echo" starting oracle listener ... "echo" --------- ---------------------------------------- ">> / var / log / oracleDate "% T% a% D: Starting Oracle Listeners As Part of System Up." >> / var / log / oracleecho "--------------------- -------------------------- ">> / var / log / oraclesu - Oracle-C" Lsnrctl Start ">> / var / log / Oracleecho "DONE." echo "" echo "---------------------------------------- --------- ">> / var / log / oracledate "% T% a% D: finished. ">> / var / log / oracleecho" ----------- -------------------------------------- ">> / var / log / oracletouch / var / Lock / Subsys / Oracle
; Stop) Echo "stoping Oracle Listener ..." echo "----------------------------------- -------------- ">> / var / log / oracledate "% T% a% D: stoping Oracle Listener As Part of System Down. ">> / var / log / oracleecho ------------------------------------- ">> / var / log / oraclesu - Oracle -c" lsnrctl stop ">> / var / log / oracleecho" DONE. "RM -F / VAR / LOCK / SUBSYS / ORACLEECHO" Stoping Oracle Databases ... "echo" ------------------------------------- " >> / var / log / oracledate "% T% a% D: stoping Oracle Databases as part of system down." >> / var / log / oracleecho "-------------- ----------------------------------- ">> / var / log / oraclesu - oracle -c" DBSHUT ">> / var / log / oracleecho" done. "echo" "echo" ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ ----------------- ">> / var / log / oracledate "% T% a% D: finished. ">> / var / log / oracleecho" --- ---------------------------------------------- ">> / Var / log / oracle ;; restart $ 0 STOP $ 0 Start
;; * Echo "USAGE: Oracle {start | stop | restart}" EXIT 1ESAC
3. ln -s /etc/rc.d/ininit.d/racle /etc/rc.d/rc3.d/s99racle
ln -s /etc/rc.d/init.d/oracle /etc/rc.d/rc0.d/k01racle
ln -s /etc/rc.d/init.d/racle /etc/rc.d/rc6.d/k01racle
4. With Oracle9i, IT Will Prompt can't Find Init File for database "SID". Fix It with Below Operate.
Cp /opt/oracle/admin/test/pfile/init {ssid }.ora $ oracle_home / dbs