签到成功

知道了

CNDBA社区CNDBA社区

How to rename ASM instances in RAC or clustered environment

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

 

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

 

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

之前做的一个实验:

       RAC 修改 ASM实例名 的步骤

       http://blog.csdn.net/tianlesoftware/archive/2011/03/25/6275827.aspx

 

 

       The following procedures do require some down time. One node at a time, we will shutdown all database instances that store their data in ASM. The other nodes will be unaffected, so these may continue to service the business.

       All the following steps are assumed to be executed while logged into the server as the Oracle software owner (e.g., oracle).

 

1) From one of the nodes (any node), update the OCR

Stop all the db instances that store their data in the asm instance you will be doing the maintenance: 

    srvctl stop db -d <db name>

Stop the asm instance:

    srvctl stop asm -n <node name>

Remove asm dependencies for the db instance and unregister asm from the OCR:

    srvctl modify inst -d <db name> -i <db instance name> -r
    srvctl remove asm -n <node name>


2) Edit /etc/oratab (on each node):

 

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

Location of oratab on some platforms:
* For AIX, HP-UX, or Linux:    /etc/oratab
* For Solaris:                              /var/opt/oracle/oratab 

Changed the ORACLE_SID for the ASM instance, to the reflect the new name for the ASM instance.

Example: Need to change +ASM1 to +ASMADC1:

Change from:  +ASM1:/c1/app/oracle/product/11.1.0.6/asm_1:N
Change to:    +ASMADC1:/c1/app/oracle/product/11.1.0.6/asm_1:N

 
3) Rename init files and orapw files (on each node):

 

Example for node1:

  mv $ORACLE_HOME/dbs/init+ASM1.ora $ORACLE_HOME/dbs/init+ASMADC1.ora
  mv $ORACLE_HOME/dbs/orapw+ASM1 $ORACLE_HOME/dbs/orapw+ASMADC1

NOTE: Where ORACLE_HOME, is the home for asm


4) Change contents of ASM's instance parameters (on each node):

 

If using a pfile:
Replace any references to the old asm instance names with the new asm names.

Example:
+ASM1.instance_number=1 -- change to --> +ASMADC1.instance_number=1

If using an spfile:
Connect to the ASM instance, and use SQL commands.

Example on node1 to remove the references to +ASM1:
  SQL> alter system reset instance_number sid='+ASM1' scope=spfile;

Example on node1 to set the new value: 
  SQL> alter system set instance_number=1 sid='+ASMADC1' scope=spfile;


5) Cleanup some directories and files used by the previous ASM instances:

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

You may choose to back these first for historical purposes only.

If using 10g, on each node remove any directories and files for the older ASM instance under:
$ORACLE_BASE/admin

If using 11g, on each node remove any directories and files for the older ASM instance under:
$ORACLE_BASE/diag/


6) Update the OCR (from one node only. any node):

 

Example to register the new ASM instance that will run in node1:

  srvctl add asm -n adc1 -i +ASMADC1 -o /c1/app/oracle/product/11.1.0.6/asm_1

Where adc1 is node_name, +ASMADC1 is the new ASM instance name, and the value given to -o is the ORACLE_HOME for the asm instance.

Register each database instance that stores their data in ASM, with the new ASM instance name.

Example:
  srvctl modify inst -d <db name> -i <instance name> -s +ASMADC<n>


7) Start up the ASM instance (from one node only, any node):

 

  srvctl start asm -n <node name>


8) Start up the database instances that store their data in the ASM instance that you just completed the maintenance (from one node only -any node):

 

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

  srvctl start db -d <db name> 

OR

  srvctl start inst -db <db name> -i <instance name>


9)  If you have any scripts that have hard-coded ASM instance names, do not forget to also update those.

 

 

 

 

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

From Oracle

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

-------------------------------------------------------------------------------------------------------

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

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

Email: dvd.dba@gmail.com

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
    评论
  • 访问:7983437次
  • 积分:4346
  • 等级:核心会员
  • 排名:第1名
精华文章
    最新问题
    查看更多+
    热门文章
      热门用户
      推荐用户
        Copyright © 2016 All Rights Reserved. Powered by CNDBA · 皖ICP备2022006297号-1·

        QQ交流群

        注册联系QQ