Thursday, June 13, 2013

EM12c Storage Report

Want a report with all your storage mounts as well as the total space allocated and used?

Below is a select statement you can use to select the data from the SYSMAN views.

select
target_name,
name,
ceil(sizeb/1024/1024/1024) as allocated_gb,
ceil(usedb/1024/1024/1024) as used_gb,
ceil(freeb/1024/1024/1024) as free_gb
from sysman.mgmt$storage_report_data
where entity_type='Mountpoint'
order by 1 asc

Note: If you are going to use another account other than SYSMAN to select you will need to have the following privilege.

grant select on mgmt$storage_report_data to <username>;
grant exempt access policy to <username>;

1 comment:

  1. Hello Javier,

    I am running below SQL statement as user id sysman in oem db:

    select
    target_name,
    name,
    ceil(sizeb/1024/1024/1024) as allocated_gb,
    ceil(usedb/1024/1024/1024) as used_gb,
    ceil(freeb/1024/1024/1024) as free_gb
    from sysman.mgmt$storage_report_data;

    Above SQL statement does not produce any data when I run in TOAD.

    I have OEM 12c.

    Do you know what could be the cause of that?

    thank you
    Jeet

    ReplyDelete