Configure the Oracle Database for boot

Source: Internet
Author: User

Whenever the database server restarts, restart the database for monitoring and instance, especially in the case of server power-down restart, routine maintenance. Can the instance and listener start as the service starts, like Windows Server? The answer is of course yes, we can use the Oracle-provided Dbstart file to set up the Oracle database to boot from. The Setup method is as follows:

(1), first of all to ensure that oracle_home and other environment variables are configured, similar to the following:

Vi. bash_profileoracle_base=/u01/app/oracleoracle_home= $ORACLE _base/product/11.2.0/db_1path= $ORACLE _home/bin:$ Pathexport oracle_base Oracle_home PATH

(2), edit the Dbstart file in the $oracle_home/bin directory, find oracle_home_listner=$1, modify it to oracle_home_listner= $ORACLE _home.

(3), edit the Oratab file in the/etc directory, locate the orcl:/u01/app/oracle/product/11.2.0/db_1:n, and modify it to: orcl:/u01/app/oracle/product/11.2.0/ Db_1:y.

(4), edit the rc.local boot file in the/ETC/RC.D directory, add the database self-startup script Dbstart. Note: The step must be switched to root for execution.

vi/etc/rc.d/rc.local# Start Database Listener, there are spaces must be quoted SU-ORACLE-LC "/u01/app/oracle/product/11.2.0/db_1/bin/lsnrctl start" # Launch instance su -Oracle-lc/u01/app/oracle/product/11.2.0/db_1/bin/dbstart

(5), restart check whether the configuration is successful.

Configure the Oracle Database for boot

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.