Oracle 11g 64-bit automatic restart in RHEL (Red Hat EnterPrise Linux) 5.5 64-bit

Source: Internet
Author: User
Tags stop script


Oracle 11g 64-bit automatic restart, automatic shutdown command in RHEL (Red Hat EnterPrise Linux) 5.5 64-bit Oracle 11g 64-bit in RHEL (Red Hat EnterPrise Linux, 5.5 64-bit automatic restart and shutdown command: www.2cto.com Log On As an oracle user and enter: vi/etc/init. d/oracle on the editing page, add the following content: (assume that the main Oracle directory is/u01/app/oracle/product/11.2.0/dbhome_1 )#! /Bin/sh # chkconfig: 35 80 10 # description: Oracle auto start-stop script. # Set ORA_HOME to be equivalent to the $ ORACLE_HOME # from which you wish to execute dbstart and dbshut; # Set ORA_OWNER to the user id of the owner of the # Oracle database in ORA_HOME.ORA_HOME =/u01/app/oracle/product/11.2.0/dbhome_1ORA_OWNER = oracleif [! -F $ ORA_HOME/bin/dbstart] then echo "Oracle startup: cannot start" exitfi www.2cto.com case "$1" in 'start') # start the Oracle databases: echo "Starting Oracle Databases... "echo" --------------------------------------------- ">/var/log/oracledate +" % T % a % D: Starting Oracle Databasee as part of system up. ">/var/log/oracleecho" ------------------------------------------------- ">/var/l Og/oraclesu-$ ORA_OWNER-c "$ ORA_HOME/bin/dbstart">/var/log/oracleecho "Done" # Start the Listener: echo "Starting Oracle Listeners... "echo" --------------------------------------------- ">/var/log/oracledate +" % T % a % D: Starting Oracle Listeners as part of system up. ">/var/log/oracleecho" ----------------------------------------------- ">/var/log/oraclesu-$ ORA_OWNER-c" $ ORA _ HOME/bin/lsnrctl start ">/var/log/oracleecho" Done. "echo" ----------------------------------------------- ">/var/log/oracledate +" % T % a % D: Finished. ">/var/log/oracleecho" --------------------------------------------- ">/var/log/oracletouch/var/lock/subsys/oracle; www.2cto.com 'stop ') # Stop the Oracle Listener: echo "Stoping Oracle Listeners... "echo "---------------------------- --------------------- ">/Var/log/oracledate +" % T % a % D: Stoping Oracle Listener as part of system down. ">>>/var/log/oracleecho" >>>/var/log/oraclesu-$ ORA_OWNER-c "$ ORA_HOME/bin/lsnrctl stop" >>/var/log /oracleecho "Done. "rm-f/var/lock/subsys/oracle # Stop the Oracle Database: echo" Stoping Oracle Databases... "echo "---------------------- --------------------------- ">/Var/log/oracledate +" % T % a % D: Stoping Oracle Databases as part of system down. ">>>/var/log/oracleecho" >>>/var/log/oraclesu-$ ORA_OWNER-c "$ ORA_HOME/bin/dbshut" >>/var/log/ oracleecho "Done. "echo" "echo" ----------------------------------------------- ">/var/log/oracledate +" % T % a % D: Finished. ">/var/ Log/oracleecho "-----------------------------------------------">/var/log/oracle; www.2cto.com 'restart') $0 stop $0 start; esac restart, you can see that Oracle is shut down with RHEL shutdown, and Oracle is automatically started after the system is restarted. Source http://www.cnblogs.com/downmoon/archive/2012/10/09/2716990.html

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.