Auto-start setting of oracle11g on linux

Source: Internet
Author: User

Auto-start setting of oracle11g on linux

Generally, it is best to manually start the oracle server. If this problem occurs, it can be solved on site, but it is also worried that sometimes the machine will fail. After Automatic restart, In order to quickly restore the application, it is necessary to automatically start oracle at startup, in addition, it is found that the startup settings are not the same in different operating systems.

1. In the centos operating system, you can set

Directly add in rc. local

[root@localhost ~]# vim /etc/rc.local touch /var/lock/subsys/localsu - oracle < lsnrctl start sqlplus / as sysdbastartupquitEOFsu - oracle < export ORACLE_SID=pddev1sqlplus / as sysdbastartupquitEOF

Effective after restart, PS: But invalid in redhat System

2. dbstart is used in the redhat operating system. 2.1, test
[oracle@localhost ~]$ /oracle/app/oracle/product/11.2.0/dbhome_1/bin/dbstartORACLE_HOME_LISTNER is not SET, unable to auto-start Oracle Net ListenerUsage: /oracle/app/oracle/product/11.2.0/dbhome_1/bin/dbstart ORACLE_HOME[oracle@localhost ~]$ 

An error message is displayed, indicating that ORACLE_HOME is not recognized. In the following solution, modify dbstart and dbstut. In some versions, dbstut does not exist and can be ignored.
Vim/oracle/app/oracle/product/11.2.0/dbhome_1/bin/dbstart
Vim/oracle/app/oracle/product/11.2.0/dbhome_1/bin/dbstut

Set
ORACLE_HOME_LISTNER = $1

Change
ORACLE_HOME_LISTNER = $ ORACLE_HOME

2.2,[root@localhost ~]# vim /etc/oratab

powerdes:/oracle/app/oracle/product/11.2.0/dbhome_1:Y

2.3 set auto start in rc. local
[root@localhost bin]# 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/localsu - oracle -lc "/oracle/app/oracle/product/11.2.0/dbhome_1/bin/lsnrctl start"su - oracle -c "/oracle/app/oracle/product/11.2.0/dbhome_1/bin/dbstart"

The restart of the db server takes effect.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.