Home > Database > Mysql Tutorial > body text

Oracle 11gR2 单实例数据库开机自启

WBOY
Release: 2016-06-07 17:34:36
Original
1299 people have browsed it

Oracle 11gR2 单实例数据库开机自启 1.修改 /etc/oratab 最下面的 N 改为 Y 2.修改 $ORACLE_HOME/bin/dbstart 和 $ORACLE_HOME

Oracle 11gR2 单实例数据库开机自启

1.修改 /etc/oratab  最下面的 N  改为 Y

2.修改 $ORACLE_HOME/bin/dbstart 和 $ORACLE_HOME/bin/dbshut

ORACLE_HOME_LISNER=$ORACLE_HOME的绝对路径

3.加为linux服务:

vi /etc/init.d/oracle
#!/bin/sh
# chkconfig: 35 90 90
# description: Oracle 11gR2
# /etc/init.d/oracle
#
# Run-level Stratup script for the Oracle Instance, Listener, and Web Interface

export ORACLE_SID=doudou
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/dbhome_1
export TMP=/tmp
export TMPDIR=/u01/tmp
export PATH=$PATH:$HOME/bin:$ORACLE_HOME/bin:
umask 022
 

ORA_OWNR="oracle"

case "$1" in
  start)
        su $ORA_OWNR -lc $ORACLE_HOME/bin/dbstart
        echo "Oracle Start Successful!"
        ;;
  stop)
        su $ORA_OWNR -lc $ORACLE_HOME/bin/dbshut
        echo "Oracle Stop Successful!"
        ;;
  reload|restart)
        $0 stop
        $0 start
        ;;
  *)
        echo $"Usage: `basename $0` {start|stop|reload|restart}"
        exit 1
  esac
  exit 0

 
4.添加开机启动服务
chmod 755 /etc/init.d/oracle
chkconfig --add oracle
chkconfig oracle on
chkconfig --list oracle

linux

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!