REL5 oracle service shell

Source: Internet
Author: User

In the REL5 oracle service shell, create an oracle file in/etc/init. d/. How can I get the Java code www.2cto.com #! /Bin/sh # oracle service start or stop shell ORA_HOME =/home/oracle/db/oracle/product/12.1.0/db_1 ORA_OWNER = oracle if [! -F $ ORA_HOME/bin/dbstart] then echo "Oracle startup: cannot start" exit fi case "$1" in 'start') # start the Oracle databases: echo "Starting Oracle Databases... "echo" --------------------------------------------- ">/var/log/oracle date +" % T % a % D: Starting Oracle Databases as part of system up. ">>>/var/log/oracle echo" --------------------------------------------- ">/var/log/oracle su-$ ORA_OWNER-c" $ ORA_HOME/bin/dbstart ">/var/ log/oracle echo "Done" # Start the Listener: echo "Starting Oracle Listeners... "echo" --------------------------------------------- ">/var/log/oracle date +" % T % a % D: Starting Oracle Listeners as part of system up. ">/var/log/oracle echo" --------------------------------------------- ">/var/log/oracle su-$ ORA_OWNER-c" $ ORA_HOME/bin/lsnrctl start ">/var /log/oracle echo "Done. "echo" ----------------------------------------------- ">/var/log/oracle date +" % T % a % D: Finished. ">>>/var/log/oracle echo" --------------------------------------------- ">/var/log/oracle touch/var/lock/subsys/oracle; 'stop ') # Stop the Oracle Listener: echo "Stoping Oracle Listeners... "echo" --------------------------------------------- ">/var/log/oracle date +" % T % a % D: Stoping Oracle Listener as part of system down. ">/var/log/oracle echo" --------------------------------------------- ">/var/log/oracle su-$ ORA_OWNER-c" $ ORA_HOME/bin/lsnrctl stop ">/var /log/oracle echo "Done. "rm-f/var/lock/subsys/oracle # Stop the Oracle Database: echo" Stoping Oracle Databases... "echo" --------------------------------------------- ">/var/log/oracle date +" % T % a % D: Stoping Oracle Databases as part of system down. ">/var/log/oracle echo" --------------------------------------------- ">/var/log/oracle su-$ ORA_OWNER-c" $ ORA_HOME/bin/dbshut ">/var/ log/oracle echo "Done. "echo" "echo" ----------------------------------------------- ">/var/log/oracle date +" % T % a % D: Finished. ">>>/var/log/oracle echo" --------------------------------------------- ">/var/log/oracle; 'restart') $0 stop $0 start ;; esac add service # chkconfig -- level 35 oracle on shutdown or stop the database before restarting the machine # ln-s/etc/init. d/oracle/etc/rc0.d/K01oracle // shutdown # ln-s/etc/init. d/oracle/etc/rc6.d/K01oracle // restart usage # service oracle start // start oracle # service oracle stop // close oracle # service oracle restart // restart xs @ xs # su-oracle Password: oracle @ xs # sqlplus/nolog SQL * Plus: Release 11.2.0.1.0 Production on Tue Feb 19 07:14:25 2013 Copyright (c) 1982,200 9, Oracle. all rights reserved. SQL> conn/as sysdba Connected. SQL> select sysdate from dual; SYSDATE --------- 19-FEB-13 SQL>

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.