Linux下設定Oracle自啟動
測試機總是斷電,導致重啟後Oracle不自動重啟,需要手工操作,因此可以設定成自啟動模式。
作業系統:Linux
資料庫:Oracle 10g
1、vi /etc/oratab
找到bisal:/opt/oracle/102:N,將N設為Y。
檔案的註釋:
# This file is used by ORACLE utilities. It is created by root.sh
# and updated by the Database Configuration Assistant when creating
# a database.
# A colon, ':', is used as the field terminator. A new line terminates
# the entry. Lines beginning with a pound sign, '#', are comments.
#
# Entries are of the form:
# $ORACLE_SID:$ORACLE_HOME:
#
# The first and second fields are the system identifier and home
# directory of the database respectively. The third filed indicates
# to the dbstart utility that the database should , "Y", or should not,
# "N", be brought up at system boot time.
#
# Multiple entries with the same $ORACLE_SID are not allowed.
可以看到這裡$ORACLE_SID是bisal,$ORACLE_HOME是/opt/oracle/102。
設定為Y時,允許例項自啟動,當設定為N時,則不允許自啟動。
這個檔案裡的配置僅僅起一個開關的作用,其並不會具體的執行啟動和關閉,具體的操作由$ORACLE_HOME/bin/dbstart和dbshut 指令碼來實現。 這2個指令碼在執行時會檢查/etc/oratab 檔案裡的配置,為Y時才能繼續執行。
2、將lsnrctl start和dbstart新增到rc.local檔案中:
vi /etc/rc.d/rc.local
su oracle -lc "/opt/oracle/102/bin/lsnrctl start"
su oracle -lc /opt/oracle/102/bin/dbstart
檔案:
#!/bin/sh
#
# This script will be executed *after* all the other init scripts.
# You can put your own initialization stuff in here if you don't
# want to do the full Sys V style init stuff.
此處也可以使用自己定義的指令碼作為啟動指令碼。
然後重啟伺服器,就可以看到監聽和例項都可以自動啟動了。
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/29306197/viewspace-1080334/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Solaris下設定Oracle自啟動Oracle
- Linux下Oracle隨機自動啟動指令碼設定LinuxOracle隨機指令碼
- RedHat54下設定Oracle自動啟動RedhatOracle
- linux下tomcat自啟動設定LinuxTomcat
- TongWeb在Linux下設定開機自啟動WebLinux
- linux下oracle的自動啟動LinuxOracle
- Linux下oracle庫自啟動LinuxOracle
- Linux平臺下oracle設定開機啟動LinuxOracle
- Linux下開機自動啟動OracleLinuxOracle
- linux環境下ORACLE自啟動LinuxOracle
- Linux 下oracle自啟動指令碼LinuxOracle指令碼
- RedHat(Linux) Oracle資料庫設定開機自啟動RedhatLinuxOracle資料庫
- linux 下oracle10g自動啟動LinuxOracle
- linux下新增oracle自啟動指令碼LinuxOracle指令碼
- Linux下原始碼安裝MySQL後設定開機自動啟動Linux原始碼MySql
- Redhat as4 下oracle10g自啟動指令碼設定RedhatOracle指令碼
- linux下Oracle自動啟動與停止總結LinuxOracle
- 設定ORACLE GRID CONTROL 自動啟動Oracle
- oracle for linux 自動啟動OracleLinux
- linux oracle 自動啟動LinuxOracle
- linux 中oracle開機啟動設定LinuxOracle
- linux下單例項資料庫開機自啟動設定Linux單例資料庫
- windows下redis設定redis開機自啟動WindowsRedis
- 設定Oracle資料庫開機自啟動Oracle資料庫
- Linux中設定oracle例項和asm同時隨機自動啟動LinuxOracleASM隨機
- Linux 下 自動啟動oracle資料配置說明LinuxOracle
- oracle 11g之instance自動啟動設定Oracle
- linux下設定郵件自動傳送Linux
- Linux配置JavaEE環境 Linux中安裝JDK、Tomcat、mysql 設定Tomcat自啟動、設定mysql自啟動LinuxJavaJDKTomcatMySql
- linux下開機自動開啟單機oracleLinuxOracle
- [Oracle]設定Oracle隨Linux系統開機啟動OracleLinux
- Linux 下 Oracle隨系統自動啟動和關閉LinuxOracle
- Linux下新增自定義指令碼到開機自啟動,標準rpm,舉例:設定Apache自啟動Linux指令碼Apache
- openoffice啟動和自動啟動設定(centos)CentOS
- 啟動CRS單例項、設定自動啟動單例
- linux下如何自動啟動db!Linux
- Windows 設定 FRP 自動啟動WindowsFRP
- 開機自動啟動ORACLE ON LinuxOracleLinux