#!/bin/bash
#
# chkconfig: 2345 95 10
# description: init script to start/stop oracle database 10g, TNS listener \
# EMS, isqlplus
##------------------------##
## chkconfig --add oracle ##
## chkconfig --del oracle ##
##------------------------##
usage()
{
echo "Usage: $0 {start|restart|stop}"
exit 1
}
[ $# -gt 0 ] || usage
LOG_PATH=/var/log/oracle-start-stop.log
start(){
su - oracle<<EOO
lsnrctl start
sqlplus /nolog<<EOS
connect / as sysdba
startup
EOS
#emctl start dbconsole
#isqlplusctl start
EOO
}
stop(){
su - oracle<<EOO
lsnrctl stop
sqlplus /nolog<<EOS
connect / as sysdba
shutdown immediate
EOS
#emctl stop dbconsole
#isqlplusctl stop
EOO
}
case $1 in
start)
start >> $LOG_PATH
;;
stop)
stop >> $LOG_PATH
;;
restart)
stop >> $LOG_PATH
start >> $LOG_PATH
;;
*)
usage
;;
esac
分享到:
相关推荐
# 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...
# Run-level Startup script for the Oracle Instance, Listener, and # Web Interface export ORACLE_BASE=/u01/app/oracle export ORACLE_HOME=$ORACLE_BASE/product/12.2.0/dbhome_1 export ORACLE_SID=xdjadb ...
根据提供的信息,我们可以总结出以下关于“Oracle Auto Check Script”的详细知识点: ## 一、脚本概述 ### 标题与描述 该脚本被称为“Oracle Auto Check Script”,旨在为Oracle数据库管理员提供一种自动化的方式...
# Run-level Startup script for the Oracle Instance, Listener, and # Web Interface export ORACLE_BASE=/usr/oracle export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1 export ORACLE_SID=sws export ...
根据提供的文件信息,本文将详细解释“hamcp script for 横生trade for oracle”的相关知识点,包括如何启动和停止Oracle数据库以及与横生trade应用的相关配置和操作。 ### 标题解读:“hamcp script for 横生trade...
# description: Startup Script for Oracle Databases # /etc/rc.d/init.d/oradbstart export ORACLE_BASE=/u01/oracle/ export ORACLE_HOME=/u01/oracle/product/OraHome export ORACLE_SID=orcl export ...
# description: Startup script for Oracle Databases # export ORACLE_BASE=/u01/app/oracle export ORACLE_HOME=/u01/app/oracle/product/10.2.0/db_1 export ORACLE_SID=orcl export PATH=$PATH:$ORACLE_...
# Run-level Startup script for the Oracle Listener and Instances # It relies on the information in /etc/oratab export ORACLE_SID=cvrsdb export ORACLE_BASE=/opt/app/ora10g export ORACLE_HOME=/opt/app/...
# description: Startup Script for Oracle Databases # /etc/init.d/ora11g export ORACLE_SID=hmpt export ORACLE_BASE=/oracle export ORACLE_HOME=/oracle/product/11.1.0/db_1 export PATH=$PATH:$ORACLE_HOME/...
# description: Startup script for oracle Databases case "$1" in start) echo -n "Starting oracle: " su - oracle -c "dbstart" touch /var/lock/subsys/oracle echo "OK" ;; stop) echo -n "Shutting ...
ORACLE常用命令 一、ORACLE的启动和关闭 1、在单机环境下 要想启动或关闭ORACLE系统必须首先切换到ORACLE用户,如下 su - oracle a、启动ORACLE系统 oracle>svrmgrl SVRMGR>connect internal SVRMGR>startup ...
# description: init script to start/stop oracle database 10g, TNS listener, EMS, iSQL*Plus # # export ORACLE_BASE=/home/app/oracle export ORACLE_HOME=$ORACLE_BASE/product/10.1.0/db_1 export PATH...
startup mount; alter database archivelog; ``` 最后,需要设置归档路径: ``` alter system set log_archive_dest_1='location=D:appAdministratororadataarchivelog'; alter system set standby_archive_dest='...
echo "Oracle Script.init.d" if [ ! -f $ORACLE_HOME/bin/dbstart ] || [ ! -d $ORACLE_HOME ] then echo "Oracle startup: cannot start" exit 1 fi start() { # Oracle listener and instance ...
Creating default startup script /root/.vnc/xstartup Starting applications specified in /root/.vnc/xstartup Logfile is /root/.vnc/db1.bts.com:1.log ``` 以及运行dbca时出现的错误: ``` [oracle@Textbin]...
# oracle - Startup script for the Oracle Database 10g # # chkconfig: 345 90 10 # description: Oracle Database 10g # # processname: dbstart # config: /etc/sysconfig/oracle # pidfile: /var/run/oracle....
SQL>@/path/to/script.sql ``` **如何Drop Offline数据文件** 当数据文件处于离线状态时,可以通过以下命令将其删除: ```sql ALTER DATABASE DATAFILE '/path/to/datafile.dbf' DROP; ``` **如何修改DBFILES** ...
1. `startup`: 启动Oracle数据库实例。 2. `shutdown`: 关闭Oracle数据库实例,有多种模式(immediate、transactional、abort)。 3. `show user`: 显示当前登录的用户名。 4. `set echo on/off`: 控制是否显示...