Background
Removing the SYSMAN schema and other OEM-related objects from a database consisted of disabling constraints and running a series of DDL scripts in earlier versions of OEM. Always use RepManager to perform this cleanup for OEM 13c.
RepManager ‘-drop’ command drops the SYSMAN, SYSMAN_MDS, SYSMAN_OPSS, SYSMAN_RO, and SYSMAN_BIPLATFORM schemas and removes their artifacts, including tablespaces and datafiles.
Procedure
Note: The following run-time example has been simplified from actual stdout and uses a reference to $MW_HOME to make this example a little easier to read.
The required command line options are straight-forward, starting with the three components of a connect string. Notice that these values are not preceded by identifier flags. Then you define the action to perform (“drop), and then give it the user name and database role for the connection. You could pass the password on the command line but there’s no need to store that in plain text on your operating system history.
> cd $MW_HOME/sysman/admin/emdrep/bin > RepManager demohost.demo.com 1521 OMR -action drop -dbUser sys -dbRole sysdba processing arguments compiling arguments for validation Enter sys user password : Verify : Checking if OMS is up... Performing PreDropAll action... Done PreDropAll action... Dropping BIP schema... Action on BIP schema succeed. Dropping APM schema... Successfully dropped schema Dropping OPSS schema... 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=demohost.demo.com)(Port=1521)))(CONNECT_DATA=(SID=OMR))) Connected As : sys Prefix for (prefixable) Schema Owners : SYSMAN RCU Logfile : $MW_HOME/cfgtoollogs/cfgfw/emsecrepmgr.log Component schemas dropped: Component Status Logfile Oracle Platform Security Services Success $MW_HOME/cfgtoollogs/cfgfw/opss.log Repository Creation Utility - Drop : Operation Completed Successfully dropped schema Dropping SYSMANUPGR_OPSS schema... 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=demohost.demo.com)(Port=1521)))(CONNECT_DATA=(SID=OMR))) Connected As : sys Prefix for (prefixable) Schema Owners : SYSMANUPGR RCU Logfile : $MW_HOME/cfgtoollogs/cfgfw/emsecrepmgr.log Component schemas dropped: Component Status Logfile Oracle Platform Security Services Success $MW_HOME/cfgtoollogs/cfgfw/opss.log Repository Creation Utility - Drop : Operation Completed Successfully dropped schema Dropping STB schema... 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=demohost.demo.com)(Port=1521)))(CONNECT_DATA=(SID=OMR))) Connected As : sys Prefix for (prefixable) Schema Owners : SYSMAN RCU Logfile : $MW_HOME/cfgtoollogs/cfgfw/emsecrepmgr.log Component schemas dropped: Component Status Logfile Common Infrastructure Services Success $MW_HOME/cfgtoollogs/cfgfw/stb.log Repository Creation Utility - Drop : Operation Completed Successfully dropped schema Dropping MDS schema... Action on MDS schema succeed. 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. < Long wait for SYSMAN to be dropped > Repository Creation Utility: Drop - Completion Summary Database details: Connect Descriptor : (DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(Host=demohost.demo.com)(Port=1521)))(CONNECT_DATA=(SID=OMR))) Connected As : sys RCU Logfile : $MW_HOME/log/schemamanager/m_031317_0128_PM/m_031317_0128_PM.DROP/rcu.log Component schemas dropped: Component Status Logfile EM Repository Drop Success $MW_HOME/sysman/log/schemamanager/m_031317_0128_PM/m_031317_0128_PM.DROP/em_repos_drop.log Repository Creation Utility - Drop : Operation Completed Performing PostDropAll action... drop completed successfully