Thursday, 19 April 2018

Uninstall Oracle Database 12c from Windows



Steps to Uninstall Oracle Database 12c from Windows 


1    Stop the application related to the Database before starting of Activity and reply to the DB team     (Application Team Task)

2    Stop the AV services in the server UKC1CENTQJ and UKC1CENTQK before the activity after coordinating with Oracle team   

3    Delete the Obsolete version of DB software in the server UKC1CENTQJ and UKC1CENTQK     (DBA Team)

4    Reboot the Wintel Server UKC1CENTQJ and UKC1CENTQK after co ordinating with Oracle team      (Wintel Team)

5    Start the DB DBCENTQJ &DBCENTQK      (DBA Team)

6    Start the application related to the Database after the DB upgrade completed    (Application Team) 
 
7    Start the AV services in the server UKC1CENTQJ and UKC1CENTQK after the activity after coordinating with Oracle team    

8    Sanity check on the application   


you had done 12c upgrade on ukc1centqj so pls deinstallation on same server

Starting with Oracle Database 11g Release 2 (11.2.0.1.0) , you CANNOT use anymore the Oracle Universal Installer to deinstall the Oracle home.  .
You have to use a a separate de-install utility tool downloadable from OTN site.
This de-install utility is to deinstall the 11.2 software and is intended ONLY for this purpose.
 Note : It is recommended to use the latest version of the 11.2 deinstall utility, which would be version 11.2.0.4.0.

Once downloaded this de-install utility has to be unzipped in a temporary directory and it will produce a sub-directory called deinstall in which you will find script deinstall (deinstall.bat for windows) to execute.


Deinstall should NOT delete the existing instances/directories under Oracle Base :

- If you are having multiple Oracle Software Homes under same Oracle Base, and all of them are registered under single Central Inventory (oraInventory).
The deinstall tool will check from the Central Inventory (oraInventory) for the information of other Oracle Software Homes installed on this server so it will NOT delete those Oracle home under the same base and keep Oracle Base and Other Registered Homes intact.


1) download deinstallation tool from OTN

1) check Oracle Central Inventory.
C:\>reg query HKLM\SOFTWARE\ORACLE /v inst_loc

C:\app\oracle\product\11.2.0\dbhome_1\OPatch\opatch lsinventory

1) Take backup of tnsname.ora,listener file and parameter file
2) backup of current oracle home binary
3) Backup of database
4) run deinstall and carefull while selecting ORACLE_HOME
   ....\deinstall\deinstall.bat (windows platforms)

If Oracle Home deinstall script has some issue and you want to deinstall home then you can download separate de-install utility from OTN and use it.

1. Download and unzip de-install utility in some folder outside Oracle Home.

2. Go to the deinstall folder.

3. Invoke deinstall utility with the -home option specifying the full path of the Oracle Home you want to deinstall.

Example:

% ./deinstall -home /u01/app/oracle/product/11.2.0/dbhome_2


D:\deinstall>deinstall.bat -home D:\app\oracle\product\11.2.0\db_1
Location of logs C:\Program Files\Oracle\Inventory\logs\

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


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


Checking for existence of the Oracle home location D:\app\oracle\product\11.2.0\
db_1
Oracle Home type selected for deinstall is: Oracle Single Instance Database
Oracle Base selected for deinstall is: D:\app\oracle
Checking for existence of central inventory location C:\Program Files\Oracle\Inv
entory

## [END] Install check configuration ##

## [START] Checking Windows and .NET products configuration ##


The following Windows and .NET products will be deconfigured from the Oracle hom
e : asp.net,ode.net,odp.net,ntoledb,oramts

## [END] Checking Windows and .NET products configuration ##


Network Configuration check config START

Network de-configuration trace file location: C:\Program Files\Oracle\Inventory\
logs\netdc_check2017-05-02_09-53-20-AM.log

Network Configuration check config END

Database Check Configuration START

Database de-configuration trace file location: C:\Program Files\Oracle\Inventory
\logs\databasedc_check2017-05-02_09-53-24-AM.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 []:
Database Check Configuration END

Enterprise Manager Configuration Assistant START

EMCA de-configuration trace file location: C:\Program Files\Oracle\Inventory\log
s\emcadc_check2017-05-02_09-54-15-AM.log

Enterprise Manager Configuration Assistant END
Oracle Configuration Manager check START
OCM check log file location : C:\Program Files\Oracle\Inventory\logs\\ocm_check_
2017-05-02_09-54-15-AM.log
Oracle Configuration Manager check END

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


####################### CHECK OPERATION SUMMARY #######################
Oracle Home selected for deinstall is: D:\app\oracle\product\11.2.0\db_1
Inventory Location where the Oracle home registered is: C:\Program Files\Oracle\
Inventory
The following Windows and .NET products will be deconfigured from the Oracle hom
e : asp.net,ode.net,odp.net,ntoledb,oramts
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
Do you want to continue (y - yes, n - no)? [n]:



6) verification( path enviroment,windows registry and physical file.



 Windows platforms :  c:\program files\oracle\inventory\logs

5. Check the logs created under <central_inventory>/logs folder for any issu

7. Check if Oracle Home folder is deleted or not. If not then you have to remove it manually


8) reboot server and check PATH has updated or not

echo %PATH%

=======================

STEP 3:

