Re: Consolidated Database Size in OEM

  • From: Ls Cheng <exriscer@xxxxxxxxx>
  • To: ramnivaschaurasia@xxxxxxxxx
  • Date: Mon, 17 Dec 2018 11:36:07 +0100

Be careful when querying MGMT$ views, many of them requieres license

https://docs.oracle.com/cd/E24628_01/doc.121/e24474/ch2_db_mgmt.htm#OEMLI119

https://docs.oracle.com/cd/E73210_01/OEMLI/GUID-B7FDEFFE-DECB-4826-A3C8-7660B013C5DE.htm#OEMLI115





On Sun, Dec 16, 2018 at 6:35 AM Ramnivas Chaurasia <
ramnivaschaurasia@xxxxxxxxx> wrote:

Query below might be helpful. It works on OEM 13c:

select target_name, column_label,average, maximum
from sysman.MGMT$METRIC_DAILY
where target_type='oracle_database'
and column_label  in ('Allocated Space(GB)','Used Space(GB)'
and rollup_timestamp >= trunc(sysdate);

You may adjust the "rollup_timestamp" condition based on the frequency
agents load the data.

Regards,
Ramniwas

On Sun, Dec 16, 2018 at 10:08 AM Mladen Gogala <gogala.mladen@xxxxxxxxx>
wrote:

What do you need repository for?  Usually, it's done from the database
itself:

SQL> set sqlformat ansiconsole
SQL> select con_id,sum(bytes)/1048575 MB
  2  from cdb_data_files
  3  group by rollup(con_id);
CON_ID  MB
1       1970.001878740195026583696922013208401879
4       905.000863076079441146317621533986600863
        2875.002741816274467730014543547195002742

There may be some problems with executing this on a 11G database.
However, in approximately 2 weeks, Oracle 11G will die. Extended support
will no longer be available for free. If there is something strange in your
database, who you gonna call? Definitely not Oracle.

Regards
On 12/15/18 7:23 PM, Nagaraj chk wrote:

Hi Gurus ,

I am looking for a query to get the database size from OEM Repository
database.  Please help if anyone of you have query in handy.

-Naga

--
Mladen Gogala
Database Consultant
Tel: (347) 321-1217


Other related posts: