Site icon IT Tutorial

How to Deinstall or Cleanup Grid Infrastructure ( RAC ) in Oracle

Hi,

I will explain How to Deinstall or Cleanup Grid Infrastructure ( RAC ) in Oracle in this post.

Deinstall or Cleanup Grid Infrastructure ( RAC )

Sometimes you may need to deinstall or clean up the Grid Infrastructure if it is corrupted or broken.

 

 

 

 

Voting disk is deleted in my case, so Clusterware is not started. I would upgrade the Grid Infrastructure to the Oracle 19c from 18c, but I couldn’t upgrade it because of not started.

So I decided to uninstall / cleanup the Grid Infrastructure, then try to Install fresh Oracle 19c RAC.

 

If you want to install Oracle RAC, you can read the following post to learn how to install Oracle 19c RAC.

Oracle 19c Real Application Cluster (RAC) Step by Step Installation on Full Rack Exadata X7

 

 

 

Deinstall Grid Infrastructure

I will keep the Diskgroups and their data During the uninstall, so that I won’t lost my data and don’t need restore database again.

You can also remove and delete all diskgroups and their data, if you want to cleanup completely.

 

Deinstall Clusterware / Grid Infrastructure Steps

To deinstall Grid Infrastructure, Oracle has deinstall tool under the ORACLE_HOME. Run it as follows.

 

[+ASM2]/u01/app/18.0.0/grid/deinstall $ ./deinstall
Checking for required files and bootstrapping ...
Please wait ...
Location of logs /u01/app/oraInventory/logs/

############ ORACLE DECONFIG TOOL START ############


######################### DECONFIG CHECK OPERATION START #########################
## [START] Install check configuration ##


Deinstall utility is unable to determine the list of nodes, on which this home is configured, as the Oracle Clusterware processes are not running on the local node.

Is this home configured on other nodes (y - yes, n - no)?[n]:y

Specify a comma-separated list of remote nodes to cleanup : msdbadm001

Checking for existence of the Oracle home location /u01/app/18.0.0/grid
Oracle Home type selected for deinstall is: Oracle Grid Infrastructure for a Cluster
Oracle Base selected for deinstall is: /u01/app/grid
Checking for existence of central inventory location /u01/app/oraInventory
Checking for existence of the Oracle Grid Infrastructure home /u01/app/18.0.0/grid
The following nodes are part of this cluster: msdbadm002,msdbadm001
Active Remote Nodes are msdbadm001
Checking for sufficient temp space availability on node(s) : 'msdbadm002,msdbadm001'

## [END] Install check configuration ##

Traces log file: /u01/app/oraInventory/logs//crsdc_2020-10-28_04-23-25-PM.log

Network Configuration check config START

Network de-configuration trace file location: /u01/app/oraInventory/logs/netdc_check2020-10-28_04-23-32PM.log

Network Configuration check config END

Asm Check Configuration START

ASM de-configuration trace file location: /u01/app/oraInventory/logs/asmcadc_check2020-10-28_04-23-32PM.log

