Re: Query to list targets in Group
Date: Fri, 29 Apr 2016 09:38:52 +0530
Message-ID: <CAG6s0C0AmZ95X_pkdCre-rWwBrtcup9KP0fJXGerbvZefmCdxw_at_mail.gmail.com>
Your query is awesome Freek , Thank You so much for helping me
-Naga.
On Thu, Apr 28, 2016 at 6:26 PM, Freek D'Hooge <freek.dhooge_at_gmail.com> wrote:
> 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-lReceived on Fri Apr 29 2016 - 06:08:52 CEST