Showing posts with label deinstalling oracle. Show all posts
Showing posts with label deinstalling oracle. Show all posts

Monday, April 17, 2023

How to deinstall Oracle 19c database software

If you are deinstalling Oracle on a Linux RHEL 8, set the variable CV_ASSUME_DISTID=OL7 to avoid the error outlined in Doc ID 2738856.1:
export CV_ASSUME_DISTID=OL7
Deinstall the binaries:
$ORACLE_HOME/deinstall/deinstall

At the end of the deinstallation, a summary is presented:
####################### DEINSTALL CLEAN OPERATION SUMMARY #######################
Successfully detached Oracle home '/u01/oracle/product/19c' from the central inventory on the local node.
Failed to delete directory '/u01/oracle/product/19c' on the local node due to error : Either user has no permission to delete or file is in use.
Review the permissions and manually delete '/u01/oracle/product/19c' on local node.
Successfully deleted directory '/home/oracle/oraInventory' on the local node.
Oracle Universal Installer cleanup was successful.

Sunday, February 19, 2023

How to identified active files/executables when using opatch to deinstall software

During a opatch rollback operation, we saw the following error message in the opatch logfile:
[Feb 19, 2023 2:29:51 PM] [INFO]    Prerequisite check "CheckActiveFilesAndExecutables" failed.
                                    The details are:


                                    Following active files/executables/libs are used by ORACLE_HOME :/sw/oracle/product/19.18
                                    /sw/oracle/product/19.18/lib/libclntsh.so.19.1
Reason:
Some processes are still using the /sw/oracle/product/19.18/lib/libclntsh.so.19.1.
Use the fuser utility with verbose output to find the process:
fuser -v /sw/oracle/product/19.18/lib/libclntsh.so.19.1
                     USER        PID ACCESS COMMAND
/sw/oracle/product/19.18/lib/libclntsh.so.19.1:
                     oracle    48439 ....m prometheus_orac
                     oracle    595787 ....m ggsci

There were two open processes using the file libclntsh.so.19.1: 1. the Golden Gate Manager 2. a utility called prometheus_oracle_exporter

Solution:
log in as the Golden Gate software owner
ggsci --> info all --> list all processes
stop mgr !
One of two processes quit its handler on the file:
 fuser -v /sw/oracle/product/19.18/lib/libclntsh.so.19.1
                     USER        PID ACCESS COMMAND
/sw/oracle/product/19.18/lib/libclntsh.so.19.1:
                     oracle    48439 ....m prometheus_orac

For the prometheus agent, we simply kill the agent, and the output from fuser now reveals that no file handlers are open:
kill 48439
fuser -v /sw/oracle/product/19.18/lib/libclntsh.so.19.1

Friday, March 29, 2019

How to remove the schema OWF_MGR from a database


Applicable for Oracle version 12.1.0.2.0.

Workflow manager is a component used for Orchestrating of Oracle Warehouse Builder (OWB).
If you have a schema called OWF_MGR dangling in your database, it can be removed. I did it the following way:

Find the number of grants per user from OWF_MGR:
SELECT UNIQUE GRANTEE,COUNT(*)
FROM DBA_TAB_PRIVS
WHERE OWNER='OWF_MGR'
GROUP BY GRANTEE;

This query gave me to grantees: PUBLIC and the role WF_PLSQL_UI.

Revoke the privileges granted. Generate the revoke statements:
select 'revoke execute on '|| owner ||'.' || table_name || ' from WF_PLSQL_UI;' 
from  dba_tab_privs
where owner='OWF_MGR'
AND grantee='WF_PLSQL_UI';

Generate the same statements for PUBLIC.

Drop the role:
drop role WF_PLSQL_UI;
Finally, drop the user with the cascade option:
drop user owf_mgr cascade;

I found this information here

Monday, September 24, 2018

How to deinstall an old oracle installation using oui

You can use the following command to remove an obsolete oracle software installation from the central inventory:
$ORACLE_HOME/oui/bin/runInstaller -silent -deinstall REMOVE_HOMES={"/u01/oracle/product/11204"}

Remember to clean out the physical files with an appropriate operating system command.

The above method is an alternative to the method outlined in this post.

Wednesday, May 20, 2015

How to deinstall Oracle 10g database software

How to deinstall Oracle 10g database software

In oracle 10g, you need to use the oui (oracle universal installer) script supplied in the $ORACLE_HOME/oui/bin folder, as shown below.


# Log in as the oracle 10g user, and set the environment to the ORACLE_HOME you are about remove.
# Check the current ORACLE_HOME
echo $ORACLE_HOME
/u01/oracle/product/10.2.0.4/db

# run oui in silent mode, and point to the correct Oracle 10g home:
cd /u01/oracle/product/10.2.0.4/db/oui/bin
./runInstaller -deinstall -silent REMOVE_HOMES={"/u01/oracle/product/10.2.0.4/db"}


Expected output:
Starting Oracle Universal Installer...

No pre-requisite checks found in oraparam.ini, no system pre-requisite checks will be executed.

Preparing to launch Oracle Universal Installer from /tmp/OraInstall2015-05-20_08-51-59AM. Please wait ...
Oracle Universal Installer, Version 10.2.0.4.0 Production

Copyright (C) 1999, 2008, Oracle. All rights reserved.

Starting deinstall

Deinstall in progress (Wednesday, May 20, 2015 8:52:24 AM CEST)
Configuration assistant "iSQL*Plus Configuration Assistant" succeeded
Configuration assistant "Oracle Database Configuration Assistant" succeeded
Configuration assistant "Oracle Net Configuration Assistant - Deinstall Script" failed
............................................................................................................... 100% Done.

Deinstall successful

End of install phases.(Wednesday, May 20, 2015 8:56:17 AM CEST)
End of deinstallations

Please check '/u01/oracle/oraInventory/logs/silentInstall2015-05-20_08-51-59AM.log' for more details.
To verify the deinstallation, check the oracle inventory, in my case /u01/oracle/oraInventory/ContentsXML/inventory.xml

There should be a row similar to:


Remove the old ORACLE_HOME folder physically from disk:
cd /u01/oracle/product
rm -rf 10.2.0.4

How to deinstall Oracle 11g database software

In oracle 11g, you can use the deinstall script supplied in the $ORACLE_HOME/deinstall folder, as shown below.

In my example, I have two Oracle software installations on the host

  • /u01/oracle/product/11203 <-- not in use, can be removed
  • /u01/oracle/product/11204 <-- in use

    cd /tmp
    # first perform a trial run
    /u01/oracle/product/11203/deinstall/deinstall -checkonly
    # do the actual deinstall
    /u01/oracle/product/11203/deinstall/deinstall

    I have found that when you have a listener running on the host out of a different ORACLE_HOME, the deinstall script will often (but not always) want to deconfigure it, despite the fact that it runs out of a different ORACLE_HOME. So for a brief period, the host may be without a valid listener process. However, this was never a problem , simply change directory to the working /u01/oracle/product/11204/network/admin folder and restart the listener.

    Sometimes (but not always) you may have to manually remove the deinstall folder under the ORACLE_HOME home you just deinstalled.