Linux 下設定Oracle 11.2 資料庫自動啟動

來源:互聯網
上載者:User

環境:OEL+Oracle 11.2.0.3

更改 $ORACLE_HOME/bin 下的dbstart 檔案

[oracle@Seven bin]$ vi dbstart

找到此段話,在最前端

# First argument is used to bring up Oracle Net Listener

ORACLE_HOME_LISTNER=$1

//需要將此處的 ORACLE_HOME_LISTNER=$1

修改為:

ORACLE_HOME_LISTNER=$ORACLE_HOME

if [ ! $ORACLE_HOME_LISTNER ] ; then

echo "ORACLE_HOME_LISTNER is not SET, unable to auto-start Oracle Net Listener"

echo "Usage: $0 ORACLE_HOME"

else

LOG=$ORACLE_HOME_LISTNER/listener.log

二:讓啟動指令碼生效:

[oracle@Seven bin]$ cat /etc/oratab

seven:/u01/oracle/product/11.2.0:N

改成

seven:/u01/oracle/product/11.2.0:Y

三、配置Oracle為自動啟動:

以root使用者登入,開啟“/etc/rc.d/rc.local”檔案,在最後添加下面幾行資訊:

[root@Seven ~]# vi /etc/rc.d/rc.local

su - oracle -c 'dbstart'

 

相關文章

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.