Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1091005
  • 博文数量: 276
  • 博客积分: 10077
  • 博客等级: 上将
  • 技术积分: 2513
  • 用 户 组: 普通用户
  • 注册时间: 2007-08-24 20:31
文章分类

全部博文(276)

文章存档

2020年(1)

2015年(5)

2012年(2)

2011年(6)

2010年(7)

2009年(224)

2008年(31)

我的朋友

分类:

2009-09-10 08:27:52

  #vi mespkg.cntl
###################################
# START OF CUSTOMER DEFINED FUNCTIONS
 
# This function is a place holder for customer define functions.
# You should define all actions you want to happen here, before the service is
# started.  You can create as many functions as you need.
 
function customer_defined_run_cmds
{
# ADD customer defined run commands.
: # do nothing instruction, because a function must contain some command.
        /etc/cmcluster/mespkg/ora_start
        test_return 51
}
 
# This function is a place holder for customer define functions.
# You should define all actions you want to happen here, before the service is
# halted.
 
function customer_defined_halt_cmds
{
# ADD customer defined halt commands.
: # do nothing instruction, because a function must contain some command.
        /etc/cmcluster/mespkg/ora_stop
        test_return 52
}
 
# END OF CUSTOMER DEFINED FUNCTIONS
 
[lgxmes:(root)/etc/cmcluster/mespkg]# cat ora_start
#!/usr/bin/sh
 
################################################################
su - oracle -c "sqlplus '/as sysdba'" << EOFotpt
        startup mount;
        recover database;
        alter database open;
        exit
EOFotpt
su - oracle -c "lsnrctl start"
################################################################
[lgxmes:(root)/etc/cmcluster/mespkg]# cat ora_stop
#!/usr/bin/sh
 
######################################################################
su - oracle -c "lsnrctl" <set password qkrtm123
stop
exit
EOF
su - oracle -c "sqlplus '/as sysdba" <        shutdown abort;
        exit
EOFotpt
######################################################################
[saemes:(root)/etc/cmcluster/mespkg]#
阅读(1048) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~