Oracle 12c Lnux 启动脚本
#!/bin/bash # #oracle: Start/Stop Oracle Database 11g R2/12c # # chkconfig: 345 90 10 # description: The Oracle Database Server is an RDBMS created by Oracle Corporation # # processname: oracle . /etc/rc.d/init.d/functions LOCKFILE=/var/lock/subsys/oracle PATH=$PATH:$HOME/bin ORACLE_USER=oracle export PATH ORACLE_BASE=/home/oracle/Oracle_12c/app/oracle ORACLE_HOME=$ORACLE_BASE/product/12.1.0/dbhome_1 ORACLE_SID=MYORACLE PATH=$PATH:$ORACLE_HOME/bin LD_LIBRARY_PATH=$ORACLE_HOME/lib:$ORACLE_HOME/lib32 NLS_LANG=AMERICAN_CHINA.ZHS16GBK export ORACLE_BASE ORACLE_HOME PATH ORACLE_SID LD_LIBRARY_PATH NLS_LANG case "$1" in start) if [ -f $LOCKFILE ]; then echo $0 already running. exit 1 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 $0 already stopping. exit 1 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‘) $0 stop $0 start ;; ‘status‘) if [ -f $LOCKFILE ]; then echo $0 started. else echo $0 stopped. fi ;; *) echo "Usage: $0 [start|stop|status]" exit 1 esac exit 0
郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。