当前位置:网站首页>Linux7 (centos7) setting oracle11 boot auto start
Linux7 (centos7) setting oracle11 boot auto start
2022-06-29 01:11:00 【Pain fast buckle】
stay linux7 Under the installation of oracle, It is troublesome to restart the database after each restart , Therefore, it is set as startup and self startup .
1、 modify oracle Self startup profile oratab, modify N by Y, allow oracle The database starts when the system starts
[[email protected] ~]# vi /etc/oratab
As shown below , Will the last line of N It is amended as follows Y

# 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. # # orcl:/syn/oracle/product/11.2.0:Y
2、 modify oracle Of dbstart file
take ORACLE_HOME_LISTNER=$1
It is amended as follows ORACLE_HOME_LISTNER=$ORACLE_HOME
[[email protected] bin]# vi /syn/oracle/product/11.2.0/bin/dbstart
As shown below :
# usage: dbstart $ORACLE_HOME
#
# whose third field is a "Y". If the third field is set to "Y" and
# there is no ORACLE_SID for an entry (the first field is a *),
# then this script will ignore that entry.
#
# This script requires that ASM ORACLE_SID's start with a +, and
# that non-ASM instance ORACLE_SID's do not start with a +.
#
# If ASM instances are to be started with this script, it cannot
# be used inside an rc*.d directory, and should be invoked from
# rc.local only. Otherwise, the CSS service may not be available
# yet, and this script will block init from completing the boot
# cycle.
#
# If you want dbstart to auto-start a single-instance database that uses
# an ASM server that is auto-started by CRS (this is the default behavior
# for an ASM cluster), you must change the database's ORATAB entry to use
# a third field of "W" and the ASM's ORATAB entry to use a third field of "N".
# These values specify that dbstart auto-starts the database only after
# the ASM instance is up and running.
#
# Note:
# Use ORACLE_TRACE=T for tracing this script.
#
# The progress log for each instance bringup plus Error and Warning message[s]
# are logged in file $ORACLE_HOME/startup.log. The error messages related to
# instance bringup are also logged to syslog (system log module).
# The Listener log is located at $ORACLE_HOME_LISTNER/listener.log
#
# On all UNIX platforms except SOLARIS
# ORATAB=/etc/oratab
#
# To configure, update ORATAB with Instances that need to be started up
# Entries are of the form:
# $ORACLE_SID:$ORACLE_HOME:<N|Y|W>:
# An example entry:
# main:/usr/lib/oracle/emagent_10g:Y
#
# Overall algorithm:
# 1) Bring up all ASM instances with 'Y' entry in status field in oratab entry
# 2) Bring up all Database instances with 'Y' entry in status field in
# oratab entry
# 3) If there are Database instances with 'W' entry in status field
# wait for all of them to be started
# fi
# 4) Bring up all Database instances with 'W' entry in status field in
# oratab entry
#
#####################################
LOGMSG="logger -puser.alert -s "
trap 'exit' 1 2 3
# for script tracing
case $ORACLE_TRACE in
T) set -x ;;
esac
# Set path if path not set (if called from /etc/rc)
SAVE_PATH=/bin:/usr/bin:/etc:${PATH} ; export PATH
SAVE_LLP=$LD_LIBRARY_PATH
# First argument is used to bring up Oracle Net Listener
ORACLE_HOME_LISTNER=$ORACLE_HOME
if [ ! $ORACLE_HOME_LISTNER ] ; then
3、 take dbstart Add power on self start , modify /etc/rc.d/rc.local file
[[email protected] ~]# vi /etc/rc.d/rc.local
Add at the end su - oracle -lc /syn/oracle/product/11.2.0/bin/dbstart, And save .( Press oracle Actual path filling )
#!/bin/bash # THIS FILE IS ADDED FOR COMPATIBILITY PURPOSES # # It is highly advisable to create own systemd services or udev rules # to run scripts during boot instead of using this file. # # In contrast to previous versions due to parallel execution during boot # this script will NOT be run after all other services. # # Please note that you must run 'chmod +x /etc/rc.d/rc.local' to ensure # that this script will be executed during boot. touch /var/lock/subsys/local su - oracle -lc /syn/oracle/product/11.2.0/bin/dbstart
4、 to /etc/rc.d/rd.local File add executable rights (centos7 For security, the executable permission of this file is cancelled by default )
[[email protected] ~]# chmod u+x /etc/rc.d/rc.local
5、 After restarting the server ,oracle The database and monitoring have been started successfully
边栏推荐
- WPF 实现心电图曲线绘制
- Connected to rainwater series problems
- Easycvr service private What should I do if the PEM file is emptied and cannot be started normally?
- Check the open source projects of yyds in June!
- [Fire Detection] forest fire detection system based on Matlab GUI (with panel) [including Matlab source code phase 1921]
- The function of Schottky diode in preventing reverse connection of power supply
- Different subsequence problems I
- User login (remember the user) & user registration (verification code) [using cookie session technology]
- XML and other file contents in idea cannot be highlighted, and the file becomes gray
- 最新版CorelDRAW Technical Suite2022
猜你喜欢

接雨水系列问题

独家分析 | 关于简历和面试
![[staff] accent mark, gradually stronger mark and gradually weaker mark](/img/5d/5738bd5503d7ed0621932f901c2e8d.jpg)
[staff] accent mark, gradually stronger mark and gradually weaker mark

What is contemporaneous group analysis? Teach you to use SQL to handle

How to mount FSS object storage locally

EasyCVR服务private.pem文件被清空,导致无法正常启动该如何处理?
![[image enhancement] manual multiple exposure fusion amef image defogging based on MATLAB [including Matlab source code 1916]](/img/e9/e5a7163c949db9e649829fcdcf76f5.jpg)
[image enhancement] manual multiple exposure fusion amef image defogging based on MATLAB [including Matlab source code 1916]

Analysis Framework -- establishment of user experience measurement data system

EasyCVR播放视频出现卡顿花屏时如何解决?

Jbridge bridging frame technology for AI computing power landing
随机推荐
What is contemporaneous group analysis? Teach you to use SQL to handle
Getting started with SQL
Do280 allocating persistent storage
How to handle a SIGTERM - how to handle a SIGTERM
Rasa对话机器人之HelpDesk (五)
多维分析预汇总应该怎样做才管用?
Redis common command manual
What is the reason for the service crash caused by replacing the easycvr cluster version with the old database?
Magic Quadrant of motianlun's 2021 China Database
SRAM和DRAM之间的异同
What is the difference between the history and Western blotting
EasyCVR播放视频出现卡顿花屏时如何解决?
【SV 基础】queue 的一些用法
[UVM] my main_ Why can't the case exit when the phase runs out? Too unreasonable!
Finally understand the difference between DOM XSS and reflection XSS
Mask wearing face data set and mask wearing face generation method
个人买同业存单基金选择什么证券公司开户好,更安全
统计学习方法(4/22)朴素贝叶斯
Esmm reading notes
[MCU club] design of classroom number detection based on MCU [simulation design]