Oracle 12c Lnux Startup script

Source: Internet
Author: User

#!/bin/bash# #oracle: Start/stop Oracle Database 11g r2/12c## chkconfig:345  - Ten# description:the Oracle Database Server is a RDBMS created by Oracle corporation## processname:oracle./etc/rc.d/init.d/Functionslockfile=/var/lock/subsys/Oraclepath= $PATH: $HOME/Binoracle_user=Oracleexport pathoracle_base=/home/oracle/oracle_12c/app/Oracleoracle_home= $ORACLE _base/product/12.1.0/Dbhome_1oracle_sid=Myoraclepath= $PATH: $ORACLE _home/Binld_library_path= $ORACLE _home/lib: $ORACLE _home/Lib32nls_lang=American_china. Zhs16gbkexport oracle_base oracle_home PATH oracle_sid ld_library_path Nls_lang Case " $" inchstart)if[-F $LOCKFILE]; Then      Echo$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"   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 $ORACLE _home"   RM-f $LOCKFILE;;'Restart')   $0Stop $0start;;'Status')   if[-F $LOCKFILE]; Then      Echo$0started. Else      Echo$0stopped. fi   ;;*)   Echo "Usage: $ [Start|stop|status]"Exit1EsacExit0

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.