How to generate sql monitor report in Oracle

Home > Oracle Database > How to generate sql monitor report in Oracle
📁
Tutorial Collection
This guide is part of our comprehensive Oracle Database Reference Hub.

We often come across a situation where a sql statement is giving issues. SQL monitor report is a very useful tool to analyze the various operation done by the sql, wait events, bind variables, and memory details.

The below statement can be used to monitor any active sql or done sql in the database

SET LONG 1000000
SET LONGCHUNKSIZE 1000000
SET LINESIZE 1000
SET PAGESIZE 0
SET TRIM ON
SET TRIMSPOOL ON
SET ECHO OFF
SET FEEDBACK OFF
SELECT DBMS_SQLTUNE.report_sql_monitor(sql_id => '&1', type => 'TEXT')
AS report FROM dual;

See also  PL/SQL Gateway in R11i

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top