Forum Stats

  • 3,727,167 Users
  • 2,245,330 Discussions
  • 7,852,618 Comments

Discussions

SQL query for capturing all the details of targets having database monitoring credentials set

User_FID5M
User_FID5M Member Posts: 9 Red Ribbon
edited April 2020 in Enterprise Manager

I am using the Cloud control 13c.Here we can have the view of targets for which database monitoring credentials are set.

Whether we can have an sql query  using EM management views from which the details can be obtained.

Answers

  • Venkata Thiruveedhi-Oracle
    Venkata Thiruveedhi-Oracle Posts: 590 Employee
    edited April 2020

    Hi,

    For a target to get monitored there should be a Monitoring User already defined for each target without which i assume the target monitoring itself is not possible.

    Is your requirement to have the details of the DB targets having monitoring user set?  --->   This does not look logical for me as all the DB targets will have a monitoring user set during the discovery itself.

    Can you briefly explain your query?

    Regards,

    Venkat

  • User_FID5M
    User_FID5M Member Posts: 9 Red Ribbon
    edited April 2020

    HI Venkat,

    We having separate credentials for Database Usage Tracking Credentials and Monitoring Database Credentials.

    The requirement is to have query that can fetch the details of Targets registered in CC with Target Name,Status and Target Username.

    pastedImage_0.png

    With Regards,

    Nitish

  • Venkata Thiruveedhi-Oracle
    Venkata Thiruveedhi-Oracle Posts: 590 Employee
    edited April 2020

    Hi Nitish,

    You can not get the complete information from a single view.

    Here i am giving a sample query where you can get the Target Name, Credential Set, Monitoring Username details.

    select tgt.target_name, tc.user_name, tc.SET_NAME, creds.user_name from em_target_creds tc, em_nc_creds creds, mgmt_targets tgt where tc.cred_guid = creds.cred_guid and tgt.target_type = 'oracle_database' and tgt.target_guid(+) = tc.target_guid;

    To get the status of the target, again you need to fetch the details from mgmt_current_availability for current_status column.

    Best Regards,

    Venkat

Sign In or Register to comment.