Re: Query to list targets in Group

From: Freek D'Hooge <freek.dhooge_at_gmail.com>
Date: Thu, 28 Apr 2016 14:56:44 +0200
Message-ID: <1461848204.25419.8.camel_at_dhoogfr-lpt1>



The following might help you getting started. It does not show the status, only the members (of specific types)

select
  nvl(composite_target_name, 'Unassigned') group_name,   trgt.target_type,
  trgt.target_name
from
  mgmt$group_derived_memberships gdm,
  mgmt$target trgt
where
  gdm.member_target_guid(+) = trgt.target_guid   and ( ( trgt.target_type = 'oracle_database'

          and trgt.type_qualifier3 != 'RACINST'
        )
        or trgt.target_type in ('rac_database', 'host', 'osm_cluster', 'oracle_si_virtual_platform', 'oracle_si_server', 'oracle_exadata_grid')
      )
  and ( composite_target_guid is null 
        or composite_target_guid not in
          ( select
              composite_target_guid
            from
              mgmt$group_derived_memberships
            where
              member_target_type = 'composite'
           )
      )

order by
  group_name,
  target_type,
  target_name
;

Kind regards,

Freek

On do, 2016-04-28 at 15:22 +0530, Nagaraj S wrote:
> Hello Gurus,
>
>
> We have multiple groups created in OEM 12c console and added targets
> based on the environment, for an example I created group name PROD_DB
> and added all production targets to the "PROD_DB" group.
> I am looking for SQL query to fetch from OMR that will list the
> targets added on "PROD_DB" group along with its status like
> (UP,DOWN,PENDING etc) . Please advise
>
>
> -Naga

--
http://www.freelists.org/webpage/oracle-l
Received on Thu Apr 28 2016 - 14:56:44 CEST

Original text of this message