How to Delete an Instance from an Oracle RAC Database
This article demonstrates how to delete an instance from an Oracle RAC database using the DBCA utility. The examples use a 2-node RAC installation with the following setup.
Oracle Version : 11.2.0.3.0 Database : RAC Instances : RAC1, RAC2 Nodes : ol5-112-rac1, ol5-112-rac2
Interactive Mode
On a node you want to keep, in this case "ol5-112-rac1", start the DBCA utility.
$ dbca
Select the "Oracle Real Application Cluster (RAC) database" option and click the "Next" button.
![DBA - Welcome](https://oracle-base.com/articles/rac/images/delete_rac_node/01-dbca-welcome.jpg)
Select the "Instance Management" option and click the "Next" button.
![DBA - Operation](https://oracle-base.com/articles/rac/images/delete_rac_node/02-dbca-operation.jpg)
Select the "Delete an instance" option and click the "Next" button.
![DBA - Instance Management](https://oracle-base.com/articles/rac/images/delete_rac_node/03-dbca-instance-management.jpg)
Make sure the appropriate cluster database is selected, enter the credentials for a user with SYSDBA privilege and click the "Next" button.
![DBA - Cluster Database Selection](https://oracle-base.com/articles/rac/images/delete_rac_node/04-dbca-cluster-database-selection.jpg)
Select the instance to delete and click the "Next" button.
![DBA - Instance Selection](https://oracle-base.com/articles/rac/images/delete_rac_node/05-dbca-instance-selection.jpg)
You are presented with a similar screen again, but it now also has a "Finish" button. Click the "Finish" button.
![DBA - Instance Selection](https://oracle-base.com/articles/rac/images/delete_rac_node/06-dbca-instance-selection-2.jpg)
Click the "OK" button on the confirmation dialog.
![DBA - Confirmation](https://oracle-base.com/articles/rac/images/delete_rac_node/07-dbca-confirmation.jpg)
Wait while the instance is deleted.
![DBA - Processing](https://oracle-base.com/articles/rac/images/delete_rac_node/08-dbca-processing.jpg)
When asked if you want to perform another operation, click the "No" button to exit from the DBCA.
![DBA - Another Operation](https://oracle-base.com/articles/rac/images/delete_rac_node/09-dbca-another-operation.jpg)
Silent Mode
We could have achieved the same result using the DBCA in silent mode with the following command.
$ dbca -silent -deleteInstance -nodeList ol5-112-rac2 -gdbName RAC -instanceName RAC2 -sysDBAUserName sys -sysDBAPassword myPassword Deleting instance 20% complete 21% complete 22% complete 26% complete 33% complete 40% complete 46% complete 53% complete 60% complete 66% complete Completing instance management. 100% complete Look at the log file "/u01/app/oracle/cfgtoollogs/dbca/RAC.log" for further details. $
Post-Delete Checks
Check the redo thread associated with the deleted node has been disabled. In this case we deleted the instance "RAC2" which was thread 2.
SQL> select distinct thread# from v$log; THREAD# ---------- 1 SQL>
If the thread associated with the deleted instance hans't been disabled, do it manually.
SQL> ALTER DATABASE DISABLE THREAD 2;
Check the instance information has been deleted from the OCR.
$ srvctl config database -d RAC Database unique name: RAC Database name: RAC Oracle home: /u01/app/oracle/product/11.2.0/db_1 Oracle user: oracle Spfile: +DATA/RAC/spfileRAC.ora Domain: localdomain Start options: open Stop options: immediate Database role: PRIMARY Management policy: AUTOMATIC Server pools: RAC Database instances: RAC1 Disk Groups: DATA Mount point paths: Services: BATCH_SERVICE,OLTP_SERVICE Type: RAC Database is administrator managed [oracle@ol5-112-rac1 ~]$
Remember to edit any service definitions that related to the deleted node.
Comments
Post a Comment