terça-feira, 5 de junho de 2012

Grid Control - Alerts By type

Well and now, getting the information for all the [same] alerts across all targeted databases, you can use the following query (knowing the view, it is easy to get the rest of the different types of information). For this specific query I wanted the invalid objects order by number. Example:
"237 object(s) are invalid in the PUBLIC schema."


If you check the MGMT$ views on the sysman schema, you get all the necessary information. After this post:
http://pinelasgarden.blogspot.co.uk/2012/06/grid-control-target-databases-size.html
I leave you with the following query (the message_params field has the varying  info).



select target_name, message_params,message
from MGMT$ALERT_CURRENT 
where target_type='oracle_database'
and metric_name='invalid_objects'
order by to_number(substr(message_params,1,instr(message_params,'&')-1)) desc;

Sem comentários:

Enviar um comentário