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.