How to Find DBID from OEM Repository

A client has drooped an Oracle database, and client wants to know DBID of the dropped database.

From OEM repository, we can query some tables or views to get DBID for a specific database. for example :

 SQL> select HOST_NAME,TARGET_NAME,TARGET_TYPE,TARGET_GUID,DBID,VERSION        from  MGMT$DB_CPU_USAGE where upper(TARGET_NAME)='DB_NAME';

RMAN command to list dbid of the database:

$ rman catalog rman@rmancatalog
RMAN> list incarnation of database TESTDB;

ORA-20247: EMD_URL is Invalid: Cannot provide null emd url

When adding a cluster database into OEM, and click “Submit” , the following error occurs:

ORA-20247: EMD_URL is Invalid: Cannot provide null emd url

SOLUTION

First of the first is to make sure the host name with domain name, we have a couple of situations when domain name is added into host name, then everything is working fine.

Otherwise go to next step for workaround.

Manually add the cluster database into OEM by using emcli on OMS server:

$ emcli login -username=sysman
Enter password :

Login successful

Add first instance target of the cluster database first

$ emcli add_target -name="TESTDB_TESTDB1" -type="oracle_database" -host="racnode1" -credentials="UserName:dbsnmp;password:XXXXXXXXXX;Role:Normal" -properties="SID:TESTDB1;Port:1521;OracleHome:/u01/app/oracle/product/19.0.0/dbhome_1;MachineName:racnode1-vip" 

Target "TESTDB_TESTDB1:oracle_database" added successfully

Add the rest instance(s)

$ emcli add_target -name="TESTDB_TESTDB2" -type="oracle_database" -host="racnode2" -credentials="UserName:dbsnmp;password:XXXXXXXXXX;Role:Normal"  -properties="SID:TETSTDB2;Port:1521;OracleHome:/u01/app/oracle/product/19.0.0/dbhome_1;MachineName:racnode2-vip" 

Target "TESTDB_TESTDB2:oracle_database" added successfully

Add the cluster database

$ emcli add_target -name="TESTDB" -type="rac_database" -host="racnode1" -monitor_mode="1" -properties="ServiceName:TESTDB;ClusterName:CLSTEST" -instances="TESTDB_TESTDB1:oracle_database;TESTDB_TESTDB2:oracle_database"

Target "TESTDB:rac_database" added successfully

Go to OEM console to check the cluster database .

Software Library OMS Shared location default_loc is not accessible

Failed to pass checking accessibility by :

Login to EM > Setup > Provisioning and Patching > Software Library
Click to highlight the row > Actions(drop-down) > Check Accessibility

Solution

Make sure OMS host preferred credential is setup correctly.

Short Running Metric Collection Status is DOWN in OEM Cloud Control

Short Running Task Worker metric collection status is shown as Down from OMS and Repository monitoring :

From the Management Services and Repository target page, Navigate:

OMS and Repository > Monitoring > All Metrics > select Repository Operations Status

Following query running as sysman shows No Short Running task workers are running, which causes a backlog build up.

SQL> SELECT Decode(task_class_list, 0 , 'Short Running' , 1, 'Long Running ' , 'Unkown') Worker_type,
CASE
WHEN j.job_action IS NULL THEN 'No'
WHEN j.job_action IS NOT NULL THEN 'Yes'
    END AS job_submitted,
    j.state AS job_state,
    w.job_id AS worker_id,
Decode(w.worker_status, 0,'Starting', 1, 'Started', 'Stop Pending') worker_status
    FROM dba_scheduler_jobs j, MGMT_collection_workers w
    WHERE j.job_action(+) = 'EM_TASK.WORKER(' || w.job_id || ');'
   AND w.task_class_list IN ('0','1');

WORKER_TYPE   JOB JOB_STATE        WORKER_ID WORKER_STATU
------------- --- --------------- ---------- ------------
Long Running  Yes SCHEDULED                6 Started
Long Running  Yes SCHEDULED                7 Started

SOLUTION

SQL> show user
USER is "SYSMAN"
SQL> exec mgmt_collection.set_worker_count(0,4);

PL/SQL procedure successfully completed.

SQL> exec mgmt_collection.start_workers();

PL/SQL procedure successfully completed.

SQL> SELECT Decode(task_class_list, 0 , 'Short Running' , 1, 'Long Running ' , 'Unkown') Worker_type,
CASE
WHEN j.job_action IS NULL THEN 'No'
    WHEN j.job_action IS NOT NULL THEN 'Yes'
END AS job_submitted,
    j.state AS job_state,
w.job_id AS worker_id,
    Decode(w.worker_status, 0,'Starting', 1, 'Started', 'Stop Pending') worker_status
FROM dba_scheduler_jobs j, MGMT_collection_workers w
WHERE j.job_action(+) = 'EM_TASK.WORKER(' || w.job_id || ');'
AND w.task_class_list IN ('0','1');  

WORKER_TYPE   JOB JOB_STATE        WORKER_ID WORKER_STATU
------------- --- --------------- ---------- ------------
Short Running Yes SCHEDULED                2 Started
Short Running Yes SCHEDULED                1 Started
Short Running Yes SCHEDULED                3 Started
Short Running Yes SCHEDULED                4 Started
Long Running  Yes SCHEDULED                5 Started
Long Running  Yes SCHEDULED                8 Started

6 rows selected.

OEM Scheduled Information Publisher Report: Unexpected error getting the HTTP response stream while generating report: java.net.ConnectException:Connection refused (Connection refused)

OEM Scheduled Information Publisher Report failed everyday with the following errors:

"Unexpected error getting the HTTP response stream while generating report: java.net.ConnectException:Connection refused (Connection refused) Connection: https://emslb.domain:7799 URI:/em/onetime/reports/render?printablePage=true&reportID=0120G3D88D567B78E06324D1020A73D0&action=generate&scheduled=true"

Subscribe to get access

Read more of this content when you subscribe today.