RE: MGMT_DB_FEATUREUSAGE is empty

  • From: "Herring, David" <HerringD@xxxxxxx>
  • To: "Le, Binh T." <Binh.Le@xxxxxxx>, "oracle-l@xxxxxxxxxxxxx" <oracle-l@xxxxxxxxxxxxx>
  • Date: Fri, 27 May 2016 16:00:42 +0000

Thx Binh.  It appears there's some sync issue between settings via "emcli" and 
what the console shows.  I set the value to 5 min using "emcli" and the cursor 
following confirms this setting:

select t.target_name, c.coll_name, c.is_enabled, c.schedule_ex
  from sysman.mgmt_targets t
       left join sysman.mgmt_collections c on t.target_guid = c.object_guid
                 and c.coll_name like 'feature_usage_collection_item'
where t.target_type in ('rac_database','oracle_database')
  and t.target_name like '%<db name>%'
order by t.target_name,c.coll_name;

But viewing this in the console still shows 24 hrs, which is the default.  The 
good news is using "emcli" changes IS_ENABLED to "1".  After using "emcli" to 
set the schedule to 5 min I also changed the schedule in the console to 5 min, 
then and only then would MGMT$DB_FEATUREUSAGE get updated with this db's data.  
The key here is it seems to require a change both via "emcli" AND through the 
console, which is not exactly desirable since we have 300-400 databases.

Since my request is possibly a one-time deal I think I'll go back to running 
against DBA_FEATURE_USAGE_STATISTICS via an EM Job against all targets and mine 
the results from sysman.mgmt$job_step_history.

Regards,

Dave

From: Le, Binh T. [mailto:Binh.Le@xxxxxxx]
Sent: Friday, May 27, 2016 7:46 AM
To: Herring, David; oracle-l@xxxxxxxxxxxxx
Subject: RE: MGMT_DB_FEATUREUSAGE is empty

Hi David,

The value IS_ENABLED need to be 1.

Use this query below:

select './emcli modify_collection_schedule -targetType="'|| target_type ||'" 
-targetNames="'||target_name||'" -collectionName="'|| collection_name||'" 
-collectionStatus=Enabled -freqType="HOUR" -freqValue="24" -preview="N"' stmt
  from sysman.mgmt$target_metric_collections
where is_enabled = 0
  --and target_type = :target_type -- rac_database, oracle_database
  and collection_name = 'feature_usage_collection_item'
order by target_name;

to build the script to enable the collection for all your target.

Thanks,
Binh

From: Herring, David [mailto:HerringD@xxxxxxx]
Sent: Thursday, May 26, 2016 6:40 PM
To: Le, Binh T. <Binh.Le@xxxxxxx<mailto:Binh.Le@xxxxxxx>>; 
oracle-l@xxxxxxxxxxxxx<mailto:oracle-l@xxxxxxxxxxxxx>
Subject: RE: MGMT_DB_FEATUREUSAGE is empty

The cursor you listed returns IS_ENABLED as "0" and the schedule as " 
"<Schedule> <IntervalSchedule INTERVAL="24" TIME_UNIT="Hr"/> </Schedule>".  I 
found MOS article 1970236.1 that says I need to make sure this feature is 
enabled for the repository yet when I check in the console it shows the same 
schedule, running every 24 hrs.  But the test to check for this at the agent 
level doesn't return any rows:

% $AGENT_HOME/bin/emctl status agent scheduler | grep -i "feature"

Regards,

Dave

From: oracle-l-bounce@xxxxxxxxxxxxx<mailto:oracle-l-bounce@xxxxxxxxxxxxx
[mailto:oracle-l-bounce@xxxxxxxxxxxxx] On Behalf Of Le, Binh T.
Sent: Thursday, May 26, 2016 1:38 PM
To: rjoralist3@xxxxxxxxxxxxxxxxxxxxx<mailto:rjoralist3@xxxxxxxxxxxxxxxxxxxxx>; 
oracle-l@xxxxxxxxxxxxx<mailto:oracle-l@xxxxxxxxxxxxx>
Subject: RE: MGMT_DB_FEATUREUSAGE is empty

