Configure auto-start for Oracle Database startup

Source: Internet
Author: User

Configure auto-start for Oracle Database startup

Every time the database server is restarted, it is necessary to restart the database listening and instances, especially when the server is powered off and restarted and routinely maintained. Can I enable the instance and listener as the service starts on a Windows server? The answer is yes, of course. We can use the dbstart file provided by Oracle to set auto-start for Oracle Database startup. The setting method is as follows:

(1) first, make sure that environment variables such as ORACLE_HOME have been configured, similar to the following:

12345 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, and change it to ORACLE_HOME_LISTNER = $ ORACLE_HOME.

(3) edit the oratab file in the/etc directory, find orcl:/u01/app/oracle/product/11.2.0/db_1: N, and change it to orcl: /u01/app/oracle/product/11.2.0/db_1: Y.

(4) edit the rc. local Startup file in the/etc/rc. d directory and add the database self-starting script dbstart. Note: This step must be switched to the root identity for execution.

12345 vi /etc/rc.d/rc.local# Start database listening. quotation marks are required for spacessu - oracle -lc "/u01/app/oracle/product/11.2.0/db_1/bin/lsnrctl start"# Starting an instancesu - oracle -lc /u01/app/oracle/product/11.2.0/db_1/bin/dbstart

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

Related Article

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.