open the oracle 10g on linux

imlihj2007發表於2008-01-09

first: you must edit the file named /$oracle_home/bin/dbstart

edit the $oracle_home_listenr=$oracle_home

second: you must edit the file named /$orale_home/bin/dbshut

with the same

third:edit the file called /etc/oratab

old:

new:

four:create the file /etc/init.d/oracledb

# !/bin/bash
# whoami
# root
# chkconfig: 345 51 49
# description: starts the oracle dabase deamons
#
ORACLE_HOME=/oracle/product/9idb
ORACLE_OWNER=oracle
case "$1" in
start)
echo -n "Starting oracle10g: "
su - $ORACLE_OWNER -c "$ORACLE_HOME/bin/dbstart" &
su - $ORACLE_OWNER -c "$ORACLE_HOME/bin/lsnrctl start"
#su - $ORACLE_OWNER -c "$ORACLE_HOME/export ORACLE_SID=CCEN"
touch /var/lock/subsys/oracle10g
echo
;;

stop)
echo -n "shutting down oracle10g: "
su - $ORACLE_OWNER -c "$ORACLE_HOME/bin/dbshut" &
su - $ORACLE_OWNER -c "$ORACLE_HOME/bin/lsnrctl stop"
rm -f /var/lock/subsys/oracle10g
echo
;;

'restart')
echo -n "restarting oracle10g: "
$0 stop
$0 start
echo
;;
*)
echo "usage: oracle10g "
exit 1

esac
exit 0

last:chkconfig --add oracledb

ok restart the system and the oracle services would started while the system starting@

[@more@]

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/9879835/viewspace-996986/,如需轉載,請註明出處,否則將追究法律責任。

相關文章