linux数据库实例开机启动不了,linux下Oracle数据库实例开机自启动设置
linux下數(shù)據(jù)庫(kù)實(shí)例開機(jī)自啟動(dòng)設(shè)置
1、改動(dòng)/oratab
[root@org54 ~]# vi/etc/oratab???? --把N改為Y,例如以下提示
# This file is used by ORACLEutilities.? It is created by root.sh
# and updated by the Database ConfigurationAssistant when creating
# a database.
# A colon, ':', is used as the fieldterminator.? A new line terminates
# the entry.? Lines beginning with a pound sign, '#', arecomments.
#
# Entries are of the form:
#??$ORACLE_SID:$ORACLE_HOME::
#
# The first and second fields are thesystem identifier and home
# directory of the databaserespectively.? The third filed indicates
# to the dbstart utility that the databaseshould , "Y", or should not,
# "N", be brought up at systemboot time.
#
# Multiple entries with the same$ORACLE_SID are not allowed.
#
#
#game:/u01/app/oracle/product/10.2.0/db_1:N?? --dbca創(chuàng)建庫(kù)時(shí)注冊(cè)的默認(rèn)信息
--格式:$ORACLE_SID:$ORACLE_HOME:
--選項(xiàng)代表開機(jī)是否自啟動(dòng)
game:/u01/app/oracle/product/10.2.0/db_1:Y
~
~
~
~
2、編輯/dbstart
[oracle@org54 bin]$ cd$ORACLE_HOME/bin
[oracle@org54 bin]$ ls-ll |grep dbstart
-rwxr-xr-x 1 oracle oinstall??? 10415 Jan?1? 2000 dbstart
[oracle@org54 bin]$ vidbstart
--dbstart為開機(jī)自啟動(dòng)腳本,讓系統(tǒng)開機(jī)就去運(yùn)行dbstart腳本文件,它會(huì)去讀oratab文件。讀到Y(jié)就會(huì)把相應(yīng)的實(shí)例開機(jī)自啟動(dòng)
--調(diào)整或確認(rèn)監(jiān)聽路徑。如ORACLE_HOME_LISTNER=/ade/vikrkuma_new/oracle或ORACLE_HOME_LISTNER=$ORACLE_HOME依據(jù)設(shè)置的監(jiān)聽調(diào)整路徑
3、編輯/rc.local
[root@org54 ~]# vi/etc/rc.d/rc.local--加入例如以下兩行信息,啟動(dòng)實(shí)例、啟動(dòng)監(jiān)聽
#!/bin/sh
#
# This script will be executed *after* allthe other init scripts.
# You can put your own initialization stuffin here if you don't
# want to do the full Sys V style initstuff.
touch /var/lock/subsys/local
modprobe hangcheck-timer hangcheck_tick=30hangcheck_margin=180
su - oracle -c"/u01/app/oracle/product/10.2.0/db_1/bin/dbstart"
su - oracle -c"/u01/app/oracle/product/10.2.0/db_1/bin/lsnrctl start"
--命令中-c代表運(yùn)行腳本。腳本dbstart中指定啟動(dòng)的實(shí)例,腳本lsnrctl中啟動(dòng)配置的監(jiān)聽
4、重新啟動(dòng)驗(yàn)證
# reboot
[oracle@org54 ~]$ sqlplus'/as sysdba'
SQL*Plus: Release 10.2.0.1.0 - Productionon Fri Jul 4 10:40:57 2014
Copyright (c) 1982, 2005, Oracle.? All rights reserved.
Connected to:
Oracle Database 10g Enterprise EditionRelease 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Miningoptions
SQL> selectstatus,instance_name from v$instance;
STATUS??????INSTANCE_NAME
------------ ----------------
OPEN????????game
小結(jié):
linux下設(shè)置實(shí)例自啟動(dòng)有關(guān)腳本:
oratab:實(shí)例是否自啟動(dòng)的注冊(cè)信息
dbstart:開機(jī)啟動(dòng)腳本文件會(huì)讀取oratab信息
rc.local:開機(jī)后馬上要做的文件
***********************************************聲明************************************************
原創(chuàng)作品,出自 “深藍(lán)的blog” 博客,歡迎轉(zhuǎn)載。轉(zhuǎn)載時(shí)請(qǐng)務(wù)必注明出處(http://blog.csdn.net/huangyanlong)。
表述有錯(cuò)誤之處,請(qǐng)您留言,不勝感激。
*****************************************************************************************************
總結(jié)
以上是生活随笔為你收集整理的linux数据库实例开机启动不了,linux下Oracle数据库实例开机自启动设置的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: linux远程升级运行程序,运用RedH
- 下一篇: linux如何移动数据到文件系统,怎么把