ASM configuration was not detected in this Oracle home. Was ASM configured in this Oracle home (y|n) [n]: y
Automatic Storage Management (ASM) instance is detected in this Oracle home /u01/app/18.0.0/grid.
ASM Diagnostic Destination : /u01/app/grid
ASM Diskgroups : 
ASM diskstring : /dev/oracleasm/disks/*
Diskgroups will not be dropped
If you want to retain the existing diskgroups or if any of the information detected is incorrect, you can modify by entering 'y'. Do you want to modify above information (y|n) [n]: y
Is Grid Infrastructure Storage(OCR) in ASM diskgroup (y|n) [y]: y
Enter the OCR/Voting Disk diskgroup name [+DATA]: 
Specify the ASM Diagnostic Destination [/u01/app/grid]: 
Specify the diskstring [/dev/oracleasm/disks/*]: 
Specify the diskgroups that are managed by this ASM instance []: DATATEST

De-configuring ASM will drop the diskgroups at cleanup time. Do you want deconfig tool to drop the diskgroups (y|n) [y]: n

Database Check Configuration START

Database de-configuration trace file location: /u01/app/oraInventory/logs/databasedc_check2020-10-28_04-23-32PM.log

Oracle Grid Management database was not found in this Grid Infrastructure home

Database Check Configuration END

######################### DECONFIG CHECK OPERATION END #########################


####################### DECONFIG CHECK OPERATION SUMMARY #######################
Oracle Grid Infrastructure Home is: /u01/app/18.0.0/grid
The following nodes are part of this cluster: msdbadm002,msdbadm001
Active Remote Nodes are msdbadm001
The cluster node(s) on which the Oracle home deinstallation will be performed are:msdbadm002,msdbadm001
Oracle Home selected for deinstall is: /u01/app/18.0.0/grid
Inventory Location where the Oracle home registered is: /u01/app/oraInventory
ASM instance will be de-configured from this Oracle home
Oracle Grid Management database was not found in this Grid Infrastructure home
Do you want to continue (y - yes, n - no)? [n]: y
A log of this session will be written to: '/u01/app/oraInventory/logs/deinstall_deconfig2020-10-28_04-22-43-PM.out'
Any error messages from this session will be written to: '/u01/app/oraInventory/logs/deinstall_deconfig2020-10-28_04-22-43-PM.err'

######################## DECONFIG CLEAN OPERATION START ########################
Database de-configuration trace file location: /u01/app/oraInventory/logs/databasedc_clean2020-10-28_04-23-32PM.log
ASM de-configuration trace file location: /u01/app/oraInventory/logs/asmcadc_clean2020-10-28_04-23-32PM.log
ASM Clean Configuration START
ASM Clean Configuration END

Network Configuration clean config START

Network de-configuration trace file location: /u01/app/oraInventory/logs/netdc_clean2020-10-28_04-23-32PM.log

The network configuration has been cleaned up successfully.

Network Configuration clean config END


---------------------------------------->

The deconfig command below can be executed in parallel on all the remote nodes. Execute the command on the local node after the execution completes on all the remote nodes.

Run the following command as the root user or the administrator on node "msdbadm001".

/u01/app/18.0.0/grid/crs/install/rootcrs.sh -force -deconfig -paramfile "/tmp/deinstall2020-10-28_04-22-29PM/response/deinstall_OraGI18Home1.rsp"

Run the following command as the root user or the administrator on node "msdbadm002".

/u01/app/18.0.0/grid/crs/install/rootcrs.sh -force -deconfig -paramfile "/tmp/deinstall2020-10-28_04-22-29PM/response/deinstall_OraGI18Home1.rsp" -lastnode

Press Enter after you finish running the above commands

<----------------------------------------

 

 

 

 

 

 

Clean up the Grid Infrastructure

 

in this step, You should run the above scripts on the related nodes as follows.

[root@msdbadm001 /]# /u01/app/18.0.0/grid/crs/install/rootcrs.sh -force -deconfig -paramfile "/tmp/deinstall2020-10-28_04-22-29PM/response/deinstall_OraGI18Home1.rsp"
Using configuration parameter file: /tmp/deinstall2020-10-28_04-22-29PM/response/deinstall_OraGI18Home1.rsp
The log of current session can be found at:
/u01/app/oraInventory/logs/crsdeconfig_msdbadm001_2020-10-28_04-30-51PM.log
PRCR-1070 : Failed to check if resource ora.net1.network is registered
CRS-0184 : Cannot communicate with the CRS daemon.
PRCR-1070 : Failed to check if resource ora.helper is registered
CRS-0184 : Cannot communicate with the CRS daemon.
PRCR-1070 : Failed to check if resource ora.ons is registered
CRS-0184 : Cannot communicate with the CRS daemon.

2020/10/28 16:30:57 CLSRSC-180: An error occurred while executing the command '/u01/app/18.0.0/grid/bin/srvctl config nodeapps'
CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on 'msdbadm001'
CRS-2673: Attempting to stop 'ora.cssdmonitor' on 'msdbadm001'
CRS-2673: Attempting to stop 'ora.evmd' on 'msdbadm001'
CRS-2673: Attempting to stop 'ora.crf' on 'msdbadm001'
CRS-2673: Attempting to stop 'ora.mdnsd' on 'msdbadm001'
CRS-2677: Stop of 'ora.cssdmonitor' on 'msdbadm001' succeeded
CRS-2677: Stop of 'ora.crf' on 'msdbadm001' succeeded
CRS-2677: Stop of 'ora.evmd' on 'msdbadm001' succeeded
CRS-2673: Attempting to stop 'ora.gpnpd' on 'msdbadm001'
CRS-2673: Attempting to stop 'ora.gipcd' on 'msdbadm001'
CRS-2677: Stop of 'ora.mdnsd' on 'msdbadm001' succeeded
CRS-2677: Stop of 'ora.gipcd' on 'msdbadm001' succeeded
CRS-2677: Stop of 'ora.gpnpd' on 'msdbadm001' succeeded
CRS-2793: Shutdown of Oracle High Availability Services-managed resources on 'msdbadm001' has completed
CRS-4133: Oracle High Availability Services has been stopped.
2020/10/28 16:31:24 CLSRSC-4006: Removing Oracle Trace File Analyzer (TFA) Collector.


2020/10/28 16:33:20 CLSRSC-4007: Successfully removed Oracle Trace File Analyzer (TFA) Collector.
2020/10/28 16:33:29 CLSRSC-336: Successfully deconfigured Oracle Clusterware stack on this node
[root@msdbadm001 /]#

 

 

 

 

 

 

Run script on the second node as follows.

 

[root@msdbadm002 ~]# /u01/app/18.0.0/grid/crs/install/rootcrs.sh -force -deconfig -paramfile "/tmp/deinstall2020-10-28_04-22-29PM/response/deinstall_OraGI18Home1.rsp" -lastnode
Using configuration parameter file: /tmp/deinstall2020-10-28_04-22-29PM/response/deinstall_OraGI18Home1.rsp
The log of current session can be found at:
/u01/app/oraInventory/logs/crsdeconfig_msdbadm002_2020-10-28_04-34-08PM.log
PRCR-1070 : Failed to check if resource ora.cvu is registered

CRS-0184 : Cannot communicate with the CRS daemon.

2020/10/28 16:34:15 CLSRSC-180: An error occurred while executing the command '/u01/app/18.0.0/grid/bin/srvctl stop cvu -f'
PRCR-1070 : Failed to check if resource ora.cvu is registered

CRS-0184 : Cannot communicate with the CRS daemon.

2020/10/28 16:34:16 CLSRSC-180: An error occurred while executing the command '/u01/app/18.0.0/grid/bin/srvctl remove cvu -f'
PRCR-1068 : Failed to query resources

CRS-0184 : Cannot communicate with the CRS daemon.

2020/10/28 16:34:17 CLSRSC-180: An error occurred while executing the command '/u01/app/18.0.0/grid/bin/srvctl stop scan_listener -f'
PRCR-1068 : Failed to query resources

CRS-0184 : Cannot communicate with the CRS daemon.

2020/10/28 16:34:17 CLSRSC-180: An error occurred while executing the command '/u01/app/18.0.0/grid/bin/srvctl remove scan_listener -y -f'
PRCR-1068 : Failed to query resources
CRS-0184 : Cannot communicate with the CRS daemon.
2020/10/28 16:34:18 CLSRSC-180: An error occurred while executing the command '/u01/app/18.0.0/grid/bin/srvctl stop scan -f'
PRCR-1068 : Failed to query resources
CRS-0184 : Cannot communicate with the CRS daemon.
2020/10/28 16:34:19 CLSRSC-180: An error occurred while executing the command '/u01/app/18.0.0/grid/bin/srvctl remove scan -y -f'
PRCR-1070 : Failed to check if resource ora.net1.network is registered
CRS-0184 : Cannot communicate with the CRS daemon.
PRCR-1070 : Failed to check if resource ora.helper is registered
CRS-0184 : Cannot communicate with the CRS daemon.
PRCR-1070 : Failed to check if resource ora.ons is registered
CRS-0184 : Cannot communicate with the CRS daemon.

2020/10/28 16:34:19 CLSRSC-180: An error occurred while executing the command '/u01/app/18.0.0/grid/bin/srvctl config nodeapps'
CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on 'msdbadm002'
CRS-2673: Attempting to stop 'ora.mdnsd' on 'msdbadm002'
CRS-2673: Attempting to stop 'ora.gpnpd' on 'msdbadm002'
CRS-2673: Attempting to stop 'ora.crf' on 'msdbadm002'
CRS-2677: Stop of 'ora.crf' on 'msdbadm002' succeeded
CRS-2673: Attempting to stop 'ora.gipcd' on 'msdbadm002'
CRS-2677: Stop of 'ora.mdnsd' on 'msdbadm002' succeeded
CRS-2677: Stop of 'ora.gpnpd' on 'msdbadm002' succeeded
CRS-2677: Stop of 'ora.gipcd' on 'msdbadm002' succeeded
CRS-2793: Shutdown of Oracle High Availability Services-managed resources on 'msdbadm002' has completed
CRS-4133: Oracle High Availability Services has been stopped.
-CRS-4123: Oracle High Availability Services has been started.
CRS-2672: Attempting to start 'ora.evmd' on 'msdbadm002'
CRS-2672: Attempting to start 'ora.mdnsd' on 'msdbadm002'
CRS-2676: Start of 'ora.mdnsd' on 'msdbadm002' succeeded
CRS-2676: Start of 'ora.evmd' on 'msdbadm002' succeeded
CRS-2672: Attempting to start 'ora.gpnpd' on 'msdbadm002'
CRS-2676: Start of 'ora.gpnpd' on 'msdbadm002' succeeded
CRS-2672: Attempting to start 'ora.cssdmonitor' on 'msdbadm002'
CRS-2672: Attempting to start 'ora.gipcd' on 'msdbadm002'
CRS-2676: Start of 'ora.cssdmonitor' on 'msdbadm002' succeeded
CRS-2676: Start of 'ora.gipcd' on 'msdbadm002' succeeded
CRS-2672: Attempting to start 'ora.cssd' on 'msdbadm002'
CRS-2672: Attempting to start 'ora.diskmon' on 'msdbadm002'
CRS-2676: Start of 'ora.diskmon' on 'msdbadm002' succeeded
CRS-2676: Start of 'ora.cssd' on 'msdbadm002' succeeded
CRS-2672: Attempting to start 'ora.crf' on 'msdbadm002'
CRS-2672: Attempting to start 'ora.ctssd' on 'msdbadm002'
CRS-2672: Attempting to start 'ora.cluster_interconnect.haip' on 'msdbadm002'
CRS-2676: Start of 'ora.crf' on 'msdbadm002' succeeded
CRS-2676: Start of 'ora.ctssd' on 'msdbadm002' succeeded
CRS-2676: Start of 'ora.cluster_interconnect.haip' on 'msdbadm002' succeeded
CRS-2672: Attempting to start 'ora.asm' on 'msdbadm002'
CRS-2676: Start of 'ora.asm' on 'msdbadm002' succeeded
CRS-2672: Attempting to start 'ora.storage' on 'msdbadm002'
CRS-2674: Start of 'ora.storage' on 'msdbadm002' failed
CRS-2679: Attempting to clean 'ora.storage' on 'msdbadm002'
CRS-2681: Clean of 'ora.storage' on 'msdbadm002' succeeded
CRS-2673: Attempting to stop 'ora.asm' on 'msdbadm002'
CRS-2677: Stop of 'ora.asm' on 'msdbadm002' succeeded
CRS-2673: Attempting to stop 'ora.cluster_interconnect.haip' on 'msdbadm002'
CRS-2677: Stop of 'ora.cluster_interconnect.haip' on 'msdbadm002' succeeded
CRS-2673: Attempting to stop 'ora.ctssd' on 'msdbadm002'
CRS-2677: Stop of 'ora.ctssd' on 'msdbadm002' succeeded
CRS-2673: Attempting to stop 'ora.crf' on 'msdbadm002'
CRS-2677: Stop of 'ora.crf' on 'msdbadm002' succeeded
CRS-4000: Command Start failed, or completed with errors.
2020/10/28 16:45:41 CLSRSC-260: Clusterware exclusive mode start of Cluster Ready Services failed
2020/10/28 16:45:41 CLSRSC-558: failed to deconfigure ASM
2020/10/28 16:45:41 CLSRSC-651: One or more deconfiguration steps failed, but the deconfiguration process continued because the -force option was specified.
CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on 'msdbadm002'
CRS-2673: Attempting to stop 'ora.mdnsd' on 'msdbadm002'
CRS-2673: Attempting to stop 'ora.evmd' on 'msdbadm002'
CRS-2677: Stop of 'ora.mdnsd' on 'msdbadm002' succeeded
CRS-2677: Stop of 'ora.evmd' on 'msdbadm002' succeeded
CRS-2673: Attempting to stop 'ora.cssd' on 'msdbadm002'
CRS-2677: Stop of 'ora.cssd' on 'msdbadm002' succeeded
CRS-2673: Attempting to stop 'ora.gpnpd' on 'msdbadm002'
CRS-2673: Attempting to stop 'ora.gipcd' on 'msdbadm002'
CRS-2677: Stop of 'ora.gpnpd' on 'msdbadm002' succeeded
CRS-2677: Stop of 'ora.gipcd' on 'msdbadm002' succeeded
CRS-2793: Shutdown of Oracle High Availability Services-managed resources on 'msdbadm002' has completed
CRS-4133: Oracle High Availability Services has been stopped.
2020/10/28 16:46:10 CLSRSC-4006: Removing Oracle Trace File Analyzer (TFA) Collector.
2020/10/28 16:47:08 CLSRSC-4007: Successfully removed Oracle Trace File Analyzer (TFA) Collector.
2020/10/28 16:47:52 CLSRSC-336: Successfully deconfigured Oracle Clusterware stack on this node
2020/10/28 16:47:52 CLSRSC-559: Ensure that the GPnP profile data under the 'gpnp' directory in /u01/app/18.0.0/grid is deleted on each node before using the software in the current Grid Infrastructure home for reconfiguration.
[root@msdbadm002 ~]#

 

 

Once you completed the running of the scripts on the nodes, enter and continue to deinstall as follows.

 

The deconfig command below can be executed in parallel on all the remote nodes. Execute the command on the local node after the execution completes on all the remote nodes.

Run the following command as the root user or the administrator on node "msdbadm001".

/u01/app/18.0.0/grid/crs/install/rootcrs.sh -force -deconfig -paramfile "/tmp/deinstall2020-10-28_04-22-29PM/response/deinstall_OraGI18Home1.rsp"

Run the following command as the root user or the administrator on node "msdbadm002".

/u01/app/18.0.0/grid/crs/install/rootcrs.sh -force -deconfig -paramfile "/tmp/deinstall2020-10-28_04-22-29PM/response/deinstall_OraGI18Home1.rsp" -lastnode

Press Enter after you finish running the above commands

<----------------------------------------





######################### DECONFIG CLEAN OPERATION END #########################


####################### DECONFIG CLEAN OPERATION SUMMARY #######################
There is no Oracle Grid Management database to de-configure in this Grid Infrastructure home
ASM instance was de-configured successfully from the Oracle home
Oracle Clusterware is stopped and successfully de-configured on node "msdbadm002"
Oracle Clusterware is stopped and successfully de-configured on node "msdbadm001"
Oracle Clusterware is stopped and de-configured successfully.
#######################################################################


############# ORACLE DECONFIG TOOL END #############

Using properties file /tmp/deinstall2020-10-28_04-22-29PM/response/deinstall_2020-10-28_04-22-43-PM.rsp
Location of logs /u01/app/oraInventory/logs/

############ ORACLE DEINSTALL TOOL START ############







####################### DEINSTALL CHECK OPERATION SUMMARY #######################
A log of this session will be written to: '/u01/app/oraInventory/logs/deinstall_deconfig2020-10-28_04-22-43-PM.out'
Any error messages from this session will be written to: '/u01/app/oraInventory/logs/deinstall_deconfig2020-10-28_04-22-43-PM.err'

######################## DEINSTALL CLEAN OPERATION START ########################
## [START] Preparing for Deinstall ##
Setting LOCAL_NODE to msdbadm002
Setting REMOTE_NODES to msdbadm001
Setting CLUSTER_NODES to msdbadm002,msdbadm001
Setting CRS_HOME to true
Setting oracle.installer.invPtrLoc to /tmp/deinstall2020-10-28_04-22-29PM/oraInst.loc
Setting oracle.installer.local to false

## [END] Preparing for Deinstall ##

Setting the force flag to false
Setting the force flag to cleanup the Oracle Base
Oracle Universal Installer clean START

Detach Oracle home '/u01/app/18.0.0/grid' from the central inventory on the local node : Done

Delete directory '/u01/app/18.0.0/grid' on the local node : Done

The Oracle Base directory '/u01/app/grid' will not be removed on local node. The directory is in use by Oracle Home '/u01/app/12.1.0/grid'.

Detach Oracle home '/u01/app/18.0.0/grid' from the central inventory on the remote nodes 'msdbadm001' : Done

Delete directory '/u01/app/18.0.0/grid' on the remote nodes 'msdbadm001' : Done

The Oracle Base directory '/u01/app/grid' will not be removed on node 'msdbadm001'. The directory is in use by Oracle Home '/u01/app/12.1.0/grid'.

Oracle Universal Installer cleanup was successful.

Oracle Universal Installer clean END


## [START] Oracle install clean ##

Clean install operation removing temporary directory '/tmp/deinstall2020-10-28_04-22-29PM' on node 'msdbadm001'

## [END] Oracle install clean ##


######################### DEINSTALL CLEAN OPERATION END #########################


####################### DEINSTALL CLEAN OPERATION SUMMARY #######################
Successfully detached Oracle home '/u01/app/18.0.0/grid' from the central inventory on the local node.
Successfully deleted directory '/u01/app/18.0.0/grid' on the local node.
Successfully detached Oracle home '/u01/app/18.0.0/grid' from the central inventory on the remote nodes 'msdbadm001'.
Successfully deleted directory '/u01/app/18.0.0/grid' on the remote nodes 'msdbadm001'.
Oracle Universal Installer cleanup was successful.

For complete clean up of Oracle Clusterware software from the system, deinstall the following old clusterware home(s). Refer to Clusterware Install guide of respective old release for details.
/u01/app/12.1.0/grid on nodes : msdbadm002,msdbadm001
Review the permissions and contents of '/u01/app/grid' on nodes(s) 'msdbadm002,msdbadm001'.
If there are no Oracle home(s) associated with '/u01/app/grid', manually delete '/u01/app/grid' and its contents.
Oracle deinstall tool successfully cleaned up temporary directories.
#######################################################################


############# ORACLE DEINSTALL TOOL END #############

[+ASM2]/u01/app/18.0.0/grid/deinstall $ 
[+ASM2]/u01/app/18.0.0/grid/deinstall $

 

 

Oracle Grid Infrastructure is deinstalled properly.

 

 

 

Do you want to learn Oracle RAC Architecture,  then read the following articles.

 

 

Do you want to learn Convert Single Instance to Oracle RAC, then read the following articles.

Convert Single Instance Oracle Database to Oracle RAC

Exit mobile version