文件名称:Oracle安装单机后自启动参数配置.txt
文件大小:2KB
文件格式:TXT
更新时间:2022-11-25 12:51:43
oracle
#!/bin/bash # chkconfig: 345 99 10 # description: Startup Script for Oracle Databases # /etc/rc.d/init.d/oracle export ORACLE_BASE=/u01/app/oracle export ORACLE_HOME=/u01/app/oracle/product/12.1.0/dbhome_1 export ORACLE_SID=orcl export PATH=$PATH:$ORACLE_HOME/bin ORA_OWNR="oracle" # if the executables do not exist -- display error if [ ! -f $ORACLE_HOME/bin/dbstart -o ! -d $ORACLE_HOME ] then echo "Oracle startup: cannot start" exit 1 fi # depending on parameter -- startup, shutdown, restart # of the instance and listener or usage display case "$1" in start) # Oracle listener and instance startup echo -n "Starting Oracle: " su - $ORA_OWNR -c "$ORACLE_HOME/bin/dbstart" su - $ORA_OWNR -c "$ORACLE_HOME/bin/lsnrctl start" touch /var/lock/Oracle su - $ORA_OWNR -c "$ORACLE_HOME/bin/emctl start dbconsole" #su - $ORA_OWNR -c "$ORACLE_HOME/bin/isqlplusctrl start" echo "OK"