Not that you’d want to deinstall Oracle Enterprise Manager (OEM) 13c, but I just have to tell you how easy it is now! This was one of my pet peeves in OEM 12c. Deinstalling had a list of about 20 steps, and the order was very particular, as was the alignment of the sun and moon. Not anymore, in OEM 13c, it’s one command and it’s beautiful. Really, it’s the simple things that make me happy!
This may not be a common concern for most people, because once they install they just continue to upgrade and move forward. However when you do a lot of testing (especially destructive testing) and you have to rebuild your environment frequently, this is a big deal.
Want to see how easy it is? First, be sure to start with your environment up (repository database and OMS).
Copy the deinstall script to a temporary location…
$cp /u01/oracle/m13c/oraclehome/sysman/install/EMDeinstall.pl /home/cllamas
Then run it. Be sure you have your passwords and Oracle Home handy.
$/u01/oracle/em13/perl/bin/perl /home/cllamas/EMDeinstall.pl -mwHome /u01/oracle/em13 -stageLoc /home/cllamas
That’s it. All done. Agent, OMS (including BI Publisher), and the schema from the repository database. The database is not removed, just cleaned up and ready to start a new install 😉
Again. It’s the simple things that make me happy. For more information checkout the deinstall docs, there’s additional ways to deinstall certain components, but when you’re looking for a clean sweep this is the trick.
Output of deinstall:
Refer to /home/cllamas/deinstall_2016-08-01_08-42-48.log for deinstall log
This is a First OMS install. So, this deinstalls the OMS , Repository and Agent. Confirm (y/n)y
User confirmed for deinstallation.
Enter the SYS Password :
Enter the sysman Password :
Enter the Admin Server password :
dbConnectStr – (DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=abc.oracle.com)(PORT=1521)))(CONNECT_DATA=(SID=emrep)))
The command is /u01/oracle/em13/bin/emctl stop oms
Stopping oms………… Wait for the completion of the execution.
Oracle Enterprise Manager Cloud Control 13c Release 1
Copyright (c) 1996, 2015 Oracle Corporation. All rights reserved.
Stopping Oracle Management Server…
Oracle Management Server Already Stopped
Oracle Management Server is Down
JVMD Engine is Down
return value is : 0
The command is /u01/oracle/em13/bin/omsca delete -full -OMSNAME EMGC_OMS1 -AS_USERNAME weblogic -REP_CONN_STR “(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=abc.oracle.com)(PORT=1521)))(CONNECT_DATA=(SID=emrep)))”
The oms delete will take sometime. Wait for the completion of the execution. Don’t abort the execution.
Oracle Enterprise Manager Cloud Control 13c Release 13.1.0.0.0
Copyright (c) 1996, 2015, Oracle. All rights reserved. Do You really want to delete the OMS (Y|N):Deleting BI Publisher Server Named “BIP” Enter Administration Server user password:
Processing command line ….
Repository Creation Utility – Checking Prerequisites
Checking Global Prerequisites
Repository Creation Utility – Checking Prerequisites
Checking Component Prerequisites
Repository Creation Utility – Drop
Repository Drop in progress.
Percent Complete: 22
Percent Complete: 47
Percent Complete: 49
Percent Complete: 100
Repository Creation Utility: Drop – Completion Summary
Database details:
Connect Descriptor : (DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=abc.oracle.com)(PORT=1521)))(CONNECT_DATA=(SID=emrep)))
Connected As : sys
Prefix for (prefixable) Schema Owners : SYSMAN
RCU Logfile : /u01/oracle/em13/cfgtoollogs/cfgfw/emsecrepmgr.log
Component schemas dropped:
Component Status Logfile
Oracle Platform Security Services Success /u01/oracle/em13/cfgtoollogs/cfgfw/opss.log
Repository Creation Utility – Drop : Operation Completed
OMS Deleted successfully
return value is : 0
Running the command /u01/oracle/em13/sysman/admin/emdrep/bin/RepManager -action drop -dbUser sys -dbRole sysdba -connectString “(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=abc.oracle.com)(PORT=1521)))(CONNECT_DATA=(SID=emrep)))” -mwHome /u01/oracle/em13 -mwOraHome /u01/oracle/em13 -oracleHome /u01/oracle/em13
Repository drop will take sometime. Wait for the completion of the execution. Don’t abort the execution.
stty: standard input: Inappropriate ioctl for device
stty: standard input: Inappropriate ioctl for device
stty: standard input: Inappropriate ioctl for device
stty: standard input: Inappropriate ioctl for device
processing arguments
compiling arguments for validation
Enter sys user password :
Verify :
Performing PreDropAll action…
Enter password for: sys process_id:1p5c6aeconlq4
null
Done PreDropAll action…
Dropping BIP schema…
Enter sys user password :
Verify :
Action on BIP schema succeed.
Dropping APM schema… Component is already dropped Enter sysdba password:
Dropping OPSS schema… Component is already dropped Enter sysdba password:
[01-08-2016 08:45:11] executing query : “select count(*) from all_users where username=’SYSMANUPGR_OPSS'”
[01-08-2016 08:45:12] User SYSMANUPGR_OPSS Does Not Exist
Dropping STB schema… Processing command line …. Enter sysdba password:
Repository Creation Utility – Checking Prerequisites
Checking Global Prerequisites
Repository Creation Utility – Checking Prerequisites
Checking Component Prerequisites
Repository Creation Utility – Drop
Repository Drop in progress.
Percent Complete: 9
Percent Complete: 9
Percent Complete: 9
Percent Complete: 46
Percent Complete: 100
Repository Creation Utility: Drop – Completion Summary
Database details:
Connect Descriptor : (DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=abc.oracle.com)(PORT=1521)))(CONNECT_DATA=(SID=emrep)))
Connected As : sys
Prefix for (prefixable) Schema Owners : SYSMAN
RCU Logfile : /u01/oracle/em13/cfgtoollogs/cfgfw/emsecrepmgr.log
Component schemas dropped:
Component Status Logfile
Common Infrastructure Services Success /u01/oracle/em13/cfgtoollogs/cfgfw/stb.log
Repository Creation Utility – Drop : Operation Completed
Successfully dropped schema
Dropping MDS schema…
Enter sys user password :
Verify :
Action on MDS schema succeed.
Enter password for: sys process_id:1udv4t5atkf3v
Processing command line ….
Repository Creation Utility – Checking Prerequisites
Checking Global Prerequisites
Repository Creation Utility – Checking Prerequisites
Checking Component Prerequisites
Repository Creation Utility – Drop
Repository Drop in progress.
Repository Creation Utility: Drop – Completion Summary
Database details:
Connect Descriptor : (DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=abc.oracle.com)(PORT=1521)))(CONNECT_DATA=(SID=emrep)))
Connected As : sys
RCU Logfile : /u01/oracle/em13/sysman/log/schemamanager/m_080116_0845_AM/m_080116_0845_AM.DROP/rcu.log
Component schemas dropped:
Component Status Logfile
EM Repository Drop Success /u01/oracle/em13/sysman/log/schemamanager/m_080116_0845_AM/m_080116_0845_AM.DROP/em_repos_drop.log
Repository Creation Utility – Drop : Operation Completed
Performing PostDropAll action…
Enter password for: sys process_id:22ol5ee7e7oc
drop completed successfully
return value is : 0
The command executed is /u01/oracle/em13/oui/bin/detachHome.sh
Launcher log file is /tmp/OraInstall2016-08-01_09-18-50AM/launcher2016-08-01_09-18-50AM.log.
Starting Oracle Universal Installer
Checking swap space: must be greater than 500 MB. Actual 15455 MB Passed
Checking if this platform requires a 64-bit JVM. Actual 64 Passed (64-bit not required)
‘detachHome’ was successful.
Logs successfully copied to /u01/oraInventory/logs.
return value is : 0
Deleting the instance home
Deleting the em home
The deinstallation of OMS is successful.
The location of the file is : /etc/oragchomelist