Translate into your own language

Wednesday, April 27, 2016

How to monitor SQL in real time using OEM Grid Control

When we open the performance page of a database, then after the graphs we see the "Additional Monitoring Links"



The concept of real-time SQL monitoring was introduced in Oracle Database Enterprise Edition 11g. This feature allows tracking the execution of SQL statements that take 5 seconds or more, or those that use parallel execution.

In this way, it is possible to understand exactly what is being done by the SQL statement. In real-life situations when batch jobs seem to run for an abnormally long period and there is pressure from management is to kill such jobs and restart them, this feature is of great use for determining if the batch job is frozen or just running slowly at some particular step of the execution plan.

This displays the Monitored SQL Executions page shown in below figure. SQL statements displayed with a tick mark have completed their execution, whereas currently executing SQL statements are displayed with a rotating sphere. It is possible to refresh this page manually or automatically at a specified time period in seconds.



We can now select any of the SQL statements on this page and click the corresponding SQL ID. Then the Monitored SQL Execution Details page is displayed.

The execution plan steps are shown along with the timeline. A tick mark is also visible at the top of the page, indicating that the SQL statement has completed without any errors.



A rotating sphere at the top of the page indicates that the SQL statement is still executing. In this case, the entire page is refreshed automatically, and the steps of the execution plan, as they run one after the other, can be identified easily.


The green arrows in this page’s Plan Statistics section in the above figure change their position on every refresh to indicate the currently executing steps, and some of the data columns in this section are also colored momentarily upon being refreshed with the latest data. This provides a very dynamic view of the progress of the execution plan.


No comments:

Post a Comment