Wednesday 23 March 2016

Removing Oracle Grid 12c home and ASM on Linux

This document describes the procedure to remove the Oracle Grid 12c Home and ASM on Oracle Linux 6.5.

Starting with Oracle Database 11g Release 2 , Oracle recommends that you use the deinstallation tool to remove the entire Oracle home associated with the Oracle Database, Oracle Clusterware, Oracle ASM, Oracle RAC, or Oracle Database client installation. Oracle does not support the removal of individual products or components.

Identify all instances associated with the Oracle home that you want to remove.

[oracle@oracle123 ~]$ cat /etc/oratab
+ASM:/u02/app/oracle/product/12.1.0/grid:N
db11g:/u01/app/oracle/product/11.1.0/db_1:N

Oracle recommends to run the deinstallation tool as the Oracle software installation owner usually as oracle user.

After executing deinstall tool, it will prompt for enter LISTENER name, and for confirmation.
All info marked in RED will be prompted.

During execution it will generate a script to be executed as root user and then press enter to continue.


[oracle@oracle123 deinstall]$ ls -l
total 348
-rwxrwxr-x. 1 oracle oinstall 240220 Jul  7  2014 bootstrap_files.lst
-rwxrwxr-x. 1 oracle oinstall  11952 Mar  4  2014 bootstrap.pl
-rwxrwxr-x. 1 oracle oinstall  10227 Mar 22 16:48 deinstall
-rwxrwxr-x. 1 oracle oinstall  28591 May 19  2014 deinstall.pl
-rwxrwxr-x. 1 oracle oinstall   8623 Apr 11  2014 deinstall.xml
drwxrwxr-x. 2 oracle oinstall   4096 Mar 22 16:41 jlib
-rwxrwxr-x. 1 oracle oinstall    401 Feb 10  2012 readme.txt
drwxrwxr-x. 2 oracle oinstall   4096 Mar 22 16:40 response
-rwxrwxr-x. 1 oracle oinstall  32334 Jun  7  2013 sshUserSetup.sh
drwxrwxr-x. 2 oracle oinstall   4096 Mar 22 16:41 utl

[oracle@oracle123 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 ##


Checking for existence of the Oracle home location /u02/app/oracle/product/12.1.0/grid
Oracle Home type selected for deinstall is: Oracle Grid Infrastructure for a Standalone Server
Oracle Base selected for deinstall is: /u02/app/oracle
Checking for existence of central inventory location /u01/app/oraInventory
Checking for existence of the Oracle Grid Infrastructure home /u02/app/oracle/product/12.1.0/grid

## [END] Install check configuration ##

Traces log file: /u01/app/oraInventory/logs//crsdc_2016-03-24_08-40-10AM.log

Network Configuration check config START

Network de-configuration trace file location: /u01/app/oraInventory/logs/netdc_check2016-03-24_08-40-11-AM.log

Specify all Oracle Restart enabled listeners that are to be de-configured. Enter .(dot) to deselect all. [LISTENER]:

Network Configuration check config END

Asm Check Configuration START

ASM de-configuration trace file location: /u01/app/oraInventory/logs/asmcadc_check2016-03-24_08-40-41-AM.log

Automatic Storage Management (ASM) instance is detected in this Oracle home /u02/app/oracle/product/12.1.0/grid.
ASM Diagnostic Destination : /u01/app/oracle
ASM Diskgroups : +DATA,+FRA
ASM diskstring : /dev/oracleasm/disks
Diskgroups will be dropped
De-configuring ASM will drop all the diskgroups and their contents at cleanup time. This will affect all of the databases and ACFS that use this ASM instance(s).
 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]: n
Database Check Configuration START

Database de-configuration trace file location: /u01/app/oraInventory/logs/databasedc_check2016-03-24_08-42-04-AM.log

Database Check Configuration END

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


####################### DECONFIG CHECK OPERATION SUMMARY #######################
Oracle Grid Infrastructure Home is: /u02/app/oracle/product/12.1.0/grid
The following nodes are part of this cluster: null
The cluster node(s) on which the Oracle home deinstallation will be performed are:null
Oracle Home selected for deinstall is: /u02/app/oracle/product/12.1.0/grid
Inventory Location where the Oracle home registered is: /u01/app/oraInventory
Following Oracle Restart enabled listener(s) will be de-configured: LISTENER
ASM instance will be de-configured from this Oracle 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_deconfig2016-03-24_08-40-01-AM.out'
Any error messages from this session will be written to: '/u01/app/oraInventory/logs/deinstall_deconfig2016-03-24_08-40-01-AM.err'

######################## DECONFIG CLEAN OPERATION START ########################
Database de-configuration trace file location: /u01/app/oraInventory/logs/databasedc_clean2016-03-24_08-42-15-AM.log
ASM de-configuration trace file location: /u01/app/oraInventory/logs/asmcadc_clean2016-03-24_08-42-15-AM.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_clean2016-03-24_08-42-48-AM.log

