Oracle startup, shutdown, restart scripts

Source: Internet
Author: User

2015-09-24

Vim/etc/rc.d/init.d/oracle

#!/bin/bash# Oracle:start/Stop Oracle Database 11g r2# chkconfig:345  - Ten# description:the Oracle Database is an Object-relational Database Management system.#./etc/rc.d/init.d/Functionslockfile=/var/lock/subsys/Oracleoracle_home=/u01/app/oracle/product/11.2.0Oracle_user=Oracle Case " $" inch'Start')
If [-F $LOCKFILE];thenEcho$0already running. Exit1 fi Echo-N $"starting Oracle Database:" su-$ORACLE _user-c"$ORACLE _home/bin/lsnrctl Start" su-$ORACLE _user-c"$ORACLE _home/bin/dbstart $ORACLE _home" su-$ORACLE _user-c"$ORACLE _home/bin/emctl start Dbconsole" Touch$LOCKFILE;;'Stop') if[!-f $LOCKFILE]; Then Echo$0already stopping. Exit1 fi Echo-N $"stopping Oracle Database:" su-$ORACLE _user-c"$ORACLE _home/bin/lsnrctl Stop" su-$ORACLE _user-c"$ORACLE _home/bin/dbshut" su-$ORACLE _user-c"$ORACLE _home/bin/emctl Stop Dbconsole" RM-f $LOCKFILE;;'Restart') $0Stop $0start;;'Status') if[-F $LOCKFILE]; Then Echo$0started. Else Echo$0stopped. fi ;;*) Echo "Usage: $ [Start|stop|status]"Exit1EsacExit0

Oracle startup, shutdown, restart scripts

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.