签到成功

知道了

CNDBA社区CNDBA社区

How To Automate ASM Startup and Shutdown on AIX 5L [ID 580133.1]

2016-11-25 15:50 1875 0 原创 Oracle 11g
作者: dave

 

       Oracle recommends that you configure your system to automatically to start Oracle ASM instances and Database Instances when the system starts up, and to automatically shut them down when the system shuts down. Automating ASM/Database startup and shutdown guards against incorrect database shutdown.

       The present document described how to Automate ASM Startup and Shutdown on AIX 5L.

http://www.cndba.cn/Dave/article/840

 

 

步骤如下:

http://www.cndba.cn/Dave/article/840

The first step is to create the dbora shell script and place it in the /etc/init.d directory:

1)  Log in as the root user.

2)  Edit the oratab file:

# vi /etc/oratab

3)  Update the oratab with the next entry:

+ASM:<ASM Oracle Home>:Y

Example:

+ASM:/u02/app/oracle/11g:Y

 

4)  Change to the /etc directory for AIX:

# cd /etc

 http://www.cndba.cn/Dave/article/840http://www.cndba.cn/Dave/article/840

5)  Create a file called dbora:http://www.cndba.cn/Dave/article/840

# touch /etc/dborahttp://www.cndba.cn/Dave/article/840

 

6)  Copy the following lines into this file:

# Note: Change the value of the ORACLE_HOME environment variable to your ASM 
# Oracle home directory for the installation. Change the value of the ORACLE 
# environment variable to the user name of the owner of the database installed in the 
# Oracle home directory (typically, oracle).


#! /bin/sh  -x
#
# Change the value of ORACLE_HOME to specify the correct Oracle home
# directory for your installation.

ORACLE_HOME=/u01/app/oracle/product/10.2.0/db_1
#
# Change the value of ORACLE to the login name of the
# oracle owner at your site.
#
ORACLE=oracle

PATH=${PATH}:$ORACLE_HOME/bin
HOST=`hostname`
PLATFORM=`uname`
export ORACLE_HOME PATH
#
if [ ! "$2" = "ORA_DB" ] ; then
   if [ "$PLATFORM" = "HP-UX" ] ; then
      remsh $HOST -l $ORACLE -n "$0 $1 ORA_DB"
      exit
   else
      rsh $HOST -l $ORACLE  $0 $1 ORA_DB
      exit
   fi
fi
#
case $1 in
'start')
        $ORACLE_HOME/bin/dbstart $ORACLE_HOME &
        ;;
'stop')
        $ORACLE_HOME/bin/dbshut $ORACLE_HOME &
        ;;
*)
        echo "usage: $0 {start|stop}"
        exit
        ;;
esac
#
exit

http://www.cndba.cn/Dave/article/840

 

7)  Change the group of the dbora file to the OSDBA group (typically dba), and set the permissions to 750:

# chgrp dba dbora
# chmod 750 dbora

 

8)  For ASM instances, the /etc/dbora script cannot be used inside an rc*.d directory and it needs to be invoked from rc.local only. Otherwise, the CSS service may not be available yet, and this script will block init from completing the boot cycle. Therefore please perform the next steps to create the /etc/rc.local file:

# mkitab -i rcnfs "rclocal:2:wait:/etc/rc.local >/dev/console 2>&1"
# touch /etc/rc.local
# chmod 700 /etc/rc.local

 

9)  Then update the /etc/rc.local file with the next line:

/etc/dbora &http://www.cndba.cn/Dave/article/840

 

 

 

 

From Oracle

-------------------------------------------------------------------------------------------------------http://www.cndba.cn/Dave/article/840

Blog http://blog.csdn.net/tianlesoftware

Email: dvd.dba@gmail.comhttp://www.cndba.cn/Dave/article/840

DBA1 群:62697716();   DBA2 群:62697977()   DBA3 群:62697850()  

DBA 超级群:63306533();  DBA4 群: 83829929  DBA5群: 142216823   

聊天 群:40132017   聊天2群:69087192

--加群需要在备注说明Oracle表空间和数据文件的关系,否则拒绝申请

版权声明:本文为博主原创文章,未经博主允许不得转载。

oracle 11g

用户评论
* 以下用户言论只代表其个人观点,不代表CNDBA社区的观点或立场
dave

dave

关注

人的一生应该是这样度过的:当他回首往事的时候,他不会因为虚度年华而悔恨,也不会因为碌碌无为而羞耻;这样,在临死的时候,他就能够说:“我的整个生命和全部精力,都已经献给世界上最壮丽的事业....."

  • 2261
    原创
  • 3
    翻译
  • 578
    转载
  • 191
    评论
  • 访问:7983352次
  • 积分:4346
  • 等级:核心会员
  • 排名:第1名
精华文章
    最新问题
    查看更多+
    热门文章
      热门用户
      推荐用户
        Copyright © 2016 All Rights Reserved. Powered by CNDBA · 皖ICP备2022006297号-1·

        QQ交流群

        注册联系QQ