Thursday 7 August 2014

Deinstalling/Uninstalling Oracle database in Linux machine


How to de-install Oracle database software including database instance?

Follow the below steps to de-install Oracle software:

Step-1: Go to DB home path
cd $ORACLE_HOME

Step-2:Go to deinstall dorectory
  [oracle@ttd-server db_1]$ cd deinstall/
[oracle@ttd-server deinstall]$ ls
deinstall  deinstall.xml  jlib  response  sshUserSetup.sh

Step-3:Now de-install the software as shown below.it includes database de-installation also
[oracle@ttd-server deinstall]$ ./deinstall
Checking for required files and bootstrapping ...
Please wait ...
Location of logs /tmp/deinstall2014-08-07_05-26-56-PM/logs/

############ ORACLE DEINSTALL & DECONFIG TOOL START ############


######################## CHECK OPERATION START ########################
Install check configuration START


Checking for existence of the Oracle home location /u01/app/oracle/product/11.2.0/db_1
Oracle Home type selected for de-install is: SIDB
Oracle Base selected for de-install is: /u01/app/oracle
Checking for existence of central inventory location /u01/oracle/oraInventory

Install check configuration END


Network Configuration check config START

Network de-configuration trace file location: /tmp/deinstall2014-08-07_05-26-56-PM/logs/netdc_check4894214071504988600.log

Network Configuration check config END

Database Check Configuration START

Database de-configuration trace file location: /tmp/deinstall2014-08-07_05-26-56-PM/logs/databasedc_check7761846242532288656.log

Use comma as separator when specifying list of values as input

Specify the list of database names that are configured in this Oracle home [pavantes]: pavantes    
Note: In this step we are going to give our database name inorder to uninstall it .my database instance is pavantes

###### For Database 'pavantes' ######

Single Instance Database
The diagnostic destination location of the database: /u01/app/oracle/diag/rdbms/pavantes
Storage type used by the Database: FS
Database file location: /u01/app/oracle/oradata/pavantes
Flash recovery area location: /u01/app/oracle/oradata/pavantes/FRA
database spfile location: /u01/app/oracle/product/11.2.0/db_1/dbs/spfilepavantes.ora

The details of database(s) pavantes have been discovered automatically. Do you still want to modify the details of pavantes database(s)? [n]: n
Note: in this step we are confirming that our database details are correct by saying no need for modification ‘n

Database Check Configuration END

Enterprise Manager Configuration Assistant START

EMCA de-configuration trace file location: /tmp/deinstall2014-08-07_05-26-56-PM/logs/emcadc_check.log
Checking configuration for database pavantes
Enterprise Manager Configuration Assistant END
Oracle Configuration Manager check START
OCM check log file location : /tmp/deinstall2014-08-07_05-26-56-PM/logs//ocm_check9847.log
Oracle Configuration Manager check END

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


####################### CHECK OPERATION SUMMARY #######################
Oracle Home selected for de-install is: /u01/app/oracle/product/11.2.0/db_1
Inventory Location where the Oracle home registered is: /u01/oracle/oraInventory
The following databases were selected for de-configuration : pavantes
Database unique name : pavantes
Storage used : FS
No Enterprise Manager configuration to be updated for any database(s)
No Enterprise Manager ASM targets to update
No Enterprise Manager listener targets to migrate
Checking the config status for CCR
Oracle Home exists with CCR directory, but CCR is not configured
CCR check is finished

Note:till now the pre-checks for deinstall are completed . now it will start the clean(de-install) process by taking our input as ‘y

Do you want to continue (y - yes, n - no)? [n]: y
A log of this session will be written to: '/tmp/deinstall2014-08-07_05-26-56-PM/logs/deinstall_deconfig2014-08-07_05-27-36-PM.out'
Any error messages from this session will be written to: '/tmp/deinstall2014-08-07_05-26-56-PM/logs/deinstall_deconfig2014-08-07_05-27-36-PM.err'

######################## CLEAN OPERATION START ########################

Enterprise Manager Configuration Assistant START

EMCA de-configuration trace file location: /tmp/deinstall2014-08-07_05-26-56-PM/logs/emcadc_clean.log

Updating Enterprise Manager ASM targets (if any)
Updating Enterprise Manager listener targets (if any)
Enterprise Manager Configuration Assistant END
Database de-configuration trace file location: /tmp/deinstall2014-08-07_05-26-56-PM/logs/databasedc_clean1338915545980048440.log
Database Clean Configuration START pavantes
This operation may take few minutes.
Database Clean Configuration END pavantes

Network Configuration clean config START

Network de-configuration trace file location: /tmp/deinstall2014-08-07_05-26-56-PM/logs/netdc_clean8676820294296695118.log

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

The network configuration has been cleaned up successfully.

Network Configuration clean config END

Oracle Configuration Manager clean START
OCM clean log file location : /tmp/deinstall2014-08-07_05-26-56-PM/logs//ocm_clean9847.log
Oracle Configuration Manager clean END
Oracle Universal Installer clean START

Detach Oracle home '/u01/app/oracle/product/11.2.0/db_1' from the central inventory on the local node : Done

Delete directory '/u01/app/oracle/product/11.2.0/db_1' on the local node : Done

Delete directory '/u01/oracle/oraInventory' on the local node : Done

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

Oracle Universal Installer cleanup was successful.

Oracle Universal Installer clean END


Oracle install clean START

Clean install operation removing temporary directory '/tmp/install' on node 'ttd-server'

Oracle install clean END


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


####################### CLEAN OPERATION SUMMARY #######################
Successfully de-configured the following database instances : pavantes
Cleaning the config for CCR
As CCR is not configured, so skipping the cleaning of CCR configuration
CCR clean is finished
Successfully detached Oracle home '/u01/app/oracle/product/11.2.0/db_1' from the central inventory on the local node.
Successfully deleted directory '/u01/app/oracle/product/11.2.0/db_1' on the local node.
Successfully deleted directory '/u01/oracle/oraInventory' on the local node.
Successfully deleted directory '/u01/app/oracle' on the local node.
Oracle Universal Installer cleanup was successful.


Run 'rm -rf /etc/oraInst.loc' as root on node(s) 'ttd-server' at the end of the session.

Oracle install successfully cleaned up the temporary directories.
#######################################################################


############# ORACLE DEINSTALL & DECONFIG TOOL END #############

[oracle@ttd-server deinstall]$ cd /u01/app/oracle/product/11.2.0/db_1
/u01/app/oracle/product/11.2.0/db_1: No such file or directory.
[oracle@ttd-server deinstall]$ cd /u01/app/oracle
/u01/app/oracle: No such file or directory.

Congrats.our de-install process is completed.during the entire above process what we observed is, it checked the databases on the local-node(server) and confirmed the details with us and did the clean process.

cheers....!!!


No comments:

ORA-600 [kwqitnmphe:ltbagi], [1], [0] reported in the alert log file.

ORA-00600 [kwqitnmphe:ltbagi] Cause: This issue arises in 12.1.0.2. The error occurs because there are still Historical Messages without...