Created
October 6, 2016 16:48
-
-
Save dotmaik1/be6ec4b044b01effcae59add52759778 to your computer and use it in GitHub Desktop.
SQL Details Active Report
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| This report uses data from views that are licensed with the Diagnostics and Tuning Pack. | |
| http://www.oracle.com/technetwork/database/manageability/sql-detail-099420.html | |
| How do I generate a SQL Details Active Report? | |
| From SQL*Plus, invoke the dbms_sqltune.report_sql_detail function and spool the output | |
| set trimspool on trim on | |
| set pages 0 linesize 1000 | |
| set long 1000000 longchunksize 1000000 | |
| spool sqlmon_details.html | |
| select dbms_sqltune.report_sql_detail('&sql_id') from dual; | |
| spool off | |
| The resulting sql_details.html should be edited to remove the first line (call to dbms_sqltune.report_sql_detail) and the last line (the spool off), and then viewed in any browser, with connectivity to OTN. | |
| What if I want to specify a time frame? | |
| select dbms_sqltune.report_sql_detail('&sql_id',start_time=>to_date('&time','yyyy-mm-dd hh24:mi:ss'), duration=>&duration_in_seconds) from dual; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment