您的位置:首页 > 其它

How to rename ASM instances in RAC or clustered environment

2011-04-24 21:27 543 查看
之前做的一个实验:
RAC修改ASM实例名的步骤
http://blog.csdn.net/tianlesoftware/archive/2011/03/25/6275827.aspx


Thefollowingproceduresdorequiresomedowntime.Onenodeatatime,wewillshutdownalldatabaseinstancesthatstoretheirdatainASM.Theothernodeswillbeunaffected,sothesemaycontinuetoservicethebusiness.
AllthefollowingstepsareassumedtobeexecutedwhileloggedintotheserverastheOraclesoftwareowner(e.g.,oracle).

1)Fromoneofthenodes(anynode),updatetheOCR
Stopallthedbinstancesthatstoretheirdataintheasminstanceyouwillbedoingthemaintenance:

srvctlstopdb-d<dbname>
Stoptheasminstance:

srvctlstopasm-n<nodename>
RemoveasmdependenciesforthedbinstanceandunregisterasmfromtheOCR:

srvctlmodifyinst-d<dbname>-i<dbinstancename>-r
srvctlremoveasm-n<nodename>

2)Edit/etc/oratab(oneachnode):

Locationoforatabonsomeplatforms:*ForAIX,HP-UX,orLinux:/etc/oratab
*ForSolaris:/var/opt/oracle/oratab

ChangedtheORACLE_SIDfortheASMinstance,tothereflectthenewnamefortheASMinstance.

Example:Needtochange+ASM1to+ASMADC1:

Changefrom:+ASM1:/c1/app/oracle/product/11.1.0.6/asm_1:N
Changeto:+ASMADC1:/c1/app/oracle/product/11.1.0.6/asm_1:N

3)Renameinitfilesandorapwfiles(oneachnode):

Examplefornode1:


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:WhereORACLE_HOME,isthehomeforasm

4)ChangecontentsofASM'sinstanceparameters(oneachnode):

Ifusingapfile:
Replaceanyreferencestotheoldasminstancenameswiththenewasmnames.


Example:

+ASM1.instance_number=1--changeto-->+ASMADC1.instance_number=1


Ifusinganspfile:
ConnecttotheASMinstance,anduseSQLcommands.


Exampleonnode1toremovethereferencesto+ASM1:

SQL>altersystemresetinstance_numbersid='+ASM1'scope=spfile;


Exampleonnode1tosetthenewvalue:

SQL>altersystemsetinstance_number=1sid='+ASMADC1'scope=spfile;


5)CleanupsomedirectoriesandfilesusedbythepreviousASMinstances:

Youmaychoosetobackthesefirstforhistoricalpurposesonly.

Ifusing10g
,oneachnoderemoveanydirectoriesandfilesfortheolderASMinstanceunder:

$ORACLE_BASE/admin


Ifusing11g
,oneachnoderemoveanydirectoriesandfilesfortheolderASMinstanceunder:

$ORACLE_BASE/diag/


6)UpdatetheOCR(fromonenodeonly.anynode):

ExampletoregisterthenewASMinstancethatwillruninnode1:


srvctladdasm-nadc1-i+ASMADC1-o/c1/app/oracle/product/11.1.0.6/asm_1


Whereadc1isnode_name,+ASMADC1isthenewASMinstancename,andthevaluegivento-oistheORACLE_HOMEfortheasminstance.
RegistereachdatabaseinstancethatstorestheirdatainASM,withthenewASMinstancename.
Example:
srvctlmodifyinst-d<dbname>-i<instancename>-s+ASMADC<n>

7)StartuptheASMinstance(fromonenodeonly,anynode):

srvctlstartasm-n<nodename>


8)StartupthedatabaseinstancesthatstoretheirdataintheASMinstancethatyoujustcompletedthemaintenance(fromonenodeonly-anynode):

srvctlstartdb-d<dbname>


OR


srvctlstartinst-db<dbname>-i<instancename>


9)Ifyouhaveanyscriptsthathavehard-codedASMinstancenames,donotforgettoalsoupdatethose.





FromOracle
-------------------------------------------------------------------------------------------------------
Blog:http://blog.csdn.net/tianlesoftware
Email:dvd.dba@gmail.com
DBA1群:62697716(满);DBA2群:62697977(满)DBA3群:62697850(满)
DBA超级群:63306533(满);DBA4群:83829929DBA5群:142216823
聊天群:40132017聊天2群:69087192
--加群需要在备注说明Oracle表空间和数据文件的关系,否则拒绝申请
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