<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments on: 10046 Extended SQL Tracing for a Session &#8211; What is Wrong with this Quote?</title>
	<atom:link href="http://hoopercharles.wordpress.com/2011/09/16/10046-extended-sql-tracing-for-a-session-what-is-wrong-with-this-quote/feed/" rel="self" type="application/rss+xml" />
	<link>http://hoopercharles.wordpress.com/2011/09/16/10046-extended-sql-tracing-for-a-session-what-is-wrong-with-this-quote/</link>
	<description>Miscellaneous Random Oracle Topics: Stop, Think, ... Understand</description>
	<lastBuildDate>Mon, 13 May 2013 14:10:06 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
	<item>
		<title>By: Charles Hooper</title>
		<link>http://hoopercharles.wordpress.com/2011/09/16/10046-extended-sql-tracing-for-a-session-what-is-wrong-with-this-quote/#comment-3956</link>
		<dc:creator><![CDATA[Charles Hooper]]></dc:creator>
		<pubDate>Mon, 19 Sep 2011 10:56:56 +0000</pubDate>
		<guid isPermaLink="false">http://hoopercharles.wordpress.com/?p=5417#comment-3956</guid>
		<description><![CDATA[Martin,

Sorry for the delayed response - I was trying to understand how Tanel&#039;s article applied to my blog article.  Now that I have started SQL*Plus, I think that I understand your points.  Tanel&#039;s document shows how to get information about various ORADEBUG commands from within SQL*Plus.  One of the commands that Tanel shows is this one:
&lt;pre&gt;
ORADEBUG DOC EVENT FILTER process
&lt;/pre&gt;

When I execute that command in SQL*Plus (when connected as SYS), I receive the following output:
&lt;pre&gt;
Usage
-------
{process:  ospid           ,
           orapid          ,
           pname            }
&lt;/pre&gt;

In the above it should be clear that PID should have been listed as OSPID in the book (you mentioned this also) and I think that Dom also picked up on the inconsistency.  It was this oddity combined with the phrase &quot;rest of event specification&quot; and the overall similarity including the spacing in the command that lead me to believe that the oraclue.com article linked above might to related to this section of the book.

Regarding the syntax being valid just like &quot;WHERE 1=2&quot;... now that I think about it, you might have a point.  Neither throws and error, and both prevent something from happening.  But then editing a spfile with a text editor might also meet that criteria.  :-)]]></description>
		<content:encoded><![CDATA[<p>Martin,</p>
<p>Sorry for the delayed response &#8211; I was trying to understand how Tanel&#8217;s article applied to my blog article.  Now that I have started SQL*Plus, I think that I understand your points.  Tanel&#8217;s document shows how to get information about various ORADEBUG commands from within SQL*Plus.  One of the commands that Tanel shows is this one:</p>
<pre>
ORADEBUG DOC EVENT FILTER process
</pre>
<p>When I execute that command in SQL*Plus (when connected as SYS), I receive the following output:</p>
<pre>
Usage
-------
{process:  ospid           ,
           orapid          ,
           pname            }
</pre>
<p>In the above it should be clear that PID should have been listed as OSPID in the book (you mentioned this also) and I think that Dom also picked up on the inconsistency.  It was this oddity combined with the phrase &#8220;rest of event specification&#8221; and the overall similarity including the spacing in the command that lead me to believe that the oraclue.com article linked above might to related to this section of the book.</p>
<p>Regarding the syntax being valid just like &#8220;WHERE 1=2&#8243;&#8230; now that I think about it, you might have a point.  Neither throws and error, and both prevent something from happening.  But then editing a spfile with a text editor might also meet that criteria.  <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Martin Berger (@martinberx)</title>
		<link>http://hoopercharles.wordpress.com/2011/09/16/10046-extended-sql-tracing-for-a-session-what-is-wrong-with-this-quote/#comment-3950</link>
		<dc:creator><![CDATA[Martin Berger (@martinberx)]]></dc:creator>
		<pubDate>Sun, 18 Sep 2011 18:09:15 +0000</pubDate>
		<guid isPermaLink="false">http://hoopercharles.wordpress.com/?p=5417#comment-3950</guid>
		<description><![CDATA[Charles, 
Maybe it&#039;s worth to throw in Tanel Poder (or at least one of his posts):
http://tech.e2sn.com/oracle/troubleshooting/oradebug-doc#TOC-ORADEBUG-DOC-EVENT-SCOPE 
Based on this (which makes sense to me, even without test right now) I&#039;d say ALTER SESSION SET EVENTS &#039;sql_trace {process: orapid ...&#039; is a _valid_ syntax. (similar to WHERE 1=2 is also _valid). So it&#039;s not &#039;wrong&#039;, but it would be _nice_ to mention it in the book.
For the syntax inconsistency I&#039;d say it should be OSPID instead of PID. - still untested, just reading docs :-) 
My biggest concern with the parts you quoted is the missing reference to ORADEBUG DOC.
Martin]]></description>
		<content:encoded><![CDATA[<p>Charles,<br />
Maybe it&#8217;s worth to throw in Tanel Poder (or at least one of his posts):<br />
<a href="http://tech.e2sn.com/oracle/troubleshooting/oradebug-doc#TOC-ORADEBUG-DOC-EVENT-SCOPE" rel="nofollow">http://tech.e2sn.com/oracle/troubleshooting/oradebug-doc#TOC-ORADEBUG-DOC-EVENT-SCOPE</a><br />
Based on this (which makes sense to me, even without test right now) I&#8217;d say ALTER SESSION SET EVENTS &#8216;sql_trace {process: orapid &#8230;&#8217; is a _valid_ syntax. (similar to WHERE 1=2 is also _valid). So it&#8217;s not &#8216;wrong&#8217;, but it would be _nice_ to mention it in the book.<br />
For the syntax inconsistency I&#8217;d say it should be OSPID instead of PID. &#8211; still untested, just reading docs <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /><br />
My biggest concern with the parts you quoted is the missing reference to ORADEBUG DOC.<br />
Martin</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Charles Hooper</title>
		<link>http://hoopercharles.wordpress.com/2011/09/16/10046-extended-sql-tracing-for-a-session-what-is-wrong-with-this-quote/#comment-3941</link>
		<dc:creator><![CDATA[Charles Hooper]]></dc:creator>
		<pubDate>Fri, 16 Sep 2011 21:59:35 +0000</pubDate>
		<guid isPermaLink="false">http://hoopercharles.wordpress.com/?p=5417#comment-3941</guid>
		<description><![CDATA[(I was hoping that someone else would have jumped in with a test case by now :-) )

My testing showed that ALTER SESSION will only enable a 10046 trace for the current session.  ALTER SESSION had no effect on the tracing that was enabled in another session.  If one were to replace &quot;alter session set events &#039;sql_trace {process : &lt;i&gt;n&lt;/i&gt;...&quot; with &quot;alter SYSTEM set events &#039;sql_trace {process : &lt;i&gt;n&lt;/i&gt;...&quot; then tracing may be enabled in another session if the process ID is specified correctly.

I wonder if someone were to use the above syntax to enable tracing at the database level if that tracing would survive bouncing the database?  Reviving an old article:
http://hoopercharles.wordpress.com/2010/02/12/tracing-enabled-for-sessions-after-instance-restart/#comment-3932

---

Out of curiosity, has anyone enabled a 10046 trace at the SYSTEM level (likely with an ALTER SYSTEM call) and then not been able to stop tracing for some of the sessions (possibly the background sessions) without bouncing the database?  I thought that I recalled seeing this problem on Oracle Database 10.2.0.2, but a quick test on 11.2.0.2 did not reproduce the problem.]]></description>
		<content:encoded><![CDATA[<p>(I was hoping that someone else would have jumped in with a test case by now <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  )</p>
<p>My testing showed that ALTER SESSION will only enable a 10046 trace for the current session.  ALTER SESSION had no effect on the tracing that was enabled in another session.  If one were to replace &#8220;alter session set events &#8216;sql_trace {process : <i>n</i>&#8230;&#8221; with &#8220;alter SYSTEM set events &#8216;sql_trace {process : <i>n</i>&#8230;&#8221; then tracing may be enabled in another session if the process ID is specified correctly.</p>
<p>I wonder if someone were to use the above syntax to enable tracing at the database level if that tracing would survive bouncing the database?  Reviving an old article:<br />
<a href="http://hoopercharles.wordpress.com/2010/02/12/tracing-enabled-for-sessions-after-instance-restart/#comment-3932" rel="nofollow">http://hoopercharles.wordpress.com/2010/02/12/tracing-enabled-for-sessions-after-instance-restart/#comment-3932</a></p>
<p>&#8212;</p>
<p>Out of curiosity, has anyone enabled a 10046 trace at the SYSTEM level (likely with an ALTER SYSTEM call) and then not been able to stop tracing for some of the sessions (possibly the background sessions) without bouncing the database?  I thought that I recalled seeing this problem on Oracle Database 10.2.0.2, but a quick test on 11.2.0.2 did not reproduce the problem.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dom Brooks</title>
		<link>http://hoopercharles.wordpress.com/2011/09/16/10046-extended-sql-tracing-for-a-session-what-is-wrong-with-this-quote/#comment-3940</link>
		<dc:creator><![CDATA[Dom Brooks]]></dc:creator>
		<pubDate>Fri, 16 Sep 2011 21:01:41 +0000</pubDate>
		<guid isPermaLink="false">http://hoopercharles.wordpress.com/?p=5417#comment-3940</guid>
		<description><![CDATA[Save me the effort :) - what did your tests reveal?]]></description>
		<content:encoded><![CDATA[<p>Save me the effort <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  &#8211; what did your tests reveal?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Charles Hooper</title>
		<link>http://hoopercharles.wordpress.com/2011/09/16/10046-extended-sql-tracing-for-a-session-what-is-wrong-with-this-quote/#comment-3938</link>
		<dc:creator><![CDATA[Charles Hooper]]></dc:creator>
		<pubDate>Fri, 16 Sep 2011 18:14:30 +0000</pubDate>
		<guid isPermaLink="false">http://hoopercharles.wordpress.com/?p=5417#comment-3938</guid>
		<description><![CDATA[Dom,

Very good comments.  Your third bullet point is what forced me to stop and ponder while reading the book.  So, can ALTER SESSION be used to alter the session of a specific session other than your own by using the new Oracle tracing syntax?  I was curious, so I just had to test to verify my assumptions.  

Your fifth point is also very good - why use your own database terms when Oracle Database itself uses different ones?  Confusion should not be a desired end result in my opinion.]]></description>
		<content:encoded><![CDATA[<p>Dom,</p>
<p>Very good comments.  Your third bullet point is what forced me to stop and ponder while reading the book.  So, can ALTER SESSION be used to alter the session of a specific session other than your own by using the new Oracle tracing syntax?  I was curious, so I just had to test to verify my assumptions.  </p>
<p>Your fifth point is also very good &#8211; why use your own database terms when Oracle Database itself uses different ones?  Confusion should not be a desired end result in my opinion.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Log Buffer #238, A Carnival of the Vanities for DBAs &#124; The Pythian Blog</title>
		<link>http://hoopercharles.wordpress.com/2011/09/16/10046-extended-sql-tracing-for-a-session-what-is-wrong-with-this-quote/#comment-3937</link>
		<dc:creator><![CDATA[Log Buffer #238, A Carnival of the Vanities for DBAs &#124; The Pythian Blog]]></dc:creator>
		<pubDate>Fri, 16 Sep 2011 14:57:12 +0000</pubDate>
		<guid isPermaLink="false">http://hoopercharles.wordpress.com/?p=5417#comment-3937</guid>
		<description><![CDATA[[...] Extended SQL Tracing for a Session – What is Wrong with this Quote? None other than Charles Hooper [...]]]></description>
		<content:encoded><![CDATA[<p>[...] Extended SQL Tracing for a Session – What is Wrong with this Quote? None other than Charles Hooper [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Charles Hooper</title>
		<link>http://hoopercharles.wordpress.com/2011/09/16/10046-extended-sql-tracing-for-a-session-what-is-wrong-with-this-quote/#comment-3936</link>
		<dc:creator><![CDATA[Charles Hooper]]></dc:creator>
		<pubDate>Fri, 16 Sep 2011 11:31:15 +0000</pubDate>
		<guid isPermaLink="false">http://hoopercharles.wordpress.com/?p=5417#comment-3936</guid>
		<description><![CDATA[Not related to this book, but related to the named wait events.  Is there really an event named Millsap, or was this just a bit of humor?  If there is an event named Millsap, I fully support the naming of that event name, and will quickly work to adopt the 11.1 and above syntax (side note: Cary Millsap&#039;s book introduced me to understanding raw 10046 extended SQL traces, so it would be a worthy tribute to his contribution to Oracle performance tuning for this event to be named Millsap).  Take a look at slide 17:
http://oraclue.files.wordpress.com/2011/03/oracle-diagnostic-events1.pptx]]></description>
		<content:encoded><![CDATA[<p>Not related to this book, but related to the named wait events.  Is there really an event named Millsap, or was this just a bit of humor?  If there is an event named Millsap, I fully support the naming of that event name, and will quickly work to adopt the 11.1 and above syntax (side note: Cary Millsap&#8217;s book introduced me to understanding raw 10046 extended SQL traces, so it would be a worthy tribute to his contribution to Oracle performance tuning for this event to be named Millsap).  Take a look at slide 17:<br />
<a href="http://oraclue.files.wordpress.com/2011/03/oracle-diagnostic-events1.pptx" rel="nofollow">http://oraclue.files.wordpress.com/2011/03/oracle-diagnostic-events1.pptx</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dom Brooks</title>
		<link>http://hoopercharles.wordpress.com/2011/09/16/10046-extended-sql-tracing-for-a-session-what-is-wrong-with-this-quote/#comment-3935</link>
		<dc:creator><![CDATA[Dom Brooks]]></dc:creator>
		<pubDate>Fri, 16 Sep 2011 10:54:21 +0000</pubDate>
		<guid isPermaLink="false">http://hoopercharles.wordpress.com/?p=5417#comment-3935</guid>
		<description><![CDATA[I&#039;ve not really done any testing or investigation into the new extended syntax apart from noting that it seems much more powerful etc.

If you set out specifically as an 11g performance tuning recipes book then I don&#039;t have a problem with using a syntax that only works in 11g onwards.

I would have expected &quot;alter session&quot; to only affect your own session so I would expect it to be pointless to set sql trace for a process pid which wasn&#039;t your own. Similarly, even if you do know your own pid, you shouldn&#039;t need it for alter session.

I could understand using &quot;alter session&quot; to set sql trace on for your session only for a specific sql_id.

The syntax does seem a bit confusing in that &quot;pid=&quot; should reference v$process.spid whereas &quot;orapid=&quot; should reference v$process.pid.]]></description>
		<content:encoded><![CDATA[<p>I&#8217;ve not really done any testing or investigation into the new extended syntax apart from noting that it seems much more powerful etc.</p>
<p>If you set out specifically as an 11g performance tuning recipes book then I don&#8217;t have a problem with using a syntax that only works in 11g onwards.</p>
<p>I would have expected &#8220;alter session&#8221; to only affect your own session so I would expect it to be pointless to set sql trace for a process pid which wasn&#8217;t your own. Similarly, even if you do know your own pid, you shouldn&#8217;t need it for alter session.</p>
<p>I could understand using &#8220;alter session&#8221; to set sql trace on for your session only for a specific sql_id.</p>
<p>The syntax does seem a bit confusing in that &#8220;pid=&#8221; should reference v$process.spid whereas &#8220;orapid=&#8221; should reference v$process.pid.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
