红联Linux门户
Linux帮助

Oracle 10G在Fedora6的自动启动

发布时间:2007-01-13 21:22:25来源:红联作者:Dream
用Oracle用户,将/etc/oratab文件修改为"Y", 如:TSH1:/u01/app/oracle/product/9.2.0:Y

将下面脚本保存到/etc/init.d/dbora.

然后运行:chmod 750 /etc/init.d/dbora

最后将dbora加到服务中:chkconfig --level 345 dbora on

引用:
#!/bin/bash
#
# chkconfig: 35 95 1
# description: init script to start/stop oracle database 10g, TNS listener, EMS
#
#
# match these values to your environment:
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1
export ORACLE_TERM=xterm
export PATH=/home/oracle/bin:$ORACLE_HOME/bin:$PATH
#export NLS_LANG='croatian_croatia.ee8iso8859p2'
export ORACLE_SID=TSH1
export DISPLAY=localhost:0
export ORACLE_USER=oracle

# see how we are called:
case $1 in
start)
su - "$ORACLE_USER"< lsnrctl start
sqlplus /nolog< connect / as sysdba
startup
EOS
emctl start dbconsole
EOO
;;

stop)
su - "$ORACLE_USER"< lsnrctl stop
sqlplus /nolog< connect / as sysdba
shutdown immediate
EOS
emctl stop dbconsole
EOO
;;

*)
echo "Usage: $0 {start|stop}"
;;
esac
文章评论

共有 1 条评论

  1. Augseptm 于 2007-01-15 09:42:52发表:

    支持下