Translate

Monday, 22 October 2012

ASM Diskgroup rename

Use the below Steps in RAC environmet to RENAME your exisiting ASM Diskgroup (11.2.0.3)

Steps need to follow:

Old Diskgroup Name will be: oldDGNAME

New Diskgroup Name will be: newDGNAME


1)      Use the script to get the filename with new diskgroup name:
Datafile Rename:
select 'alter database rename file '''||name||''' to ''+newDG_name'||substr(name,instr(name,'/',1,1))||''';' from V$DATAFILE;
LOG FILE Rename
select 'alter database rename file '''||member||''' to ''+newlogDG_name'||substr(member,instr(member,'/',1,1))||''';' from V$logfile;

        1.a) create pfile='/tmp/param.txt' from spfile;

2)      Stop the Instances in all the nodes
srvctl stop database -d <dbname>
In GRID OS USER (11.2.0.3), Execute the below Command to RENAME the NewDiskgroup Name
            
      3)  asmcmd umount oldDGNAME (in all the nodes)

4)      renamedg phase=both dgname=oldDGNAME newdgname=newDGNAME confirm=true config=/tmp/rename_olddgname verbose=true asm_diskstring='/dev/oracleasm/disk/*'

5)      asmcmd mount newDGNAME (in all the nodes)

        6)      edit the pfile for the new diskgroup location  

7)      startup nomount pfile='/tmp/param.txt'

8)      alter database mount;

9)      execute the above script output to rename the dbfiles and logfiles with rename the new diskgroup name


9.a) Crete spfile from pfile;

9.b)  srvctl stop database -d <dbname>



10)   Changes in Cluster configuration:

10.a) DISKGROUP  Configuration change
 srvctl modify database -d <dbname> -o <db_home_path> -a "newDGNAME"
10.b)  SPFILE location change
 srvctl modify database -d <dbname> -o <db_home_path> -p "+newDGNAME/dbname/spfiledbname.ora"
 10.c) srvctl start database -d <dbname> (cluster will start the database using the new diskgroup information)
10.d) Finally if all the checking completed, remove the old Diskgroup from the Cluster configuration:
crsctl delete resource ora. oldDGNAME.dg -f







No comments:

Post a Comment