<?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: Scripts for showing execution plans via plain SQL and also in Oracle 9i</title>
	<atom:link href="http://blog.tanelpoder.com/2009/05/26/scripts-for-showing-execution-plans-via-plain-sql-and-also-in-oracle-9i/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.tanelpoder.com/2009/05/26/scripts-for-showing-execution-plans-via-plain-sql-and-also-in-oracle-9i/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=scripts-for-showing-execution-plans-via-plain-sql-and-also-in-oracle-9i</link>
	<description>Oracle, Exadata, Performance, Troubleshooting - Mobile Life and Productivity.</description>
	<lastBuildDate>Wed, 08 Feb 2012 08:03:50 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Oracle Query Optimizer Vanishing Acts &#171; Charles Hooper&#039;s Oracle Notes</title>
		<link>http://blog.tanelpoder.com/2009/05/26/scripts-for-showing-execution-plans-via-plain-sql-and-also-in-oracle-9i/comment-page-1/#comment-11386</link>
		<dc:creator>Oracle Query Optimizer Vanishing Acts &#171; Charles Hooper&#039;s Oracle Notes</dc:creator>
		<pubDate>Sat, 04 Feb 2012 03:51:58 +0000</pubDate>
		<guid isPermaLink="false">http://blog.tanelpoder.com/2009/05/26/scripts-for-showing-execution-plans-via-plain-sql-and-also-in-oracle-9i/#comment-11386</guid>
		<description>[...] How about testing the real thing&#8230; actually executing the SQL statements in the test case script on an older version of Oracle Database &#8211; will you receive the same execution plans?  I tested Oracle Database 10.2.0.5 and obtained the same execution plans as I saw with 11.2.0.2.  Anyone with access to Oracle Database 10.1, 9.2, 9.0.1, or 8.1.7 that is able to test the above script?  The DBMS_XPLAN.DISPLAY_CURSOR function is not available in Oracle Database versions prior to 10.1, so you will need to be creative to display the execution plan (AUTOTRACE may show the wrong execution plan - you might experiment with a solution offered by Tanel Poder for Oracle Database 9i). [...]</description>
		<content:encoded><![CDATA[<p>[...] How about testing the real thing&#8230; actually executing the SQL statements in the test case script on an older version of Oracle Database &#8211; will you receive the same execution plans?  I tested Oracle Database 10.2.0.5 and obtained the same execution plans as I saw with 11.2.0.2.  Anyone with access to Oracle Database 10.1, 9.2, 9.0.1, or 8.1.7 that is able to test the above script?  The DBMS_XPLAN.DISPLAY_CURSOR function is not available in Oracle Database versions prior to 10.1, so you will need to be creative to display the execution plan (AUTOTRACE may show the wrong execution plan - you might experiment with a solution offered by Tanel Poder for Oracle Database 9i). [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Venkat</title>
		<link>http://blog.tanelpoder.com/2009/05/26/scripts-for-showing-execution-plans-via-plain-sql-and-also-in-oracle-9i/comment-page-1/#comment-9065</link>
		<dc:creator>Venkat</dc:creator>
		<pubDate>Mon, 14 Nov 2011 11:57:15 +0000</pubDate>
		<guid isPermaLink="false">http://blog.tanelpoder.com/2009/05/26/scripts-for-showing-execution-plans-via-plain-sql-and-also-in-oracle-9i/#comment-9065</guid>
		<description>Hi tanel,

Do you have that xmsh &amp; xm scripts. i have downloaded long back and misplaced. We need it for 9i db tuning.

Thanks
Venkat</description>
		<content:encoded><![CDATA[<p>Hi tanel,</p>
<p>Do you have that xmsh &amp; xm scripts. i have downloaded long back and misplaced. We need it for 9i db tuning.</p>
<p>Thanks<br />
Venkat</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tanel Poder</title>
		<link>http://blog.tanelpoder.com/2009/05/26/scripts-for-showing-execution-plans-via-plain-sql-and-also-in-oracle-9i/comment-page-1/#comment-7331</link>
		<dc:creator>Tanel Poder</dc:creator>
		<pubDate>Thu, 26 May 2011 11:13:31 +0000</pubDate>
		<guid isPermaLink="false">http://blog.tanelpoder.com/2009/05/26/scripts-for-showing-execution-plans-via-plain-sql-and-also-in-oracle-9i/#comment-7331</guid>
		<description>&lt;a href=&quot;#comment-7330&quot; rel=&quot;nofollow&quot;&gt;@D Owen&lt;/a&gt; 

Get the zip file with all scripts here:

http://tech.e2sn.com/oracle-scripts-and-tools</description>
		<content:encoded><![CDATA[<p><a href="#comment-7330" rel="nofollow">@D Owen</a> </p>
<p>Get the zip file with all scripts here:</p>
<p><a href="http://tech.e2sn.com/oracle-scripts-and-tools" rel="nofollow">http://tech.e2sn.com/oracle-scripts-and-tools</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: D Owen</title>
		<link>http://blog.tanelpoder.com/2009/05/26/scripts-for-showing-execution-plans-via-plain-sql-and-also-in-oracle-9i/comment-page-1/#comment-7330</link>
		<dc:creator>D Owen</dc:creator>
		<pubDate>Thu, 26 May 2011 10:37:16 +0000</pubDate>
		<guid isPermaLink="false">http://blog.tanelpoder.com/2009/05/26/scripts-for-showing-execution-plans-via-plain-sql-and-also-in-oracle-9i/#comment-7330</guid>
		<description>Hi Tanel,
has the link to the scripts been changed, I get a 404 whilst looking for them here and on your e2sn site.

Thanks</description>
		<content:encoded><![CDATA[<p>Hi Tanel,<br />
has the link to the scripts been changed, I get a 404 whilst looking for them here and on your e2sn site.</p>
<p>Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: JC Dauchy</title>
		<link>http://blog.tanelpoder.com/2009/05/26/scripts-for-showing-execution-plans-via-plain-sql-and-also-in-oracle-9i/comment-page-1/#comment-5667</link>
		<dc:creator>JC Dauchy</dc:creator>
		<pubDate>Wed, 10 Nov 2010 10:19:37 +0000</pubDate>
		<guid isPermaLink="false">http://blog.tanelpoder.com/2009/05/26/scripts-for-showing-execution-plans-via-plain-sql-and-also-in-oracle-9i/#comment-5667</guid>
		<description>I noticed the comment about 9i, I saw also a page on Jonathan Lewis website about this behaviour. It took me time since I could believe there was a problem on xms script.

Thanks</description>
		<content:encoded><![CDATA[<p>I noticed the comment about 9i, I saw also a page on Jonathan Lewis website about this behaviour. It took me time since I could believe there was a problem on xms script.</p>
<p>Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tanel Poder</title>
		<link>http://blog.tanelpoder.com/2009/05/26/scripts-for-showing-execution-plans-via-plain-sql-and-also-in-oracle-9i/comment-page-1/#comment-5663</link>
		<dc:creator>Tanel Poder</dc:creator>
		<pubDate>Tue, 09 Nov 2010 18:29:07 +0000</pubDate>
		<guid isPermaLink="false">http://blog.tanelpoder.com/2009/05/26/scripts-for-showing-execution-plans-via-plain-sql-and-also-in-oracle-9i/#comment-5663</guid>
		<description>&lt;a href=&quot;#comment-5660&quot; rel=&quot;nofollow&quot;&gt;@JC Dauchy&lt;/a&gt; 

Thanks,

The problem is not really in xms.sql, it does what it&#039;s supposed to do - it shows the plan for last cursor executed in the session. If you enable dbms_output buffer fetching using set serveroutput on (or some of the scripts do this) then sqlplus will always try to fetch the dbms_output buffer using a call to DBMS_OUTPUT.GET_LINES... and xms ends up showing that as it&#039;s the last command executed by sqlplus. 

So, yep, &quot;set serveroutput off&quot; will disable that behaviour and xms will see the right statement in prev_hash_value...

Also, on 9i xms won&#039;t work at all as the prev_hash_value doesn&#039;t work properly on 9i. On 9i you&#039;d have to identify the hash value of statement of interest yourself and run @xmsh &lt;hash&gt; &lt;child#&gt;</description>
		<content:encoded><![CDATA[<p><a href="#comment-5660" rel="nofollow">@JC Dauchy</a> </p>
<p>Thanks,</p>
<p>The problem is not really in xms.sql, it does what it&#8217;s supposed to do &#8211; it shows the plan for last cursor executed in the session. If you enable dbms_output buffer fetching using set serveroutput on (or some of the scripts do this) then sqlplus will always try to fetch the dbms_output buffer using a call to DBMS_OUTPUT.GET_LINES&#8230; and xms ends up showing that as it&#8217;s the last command executed by sqlplus. </p>
<p>So, yep, &#8220;set serveroutput off&#8221; will disable that behaviour and xms will see the right statement in prev_hash_value&#8230;</p>
<p>Also, on 9i xms won&#8217;t work at all as the prev_hash_value doesn&#8217;t work properly on 9i. On 9i you&#8217;d have to identify the hash value of statement of interest yourself and run @xmsh <hash> <child #></child></hash></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: JC Dauchy</title>
		<link>http://blog.tanelpoder.com/2009/05/26/scripts-for-showing-execution-plans-via-plain-sql-and-also-in-oracle-9i/comment-page-1/#comment-5660</link>
		<dc:creator>JC Dauchy</dc:creator>
		<pubDate>Tue, 09 Nov 2010 14:46:43 +0000</pubDate>
		<guid isPermaLink="false">http://blog.tanelpoder.com/2009/05/26/scripts-for-showing-execution-plans-via-plain-sql-and-also-in-oracle-9i/#comment-5660</guid>
		<description>Just a wee thing, I&#039;ve just spent one day trying to understand why the &quot;xms.sql&quot; script was not finding the right last SQL, I noticed that setting :

=&gt; set serveroutput off

Correct the problem, otherwise the previous SQL was always &#039;DBMS_OUTPUT...&#039;
This migth help someone..
Anyway, awesome scripts.</description>
		<content:encoded><![CDATA[<p>Just a wee thing, I&#8217;ve just spent one day trying to understand why the &#8220;xms.sql&#8221; script was not finding the right last SQL, I noticed that setting :</p>
<p>=&gt; set serveroutput off</p>
<p>Correct the problem, otherwise the previous SQL was always &#8216;DBMS_OUTPUT&#8230;&#8217;<br />
This migth help someone..<br />
Anyway, awesome scripts.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sometimes things are easy (Part 1): How to fix wrapped execution plan text? &#124; Tanel Poder's blog: Core IT for Geeks and Pros</title>
		<link>http://blog.tanelpoder.com/2009/05/26/scripts-for-showing-execution-plans-via-plain-sql-and-also-in-oracle-9i/comment-page-1/#comment-3645</link>
		<dc:creator>Sometimes things are easy (Part 1): How to fix wrapped execution plan text? &#124; Tanel Poder's blog: Core IT for Geeks and Pros</dc:creator>
		<pubDate>Mon, 18 Jan 2010 16:26:40 +0000</pubDate>
		<guid isPermaLink="false">http://blog.tanelpoder.com/2009/05/26/scripts-for-showing-execution-plans-via-plain-sql-and-also-in-oracle-9i/#comment-3645</guid>
		<description>[...] http://blog.tanelpoder.com/2009/05/26/scripts-for-showing-execution-plans-via-plain-sql-and-also-in-... [...]</description>
		<content:encoded><![CDATA[<p>[...] <a href="http://blog.tanelpoder.com/2009/05/26/scripts-for-showing-execution-plans-via-plain-sql-and-also-in-.." rel="nofollow">http://blog.tanelpoder.com/2009/05/26/scripts-for-showing-execution-plans-via-plain-sql-and-also-in-..</a>. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Plans gone AWRy &#8211; an invASHtigation &#171; OraStory</title>
		<link>http://blog.tanelpoder.com/2009/05/26/scripts-for-showing-execution-plans-via-plain-sql-and-also-in-oracle-9i/comment-page-1/#comment-3482</link>
		<dc:creator>Plans gone AWRy &#8211; an invASHtigation &#171; OraStory</dc:creator>
		<pubDate>Tue, 29 Dec 2009 16:37:48 +0000</pubDate>
		<guid isPermaLink="false">http://blog.tanelpoder.com/2009/05/26/scripts-for-showing-execution-plans-via-plain-sql-and-also-in-oracle-9i/#comment-3482</guid>
		<description>[...] If you do hit these display issues then you might prefer to pull your plans from dba_hist_sql_plan for example using a variation of Tanel&#8217;s script here. [...]</description>
		<content:encoded><![CDATA[<p>[...] If you do hit these display issues then you might prefer to pull your plans from dba_hist_sql_plan for example using a variation of Tanel&#8217;s script here. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dakshin</title>
		<link>http://blog.tanelpoder.com/2009/05/26/scripts-for-showing-execution-plans-via-plain-sql-and-also-in-oracle-9i/comment-page-1/#comment-2838</link>
		<dc:creator>Dakshin</dc:creator>
		<pubDate>Wed, 28 Oct 2009 08:25:09 +0000</pubDate>
		<guid isPermaLink="false">http://blog.tanelpoder.com/2009/05/26/scripts-for-showing-execution-plans-via-plain-sql-and-also-in-oracle-9i/#comment-2838</guid>
		<description>is there a way to get older SQL Plans from history tables? Thanks.</description>
		<content:encoded><![CDATA[<p>is there a way to get older SQL Plans from history tables? Thanks.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

