Chinaunix首页 | 论坛 | 博客
  • 博客访问: 757357
  • 博文数量: 160
  • 博客积分: 2516
  • 博客等级: 大尉
  • 技术积分: 1511
  • 用 户 组: 普通用户
  • 注册时间: 2004-10-24 17:58
文章分类

全部博文(160)

文章存档

2019年(2)

2018年(3)

2017年(15)

2016年(3)

2015年(11)

2014年(3)

2013年(1)

2012年(3)

2011年(17)

2010年(25)

2009年(17)

2008年(13)

2007年(14)

2006年(21)

2005年(10)

2004年(2)

分类: Oracle

2009-10-14 17:21:13

ORACLE 数据库自启动

 

1.修改 $ORACLE_HOME/bin/dbstart $ORACLE_HOME/bin/dbshut

ORACLE_HOME_LISNER=$ORACLE_HOME的实际路径

 

2.修改 /etc/oratab  最的 N  改为 Y

 

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 LANG=zh_CN.GBK

export ORACLE_BASE=/db/app/oracle

export ORACLE_HOME=/db/app/oracle/product/11.2.0/dbhome

#export ORACLE_HOME_LISTNER=$ORACLE_HOME

export ORACLE_SID=alpha

export PATH=$PATH:$ORACLE_HOME/bin

 

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

 

#chmod 755 /etc/init.d/oracle

#chkconfig --add oracle

#chkconfig –list oracle

阅读(3172) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~