发表于:2008.01.09 12:13
分类: oracle
出处:http://imlihj2007.itpub.net/post/34710/450563
---------------------------------------------------------------
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@