Hi David,

Run this query against your OEM repository database check if you have the 
feature usage collection turn on.

I think 12c default is not collect this information also check to see at your 
target level (your database also need to collect this information too)


select t.target_name
      ,c.coll_name
      ,c.is_enabled
      ,c.schedule_ex
from sysman.mgmt_targets t
 left join sysman.mgmt_collections c on t.target_guid = c.object_guid
  and c.coll_name like 'feature_usage_collection_item'
where t.target_type in ('rac_database','oracle_database')
  and t.target_name like '%'||:your_database_name ||'%'
order by t.target_name,c.coll_name;

From: oracle-l-bounce@xxxxxxxxxxxxx<mailto:oracle-l-bounce@xxxxxxxxxxxxx
[mailto:oracle-l-bounce@xxxxxxxxxxxxx] On Behalf Of Rich J
Sent: Thursday, May 26, 2016 2:18 PM
To: oracle-l@xxxxxxxxxxxxx<mailto:oracle-l@xxxxxxxxxxxxx>
Subject: Re: MGMT_DB_FEATUREUSAGE is empty


On 2016/05/26 11:45, Herring, David wrote:
I have a request from management to pull feature usage statistics for all 
supported environments so I figured I'd use the view MGMT$DB_FEATUREUSAGE on 
all EMs.  While the 11g views give me what I want, our 12c EMRs don't return 
anything as the underlying table MGMT_DB_FEATUREUSAGE is empty.  The OMS is 
12.1.0.4, db 12.1.0.2, all on RHEL 6.6.
Anyone see this before and/or know how this table is populated?
It looks like the data I'm expecting is in MGMT$CS_FEATURE_USAGE, which is new 
in 12c, but I can't be sure.  I also have noted that other MGMT$DB_* views are 
populated so it appears to be just this one.
I have these views in my 12.1.0.5 OMS respository, under the SYSMAN schema:
CM$MGMT_FEATURE_USAGE_ECM
MGMT$CS_FEATURE_USAGE
MGMT$DB_FEATUREUSAGE
MGMT$DB_FEATURE_USAGE
Of these, the last is empty, possibly a leftover from upgrades past.  All of my 
DB targets are 11.2.0.3 and my EM DB Agent plugin is 12.1.0.8.
As you've probably guessed, the underlying MGMT_DB_FEATUREUSAGE table to the 
MGMT$DB_FEATUREUSAGE view is populated.  It's not an EM metric, so I'm not sure 
why this would not be populated (i.e. it's not a matter of a metric being 
disabled).
Rich

Notice of Confidentiality: **This E-mail and any of its attachments may contain
Lincoln National Corporation proprietary information, which is privileged, 
confidential,
or subject to copyright belonging to the Lincoln National Corporation family of
companies. This E-mail is intended solely for the use of the individual or 
entity to
which it is addressed. If you are not the intended recipient of this E-mail, 
you are
hereby notified that any dissemination, distribution, copying, or action taken 
in
relation to the contents of and attachments to this E-mail is strictly 
prohibited
and may be unlawful. If you have received this E-mail in error, please notify 
the
sender immediately and permanently delete the original and any copy of this 
E-mail
and any printout. Thank You.**

Notice of Confidentiality: **This E-mail and any of its attachments may contain
Lincoln National Corporation proprietary information, which is privileged, 
confidential,
or subject to copyright belonging to the Lincoln National Corporation family of
companies. This E-mail is intended solely for the use of the individual or 
entity to
which it is addressed. If you are not the intended recipient of this E-mail, 
you are
hereby notified that any dissemination, distribution, copying, or action taken 
in
relation to the contents of and attachments to this E-mail is strictly 
prohibited
and may be unlawful. If you have received this E-mail in error, please notify 
the
sender immediately and permanently delete the original and any copy of this 
E-mail
and any printout. Thank You.**

Other related posts: