Subscribe to Posts by Email

Subscriber Count

    696

Disclaimer

All information is offered in good faith and in the hope that it may be of use for educational purpose and for Database community purpose, but is not guaranteed to be correct, up to date or suitable for any particular purpose. db.geeksinsight.com accepts no liability in respect of this information or its use. This site is independent of and does not represent Oracle Corporation in any way. Oracle does not officially sponsor, approve, or endorse this site or its content and if notify any such I am happy to remove. Product and company names mentioned in this website may be the trademarks of their respective owners and published here for informational purpose only. This is my personal blog. The views expressed on these pages are mine and learnt from other blogs and bloggers and to enhance and support the DBA community and this web blog does not represent the thoughts, intentions, plans or strategies of my current employer nor the Oracle and its affiliates or any other companies. And this website does not offer or take profit for providing these content and this is purely non-profit and for educational purpose only. If you see any issues with Content and copy write issues, I am happy to remove if you notify me. Contact Geek DBA Team, via geeksinsights@gmail.com

Pages

12c Database : Monitor Database operations using EM Express

Previous to 12c, when you want to perform an monitoring the Session you will have to turn the trace etc or trace with application/module/program/sql_id etc.

But, what if you want to monitor specific operation for that session not whole or application. Kind of set of operations you want to peform not all with in that application/module/sql_id etc.

From 12c, You can do that using dbms_SQL_MONITOR.begin_operation.

Let's have a look,

Connect to the sample schema and begin the monitoring operation.

    . oraenv

     sqlplus hr/hr@noncdb

     VAR dbop_eid NUMBER;

     EXEC :dbop_eid := DBMS_SQL_MONITOR.BEGIN_OPERATION ('ORA.HR.select', forced_tracking => 'Y')

     select a.employee_id, b.employee_id from hr.employees a, hr.employees b;

     select * from hr.departments;

     select a.table_name , b.table_name FROM dict a, dict b;

Connect     to EM Express using https://dbhost:5502/em

Note: EM Express is a light weight performance monitoring replaced the db console.  Its in built with database engine and looks similar like 12c cloud control pages

Once connected, Go to Performance --> SQL Monitor --> And observe you operation

As I turned on the Begin operation this was showing me the status still running.

image

Once I stopped the operation using below, the console shows the operation completes.

This work has been determined as composite database operation.

EXEC DBMS_SQL_MONITOR.END_OPERATION('ORA.HR.select', :dbop_eid)

image

-Thanks

Geek DBA

Comments are closed.