我的过程如下:
1.用root在/etc/rc.d/rc.local(是个文件)中添加下面黄色的内容
[root@ksdb rc.d]# more rc.local;
#!/bin/sh
#
# This script. will be executed *after* all the other init scripts.
# You can put your own initialization stuff in here if you don't
# want to do the full Sys V style. init stuff.
touch /var/lock/subsys/local
##the script. add /etc/rc.d/rc.local##
##start db script###
export ORACLE_SID=PROD
export ORACLE_HOME=/u01/app/oracle/product/10.2.0/db_1
su - oracle -c "/u01/app/oracle/product/10.2.0/db_1/bin/dbstart"
2.设置:用root在
/etc/oratab中设置下面:
PROD:/u01/app/oracle/product/10.2.0/db_1:Y
把N改成Y
3.修改$ORACLE_HOME/bin/dbstart脚本(先备份dbstart)
注释掉下面一行
ORACLE_HOME_LISTNER=/ade/vikrkuma_new/oracle
效果如下:
# Set this to bring up Oracle Net Listener
#ORACLE_HOME_LISTNER=/ade/vikrkuma_new/oracle
添加下面一行:
export ORACLE_HOME_LISTNER=$ORACLE_HOME
效果:
# Set this to bring up Oracle Net Listener
#ORACLE_HOME_LISTNER=/ade/vikrkuma_new/oracle
export ORACLE_HOME_LISTNER=$ORACLE_HOME
保存dbstart脚本
3.用root.重启,应该就没有问题了
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/119941/viewspace-722177/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/119941/viewspace-722177/