Deinstall

 OEM Cloud Control

Deinstall OMS

As the OMS owner (e.g. 'oms')...

mkdir /u01/tmp

cp $ORACLE_HOME/sysman/install/EMDeinstall.pl /u01/tmp

$ORACLE_HOME is assumed to be set in the .profile of the 'oms' user.

$ORACLE_HOME/perl/bin/perl /u01/tmp/EMDeinstall.pl -mwHome $ORACLE_HOME -stageLoc /u01/tmp

Manually remove the auto start scripts from /etc/rc.d

rm /etc/rc.d/*/S98*gcstartup

rm /etc/rc.d/init.d/gcstartup

rm /etc/rc.d/init.d/lockgcstartup

rm /etc/rc.d/init.d/unlockgcstartup

Example output

Note that there are some "interesting" errors here but deinstall is still reported as successful.
Refer to /u01/tmp/deinstall_2021-07-09_14-25-47.log for deinstall logThis is a First OMS install. So, this deinstalls the OMS and Repository. Confirm (y/n)yUser confirmed for deinstallation.
Enter the SYS Password :Enter the sysman Password :Enter the Admin Server password :dbConnectStr - (DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=myserver)(PORT=1521)))(CONNECT_DATA=(SID=ORCL)))
The command is /u01/app/em13c/bin/emctl stop oms
 Stopping oms............ Wait for the completion of the execution.Oracle Enterprise Manager Cloud Control 13c Release 1Copyright (c) 1996, 2015 Oracle Corporation.  All rights reserved.Stopping Oracle Management Server...Oracle Management Server Successfully StoppedOracle Management Server is DownJVMD Engine is Down return value is : 0
The command is /u01/app/em13c/bin/omsca delete -full -OMSNAME EMGC_OMS1 -AS_USERNAME weblogic -REP_CONN_STR "(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=myserver)(PORT=1521)))(CONNECT_DATA=(SID=plato)))"
The oms delete will take sometime. Wait for the completion of the execution. Don't abort the execution.
log4j:WARN No appenders could be found for logger (emctl.secure.oms.SecureOMSCmds).log4j:WARN Please initialize the log4j system properly.Oracle Enterprise Manager Cloud Control 13c Release 13.1.0.0.0Copyright (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 PrerequisitesChecking Global PrerequisitesRCU-6013:Specified prefix does not exist. Existing prefixes are: SYSMANUPGRRCU-6091:Component name/schema prefix validation failed.OMS Deleted successfully
 return value is : 0Running the command /u01/app/em13c/sysman/admin/emdrep/bin/RepManager -action drop -dbUser sys -dbRole sysdba -connectString "(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=myserver)(PORT=1521)))(CONNECT_DATA=(SID=ORCL)))" -mwHome /u01/app/em13c -mwOraHome /u01/app/em13c -oracleHome /u01/app/em13c
Repository drop will take sometime. Wait for the completion of the execution. Don't abort the execution.
stty: standard input: Inappropriate ioctl for devicestty: standard input: Inappropriate ioctl for devicestty: standard input: Inappropriate ioctl for devicestty: standard input: Inappropriate ioctl for deviceprocessing argumentscompiling arguments for validation Enter sys user password   :Verify :Performing PreDropAll action...Enter password for: sys                                                                                                                                                                                                                     Following active sessions found to Oracle Cloud Control repositories:INST_ID:1 SID:371 USERNAME:SYSMAN STATUS:ACTIVE PROGRAM:oracle@myserver (J002)
Error found: Validation Failure for Action: [DROP]. The reason for failure was: [Active sessions found to Oracle Cloud Control repositories, please close the respective clients; example:OMS, WLS, SQL*Plus etc. and retry]PreDropAll action failed. return value is : 0The command executed is /u01/app/em13c/oui/bin/detachHome.shLauncher log file is /tmp/OraInstall2021-07-09_02-31-43PM/launcher2021-07-09_02-31-43PM.log.Starting Oracle Universal Installer
Checking swap space: must be greater than 500 MB.   Actual 16383 MB    PassedChecking if this platform requires a 64-bit JVM.   Actual 64    Passed (64-bit not required)

'detachHome' was successful.Logs successfully copied to /u01/app/oraInventory/logs. return value is : 0
Deleting the instance home cannot remove directory for /u01/app/gc_inst: Permission denied at /u01/tmp/EMDeinstall.pl line 712
Deleting the em homecannot remove directory for /u01/app/em13c: Permission denied at /u01/tmp/EMDeinstall.pl line 720The deinstallation of OMS is successful.
The location of the file is : /etc/oragchomelist

Deinstall Repository Database Instance

Bibliography