Sunday, April 12, 2009

User Defined Metrics in Oracle EM Grid Control

Everyone has various ways to manage scripts. I have found UDM's in Oracle Enterprise manager to be a nice way to catalog and standardize scripts across various platforms.
UDM's or User Defined Metrics are a great way to track, alert and look at trending information using Oracle Enterprise manager . Oracle provides UDM's on a server level as well as an instance level. UDM's can be cataloged and saved into a library for reuse.

I've been using SQL UDM's to monitor and alert on SQL Apply Lag times in minutes as well as restarting the logical dataguard environment .
To see if Sql Apply has stopped i check select count(*) from v$dataguard_stats and based on the count 3 for good and 0 for bad run a corrective action to start the sql apply again. If the corrective action fails . The alert is then escalated to the pager for support. Corrective Actions based on UDM's if scripted right can help reduce support calls and keep environments in sync.
I've used UDM's to pick up data from DBA_LOGSTDBY_EVENTS and execute alter database datafiles commands to keep my primary and standby in sync.
The UDM creation screen is fairly simple and the wizard walks the user through all the information . If using external scripts i would definitely recommend creating user that manages the scripts and then setting preferred credentials at that user level. This makes it easier to change passwords using the emcli command line interface and be compliant with audit policies.

Google Search