Chinaunix首页 | 论坛 | 博客
  • 博客访问: 11482707
  • 博文数量: 48
  • 博客积分: 7017
  • 博客等级: 少将
  • 技术积分: 2073
  • 用 户 组: 普通用户
  • 注册时间: 2006-08-24 09:50
文章分类

全部博文(48)

文章存档

2011年(4)

2010年(15)

2009年(15)

2008年(14)

我的朋友

分类: Oracle

2009-12-23 10:16:59

#!/bin/bash
#
# chkconfig: 35 95 1
# description: init script to start/stop oracle database 10g, TNS listener, EMS, isqlplus
#
#
#
# match these values to your environment:
export ORACLE_BASE=/home/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/10.1.0/db_1
# export ORACLE_TERM=xterm
export PATH=$PATH:$ORACLE_HOME/bin
export NLS_LANG='american_america.ZHS16GBK'
export ORACLE_SID=yysoft
# export DISPLAY=localhost:0
export ORACLE_USER=oracle
# see how we are called:
case $1 in
start)
su - "$ORACLE_USER"<lsnrctl start
sqlplus /nolog<connect / as sysdba
startup
EOS
emctl start dbconsole
isqlplusctl start
EOO
;;
stop)
su - "$ORACLE_USER"<lsnrctl stop
sqlplus /nolog<connect / as sysdba
shutdown immediate
EOS
emctl stop dbconsole
isqlplusctl stop
EOO
;;
*)
echo "Usage: $0 {start|stop}"
;;
esac
阅读(1544) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~