Change the directory to the oui location.

    Use the following command to change the directory to the oui location.
    (Unix/Linux): % cd $ORACLE_HOME/oui/bin

    (Windows): > cd %ORACLE_HOME%\oui\bin




============================
How to Find the Location of Central Inventory for Both the 32 bit and 64 bit Database/Client Installation on Microsoft Windows x64 (64-bit) Server? (Doc ID 1388380.1)    
Applies to:
Oracle Database - Enterprise Edition - Version 10.2.0.1 and later
Microsoft Windows x64 (64-bit)
Goal

How to find the location of Central Inventory for both the 32 bit and 64 bit database/client installation on  Microsoft Windows x64 (64-bit) server?
Solution

1) To check inventory (if it is 64 bit),  type in command prompt:

C:>reg query HKLM\SOFTWARE\ORACLE /v inst_loc


The output will be similar to:


HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE
 inst_loc REG_SZ C:\Program Files\Oracle\Inventory


2) To check inventory (for 32 bit),  type in command prompt:

C:>reg query HKLM\SOFTWARE\WOW6432Node\ORACLE /v inst_loc


The output will be similar to:

HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\ORACLE
inst_loc REG_SZ C:\Program Files (x86)\Oracle\Inventory



It is recommended not to change the default central Inventory location.
But somehow it is possible to change from registries and hence you may get the different result from what you expected.
Hence the above command will give you what's the correct inventory location.

To find the inventory from registry:

1) For 64 bit:
1. Go to "Run" window (Press Windows Key + r)
2. Type "regedit" and enter
3. Expand HKEY_LOCAL_MACHINE/SOFTWARE/ORACLE
4. Find the value of the key "inst_loc"

2) For 32 bit:
1. Go to "Run" window (Press Windows Key + r)
2. Type "regedit" and enter
3. Expand HKEY_LOCAL_MACHINE\Software\WOW6432Node
4. Find the value of the key "inst_loc"

Alternatively can also open the 32-bit version of Registry Editor directly:
Click Start, and then click Run.
In the Open box, type %systemroot%\syswow64\regedit, and then click OK.
Find the value of the key "inst_loc"

==============


d:\app\oracle\product\12.1.0.2\bin\ORACLE.EXE DBCENTQ8

=====================deinstallation--5 jul 2017==========
ukc1centqj==server name

ukc1centqj
f:\app\oracle\product\12.1.2\bin\ORACLE.EXE DBCENTQJ

F:\app\oracle\product\12.1.2\bin;E:\app\oracle\product\11.2.0.4\db_1\bin;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;C:\IBM\ITM\bin;C:\IBM\ITM\TMAITM6;C:\Program Files (x86)\IBM\Director\cimom\bin;C:\Program Files (x86)\Common Files\ibm\icc\cimom\bin;C:\Program Files (x86)\IBM\Director\bin;C:\Program Files (x86)\BROCADE\Adapter\driver;C:\Program Files (x86)\BROCADE\Adapter\driver\util;D:\PROGRA~1\IBM\IBMDAT~1\BIN;C:\IBM\ITM\InstallITM

===========after deinstallation=========

F:\app\oracle\product\12.1.2\bin;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;C:\IBM\ITM\bin;C:\IBM\ITM\TMAITM6;C:\Program Files (x86)\IBM\Director\cimom\bin;C:\Program Files (x86)\Common Files\ibm\icc\cimom\bin;C:\Program Files (x86)\IBM\Director\bin;C:\Program Files (x86)\BROCADE\Adapter\driver;C:\Program Files (x86)\BROCADE\Adapter\driver\util;D:\PROGRA~1\IBM\IBMDAT~1\BIN;C:\IBM\ITM\InstallITM



F:\>
F:\>set ORACLE_HOME=f:\app\oracle\product\12.1.2

F:\>set ORACLE_SID=DBCENTQJ

F:\>reg query HKLM\SOFTWARE\ORACLE /v inst_loc

HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE
    inst_loc    REG_SZ    C:\Program Files\Oracle\Inventory


F:\>cd %ORACLE_HOME%

f:\app\oracle\product\12.1.2>cd OPatch

f:\app\oracle\product\12.1.2\OPatch>opatch lsinventory
Oracle Interim Patch Installer version 12.1.0.1.3
Copyright (c) 2017, Oracle Corporation.  All rights reserved.


Oracle Home       : f:\app\oracle\product\12.1.2
Central Inventory : C:\Program Files\Oracle\Inventory
   from           : n/a
OPatch version    : 12.1.0.1.3
OUI version       : 12.1.0.2.0
Log file location : f:\app\oracle\product\12.1.2\cfgtoollogs\opatch\opatch2017-0
7-05_13-27-17PM_1.log

Lsinventory Output file location : f:\app\oracle\product\12.1.2\cfgtoollogs\opat
ch\lsinv\lsinventory2017-07-05_13-27-17PM.txt

--------------------------------------------------------------------------------

Installed Top-level Products (1):

Oracle Database 12c                                                  12.1.0.2.0
There are 1 products installed in this Oracle Home.


Interim patches (1) :

Patch  24591642     : applied on Sat May 20 14:12:52 BST 2017


D:\deinstall>deinstall.bat -home D:\app\oracle\product\11.2.0\db_1

cd F:\CHG0105781\windows.x64_11204_deinstall\deinstall

deinstall.bat -home E:\app\oracle\product\11.2.0.4\db_1


path

E:\app\oracle\product\11.2.0.4\db_1

No comments:

Post a Comment