<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Oracle 11g: Real-Time SQL Monitoring Using DBMS_SQLTUNE.REPORT_SQL_MONITOR</title>
	<atom:link href="http://structureddata.org/2008/01/06/oracle-11g-real-time-sql-monitoring-using-dbms_sqltunereport_sql_monitor/feed/" rel="self" type="application/rss+xml" />
	<link>http://structureddata.org/2008/01/06/oracle-11g-real-time-sql-monitoring-using-dbms_sqltunereport_sql_monitor/</link>
	<description>Oracle Database Performance And Scalability Blog</description>
	<lastBuildDate>Mon, 01 Mar 2010 22:11:26 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Benoit Dageville</title>
		<link>http://structureddata.org/2008/01/06/oracle-11g-real-time-sql-monitoring-using-dbms_sqltunereport_sql_monitor/comment-page-1/#comment-150</link>
		<dc:creator>Benoit Dageville</dc:creator>
		<pubDate>Sun, 06 Dec 2009 01:59:25 +0000</pubDate>
		<guid isPermaLink="false">http://structureddata.org/2008/01/06/oracle-11g-real-time-sql-monitoring-using-dbms_sqltunereport_sql_monitor/#comment-150</guid>
		<description>In Oracle database 11.2, we also introduced HTML active reports for SQL monitoring. Active reports are a new type of HTML reports showing more information than the vanilla HTML reports. Also, look and feel is really improved since the content of these reports is displayed using the same interactive UI as the one in Oracle Entreprise Manager.

For more information on SQL Monitor active reports, see http://www.oracle.com/technology/products/manageability/database/sqlmonitor.html. You will find few examples there like the example below reporting on the execution of a parallel index create:

http://www.oracle.com/technology/products/manageability/database/active_reports/samples/faq_create_index.html

