Centos6.4 Oracle11g random start and close

Source: Internet
Author: User

Centos6.4 Oracle11g random start and close configuration steps: 1. Modify the dbstart and dbshut scripts $ vi $ ORACLE_HOME/bin/dbstart to change ORACLE_HOME_LISTNER = $1 to ORACLE_HOME_LISTNER = $ ORACLE_HOME $ vi $ ORACLE_HOME/bin/dbshut to ORACLE_HOME_LISTNER = $1 = $ ORACLE_HOME 2. Modify/etc/oratab $ su-root # vi/etc/oratab and find # $ ORACLE_HOME with the value of $ ORACLE_HOME, replace $ SID with the value of $ SID variable $ SID: $ ORACLE_HOME: N with $ SID: $ ORACLE_HOME: Y 3. Edit the startup close script # vi/etc/rc. d/init. d/oracle #! /Bin/bash # chkconfig: 234 61 61 # description: Oracle 11g AutoRun Service #/etc/rc. d/init. d/oracle case "$1" in start) # starts oracle listener and instance echo "Starting Oracle Database: "su-oracle-lc" lsnrctl start "su-oracle-lc dbstart; stop) # shutdown oracle listner and instance echo" Shuting down Oracle Database: "su-oracle-lc" lsnrctl stop "su-oracle-lc dbshut; reload | restar T) $0 stop $0 start; *) echo "Usage: {start | stop | reload | restart} "exit 1 esacexit 0 4. Check whether the script is correctly executed # cd/etc/rc. d/init. d #. /oracle start #. /oracle stop 5. Execute the following command: # chmod 750/etc/rc. d/init. d/oracle # ln-s/etc/rc. d/init. d/oracle/etc/rc2.d/S61oracle # ln-s/etc/rc. d/init. d/oracle/etc/rc3.d/S61oracle # ln-s/etc/rc. d/init. d/oracle/etc/rc4.d/S61oracle # ln-s/etc/rc. d/init. d/oracle/etc/rc0.d/K61orac Le # ln-s/etc/rc. d/init. d/oracle/etc/rc6.d/K61oracle # chkconfig -- level 234 oracle on # chkconfig -- add oracle note: When chkconfig is executed, you need to add at least two lines of comments to the script (step 1). The first line tells chkconfig the running level of the service, and the second line adds a brief description about the service. 5. Restart the linux operating system and check whether oracle is automatically started and restarted. You can see the relevant information on the system startup page.

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.