How To Delete MGMTDB and MGMTLSNR Using emcli

2 min read
Jul 17, 2019 12:00:00 AM

It sounds like you’ve run into one of those classic Oracle "features" where the system is a little too helpful for its own good. Getting paged for a planned relocation of a management resource is definitely not the kind of adrenaline rush a DBA wants.

Per Doc ID 1933649.1, these components are internal to the cluster’s infrastructure and don't need the overhead (or the noise) of Enterprise Manager monitoring.

Here is your content with the H2 headings inserted to make it more scannable and organized:

The Problem: Unnecessary Paging During Management Resource Relocation

Problem: MGMTDB and MGMTLSNR are running on only one host at a time and when relocated, will be paged unnecessarily. One team member's suggestion is to relocate MGMTDB and MGMTLSNR back to its original host. It does not make sense having to identify and relocate MGMTDB and MGMTLSNR to its original host.

As it turns out, Doc ID 1933649.1 states that MGMTDB and MGMTLSNR should not be monitored. Here I will provide an example for how to delete monitoring for MGMTLSNR using emcli.

MGMTDB and MGMTLSNR are currently running on host01:

$ srvctl status mgmtdb  Database is enabled  Instance -MGMTDB is running on node host01   $ srvctl status mgmtlsnr  Listener MGMTLSNR is enabled  Listener MGMTLSNR is running on node(s): host01 

The Scenario: Relocation and the Resulting "Fatal" Event

Relocate MGMTDB and MGMTLSNR to host02:

$ srvctl relocate mgmtdb -node host02   $ srvctl status mgmtdb  Database is enabled  Instance -MGMTDB is running on node host02   $ srvctl status mgmtlsnr  Listener MGMTLSNR is enabled  Listener MGMTLSNR is running on node(s): host02 

Received page: EM Event: Fatal:MGMTLSNR_host01 - The listener is down: TNS-12541: TNS:no listener

The Solution: Deleting the MGMTLSNR Target via EMCLI

Delete MGMTLSNR from the OMS host (noting that MGMTDB was already not being monitored):

$ grep oms /etc/oratab  oms:/u01/middleware/13.2.0:N   $ . oraenv <<< oms   $ emcli login -username=SYSMAN  Enter password :  Login successful   $ emcli sync  Synchronized successfully   $ emcli get_targets | grep -i MGMT  1 Up oracle_listener MGMTLSNR_host01   $ emcli delete_target -name="MGMTLSNR_host01" -type="oracle_listener"  Target "MGMTLSNR_host01:oracle_listener" deleted successfully   $ emcli sync   $ emcli get_targets | grep -i MGMT 

Conclusion: Reducing Monitoring Noise

In conclusion, MGMTDB and MGMTLSNR should not be monitored and if they are monitored, then it's best to remove monitoring to avoid false-positive alerts during cluster maintenance or resource relocation.

Oracle Database Consulting Services

Ready to optimize your Oracle Database for the future?

 

On this page

Ready to unlock value from your data?

With Pythian, you can accomplish your data transformation goals and more.