Active reports can be directly generated from SQL*Plus command line, like the regular HTML report. Simply use &#039;ACTIVE&#039; instead of &#039;HTML&#039;.</description>
		<content:encoded><![CDATA[<p>In Oracle database 11.2, we also introduced HTML active reports for SQL monitoring. Active reports are a new type of HTML reports showing more information than the vanilla HTML reports. Also, look and feel is really improved since the content of these reports is displayed using the same interactive UI as the one in Oracle Entreprise Manager.</p>
<p>For more information on SQL Monitor active reports, see <a href="http://www.oracle.com/technology/products/manageability/database/sqlmonitor.html" rel="nofollow">http://www.oracle.com/technology/products/manageability/database/sqlmonitor.html</a>. You will find few examples there like the example below reporting on the execution of a parallel index create:</p>
<p><a href="http://www.oracle.com/technology/products/manageability/database/active_reports/samples/faq_create_index.html" rel="nofollow">http://www.oracle.com/technology/products/manageability/database/active_reports/samples/faq_create_index.html</a></p>
<p>Active reports can be directly generated from SQL*Plus command line, like the regular HTML report. Simply use &#8216;ACTIVE&#8217; instead of &#8216;HTML&#8217;.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: AskDba.org Weblog &#187; 11gR2: Monitoring SQL Plan Execution from Oracle Enterprise Manager</title>
		<link>http://structureddata.org/2008/01/06/oracle-11g-real-time-sql-monitoring-using-dbms_sqltunereport_sql_monitor/comment-page-1/#comment-151</link>
		<dc:creator>AskDba.org Weblog &#187; 11gR2: Monitoring SQL Plan Execution from Oracle Enterprise Manager</dc:creator>
		<pubDate>Mon, 07 Sep 2009 07:23:50 +0000</pubDate>
		<guid isPermaLink="false">http://structureddata.org/2008/01/06/oracle-11g-real-time-sql-monitoring-using-dbms_sqltunereport_sql_monitor/#comment-151</guid>
		<description>[...] could use DBMS_SQLTUNE.REPORT_SQL_MONITOR to generate html/text reports . Greg Rahn has written a post describing it in [...]</description>
		<content:encoded><![CDATA[<p>[...] could use DBMS_SQLTUNE.REPORT_SQL_MONITOR to generate html/text reports . Greg Rahn has written a post describing it in [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Real-Time SQL Monitoring in SQL Developer - Doug's Oracle Blog</title>
		<link>http://structureddata.org/2008/01/06/oracle-11g-real-time-sql-monitoring-using-dbms_sqltunereport_sql_monitor/comment-page-1/#comment-148</link>
		<dc:creator>Real-Time SQL Monitoring in SQL Developer - Doug's Oracle Blog</dc:creator>
		<pubDate>Thu, 02 Jul 2009 17:31:46 +0000</pubDate>
		<guid isPermaLink="false">http://structureddata.org/2008/01/06/oracle-11g-real-time-sql-monitoring-using-dbms_sqltunereport_sql_monitor/#comment-148</guid>
		<description>[...] tools I&#039;ve seen since I started working with Oracle too long ago. I was first aware of it via Greg Rahn&#039;s blog post.To date I&#039;ve used it via DB Control for demos and it&#039;s sweet, but one of the problems with any demo [...]</description>
		<content:encoded><![CDATA[<p>[...] tools I&#39;ve seen since I started working with Oracle too long ago. I was first aware of it via Greg Rahn&#39;s blog post.To date I&#39;ve used it via DB Control for demos and it&#39;s sweet, but one of the problems with any demo [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jerry Cunningham</title>
		<link>http://structureddata.org/2008/01/06/oracle-11g-real-time-sql-monitoring-using-dbms_sqltunereport_sql_monitor/comment-page-1/#comment-149</link>
		<dc:creator>Jerry Cunningham</dc:creator>
		<pubDate>Thu, 02 Jul 2009 17:03:06 +0000</pubDate>
		<guid isPermaLink="false">http://structureddata.org/2008/01/06/oracle-11g-real-time-sql-monitoring-using-dbms_sqltunereport_sql_monitor/#comment-149</guid>
		<description>Greg,

I&#039;m a little late in reading it, but thanks very much for this awesome post.

Jerry Cunningham</description>
		<content:encoded><![CDATA[<p>Greg,</p>
<p>I&#8217;m a little late in reading it, but thanks very much for this awesome post.</p>
<p>Jerry Cunningham</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Oracle Enterprise Manager Grid Control: Scripts Guru shows Database control</title>
		<link>http://structureddata.org/2008/01/06/oracle-11g-real-time-sql-monitoring-using-dbms_sqltunereport_sql_monitor/comment-page-1/#comment-135</link>
		<dc:creator>Oracle Enterprise Manager Grid Control: Scripts Guru shows Database control</dc:creator>
		<pubDate>Thu, 16 Apr 2009 00:27:18 +0000</pubDate>
		<guid isPermaLink="false">http://structureddata.org/2008/01/06/oracle-11g-real-time-sql-monitoring-using-dbms_sqltunereport_sql_monitor/#comment-135</guid>
		<description>[...] This requires the license of the Diagnostic and Tuning Packs. For more detail, have a look at this blog entry.     Blogged by Porus Homi Havewala (પ&#2763;રસ હ&#2763;મ&#2752; [...]</description>
		<content:encoded><![CDATA[<p>[...] This requires the license of the Diagnostic and Tuning Packs. For more detail, have a look at this blog entry.     Blogged by Porus Homi Havewala (પ&#2763;રસ હ&#2763;મ&#2752; [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Greg Rahn</title>
		<link>http://structureddata.org/2008/01/06/oracle-11g-real-time-sql-monitoring-using-dbms_sqltunereport_sql_monitor/comment-page-1/#comment-134</link>
		<dc:creator>Greg Rahn</dc:creator>
		<pubDate>Sat, 14 Mar 2009 19:28:10 +0000</pubDate>
		<guid isPermaLink="false">http://structureddata.org/2008/01/06/oracle-11g-real-time-sql-monitoring-using-dbms_sqltunereport_sql_monitor/#comment-134</guid>
		<description>&lt;a href=&quot;#comment-6741&quot; rel=&quot;nofollow&quot;&gt;@Gerhard&lt;/a&gt;
I do not have the tables/data any more.  I would suggest downloading the &lt;a href=&quot;http://www.tpc.org/tpcds/tpcds.asp&quot; rel=&quot;nofollow&quot;&gt;TPC-DS&lt;/a&gt; kit.  It includes tables, data generator and 99 queries to play with.</description>
		<content:encoded><![CDATA[<p><a href="#comment-6741" rel="nofollow">@Gerhard</a><br />
I do not have the tables/data any more.  I would suggest downloading the <a href="http://www.tpc.org/tpcds/tpcds.asp" rel="nofollow">TPC-DS</a> kit.  It includes tables, data generator and 99 queries to play with.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Gerhard</title>
		<link>http://structureddata.org/2008/01/06/oracle-11g-real-time-sql-monitoring-using-dbms_sqltunereport_sql_monitor/comment-page-1/#comment-147</link>
		<dc:creator>Gerhard</dc:creator>
		<pubDate>Sat, 14 Mar 2009 08:23:42 +0000</pubDate>
		<guid isPermaLink="false">http://structureddata.org/2008/01/06/oracle-11g-real-time-sql-monitoring-using-dbms_sqltunereport_sql_monitor/#comment-147</guid>
		<description>Hi Greg,
maybe I&#039;m little late in this post. So my Question: Is it possible to get the table definition and/or the data you used for this test? I&#039;would reproduce this (especially the parallel query with a long run) to learn more about this new famouse feature from oracle 11g.
Thank in advance
Gerhard</description>
		<content:encoded><![CDATA[<p>Hi Greg,<br />
maybe I&#8217;m little late in this post. So my Question: Is it possible to get the table definition and/or the data you used for this test? I&#8217;would reproduce this (especially the parallel query with a long run) to learn more about this new famouse feature from oracle 11g.<br />
Thank in advance<br />
Gerhard</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Doug's Oracle Blog</title>
		<link>http://structureddata.org/2008/01/06/oracle-11g-real-time-sql-monitoring-using-dbms_sqltunereport_sql_monitor/comment-page-1/#comment-143</link>
		<dc:creator>Doug's Oracle Blog</dc:creator>
		<pubDate>Sun, 02 Nov 2008 21:02:19 +0000</pubDate>
		<guid isPermaLink="false">http://structureddata.org/2008/01/06/oracle-11g-real-time-sql-monitoring-using-dbms_sqltunereport_sql_monitor/#comment-143</guid>
		<description>[...] Other9 rows selected.Just a bit of fun, but nowhere near as much fun as Real Time SQL Monitoring. Now *that&#039;s* a feature worth upgrading for!   Posted by Doug Burns Comments: (0) Trackbacks: [...]</description>
		<content:encoded><![CDATA[<p>[...] Other9 rows selected.Just a bit of fun, but nowhere near as much fun as Real Time SQL Monitoring. Now *that&#8217;s* a feature worth upgrading for!   Posted by Doug Burns Comments: (0) Trackbacks: [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kerry Osborne</title>
		<link>http://structureddata.org/2008/01/06/oracle-11g-real-time-sql-monitoring-using-dbms_sqltunereport_sql_monitor/comment-page-1/#comment-140</link>
		<dc:creator>Kerry Osborne</dc:creator>
		<pubDate>Tue, 21 Oct 2008 21:44:41 +0000</pubDate>
		<guid isPermaLink="false">http://structureddata.org/2008/01/06/oracle-11g-real-time-sql-monitoring-using-dbms_sqltunereport_sql_monitor/#comment-140</guid>
		<description>Hi Greg,

  Thanks for the quick response. On busy systems, SID&#039;s are frequently reused so it is necessary to specify the serial# as well to ensure that we&#039;re looking at the correct session. Here&#039;s an example (I hope the formatting is OK - if not have a look at a posting I just did on the subject at kerryosborne.oracle-guy.com)

&lt;pre&gt;
SQL&gt; @sql_monitor
SQL&gt; break on sql_id on plan_hash_value
SQL&gt; col sql_exec_start for a20
SQL&gt; select sid, session_serial# serial#, sql_id, sql_exec_id, to_char(sql_exec_start,&#039;DD-Mon-YY HH24:MI:SS&#039;) sql_exec_start, sql_plan_hash_value plan_hash_value,
  2  elapsed_time/1000000 etime, buffer_gets, disk_reads
  3  from v$sql_monitor
  4  where sid like nvl(&#039;&amp;sid&#039;,sid)
  5  and sql_id like nvl(&#039;&amp;sql_id&#039;,sql_id)
  6  and sql_exec_id like nvl(&#039;&amp;sql_exec_id&#039;,sql_exec_id)
  7  -- order by sql_id, sql_exec_id
  8  order by sql_exec_start
  9  /
Enter value for sid: 102
Enter value for sql_id:
Enter value for sql_exec_id:

 SID    SERIAL# SQL_ID        SQL_EXEC_ID SQL_EXEC_START       PLAN_HASH_VALUE         ETIME BUFFER_GETS DISK_READS
---- ---------- ------------- ----------- -------------------- --------------- ------------- ----------- ----------
 102          7 0r3nf6rvn31z0    16777217 17-Oct-08 09:40:14        3781965855           .01           0          0
 102         14                  16777218 17-Oct-08 09:42:00                             .02           3          0
 102         16 dbmt8tuqdmhkr    16777218 17-Oct-08 09:42:00        3777092978           .02           3          0
 102         20 8szmwam7fysa3    16777217 17-Oct-08 22:00:10        2976124318         11.17        2608       2167
 102       3189                  16777242 18-Oct-08 10:02:08                            5.07        2157       2080
 102       3189                  16777243 18-Oct-08 10:02:13                            3.96        2291       1876
 102       3818 9hu31jpkxnmcu    16777219 18-Oct-08 14:02:24        2828798618          3.87        1131       4565
 102      12380 bxrvdy7xcx1uz    16777216 20-Oct-08 22:00:20        3965205907          4.14        6420       6275
 102      12380 1gd6hj6au5nn3    16777216 20-Oct-08 22:00:24        3965205907          6.53       12464      11924
 102      12380 chbj552h35n8t    16777216 20-Oct-08 22:00:31        3965205907         12.05       24884      22823
 102      12380 akcnuthdm0nax    16777216 20-Oct-08 22:00:45        4108509612         15.95       55125      52013
 102      12380                  16777217 20-Oct-08 22:01:01        3371650501         16.07       48190          0
 102      12380                  16777218 20-Oct-08 22:01:17        3885211065         16.22       78885      78415
 102      12380                  16777219 20-Oct-08 22:01:33         234802133         16.29       70999          0
 102      12380                  16777220 20-Oct-08 22:01:49        2330810755         15.08       74847        617
 102      12380                  16777221 20-Oct-08 22:02:05        4108509612         31.41      150585     149566
 102      12380                  16777222 20-Oct-08 22:02:36        3371650501         31.39      112369          0
 102      12380                  16777223 20-Oct-08 22:03:07        3885211065         30.36      162304     163522
 102      12380                  16777224 20-Oct-08 22:03:38         234802133         31.39       74847      15682
 102      12380                  16777225 20-Oct-08 22:04:09        2330810755         31.37       74847       9249
 102      12380                  16777226 20-Oct-08 22:04:41        4108509612         61.71      162304     182260
 102      12380                  16777227 20-Oct-08 22:05:42        3371650501         60.71      216863          0
 102      12380                  16777228 20-Oct-08 22:06:43        3885211065         60.69      162304     194318
 102      12380                  16777229 20-Oct-08 22:07:44         234802133         61.76       74847      42521
 102      12380                  16777230 20-Oct-08 22:08:45        2330810755         60.72       74847      26045
 102      12380                  16777231 20-Oct-08 22:09:46        4108509612        120.43      162304     216771
 102      12380                  16777232 20-Oct-08 22:11:47        3371650501        121.48      437847          0
 102      12380                  16777233 20-Oct-08 22:13:48        3885211065        121.46      162304     249492
 102      12380                  16777234 20-Oct-08 22:15:49         234802133        120.45       74847      92853
 102      12380                  16777235 20-Oct-08 22:17:50        2330810755        121.50       74847      60744
 102      12380                  16777236 20-Oct-08 22:19:51        4108509612         22.28      159623     159662
 102      15594 ftgja8q5449mb    16777230 21-Oct-08 11:47:29         568322376         10.72      162297     162294
 102      15594                  16777231 21-Oct-08 11:50:55                           10.80      162297     162294
 102      15594                  16777232 21-Oct-08 11:51:42                           10.56      162297     162294
 102      15596                  16777240 21-Oct-08 13:03:59                           10.78      162297     162294
 102      15596 53sz5gs699tqv    16777217 21-Oct-08 13:39:41         717147039          7.02      162297     162294

36 rows selected.

SQL&gt; @whoami

USERNAME             USER#  SID    SERIAL# PREV_HASH_VALUE SCHEMANAME                     OS_PID
--------------- ---------- ---- ---------- --------------- ------------------------------ ------------------------
KSO                     89  102      15598      1029988163 KSO                            6159
&lt;/pre&gt;

So you can see that there have been many sessions with SID 102 over the last several days that executed long running statements. Executing the report_sql_monitor function with session_id=&gt;sys_context(&#039;userenv&#039;,&#039;sid&#039;) will return data for the most recently monitored statement by any session with the SID 102, but it won&#039;t be my current session because it hasn&#039;t executed a long running statement.

It would be nice if we could add another where clause that said session_serial=&gt;sys_context(&#039;userenv&#039;,&#039;serial#&#039;), but unfortunately that option doesn&#039;t seem to exist. I was hoping you might know of an undocumented option. This would be handy in a number of places by the way. For example, when connected as sysdba, the audsid is not unique and so there is no way with sys_context (that I am aware of) to determine which session is actually mine if there are more than one sysdba connections.  Anyway, I worked around the issue with the report_sql_monitor function by doing a subquery something like this -

 session_serial=&gt;(select serial# from v$session where audsid=sys_context(&#039;userenv&#039;,&#039;sessionid&#039;))

I hope this makes sense (and the formatting isn&#039;t too bad).</description>
		<content:encoded><![CDATA[<p>Hi Greg,</p>
<p>  Thanks for the quick response. On busy systems, SID&#8217;s are frequently reused so it is necessary to specify the serial# as well to ensure that we&#8217;re looking at the correct session. Here&#8217;s an example (I hope the formatting is OK &#8211; if not have a look at a posting I just did on the subject at kerryosborne.oracle-guy.com)</p>
<pre>
SQL&gt; @sql_monitor
SQL&gt; break on sql_id on plan_hash_value
SQL&gt; col sql_exec_start for a20
SQL&gt; select sid, session_serial# serial#, sql_id, sql_exec_id, to_char(sql_exec_start,'DD-Mon-YY HH24:MI:SS') sql_exec_start, sql_plan_hash_value plan_hash_value,
  2  elapsed_time/1000000 etime, buffer_gets, disk_reads
  3  from v$sql_monitor
  4  where sid like nvl('&amp;sid',sid)
  5  and sql_id like nvl('&amp;sql_id',sql_id)
  6  and sql_exec_id like nvl('&amp;sql_exec_id',sql_exec_id)
  7  -- order by sql_id, sql_exec_id
  8  order by sql_exec_start
  9  /
Enter value for sid: 102
Enter value for sql_id:
Enter value for sql_exec_id:

 SID    SERIAL# SQL_ID        SQL_EXEC_ID SQL_EXEC_START       PLAN_HASH_VALUE         ETIME BUFFER_GETS DISK_READS
---- ---------- ------------- ----------- -------------------- --------------- ------------- ----------- ----------
 102          7 0r3nf6rvn31z0    16777217 17-Oct-08 09:40:14        3781965855           .01           0          0
 102         14                  16777218 17-Oct-08 09:42:00                             .02           3          0
 102         16 dbmt8tuqdmhkr    16777218 17-Oct-08 09:42:00        3777092978           .02           3          0
 102         20 8szmwam7fysa3    16777217 17-Oct-08 22:00:10        2976124318         11.17        2608       2167
 102       3189                  16777242 18-Oct-08 10:02:08                            5.07        2157       2080
 102       3189                  16777243 18-Oct-08 10:02:13                            3.96        2291       1876
 102       3818 9hu31jpkxnmcu    16777219 18-Oct-08 14:02:24        2828798618          3.87        1131       4565
 102      12380 bxrvdy7xcx1uz    16777216 20-Oct-08 22:00:20        3965205907          4.14        6420       6275
 102      12380 1gd6hj6au5nn3    16777216 20-Oct-08 22:00:24        3965205907          6.53       12464      11924
 102      12380 chbj552h35n8t    16777216 20-Oct-08 22:00:31        3965205907         12.05       24884      22823
 102      12380 akcnuthdm0nax    16777216 20-Oct-08 22:00:45        4108509612         15.95       55125      52013
 102      12380                  16777217 20-Oct-08 22:01:01        3371650501         16.07       48190          0
 102      12380                  16777218 20-Oct-08 22:01:17        3885211065         16.22       78885      78415
 102      12380                  16777219 20-Oct-08 22:01:33         234802133         16.29       70999          0
 102      12380                  16777220 20-Oct-08 22:01:49        2330810755         15.08       74847        617
 102      12380                  16777221 20-Oct-08 22:02:05        4108509612         31.41      150585     149566
 102      12380                  16777222 20-Oct-08 22:02:36        3371650501         31.39      112369          0
 102      12380                  16777223 20-Oct-08 22:03:07        3885211065         30.36      162304     163522
 102      12380                  16777224 20-Oct-08 22:03:38         234802133         31.39       74847      15682
 102      12380                  16777225 20-Oct-08 22:04:09        2330810755         31.37       74847       9249
 102      12380                  16777226 20-Oct-08 22:04:41        4108509612         61.71      162304     182260
 102      12380                  16777227 20-Oct-08 22:05:42        3371650501         60.71      216863          0
 102      12380                  16777228 20-Oct-08 22:06:43        3885211065         60.69      162304     194318
 102      12380                  16777229 20-Oct-08 22:07:44         234802133         61.76       74847      42521
 102      12380                  16777230 20-Oct-08 22:08:45        2330810755         60.72       74847      26045
 102      12380                  16777231 20-Oct-08 22:09:46        4108509612        120.43      162304     216771
 102      12380                  16777232 20-Oct-08 22:11:47        3371650501        121.48      437847          0
 102      12380                  16777233 20-Oct-08 22:13:48        3885211065        121.46      162304     249492
 102      12380                  16777234 20-Oct-08 22:15:49         234802133        120.45       74847      92853
 102      12380                  16777235 20-Oct-08 22:17:50        2330810755        121.50       74847      60744
 102      12380                  16777236 20-Oct-08 22:19:51        4108509612         22.28      159623     159662
 102      15594 ftgja8q5449mb    16777230 21-Oct-08 11:47:29         568322376         10.72      162297     162294
 102      15594                  16777231 21-Oct-08 11:50:55                           10.80      162297     162294
 102      15594                  16777232 21-Oct-08 11:51:42                           10.56      162297     162294
 102      15596                  16777240 21-Oct-08 13:03:59                           10.78      162297     162294
 102      15596 53sz5gs699tqv    16777217 21-Oct-08 13:39:41         717147039          7.02      162297     162294

36 rows selected.

SQL&gt; @whoami

USERNAME             USER#  SID    SERIAL# PREV_HASH_VALUE SCHEMANAME                     OS_PID
--------------- ---------- ---- ---------- --------------- ------------------------------ ------------------------
KSO                     89  102      15598      1029988163 KSO                            6159
</pre>
<p>So you can see that there have been many sessions with SID 102 over the last several days that executed long running statements. Executing the report_sql_monitor function with session_id=&gt;sys_context(&#8216;userenv&#8217;,&#8217;sid&#8217;) will return data for the most recently monitored statement by any session with the SID 102, but it won&#8217;t be my current session because it hasn&#8217;t executed a long running statement.</p>
<p>It would be nice if we could add another where clause that said session_serial=&gt;sys_context(&#8216;userenv&#8217;,&#8217;serial#&#8217;), but unfortunately that option doesn&#8217;t seem to exist. I was hoping you might know of an undocumented option. This would be handy in a number of places by the way. For example, when connected as sysdba, the audsid is not unique and so there is no way with sys_context (that I am aware of) to determine which session is actually mine if there are more than one sysdba connections.  Anyway, I worked around the issue with the report_sql_monitor function by doing a subquery something like this -</p>
<p> session_serial=&gt;(select serial# from v$session where audsid=sys_context(&#8216;userenv&#8217;,&#8217;sessionid&#8217;))</p>
<p>I hope this makes sense (and the formatting isn&#8217;t too bad).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kerry Osborne&#8217;s Blog &#187; Blog Archive &#187; Oracle 11g Real Time SQl Monitoring</title>
		<link>http://structureddata.org/2008/01/06/oracle-11g-real-time-sql-monitoring-using-dbms_sqltunereport_sql_monitor/comment-page-1/#comment-136</link>
		<dc:creator>Kerry Osborne&#8217;s Blog &#187; Blog Archive &#187; Oracle 11g Real Time SQl Monitoring</dc:creator>
		<pubDate>Tue, 21 Oct 2008 20:34:27 +0000</pubDate>
		<guid isPermaLink="false">http://structureddata.org/2008/01/06/oracle-11g-real-time-sql-monitoring-using-dbms_sqltunereport_sql_monitor/#comment-136</guid>
		<description>[...] Greg Rahn has a good post on this feature with examples of the html output of the dbms_sqltune.report_sql_monitor function.    Tags: 11g, Oracle, Tuning Category: Uncategorized &#160;&#124;&#160;&#160;Comment (RSS) &#160;&#124;&#160;&#160;Trackback [...]</description>
		<content:encoded><![CDATA[<p>[...] Greg Rahn has a good post on this feature with examples of the html output of the dbms_sqltune.report_sql_monitor function.    Tags: 11g, Oracle, Tuning Category: Uncategorized &nbsp;|&nbsp;&nbsp;Comment (RSS) &nbsp;|&nbsp;&nbsp;Trackback [...]</p>
]]></content:encoded>
	</item>
</channel>
</rss>
