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):
NOTE:WhereORACLE_HOME,isthehomeforasm
4)ChangecontentsofASM'sinstanceparameters(oneachnode):
Ifusingapfile:
Ifusinganspfile:
5)CleanupsomedirectoriesandfilesusedbythepreviousASMinstances:
Youmaychoosetobackthesefirstforhistoricalpurposesonly.
Ifusing10g
Ifusing11g
6)UpdatetheOCR(fromonenodeonly.anynode):
Whereadc1isnode_name,+ASMADC1isthenewASMinstancename,andthevaluegivento-oistheORACLE_HOMEfortheasminstance.
RegistereachdatabaseinstancethatstorestheirdatainASM,withthenewASMinstancename.
Example:
srvctlmodifyinst-d<dbname>-i<instancename>-s+ASMADC<n>
7)StartuptheASMinstance(fromonenodeonly,anynode):
8)StartupthedatabaseinstancesthatstoretheirdataintheASMinstancethatyoujustcompletedthemaintenance(fromonenodeonly-anynode):
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表空间和数据文件的关系,否则拒绝申请
RAC修改ASM实例名的步骤
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:
Email:dvd.dba@gmail.com
DBA1群:62697716(满);DBA2群:62697977(满)DBA3群:62697850(满)
DBA超级群:63306533(满);DBA4群:83829929DBA5群:142216823
聊天群:40132017聊天2群:69087192
--加群需要在备注说明Oracle表空间和数据文件的关系,否则拒绝申请
相关文章推荐
- How To Enable/Disable Archive Logging In RAC Environment for 10.2 and higher version
- How to rename diskgroup in 10g ASM (Pre-11gR2 release)
- How To Add/Increase The Size Of Redo Log Files In Rac Environment? (文档 ID 779306.1)
- 11g How To Enable Archive Logging In RAC Environment
- How to Change ASM Home on a Node in RAC [ID 558508.1]
- ORA-245: In RAC environment from 11.2 onwards Backup Or Snapshot controlfile needs to be in shared l
- How to set JAVA environment variables in Linux or CentOS
- How To Enable Archive Log Mode In a RAC Environment
- How to Check Whether Oracle Binary/Instance is RAC Enabled and Relink Oracle Binary in RAC (文档 ID 28
- How to read Mac .DMG file in Linux or PC(II)
- How to run multiple instances of Tomcat in one Windows machine
- How To Check Whether Physical Standby is in Sync with the Primary or Not?
- Eclipse启动时报错:A Java RunTime Environment (JRE) or Java Development Kit (JDK) must be available in order to run Eclipse. No java v
- How To Upgrade ASM from 10.2 to 11.1 (single Instance configuration -Non-RAC)
- How To Upgrade ASM from 10.2 to 11.1 (RAC)
- How to Change Default Grub Theme or Splash Image in Ubuntu 10.10
- 93 The ORACLE_SID environment variable is set to +ASM. ASMLIB is not used in the configuration. You
- javax.naming.NoInitialContextException: Need to specify class name in environment or system property
- A Java Runtime Environment (JRE) or Java Development Kit (JDK) must be available in order to run Eclipse. No Java virtual machine was found after searching the following locations: /usr/local/eclipse/
- An ffmpeg and SDL Tutorial or How to Write a Video Player in Less Than 1000 Lines