linux下启动oracle数据库实例的脚本
来源:互联网 发布:360safe php 编辑:程序博客网 时间:2024/05/29 16:21
来源:http://jaryer.blog.sohu.com/41567121.html
#!/bin/sh
cmdname="restart"
# get oracle sid information from env by default.
oracleSID=${ORACLE_SID}
env_oracleSID=${ORACLE_SID}
function echohelp(){
echo "******oracled Tool Helper******"
echo "Usage:sh oracled [start|stop|restart] SIDs"
echo "SIDs : seperated by comma"
exit 5
}
function startoracle(){
echo "begin to start oracle ..."
lsnrctl start
for curSID in `echo ${oracleSID} | awk 'BEGIN {RS=","}{ORS="/n"}{print $1}'` ; do
if [ "x${curSID}" = "x" ] ; then
continue;
fi
export ORACLE_SID=${curSID}
sqlplus /nolog <<EOF
connect /as sysdba
startup
exit
exit
EOF
echo "oracle DB [${curSID}] started OK."
done
}
function stoporacle(){
echo "begin to stop oracle ..."
for curSID in `echo ${oracleSID} | awk 'BEGIN {RS=","}{ORS="/n"}{print $1}'` ; do
if [ "x${curSID}" = "x" ] ; then
continue;
fi
export ORACLE_SID=${curSID}
sqlplus /nolog <<EOF
connect /as sysdba
shutdown immediate
exit
exit
EOF
echo "oracle DB [${curSID}] stopped OK."
done
lsnrctl stop
}
function restartoracle(){
stoporacle
startoracle
}
if [ $# -lt 1 ] ; then
echohelp
fi
until [ $# -eq 0 ]
do
tmpVOrg=$1
tmpV=`echo "${tmpVOrg}" | awk '{printf "%s",$1}' | tr '[A-Z]' '[a-z]'`
if [ $tmpV = "start" -o $tmpV = "restart" -o $tmpV = "stop" ] ; then
cmdname=${tmpV}
elif [ $tmpV = "--help" -o $tmpV = "-h" ] ; then
echohelp
else
oracleSID=$tmpVOrg
fi
shift
done
if [ "x${cmdname}" = "x" ] ; then
echohelp
fi
${cmdname}oracle
export ORACLE_SID=${env_oracleSID}
- linux下启动oracle数据库实例的脚本
- LINUX 下ORACLE的启动脚本
- Linux Shell经典实例解析--Oracle启动脚本(下)
- Linux Shell经典实例解析--Oracle启动脚本(下)
- linux下Oracle数据库实例开机自启动设置
- Linux下启动指定的Oracle数据库
- linux下oracle数据库的启动
- RedHat Linux下Oracle启动脚本的建立 dbstart oracle
- windows系统下启动关闭oracle数据库服务的脚本
- linux 下启动oracle数据库
- Linux下启动Oracle数据库
- linux 下启动oracle数据库
- linux下启动oracle数据库
- linux下启动oracle数据库
- Linux下启动oracle数据库
- Linux下启动Oracle数据库
- Aix下启动/停止Oracle数据库实例
- Linux下自动启动关闭Oracle脚本
- Asp.Net2.0无刷新客户端回调
- 中国商务智能免费资料收集
- .NET中回发或回调参数无效问题的解决
- C语言中 static修饰函数
- SQL数据库备份与还原的四个存储过程与一个函数
- linux下启动oracle数据库实例的脚本
- 5年从月薪3500到70万
- C#中读写App.Config文件
- struts2 常量的配置
- 八个实用的CMD命令及开始→运行→命令集锦
- 郭克华:即日起所有内容搬至http://www.chinasei.com
- Java基础:关于Java编程语言中的内部类说明(摘)
- 好代码十个秘诀
- mysql Data too long for column ‘xxx’ at row xxx的解决方法