Below are the steps for renaming an ASM diskgroup with database files present inside for a running database.

 

EXAMPLE:

In this article we will rename the diskgroup +DATATST to +NEWTST.  The database present inside the diskgroup is TESTDB2 .

 
1. Check configuration of the database:

srvctl config database -d TESTDB2

2. Check whether ASM instance spfile is present is that diskgroup.
srvctl config asm

If asm parameter pfile is present in the diskgroup which we are planning to rename, Then different steps need to be followed, which we will show in future article.

3. Take a backup of database pfile:

4. Modify the parameter which are pointing to old diskgroup(+DATATST to +NEWTST)

5. Stop the database

6. Check the diskgroup (DATATST) status:

crsctl status resource

7. Disable the HAS component ( Do ON BOTH THE NODES)

8 .Unmount the diskgroup ( ON BOTH THE NODES)

9. Rename the diskgroup ( Only on one node)

renamedg phase=both dgname=DATATST newdgname=NEWTST verbose=true

10. Now mount the new diskgroup ( ON BOTH THE NODES)

11. Mount the database pfile backup

12. Rename the databafiles from old location to new location:

13.Rename the redolog files from old location to new location

14. Rename the tempfile:

15. Now create spfile pointing to new

16. Shutdown database

17. Modify init file in $ORACLE_HOME/dbs location on both nodes( Pointing to new spfile location)

18. Modify database configuration with new spfile location

19.Modify database configuration with new pwdfile location

20. Modify database configuration with new DISKGROUP

21. Check the database configuration again( Make no parameter pointing to old diskgroup)

22. Now RENAME the underline disk also(OPTIONAL – available in Oracle 12c only)

Rename disk is introduced in oracle 12c. This is an optional steps. However if you wish to rename the underlining alias diskname also , follow below steps.

We will rename the diskname DATATST_0000 to NEWTST_0000 .

Check for active connections to the diskgroup:

Dismount the diskgroup( ON both nodes)

Mount the diskgroup in restrict mode ( ONE NODE)

Rename the diskname:

Now dismount the diskgroup

Mount the diskgroup on both the nodes:

23. Start the database 

srvctl start database -d TESTDB2

24. Enable HAS on both nodes

Recommended BOOKS:
Expert Oracle RAC 12c
Oracle 12c for Dummies
Oracle Database 12c Performance Tuning Recipes