In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-26 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
Oracle database how to set boot self-boot, I believe that many inexperienced people do not know what to do, so this paper summarizes the causes of the problem and solutions, through this article I hope you can solve this problem.
1. Modify $ORACLE_HOME/bin/dbstart
[oracle@seiang11g ~] $vim $ORACLE_HOME/bin/dbstart
Change ORACLE_HOME_LISTNER=$1 to ORACLE_HOME_LISTNER=$ORACLE_HOME
2. Modify $ORACLE_HOME/bin/dbshut
[oracle@seiang11g ~] $vim $ORACLE_HOME/bin/dbshut
Change ORACLE_HOME_LISTNER=$1 to ORACLE_HOME_LISTNER=$ORACLE_HOME
3. Modify / etc/oratab file
[oracle@seiang11g ~] $vim / etc/oratab
Change the last N in seiang11g:/u01/app/oracle/product/11.2.0/dbhome_1:N to Y to become seiang11g:/u01/app/oracle/product/11.2.0/dbhome_1:Y
4. Enter the commands dbshut and dbstart to test
[oracle@seiang11g ~] $dbshut
Oracle snooping stops and the process disappears.
[oracle@seiang11g ~] $dbstart
Oracle snooping starts and the process starts.
5. Switch to root account and set up a self-startup script.
[root@seiang11g init.d] # vim / etc/rc.d/init.d/oracle
Add the following (some values such as ORACLE_HOME and ORACLE_USER can be modified according to the actual situation):
#! / bin/bash
# oracle: Start/Stop Oracle Database 11g R2
# chkconfig: 345 90 10
# description: The Oracle Database is an Object-Relational Database Management System.
#
. / etc/rc.d/init.d/functions
LOCKFILE=/var/lock/subsys/oracle
ORACLE_HOME=/u01/app/oracle/product/11.2.0
ORACLE_USER=oracle
Case "$1" in
'start')
If [- f $LOCKFILE]; then
Echo $0 already running.
Exit 1
Fi
Echo-n $"Starting Oracle Database:"
Su-$ORACLE_USER-c "$ORACLE_HOME/bin/lsnrctl start"
Su-$ORACLE_USER-c "$ORACLE_HOME/bin/dbstart $ORACLE_HOME"
Su-$ORACLE_USER-c "$ORACLE_HOME/bin/emctl start dbconsole"
Touch $LOCKFILE
'stop')
If [!-f $LOCKFILE]; then
Echo $0 already stopping.
Exit 1
Fi
Echo-n $"Stopping Oracle Database:"
Su-$ORACLE_USER-c "$ORACLE_HOME/bin/lsnrctl stop"
Su-$ORACLE_USER-c "$ORACLE_HOME/bin/dbshut"
Su-$ORACLE_USER-c "$ORACLE_HOME/bin/emctl stop dbconsole"
Rm-f $LOCKFILE
'restart')
$0 stop
$0 start
'status')
If [- f $LOCKFILE]; then
Echo $0 started.
Else
Echo $0 stopped.
Fi
*)
Echo "Usage: $0 [start | stop | status]"
Exit 1
Esac
Exit 0
6. Modify / etc/init.d/oracle service file permissions
[root@seiang11g ~] # chmod 755 / etc/init.d/oracle
7. Set to boot
[root@seiang11g ~] # chkconfig oracle on
Note:
If the following prompt appears when executing chkconfig oralce on or chkconfig-add oracle:
Be sure to add the following two lines to the / etc/rc.d/init.d/oracle script
# chkconfig: 345 99 10
# description: script for the Oracle Instance, Listener (description content can be modified)
Description:
# chkconfig: 345 99 10
It is pointed out that the service is started at level 3 etc/rc.d/rcN.d 4 and 5, 99 is the sequence number (startup priority) of the linked file generated under the corresponding / etc/rc.d/rcN.d directory (N is the previously specified level, here is 345) K10oradbstart for the linked file generated in the directory / etc/rc.d/rcN.d (N is the level other than 345) corresponding to the level indicated earlier.
8. Conduct service oracle start/stop/restart test
9. Reboot restart View Oracle snooping and instance processes can be started automatically.
After reading the above, have you mastered how to set up the method of boot self-boot in Oracle database? If you want to learn more skills or want to know more about it, you are welcome to follow the industry information channel, thank you for reading!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.