配置作業系統重啟後,Oracle資料庫和監聽自動啟動

feelpurple發表於2016-08-07
--配置作業系統重啟後,例項自動啟動
--將例項所在行最後的標誌N改為Y

[oracle@localhost etc]$ vim /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 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.
#
#
fire:/u01/app/oracle/product/11.2.0/db_1:Y

--配置作業系統重啟後,資料庫監聽自動啟動
[root@localhost ~]# vim /etc/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 -c 'dbstart'
su - oracle -c 'lsnrctl start'

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/26506993/viewspace-2123101/,如需轉載,請註明出處,否則將追究法律責任。

相關文章