RedHat(Linux) Oracle資料庫設定開機自啟動
1 首先修改/etc/oratab檔案新增如下行:
ycr:/u01/app/oracle/product/12.1.0/dbhome_1:Y
關於/etc/oratab檔案解釋如下:
# This file is used by ORACLE utilities. It is created by root.sh
# and updated by either Database Configuration Assistant while creating
# a database or ASM Configuration Assistant while creating ASM instance.
# 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:<N|Y>:
#
# The first and second fields are the system identifier and home
# directory of the database respectively. The third field 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.
#
#
ycr:/u01/app/oracle/product/12.1.0/dbhome_1:Y
上面三個引數的意義分別為,例項名、ORACLE HOME、是否允許使用dbstart啟動資料庫
2 修改檔案/etc/rc.d/rc.local,新增如下行:
su oracle -lc "/u01/app/oracle/product/12.1.0/dbhome_1/bin/lsnrctl start"
su oracle -lc "/u01/app/oracle/product/12.1.0/dbhome_1/bin/dbstart"
關於rc.local解釋如下:
#!/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.
touch /var/lock/subsys/local
su oracle -lc "/u01/app/oracle/product/12.1.0/dbhome_1/bin/lsnrctl start"
su oracle -lc "/u01/app/oracle/product/12.1.0/dbhome_1/bin/dbstart"
/etc/rc.d/rc.local做為初始化指令碼中,的最後一個隨開機啟動。
ycr:/u01/app/oracle/product/12.1.0/dbhome_1:Y
關於/etc/oratab檔案解釋如下:
# This file is used by ORACLE utilities. It is created by root.sh
# and updated by either Database Configuration Assistant while creating
# a database or ASM Configuration Assistant while creating ASM instance.
# 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:<N|Y>:
#
# The first and second fields are the system identifier and home
# directory of the database respectively. The third field 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.
#
#
ycr:/u01/app/oracle/product/12.1.0/dbhome_1:Y
上面三個引數的意義分別為,例項名、ORACLE HOME、是否允許使用dbstart啟動資料庫
2 修改檔案/etc/rc.d/rc.local,新增如下行:
su oracle -lc "/u01/app/oracle/product/12.1.0/dbhome_1/bin/lsnrctl start"
su oracle -lc "/u01/app/oracle/product/12.1.0/dbhome_1/bin/dbstart"
關於rc.local解釋如下:
#!/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.
touch /var/lock/subsys/local
su oracle -lc "/u01/app/oracle/product/12.1.0/dbhome_1/bin/lsnrctl start"
su oracle -lc "/u01/app/oracle/product/12.1.0/dbhome_1/bin/dbstart"
/etc/rc.d/rc.local做為初始化指令碼中,的最後一個隨開機啟動。
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/29135257/viewspace-2123768/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Linux平臺Oracle開機自啟動設定LinuxOracle
- redhat enterprise linux中vsftp開機自啟動RedhatLinuxFTP
- Oracle Linux 7.1 透過systemctl將Weblogic設定為開機自啟動OracleLinuxWeb
- TongWeb在Linux下設定開機自啟動WebLinux
- Linux MySQL 服務設定開機自啟動LinuxMySql
- Linux Redis 服務設定開機自啟動LinuxRedis
- linux設定開機啟動Linux
- linux7 開機自啟動oracleLinuxOracle
- 【OEM】Oracle oem取消開機自動啟動(linux)OracleLinux
- 4 配置Oracle資料庫自動啟動Oracle資料庫
- linux設定開機自啟動指令碼的最佳方式Linux指令碼
- oracle配置開機自啟動Oracle
- 設定開機自啟動nginx和httpdNginxhttpd
- Ubuntu 設定開機自啟動指令碼Ubuntu指令碼
- frp設定開機自啟FRP
- Linux部署的WGCLOUD的探針agent如何設定開機自啟動LinuxGCCloud
- linux server設定開機自動連線WIFILinuxServerWiFi
- windows下redis設定redis開機自啟動WindowsRedis
- systemctl 命令設定開機自啟動失敗
- centos7.5 設定Mysql開機自啟動CentOSMySql
- Linux CentOS開機啟動項設定命令:chkconfigLinuxCentOS
- Linux 新增開機自啟動Linux
- Linux開機自啟動配置Linux
- Oracle 19c 利用觸發器在資料庫啟動後自動開啟 PDBOracle觸發器資料庫
- 設定msyqlphp-fpm開機自動啟動指令碼PHP指令碼
- java程式設定開機自啟Java
- Android設定app開機自啟AndroidAPP
- Linux配置JavaEE環境 Linux中安裝JDK、Tomcat、mysql 設定Tomcat自啟動、設定mysql自啟動LinuxJavaJDKTomcatMySql
- Oracle資料庫啟動步驟Oracle資料庫
- lubuntu設定開機啟動Ubuntu
- Oracle sysman.mgmt_jobs導致資料庫自動重啟Oracle資料庫
- Oracle資料庫開啟NUMA支援Oracle資料庫
- win 開機自動輸入密碼 並設定 cmder 開機自啟執行密碼
- 如何設定win10軟體開機自動啟動 win10軟體開機自動啟動的方法Win10
- OracleLinux上的Oracle開關機自啟動OracleLinux
- 每天自動備份Oracle資料庫Oracle資料庫
- win10電腦開啟蓋子自動開機怎麼設定 win10翻蓋自動開機設定方法Win10
- Linux 新增指令碼開機自啟動Linux指令碼
- Linux 下軟體開機自啟動Linux