viernes, 21 de junio de 2013

Remove RAC ( + ASM under RHEL 5

In that example, i am working with  RAC (2 nodes, Oracle database + ASM under RHEL 5.3

1) Search in /etc/oratab the instances (in all nodes):

2) Start DBCA, select Oracle Real Application Clusters Database, select Delete a database, and select the database that you want to delete. Repeat this step to delete all databases.

3) Run asmca to drop diskgroups

Select the diskgroup, and right click on it, later “drop”


*do the same with all diskgroups.




Depends the configuration of the asm disks, probably you can't drop all disks. :

You have to create a pfile from spfile and startup with pfile:

Connect as “sys / as sysasm” and create pfile from current spfile (do it in both nodes):

Shutdown database and restart with the pfile created, and try to drop the diskgroup again:


SQL> alter diskgroup XXX force dismount;

*in all nodes except in one, where you are going to run "drop diskgroup" have to be mounted.

SQL> drop diskgroup XXX force including contents;


*only if It is a OCFS diskgroup
In asmca window, go to “ASM Cluster File Systems” and remember the path of “Active Mount Point”

As root:

Connect “as sysasm” again:

Only in one node the diskgroup must be “mounted” (where you execute “drop diskgroup"), in the others should be “dismounted”:

In node 1:

In node 2:

If you have OCR disks (VOTING DISKS) in ASM, you must drop it like follow as “ROOT”:

If you haven’t OCR (VOTING DISK) under ASM, do the following as “ROOT”:

*change <path> for your path, in that example i can’t because my Voting disk are under ASM.

**to remove ASM entry for OCR you should stop asm and remove it:

$srvctl remove asm

4) Go to /etc/init.d and run “oracleasm listdisks” to list all your asm disks and later use “oracleasm deletedisk XXX” on all.

5) deconfigure asm configuration, starting with listener and clusterware resources as “ORACLE” user:

6) To uninstall grid infrastructure, run "deinstall" in all nodes (it is under your GRID_HOME), you can do it in parallel:

*In all questions, you have to answer with default option or yes. Almost at the end, you also have to execute some scripts with root user to continue.

7) To uninstall oracle database infrastructure, run "deinstall" in all nodes (it’s under your ORACLE_HOME), you can do it in parallel: