Oracle 11g Grid| How to add a custom SQL UDM (User Defined Metric)

Posted By Sagar Patil

I have number of systems on grid and I want to keep grid working as smoothly as I can.
Since there are many alerts/notificatins raised & inserts/deletes happeningĀ  every single minute, often repository tables will need rebuild to gain EM performance.
I have SQL script to track tables in need of a rebuild.

SELECT COUNT ( * )
 FROM USER_TABLES UT
 , USER_SEGMENTS US
 WHERE ( UT.NUM_ROWS > 0 AND UT.AVG_ROW_LEN > 0 AND US.BYTES > 0 )
 AND UT.PARTITIONED = 'NO'
 AND UT.IOT_TYPE IS NULL
 AND UT.IOT_NAME IS NULL
 AND UT.TABLE_NAME = US.SEGMENT_NAME
 AND ROUND ( US.BYTES / 1024 / 1024
 , 2 ) > 5
 AND ROUND ( US.BYTES / 1024 / 1024
 , 2 ) > ( ROUND ( UT.NUM_ROWS * UT.AVG_ROW_LEN / 1024 / 1024
 , 4 ) * 2 );

Navigate to Targets -> Databases -> select “Grid Database”

Scroll down at this page and select “User-Defined Metrics” under “Related Links”

Leave a Reply

You must be logged in to post a comment.

Top of Page

Top menu