De-configuring Oracle Restart enabled listener(s): LISTENER

De-configuring listener: LISTENER
    Stopping listener: LISTENER
    Listener stopped successfully.
    Unregistering listener: LISTENER
    Listener unregistered successfully.
    Deleting listener: LISTENER
    Listener deleted successfully.
Listener de-configured successfully.

De-configuring Listener configuration file...
Listener configuration file de-configured successfully.

De-configuring Naming Methods configuration file...
Naming Methods configuration file de-configured successfully.

De-configuring backup files...
Backup files de-configured successfully.

The network configuration has been cleaned up successfully.

Network Configuration clean config END


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

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

/tmp/deinstall2016-03-24_08-38-41AM/perl/bin/perl -I/tmp/deinstall2016-03-24_08-38-41AM/perl/lib -I/tmp/deinstall2016-03-24_08-38-41AM/crs/install /tmp/deinstall2016-03-24_08-38-41AM/crs/install/roothas.pl -force  -deconfig -paramfile "/tmp/deinstall2016-03-24_08-38-41AM/response/deinstall_OraGI12Home1.rsp"

[root@oracle123 ~]# /tmp/deinstall2016-03-24_08-38-41AM/perl/bin/perl -I/tmp/deinstall2016-03-24_08-38-41AM/perl/lib -I/tmp/deinstall2016-03-24_08-38-41AM/crs/install /tmp/deinstall2016-03-24_08-38-41AM/crs/install/roothas.pl -force  -deconfig -paramfile "/tmp/deinstall2016-03-24_08-38-41AM/response/deinstall_OraGI12Home1.rsp"
Using configuration parameter file: /tmp/deinstall2016-03-24_08-38-41AM/response/deinstall_OraGI12Home1.rsp
PRKO-2573 : ONS daemon is already stopped.
CRS-2673: Attempting to stop 'ora.cssd' on 'oracle123'
CRS-2677: Stop of 'ora.cssd' on 'oracle123' succeeded
CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on 'oracle123'
CRS-2673: Attempting to stop 'ora.evmd' on 'oracle123'
CRS-2677: Stop of 'ora.evmd' on 'oracle123' succeeded
CRS-2793: Shutdown of Oracle High Availability Services-managed resources on 'oracle123' has completed
CRS-4133: Oracle High Availability Services has been stopped.
2016/03/24 08:44:39 CLSRSC-337: Successfully deconfigured Oracle Restart stack


Press Enter after you finish running the above commands

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


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


####################### DECONFIG CLEAN OPERATION SUMMARY #######################
ASM instance was de-configured successfully from the Oracle home
Following Oracle Restart enabled listener(s) were de-configured successfully: LISTENER
Oracle Restart was already stopped and de-configured on node "oracle123"
Oracle Restart is stopped and de-configured successfully.
#######################################################################


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

Using properties file /tmp/deinstall2016-03-24_08-38-41AM/response/deinstall_2016-03-24_08-40-01-AM.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_deconfig2016-03-24_08-40-01-AM.out'
Any error messages from this session will be written to: '/u01/app/oraInventory/logs/deinstall_deconfig2016-03-24_08-40-01-AM.err'

######################## DEINSTALL CLEAN OPERATION START ########################
## [START] Preparing for Deinstall ##
Setting LOCAL_NODE to oracle123
Setting CRS_HOME to true
Setting oracle.installer.invPtrLoc to /tmp/deinstall2016-03-24_08-38-41AM/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 '/u02/app/oracle/product/12.1.0/grid' from the central inventory on the local node : Done

Delete directory '/u02/app/oracle/product/12.1.0/grid' on the local node : Done

The Oracle Base directory '/u02/app/oracle' will not be removed on local node. The directory is not empty.

Oracle Universal Installer cleanup was successful.

Oracle Universal Installer clean END


## [START] Oracle install clean ##

Clean install operation removing temporary directory '/tmp/deinstall2016-03-24_08-38-41AM' on node 'oracle123'

## [END] Oracle install clean ##


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


####################### DEINSTALL CLEAN OPERATION SUMMARY #######################
Successfully detached Oracle home '/u02/app/oracle/product/12.1.0/grid' from the central inventory on the local node.
Successfully deleted directory '/u02/app/oracle/product/12.1.0/grid' on the local node.
Oracle Universal Installer cleanup was successful.

Run 'rm -r /opt/ORCLfmap' as root on node(s) 'oracle123' at the end of the session.
Oracle deinstall tool successfully cleaned up temporary directories.
#######################################################################


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



Remove files from /tmp

[root@oracle123 tmp]# rm -Rf *
[root@oracle123 tmp]# ls -l

Thanks

No comments:

Post a Comment