In Friday, because the office suddenly power outages, the server restarted, the database did not follow the restart, I found that all the database did not set up automatic restart, in order to prevent future middle server restart, there will be no phone to wake me from sleep, let me manually start the database, I decided to take a moment to study the settings for Oracle to automatically restart with Linux, as follows:
1. Modify Oratab (root user execution)
The configuration format for/etc/oratab is as follows:
$ORACLE _sid: $ORACLE _home:y
2. Test Dbstart, dbstop (Oracle user execution)
Set Oracle_home, Oracle_home_listener
Execute Dbstart, Dbshut script test to deactivate Oracle instance and listener
Dbstart $ORACLE _home
Dbshut $ORACLE _home
3. Configure rc.local (root user execution)
Vi/etc/rc.d/rc.local
SU-ORACLE-LC "/home/oracle/app/oracle/product/11.2.0/dbhome_1/bin/dbstart $ORACLE _home"
Note here that Dbstart must write a full path, otherwise it may not be called correctly.
At this point, Oracle with the Linux automatic startup settings complete!
See more highlights of this column: http://www.bianceng.cnhttp://www.bianceng.cn/database/Oracle/