10.07.2015 Views

Expert Oracle Exadata - Parent Directory

Expert Oracle Exadata - Parent Directory

Expert Oracle Exadata - Parent Directory

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

CHAPTER 12 MONITORING EXADATA PERFORMANCE• The GV$ACTIVE_SESSION_HISTORY view contains columns like SQL_PLAN_LINE_ID,SQL_PLAN_OPERATION and SQL_PLAN_OPTIONS starting from <strong>Oracle</strong> 11gR1. You canquery these columns, in addition to SQL_ID, to find the top rowsources of an SQLexecution plan, too, instead of just listing the top SQL statement.Reporting Real-Time SQL Monitoring Data with DBMS_SQLTUNEIf you do not have access to Grid Control or Enterprise Manager Database Console for some reason, youcan also extract the SQL monitoring details using the DBMS_SQLTUNE.REPORT_SQL_MONITOR packagefunction. You can use the following syntax, but make sure you read the related documentation to see thefull power of this feature. Note that the text below is edited, as this function generates very wide output,which wouldn’t fit the book pages.SQL> SELECTDBMS_SQLTUNE.REPORT_SQL_MONITOR(session_id=> &sid,report_level=>'ALL',type => 'TEXT') as reportFROM dualSQL> /Enter value for sid: 543REPORT----------------------------------------------------------------------------SQL Monitoring ReportSQL Text------------------------------SELECT /*+ parallel(32) */ COUNT(*) FROM T4 AGlobal Information------------------------------Status: EXECUTINGInstance ID : 2Session : TANEL (543:4641)SQL ID: 0duat97xt417kSQL Execution ID : 33555560Execution Started : 05/27/2011 06:59:23First Refresh Time : 05/27/2011 06:59:23Last Refresh Time : 05/27/2011 06:59:59Duration: 36sModule/Action : SQL*Plus/-Service: SANDBOXProgram: sqlplus@mac01.lan (TNS V1-V3)391

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!