REPORTING module can be used in oem cloud control to generate custom reports like , database status report of all target databases.
Repository database contains all the target details and metric information . So best way is to run query against the repository database.
Here we have provided steps for generating database consolidation report
ENTERPRISE -> REPORT -> INFORMATION PUBLISHER REPORT
ON GENERAL TAB:
CATEGORY – Compliance
SUBCATEGORY – Database Targets
TARGETS – Select the repository database
PRIVILEGES – Run with SYSMAN privilege
ELEMENTS TAB:
COMPLETE QUERY:
SELECT A.HOST_NAME, A.DATABASE_NAME, TO_CHAR(A.STARTUP_TIME,'DD-MON-YYYY') "STARTUP_DATE" , TO_CHAR(A.creation_date,'DD-MON-YYYY') "CREATION_DATE", A.LOG_MODE,A.CHARACTERSET,A.DBVERSION, AVAILABILITY_STATUS,E.SGASIZE, G.HOME_LOCATION "ORACLE_HOME", F.property_value "PORT", C.cpu_count, C.CPU_CORE_COUNT, SUBSTR(D.OS_SUMMARY,1,40) "OS PLATFORM" FROM SYSMAN.MGMT$DB_DBNINSTANCEINFO A, SYSMAN.MGMT$AVAILABILITY_CURRENT B, SYSMAN.MGMT$DB_CPU_USAGE C , sysman.mgmt$os_hw_summary D, sysman.mgmt$db_sga_all E , SYSMAN.MGMT$TARGET_PROPERTIES F , SYSMAN.MGMT$ORACLE_SW_ENT_TARGETS G WHERE B.TARGET_TYPE='oracle_database' and A.TARGET_NAME=B.TARGET_NAME AND A.TARGET_NAME=C.TARGET_NAME AND A.HOST_NAME=D.HOST_NAME and a.target_name=E.target_name AND E.SGANAME='Total SGA (MB)' AND A.TARGET_NAME=F.TARGET_NAME AND a.target_name=G.TARGET_NAME and F.PROPERTY_NAME='Port' ORDER BY host_name desc;
This query you can customize as per your requirement:
Now schedule it:
You can preview the report also. Once the preview is fine, you can save it. HTML formatted report will be sent the the mentioned email addresses.
Can you please send me the query for database space usage report in information publisher report
Thanks a lot for this.
I like this report query. Can you add in, or tell me where to find PGA info from OEM also? I need both SGA and PGA sizes in a report.
I’d like a script that can give me the status of all primary and standby databases in a dataguard configuration.
Hi John,
My oracle oem setup has been scrapped. However i will work on the query for dg setups and let u know.
Thanks admin.
I also have RMAN backups which run via linux cronjob. I tried setting up Information Publisher 12c to monitor these but got errors.
Not sure If I have to manually set up something to get these backups monitored.
Try using the below query and see if you are getting your expected output.
select database_name as “Database_Name”,
start_time as “Start Time”,
end_time as “End Time”,
status as “Completion Status”,
input_type as “Backup Type”,
output_device_type as “Device”,
output_bytes_display as ” Backup Size”
from mgmt$ha_backup
where –input_type like ‘%FULL’ AND
END_time > (TO_DATE(sysdate, ‘DD-MON-RR’) – 1)
order by End_TIME desc ;
REFERENCE – >
http://emdeepaksharma.com/2017/10/schedule-daily-rman-backup-report-using-13c-cloud-control/
Thanks Admin.
Will try it out and advise.
Regards,
John.
RMAN status report shows the following error:
Error rendering element. Exception: ORA-00911: invalid character
John, can u try this.Try to run in the our EM repository database manually.
select database_name as “Database_Name”,
start_time as “Start Time”,
end_time as “End Time”,
status as “Completion Status”,
input_type as “Backup Type”,
output_device_type as “Device”,
output_bytes_display as ” Backup Size”
from mgmt$ha_backup
where END_time > (TO_DATE(sysdate, ‘DD-MON-RR’) – 1)
order by End_TIME desc ;
Need script for schema usage check from BI Publisher report.
your example uses SQL, how to you use PL/SQL? can you give a small example for this please?
Hi Team ,
Can any one please share script (SQL Query ) for tablespace report for Oracle RDS(AWS) to run from OEM EM repository database.
I’m trying to generate one OEM report for all our rds target dbs to list tablespace ,datafiles growth and %uasge , Free space .
Please someone help on sql qeury . Thank you.
hi need script for MGMT view for DB sizing , fragmentation %, logging/nologging, temp tables.