<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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:slash="http://purl.org/rss/1.0/modules/slash/"
	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>ORAganism</title>
	<atom:link href="http://oraganism.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://oraganism.wordpress.com</link>
	<description></description>
	<lastBuildDate>Mon, 23 Jan 2012 22:46:05 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='oraganism.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>ORAganism</title>
		<link>http://oraganism.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://oraganism.wordpress.com/osd.xml" title="ORAganism" />
	<atom:link rel='hub' href='http://oraganism.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Controlling The SCAN Listener Log Location</title>
		<link>http://oraganism.wordpress.com/2012/01/23/controlling-the-scan-listener-log-location/</link>
		<comments>http://oraganism.wordpress.com/2012/01/23/controlling-the-scan-listener-log-location/#comments</comments>
		<pubDate>Mon, 23 Jan 2012 22:20:25 +0000</pubDate>
		<dc:creator>Neil Johnson</dc:creator>
				<category><![CDATA[Oracle]]></category>
		<category><![CDATA[ADR]]></category>
		<category><![CDATA[CRSCTL]]></category>
		<category><![CDATA[DIAGNOSTIC_DEST]]></category>
		<category><![CDATA[listener]]></category>
		<category><![CDATA[SCAN]]></category>

		<guid isPermaLink="false">http://oraganism.wordpress.com/?p=1922</guid>
		<description><![CDATA[I was lucky enough to attend UKOUG Conference 2011 last year. I saw several great presentations, one of which was a presentation on troubleshooting RAC by Julian Dyke. During this presentation Julian commented that we need to watch out for SCAN listeners having their ADR home inside the Grid Infrastructure home instead of with the [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=oraganism.wordpress.com&amp;blog=6580652&amp;post=1922&amp;subd=oraganism&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I was lucky enough to attend <a href="http://2011.ukoug.org/" title="UKOUG Conference 2011">UKOUG Conference 2011</a> last year. I saw several great presentations, one of which was a presentation on troubleshooting RAC by <a href="http://www.juliandyke.com/index.htm" title="Julian Dyke">Julian Dyke</a>. During this presentation Julian commented that we need to watch out for SCAN listeners having their ADR home inside the Grid Infrastructure home instead of with the Database listeners in the ADR home under $ORACLE_BASE.</p>
<p>Well this was one of the few things in his presentation I was fit to comment on so I tried to attract Julian&#8217;s attention by waving my arm, sadly my timid nature meant I went unnoticed. So this blog post is me going public with my attempted interruption. </p>
<p>First an example of how the log location for SCAN listeners typically differs to that of Database listeners. I personally do not like this behaviour as I like my Grid Infrastructure home to have resonably stable size, which it can have once the log directory&#8217;s rotation is mature, however the ADR home for listeners is not cleared down automatically so you can end up with a directory growing unchecked.</p>
<p><pre class="brush: plain; gutter: false; highlight: [2,4];">
[grid@n01 n01]$ $GRID_HOME/bin/lsnrctl status LISTENER|grep Log
Listener Log File         /u01/app/oracle/diag/tnslsnr/n01/listener/alert/log.xml
[grid@n01 n01]$ $GRID_HOME/bin/lsnrctl status LISTENER_SCAN3|grep Log
Listener Log File         /u01/app/grid/11203/ghome_1/log/diag/tnslsnr/n01/listener_scan3/alert/log.xml
</pre></p>
<p>And we know from the <a href="http://docs.oracle.com/cd/E11882_01/network.112/e10835/sqlnet.htm#sthref429" title="Oracle Docs">Oracle documentation</a> that ADR_BASE is defined as:</p>
<blockquote><p>Purpose<br />
To specify the base directory into which tracing and logging incidents are stored when ADR is enabled.</p>
<p>Default<br />
The default on the server side is ORACLE_BASE, or ORACLE_HOME/log, if ORACLE_BASE is not defined.</p></blockquote>
<p>So&#8230; let&#8217;s check ORACLE_BASE for CRS resources:</p>
<p><pre class="brush: plain; gutter: false;">
[grid@n01 ~]$ $GRID_HOME/bin/crsctl stat res ora.LISTENER.lsnr -p|grep -i base
USR_ORA_ENV=ORACLE_BASE=/u01/app/oracle
[grid@n01 ~]$ $GRID_HOME/bin/crsctl stat res ora.LISTENER_SCAN3.lsnr -p|grep -i base
[grid@n01 ~]$
</pre></p>
<p>Notice above that the Database listener has $ORACLE_BASE set and the Scan listener does not. Hence the log location.</p>
<p>This can be controlled for Database listeners by using the <a href="http://docs.oracle.com/cd/E11882_01/rac.112/e16795/srvctladmin.htm#sthref1606" title="SRVCTL SETENV">SETENV switch for SRVCTL</a> but this does not work for Scan listeners.</p>
<p><pre class="brush: plain; gutter: false; highlight: [2];">
[grid@n01 ~]$ $GRID_HOME/bin/srvctl setenv listener -l listener_scan1 -t &quot;ORACLE_BASE=/u01/app/oracle&quot;
PRKO-3162 : The actions setenv, getenv, and unsetenv are not suppported for Single Client Access Name listener listener_scan1
PRCN-2066 : Failed to retrieve cluster listener for listener_scan1 because it has the type of Single Client Access Name Listener
</pre></p>
<p>There is another way of setting environment variables for cluster resources and that is via <a href="http://docs.oracle.com/cd/E11882_01/rac.112/e16794/crsref.htm#CHDFEFBJ" title="CRSCTL MODIFY RESOURCE">crsctl modify resource</a>. </p>
<p><pre class="brush: plain; gutter: false; highlight: [7];">
[grid@n01 ~]$ $GRID_HOME/bin/crsctl modify resource ora.LISTENER_SCAN3.lsnr -attr USR_ORA_ENV=ORACLE_BASE=/u01/app/oracle
[grid@n01 ~]$ $GRID_HOME/bin/crsctl stat res ora.LISTENER_SCAN3.lsnr -p|grep -i base
USR_ORA_ENV=ORACLE_BASE=/u01/app/oracle
[grid@n01 ~]$ $GRID_HOME/bin/srvctl stop scan_listener -i 3
[grid@n01 ~]$ $GRID_HOME/bin/srvctl start scan_listener -i 3
[grid@n01 ~]$ lsnrctl status  listener_scan3 | grep Log
Listener Log File         /u01/app/oracle/diag/tnslsnr/n01/listener_scan3/alert/log.xml
</pre></p>
<p>To my mind the whole thing would seem a little cleaner if there was an &#8220;SRVCTL SETENV SCAN_LISTENER&#8221; command.</p>
<p>After writing this post I thought I&#8217;d check around for other information to support this post and, lo and behold, there is a My Oracle Support article covering almost exactly what I&#8217;ve written above. The article also talks about using the LISTENER.ORA attribute ADR_BASE_LISTENER_SCAN<em>n</em> to control this.</p>
<blockquote><p>Diagnostic Destination For Listeners Is Under Grid_home/Log Instead Of Oracle_base/Diag [ID 1269109.1]</p></blockquote>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/oraganism.wordpress.com/1922/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/oraganism.wordpress.com/1922/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/oraganism.wordpress.com/1922/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/oraganism.wordpress.com/1922/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/oraganism.wordpress.com/1922/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/oraganism.wordpress.com/1922/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/oraganism.wordpress.com/1922/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/oraganism.wordpress.com/1922/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/oraganism.wordpress.com/1922/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/oraganism.wordpress.com/1922/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/oraganism.wordpress.com/1922/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/oraganism.wordpress.com/1922/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/oraganism.wordpress.com/1922/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/oraganism.wordpress.com/1922/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=oraganism.wordpress.com&amp;blog=6580652&amp;post=1922&amp;subd=oraganism&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://oraganism.wordpress.com/2012/01/23/controlling-the-scan-listener-log-location/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/55ea924d6d316a670e89006c04d6a0b6?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Neil</media:title>
		</media:content>
	</item>
		<item>
		<title>Partition pruning using non-prefixed local indexes</title>
		<link>http://oraganism.wordpress.com/2012/01/16/partition-pruning-using-non-prefixed-local-indexes/</link>
		<comments>http://oraganism.wordpress.com/2012/01/16/partition-pruning-using-non-prefixed-local-indexes/#comments</comments>
		<pubDate>Mon, 16 Jan 2012 02:06:16 +0000</pubDate>
		<dc:creator>Eter Pani</dc:creator>
				<category><![CDATA[Oracle]]></category>
		<category><![CDATA[11.2]]></category>
		<category><![CDATA[explain plan]]></category>
		<category><![CDATA[partition]]></category>
		<category><![CDATA[S]]></category>

		<guid isPermaLink="false">http://oraganism.wordpress.com/2012/01/16/partition-pruning-using-non-prefixed-local-indexes/</guid>
		<description><![CDATA[This small post is from nice and frighten world of partitions, specifically the case of partition pruning. If you are using partitions in your application there is fair chance that your database is quite big and performance demanding. If you are not working in classic Data Warehousing manner you have to care about DML statement [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=oraganism.wordpress.com&amp;blog=6580652&amp;post=1916&amp;subd=oraganism&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>This small post is from nice and frighten world of partitions, specifically the case of partition pruning. If you are using partitions in your application there is fair chance that your database is quite big and performance demanding. If you are not working in classic Data Warehousing manner you have to care about DML statement performance. One of the basic rules of DML performance is less indexes you have and less index columns in existing indexes then higher is the DML performance. Thus one of the architectural DBA targets is to reduce the number of indexed columns by just most critical. Another axiom statement is that smaller indexes is easier to support and manage then big one, thus local indexes usually more preferable. The conclusion from two previous axiom is that probably most indexes on partitioned tables in your application is non-prefixed local indexes. Now we came to the topic of this post how oracle optimizer deal with such indexes and what we can do with it.</p>
<p>Lets create list base partitioned table transactions</p>
<table width="442" border="1" cellspacing="0" cellpadding="7">
<col width="106" />
<col width="306" />
<tbody>
<tr valign="TOP">
<td width="106">Column Name</td>
<td width="306">Comment</td>
</tr>
<tr valign="TOP">
<td width="106">SERNO</td>
<td width="306">Unique identifier</td>
</tr>
<tr valign="TOP">
<td width="106">PARTITIONKEY</td>
<td width="306">Partition Key</td>
</tr>
<tr valign="TOP">
<td width="106">SGENERAL</td>
<td width="306">Some indexed Field</td>
</tr>
</tbody>
</table>
<p>And create two indexes TRANSACTIONS_PK (SERNO, PARTITIONKEY) and local partitioned non-prefixed index TRANSACTIONSI (SGENERAL).</p>
<p>Let’s start from the most common statement</p>
<p><pre class="brush: sql;">

EXPLAIN PLAN FOR
 SELECT SGENERAL, count(1)
 FROM transactions
 WHERE PARTITIONKEY='JUL2012' AND SGENERAL is not null
 GROUP BY SGENERAL;

</pre></p>
<p><span style="color:#000000;">PLAN_TABLE_OUTPUT<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
Plan hash value: 2338610280<br />
</span></p>
<table width="799" border="1" cellspacing="0" cellpadding="4">
<col width="21" />
<col width="186" />
<col width="131" />
<col width="57" />
<col width="55" />
<col width="70" />
<col width="79" />
<col width="61" />
<col width="65" />
<tbody>
<tr valign="TOP">
<td width="21"><span style="color:#000000;">Id</span></td>
<td width="186"><span style="color:#000000;">Operation</span></td>
<td width="131"><span style="color:#000000;">Name</span></td>
<td width="57">
<p align="CENTER"><span style="color:#000000;">Rows</span></p>
</td>
<td width="55">
<p align="CENTER"><span style="color:#000000;">Bytes</span></p>
</td>
<td width="70">
<p align="CENTER"><span style="color:#000000;">Cost</span></p>
</td>
<td width="79">
<p align="CENTER"><span style="color:#000000;">Time</span></p>
</td>
<td width="61">
<p align="CENTER"><span style="color:#000000;">Pstart</span></p>
</td>
<td width="65">
<p align="CENTER"><span style="color:#000000;">Pstop</span></p>
</td>
</tr>
<tr valign="TOP">
<td width="21">0</td>
<td width="186"><span style="color:#000000;">SELECT STATEMENT</span></td>
<td width="131"></td>
<td width="57">
<p align="CENTER">5</p>
</td>
<td width="55">
<p align="CENTER">55</p>
</td>
<td width="70">
<p align="CENTER"><span style="color:#000000;">69978 (1) </span></p>
</td>
<td width="79">
<p align="CENTER"><span style="color:#000000;"><strong>00:14:00</strong></span></p>
</td>
<td width="61"></td>
<td width="65"></td>
</tr>
<tr valign="TOP">
<td width="21">1</td>
<td width="186"><span style="color:#000000;"> HASH GROUP BY </span></td>
<td width="131"></td>
<td width="57">
<p align="CENTER">5</p>
</td>
<td width="55">
<p align="CENTER">55</p>
</td>
<td width="70">
<p align="CENTER"><span style="color:#000000;">69978 (1) </span></p>
</td>
<td width="79">
<p align="CENTER"><span style="color:#000000;">00:14:00</span></p>
</td>
<td width="61"></td>
<td width="65"></td>
</tr>
<tr valign="TOP">
<td width="21">2</td>
<td width="186"><span style="color:#000000;"> PARTITION LIST SINGLE</span></td>
<td width="131"></td>
<td width="57">
<p align="CENTER">5340K</p>
</td>
<td width="55">
<p align="CENTER">56M</p>
</td>
<td width="70">
<p align="CENTER"><span style="color:#000000;">69727 (1) </span></p>
</td>
<td width="79">
<p align="CENTER"><span style="color:#000000;">00:13:57</span></p>
</td>
<td width="61">
<p align="CENTER"><span style="color:#000000;">KEY</span></p>
</td>
<td width="65">
<p align="CENTER"><span style="color:#000000;">KEY</span></p>
</td>
</tr>
<tr valign="TOP">
<td width="21">*3</td>
<td width="186"><span style="color:#000000;"> TABLE ACCESS FULL </span></td>
<td width="131"><span style="color:#000000;">TRANSACTIONS</span></td>
<td width="57">
<p align="CENTER">5340K</p>
</td>
<td width="55">
<p align="CENTER">56M</p>
</td>
<td width="70">
<p align="CENTER"><span style="color:#000000;">69727 (1) </span></p>
</td>
<td width="79">
<p align="CENTER"><span style="color:#000000;">00:13:57</span></p>
</td>
<td width="61">
<p align="CENTER">19</p>
</td>
<td width="65">
<p align="CENTER">19</p>
</td>
</tr>
</tbody>
</table>
<p><span style="color:#000000;">Predicate Information (identified by operation id):<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />
3 &#8211; filter(&#8220;STGENERAL&#8221; IS NOT NULL)</span></p>
<p>Does it look like non-optimal? Optimizer has chosen to do FULL SCAN even if it has nice looking index TRANSACTIONSI. The problem is that partition pruning works only for prefixed indexes, that means you have to pay for support extra column in your index even if you do not need it because you clearly can get the partition name based from the identical rules on a table.</p>
<p>But luckily we have extended syntaxes. Uses it we can manually define the partition that should be used. In our case the partition name is equal to the partition key. Getting the partition name is very simple for list partitions but can be received in all other cases too.</p>
<p><pre class="brush: sql;">
EXPLAIN PLAN FOR
 SELECT SGENERAL, count(1)
 FROM TRANSACTIONS PARTITION (&quot;JUL2012&quot;)
 WHERE SGENERAL is not null
 GROUP BY SGENERAL;
</pre></p>
<p><span style="color:#000000;">PLAN_TABLE_OUTPUT<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
Plan hash value: 198159339</span></p>
<table width="799" border="1" cellspacing="0" cellpadding="4">
<col width="21" />
<col width="197" />
<col width="127" />
<col width="50" />
<col width="55" />
<col width="70" />
<col width="79" />
<col width="61" />
<col width="65" />
<tbody>
<tr valign="TOP">
<td width="21"><span style="color:#000000;">Id</span></td>
<td width="197"><span style="color:#000000;">Operation</span></td>
<td width="127"><span style="color:#000000;">Name</span></td>
<td width="50">
<p align="CENTER"><span style="color:#000000;">Rows</span></p>
</td>
<td width="55">
<p align="CENTER"><span style="color:#000000;">Bytes</span></p>
</td>
<td width="70">
<p align="CENTER"><span style="color:#000000;">Cost</span></p>
</td>
<td width="79">
<p align="CENTER"><span style="color:#000000;">Time</span></p>
</td>
<td width="61">
<p align="CENTER"><span style="color:#000000;">Pstart</span></p>
</td>
<td width="65">
<p align="CENTER"><span style="color:#000000;">Pstop</span></p>
</td>
</tr>
<tr valign="TOP">
<td width="21">0</td>
<td width="197"><span style="color:#000000;">SELECT STATEMENT</span></td>
<td width="127"></td>
<td width="50">
<p align="CENTER">4</p>
</td>
<td width="55">
<p align="CENTER">20</p>
</td>
<td width="70">
<p align="CENTER"><span style="color:#000000;">10 (20) </span></p>
</td>
<td width="79">
<p align="CENTER"><span style="color:#000000;"><strong>00:00:01</strong></span></p>
</td>
<td width="61"></td>
<td width="65"></td>
</tr>
<tr valign="TOP">
<td width="21">1</td>
<td width="197"><span style="color:#000000;"> SORT GROUP BY NOSORT</span></td>
<td width="127"></td>
<td width="50">
<p align="CENTER">4</p>
</td>
<td width="55">
<p align="CENTER">20</p>
</td>
<td width="70">
<p align="CENTER"><span style="color:#000000;">10 (20) </span></p>
</td>
<td width="79">
<p align="CENTER"><span style="color:#000000;">00:00:01</span></p>
</td>
<td width="61"></td>
<td width="65"></td>
</tr>
<tr valign="TOP">
<td width="21">2</td>
<td width="197"><span style="color:#000000;"> PARTITION LIST SINGLE</span></td>
<td width="127"></td>
<td width="50">
<p align="CENTER"><span style="color:#000000;">8890</span></p>
</td>
<td width="55">
<p align="CENTER"><span style="color:#000000;">44450</span></p>
</td>
<td width="70">
<p align="CENTER"><span style="color:#000000;">8 (0) </span></p>
</td>
<td width="79">
<p align="CENTER"><span style="color:#000000;">00:00:01</span></p>
</td>
<td width="61">
<p align="CENTER"><span style="color:#000000;">KEY</span></p>
</td>
<td width="65">
<p align="CENTER"><span style="color:#000000;">KEY</span></p>
</td>
</tr>
<tr valign="TOP">
<td width="21">*3</td>
<td width="197"><span style="color:#000000;"> INDEX FULL SCAN</span></td>
<td width="127"><span style="color:#000000;">TRANSACTIONS<strong>I</strong></span></td>
<td width="50">
<p align="CENTER"><span style="color:#000000;">8890</span></p>
</td>
<td width="55">
<p align="CENTER"><span style="color:#000000;">44450</span></p>
</td>
<td width="70">
<p align="CENTER"><span style="color:#000000;">8 (0) </span></p>
</td>
<td width="79">
<p align="CENTER"><span style="color:#000000;">00:00:01</span></p>
</td>
<td width="61">
<p align="CENTER">19</p>
</td>
<td width="65">
<p align="CENTER">19</p>
</td>
</tr>
</tbody>
</table>
<p>Predicate Information (identified by operation id):</p>
<p><span style="color:#000000;">&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />
3 &#8211; filter(&#8220;SGENERAL&#8221; IS NOT NULL)</span></p>
<p>This plan looks much better. According to optimizer estimations we can save 14 minutes on it. But there is even more attractive syntaxes for those who do not want to spend their time calculating the partition name</p>
<p><pre class="brush: sql;">
 EXPLAIN PLAN FOR
 SELECT SGENERAL, count(1)
 FROM TRANSACTIONS PARTITION FOR ('JUL2012')
 WHERE SGENERAL is not null
 GROUP BY SGENERAL;
</pre></p>
<p><span style="color:#000000;">PLAN_TABLE_OUTPUT<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />
Plan hash value: 198159339<br />
</span></p>
<table width="799" border="1" cellspacing="0" cellpadding="4">
<col width="21" />
<col width="197" />
<col width="127" />
<col width="50" />
<col width="55" />
<col width="70" />
<col width="79" />
<col width="61" />
<col width="65" />
<tbody>
<tr valign="TOP">
<td width="21"><span style="color:#000000;">Id</span></td>
<td width="197"><span style="color:#000000;">Operation</span></td>
<td width="127"><span style="color:#000000;">Name</span></td>
<td width="50">
<p align="CENTER"><span style="color:#000000;">Rows</span></p>
</td>
<td width="55">
<p align="CENTER"><span style="color:#000000;">Bytes</span></p>
</td>
<td width="70">
<p align="CENTER"><span style="color:#000000;">Cost</span></p>
</td>
<td width="79">
<p align="CENTER"><span style="color:#000000;">Time</span></p>
</td>
<td width="61">
<p align="CENTER"><span style="color:#000000;">Pstart</span></p>
</td>
<td width="65">
<p align="CENTER"><span style="color:#000000;">Pstop</span></p>
</td>
</tr>
<tr valign="TOP">
<td width="21">0</td>
<td width="197"><span style="color:#000000;">SELECT STATEMENT</span></td>
<td width="127"></td>
<td width="50">
<p align="CENTER">4</p>
</td>
<td width="55">
<p align="CENTER">20</p>
</td>
<td width="70">
<p align="CENTER"><span style="color:#000000;">10 (20) </span></p>
</td>
<td width="79">
<p align="CENTER"><span style="color:#000000;"><strong>00:00:01</strong></span></p>
</td>
<td width="61"></td>
<td width="65"></td>
</tr>
<tr valign="TOP">
<td width="21">1</td>
<td width="197"><span style="color:#000000;"> SORT GROUP BY NOSORT</span></td>
<td width="127"></td>
<td width="50">
<p align="CENTER">4</p>
</td>
<td width="55">
<p align="CENTER">20</p>
</td>
<td width="70">
<p align="CENTER"><span style="color:#000000;">10 (20) </span></p>
</td>
<td width="79">
<p align="CENTER"><span style="color:#000000;">00:00:01</span></p>
</td>
<td width="61"></td>
<td width="65"></td>
</tr>
<tr valign="TOP">
<td width="21">2</td>
<td width="197"><span style="color:#000000;"> PARTITION LIST SINGLE</span></td>
<td width="127"></td>
<td width="50">
<p align="CENTER"><span style="color:#000000;">8890</span></p>
</td>
<td width="55">
<p align="CENTER"><span style="color:#000000;">44450</span></p>
</td>
<td width="70">
<p align="CENTER"><span style="color:#000000;">8 (0) </span></p>
</td>
<td width="79">
<p align="CENTER"><span style="color:#000000;">00:00:01</span></p>
</td>
<td width="61">
<p align="CENTER"><span style="color:#000000;">KEY</span></p>
</td>
<td width="65">
<p align="CENTER"><span style="color:#000000;">KEY</span></p>
</td>
</tr>
<tr valign="TOP">
<td width="21">*3</td>
<td width="197"><span style="color:#000000;"> INDEX FULL SCAN</span></td>
<td width="127"><span style="color:#000000;">TRANSACTIONS<strong>I</strong></span></td>
<td width="50">
<p align="CENTER"><span style="color:#000000;">8890</span></p>
</td>
<td width="55">
<p align="CENTER"><span style="color:#000000;">44450</span></p>
</td>
<td width="70">
<p align="CENTER"><span style="color:#000000;">8 (0) </span></p>
</td>
<td width="79">
<p align="CENTER"><span style="color:#000000;">00:00:01</span></p>
</td>
<td width="61">
<p align="CENTER">19</p>
</td>
<td width="65">
<p align="CENTER">19</p>
</td>
</tr>
</tbody>
</table>
<p><span style="color:#000000;">Predicate Information (identified by operation id):<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />
3 &#8211; filter(&#8220;SGENERAL&#8221; IS NOT NULL)</span></p>
<p>The only problem with last syntax is that it is supported only from 11.2 version. The syntax was developed to support interval partitions but can be handy for all other types.</p>
<p>Does it looks that with new syntax we came to the kingdom of wealth and prosperity, where we can easily avoid prefixes on local indexes and still use the effective partition pruning? But it is not. The hidden rock is that the partition keys in PARTITION FOR clause could not be defined throw the variables like in WHERE clause. Below there are examples of such attempt</p>
<p>Firstly traditional approach<br />
<pre class="brush: sql;">
 DECLARE
 v_part char(7):='JUL2012';
 BEGIN
 FOR REC IN (SELECT SGENERAL, count(1) FROM TRANSACTIONS
 WHERE PARTITIONKEY=v_part AND SGENERAL is not null
 GROUP BY SGENERAL)
 LOOP
 NULL;
 END LOOP;
 END;
 /
 Elapsed: 00:12:42.05
</pre></p>
<p>It works but does not looks like very performance effective. Let’s go and try 10g approach in PL/SQL</p>
<p><pre class="brush: sql;">
DECLARE
 v_part varchar2(10):=&quot;JUL2012&quot;;
 BEGIN
 FOR REC IN (SELECT SGENERAL, count(1) FROM TRANSACTIONS PARTITION (v_part)
 WHERE SGENERAL is not null
 GROUP BY SGENERAL)
 LOOP
 NULL;
 END LOOP;
 END;
 /

ERROR at line 2:
 ORA-06550: line 2, column 25:
 PLS-00201: identifier &quot;JUL2012&quot; must be declared
 ORA-06550: line 2, column 10:
 PL/SQL: Item ignored
</pre></p>
<p>It looks like kind of expected behavior. You could not use table name as variable, why you should be able to use partition name. Personally I put a lot of hope on the last test with PARTITIONKEY reference<br />
<pre class="brush: sql;">
DECLARE&lt;span style=&quot;color: #000000;&quot;&gt;
v_part char(7):='JUL2012';
 BEGIN
 FOR REC IN (SELECT SGENERAL, count(1) FROM TRANSACTIONS
 PARTITION FOR (v_part)
 WHERE SGENERAL is not null
 GROUP BY SGENERAL)
 LOOP
 NULL;
 END LOOP;
 END;
 /

ERROR at line 1:
 ORA-14763: Unable to resolve FOR VALUES clause to a partition number
 ORA-06512: at line 4
</pre></p>
<p>It was the first time I see the error thus have a look into the documentation</p>
<p>ORA-14763: Unable to resolve FOR VALUES clause to a partition number</p>
<p>Cause: Could not determine the partition corresponding to the FOR VALUES clause.</p>
<p>Action: <strong>Remove bind variables </strong>and dependencies on session parameters from the values specified in the FOR VALUES clause.</p>
<p>Ha-Ha-Ha nothing change we still could not pass partition key values into query.</p>
<p><strong>Summarizing</strong> oracle offer the mechanism that allows to use partition pruning on non-prefixed local indexes but have not support the syntaxes in pl/sql using binds. The usage of this syntaxes have sense only in case of big queries (e.g. reports) running on a table, when gains from effective execution plan prevail over the loses of dynamic sql.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/oraganism.wordpress.com/1916/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/oraganism.wordpress.com/1916/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/oraganism.wordpress.com/1916/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/oraganism.wordpress.com/1916/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/oraganism.wordpress.com/1916/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/oraganism.wordpress.com/1916/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/oraganism.wordpress.com/1916/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/oraganism.wordpress.com/1916/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/oraganism.wordpress.com/1916/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/oraganism.wordpress.com/1916/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/oraganism.wordpress.com/1916/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/oraganism.wordpress.com/1916/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/oraganism.wordpress.com/1916/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/oraganism.wordpress.com/1916/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=oraganism.wordpress.com&amp;blog=6580652&amp;post=1916&amp;subd=oraganism&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://oraganism.wordpress.com/2012/01/16/partition-pruning-using-non-prefixed-local-indexes/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/86cd31c275ead197c6278bc0980689ed?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">eterpani</media:title>
		</media:content>
	</item>
		<item>
		<title>A DBA_HIST_SQLSTAT query that I am very fond of</title>
		<link>http://oraganism.wordpress.com/2011/12/14/a-dba_hist_sqlstat-query-that-i-am-very-fond-of/</link>
		<comments>http://oraganism.wordpress.com/2011/12/14/a-dba_hist_sqlstat-query-that-i-am-very-fond-of/#comments</comments>
		<pubDate>Wed, 14 Dec 2011 20:35:56 +0000</pubDate>
		<dc:creator>Neil Johnson</dc:creator>
				<category><![CDATA[Oracle]]></category>
		<category><![CDATA[AWR]]></category>
		<category><![CDATA[DBA_HIST_SQLSTAT]]></category>

		<guid isPermaLink="false">http://oraganism.wordpress.com/?p=1754</guid>
		<description><![CDATA[This is a quick post to share a SQL statement I use a lot at work. The query mines the AWR tables (beware the licence implications) for a specific SQL ID and date/time range and shows a few choice statistics for each snapshot period. awrsql.sql: Nothing ground breaking and I&#8217;m sure many will have a [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=oraganism.wordpress.com&amp;blog=6580652&amp;post=1754&amp;subd=oraganism&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>This is a quick post to share a SQL statement I use a lot at work. The query mines the AWR tables (beware the licence implications) for a specific SQL ID and date/time range and shows a few choice statistics for each snapshot period.</p>
<p>awrsql.sql:</p>
<p><pre class="brush: plain;">
prompt enter start and end times in format DD-MON-YYYY [HH24:MI]
 
column sample_end format a21
select to_char(min(s.end_interval_time),'DD-MON-YYYY DY HH24:MI') sample_end
, q.sql_id
, q.plan_hash_value
, sum(q.EXECUTIONS_DELTA) executions
, round(sum(DISK_READS_delta)/greatest(sum(executions_delta),1),1) pio_per_exec
, round(sum(BUFFER_GETS_delta)/greatest(sum(executions_delta),1),1) lio_per_exec
, round((sum(ELAPSED_TIME_delta)/greatest(sum(executions_delta),1)/1000),1) msec_exec
from dba_hist_sqlstat q, dba_hist_snapshot s
where q.SQL_ID=trim('&amp;sqlid.')
and s.snap_id = q.snap_id
and s.dbid = q.dbid
and s.instance_number = q.instance_number
and s.end_interval_time &gt;= to_date(trim('&amp;start_time.'),'dd-mon-yyyy hh24:mi')
and s.begin_interval_time &lt;= to_date(trim('&amp;end_time.'),'dd-mon-yyyy hh24:mi')
and substr(to_char(s.end_interval_time,'DD-MON-YYYY DY HH24:MI'),13,2) like '%&amp;hr24_filter.%'
group by s.snap_id
, q.sql_id
, q.plan_hash_value
order by s.snap_id, q.sql_id, q.plan_hash_value
/
</pre></p>
<p>Nothing ground breaking and I&#8217;m sure many will have a similar script.</p>
<p>Below I have example output showing one of the scripts many successful outings, quite a dramatic plan change I&#8217;m sure you&#8217;ll agree.</p>
<p><pre class="brush: plain; gutter: false;">
SQL&gt; @awrsql
enter start and end times in format DD-MON-YYYY [HH24:MI]
Enter value for sqlid: 1jjpo2i4b313g
Enter value for start_time: 15-NOV-2011
Enter value for end_time: 21-NOV-2011 13:00
Enter value for hr24_filter:

SAMPLE_END            SQL_ID        PLAN_HASH_VALUE EXECUTIONS PIO_PER_EXEC LIO_PER_EXEC  MSEC_EXEC
--------------------- ------------- --------------- ---------- ------------ ------------ ----------
15-nov-2011 TUE 08:00 1jjpo2i4b313g      3133159894     129629            0            5          0
16-nov-2011 WED 08:01 1jjpo2i4b313g      3133159894     115003            0            5         .1
17-nov-2011 THU 08:01 1jjpo2i4b313g      3133159894     115741            0            5          0
18-nov-2011 FRI 07:00 1jjpo2i4b313g      3133159894      30997            0            5         .1
18-nov-2011 FRI 08:00 1jjpo2i4b313g      3133159894      81034            0            5          0
21-nov-2011 MON 00:00 1jjpo2i4b313g       790865878         16     323091.6     323128.3    36905.8
21-nov-2011 MON 01:00 1jjpo2i4b313g       790865878         29     349676.2     349713.7    48387.2
21-nov-2011 MON 02:00 1jjpo2i4b313g       790865878         35     339474.6     339509.2    34057.7
21-nov-2011 MON 03:00 1jjpo2i4b313g       790865878         37     340934.6     340970.2    35899.4
21-nov-2011 MON 04:01 1jjpo2i4b313g       790865878         38     333469.1     333503.9    35450.8
21-nov-2011 MON 05:00 1jjpo2i4b313g       790865878         35     347559.3     347595.2    35231.8
21-nov-2011 MON 06:00 1jjpo2i4b313g       790865878         32     340224.8       340260    35208.3
</pre></p>
<p>I also like to use the query to track number of executions or LIO per execution over a longer time frame to see if either the frequency or individual impact of the SQL is changing over time. I can use the &#8220;hr24_filter&#8221; variable to do this, for example showing me all snapshots for hour &#8220;13&#8243; over a whole month.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/oraganism.wordpress.com/1754/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/oraganism.wordpress.com/1754/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/oraganism.wordpress.com/1754/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/oraganism.wordpress.com/1754/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/oraganism.wordpress.com/1754/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/oraganism.wordpress.com/1754/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/oraganism.wordpress.com/1754/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/oraganism.wordpress.com/1754/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/oraganism.wordpress.com/1754/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/oraganism.wordpress.com/1754/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/oraganism.wordpress.com/1754/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/oraganism.wordpress.com/1754/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/oraganism.wordpress.com/1754/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/oraganism.wordpress.com/1754/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=oraganism.wordpress.com&amp;blog=6580652&amp;post=1754&amp;subd=oraganism&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://oraganism.wordpress.com/2011/12/14/a-dba_hist_sqlstat-query-that-i-am-very-fond-of/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/55ea924d6d316a670e89006c04d6a0b6?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Neil</media:title>
		</media:content>
	</item>
		<item>
		<title>DBMS_METADATA.GET_DDL and SELECT_CATALOG_ROLE</title>
		<link>http://oraganism.wordpress.com/2011/11/23/dbms_metadata-get_ddl-and-select_catalog_role/</link>
		<comments>http://oraganism.wordpress.com/2011/11/23/dbms_metadata-get_ddl-and-select_catalog_role/#comments</comments>
		<pubDate>Wed, 23 Nov 2011 22:10:08 +0000</pubDate>
		<dc:creator>Neil Johnson</dc:creator>
				<category><![CDATA[Oracle]]></category>
		<category><![CDATA[DBMS_METADATA SELECT_CATALOG_ROLE]]></category>

		<guid isPermaLink="false">http://oraganism.wordpress.com/?p=1744</guid>
		<description><![CDATA[It is quite common for sites to have a set of read only (or read mostly) privileges they grant DBAs and support technicians for day to day investigation. Such a set of privileges may be similar to the role below: With such a role a user can figure out most things including the DDL that [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=oraganism.wordpress.com&amp;blog=6580652&amp;post=1744&amp;subd=oraganism&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>It is quite common for sites to have a set of read only (or read mostly) privileges they grant DBAs and support technicians for day to day investigation. Such a set of privileges may be similar to the role below:</p>
<p><pre class="brush: plain; gutter: false;">
create role readonly_dba;
grant create session to readonly_dba;
grant select any dictionary to readonly_dba;
grant select any table to readonly_dba;
-- and maybe a few other bits and pieces such as below (site permitting)
grant execute on dbms_monitor to readonly_dba;
</pre></p>
<p>With such a role a user can figure out most things including the DDL that defines an object. However with such a user DBMS_METADATA.GET_DDL on an object in a different schema returns an error (output below from 10.2 but 11.2 is similar):</p>
<p><pre class="brush: plain; gutter: false;">
SQL&gt; create user mydba identified by mydba;
SQL&gt; grant readonly_dba to mydba;
SQL&gt; conn mydba/mydba

SQL&gt; -- picked a table at random - DBSNMP.MGMT_SNAPSHOT
SQL&gt; SELECT DBMS_METADATA.GET_DDL('TABLE','MGMT_SNAPSHOT','DBSNMP') FROM dual;
ERROR:
ORA-31603: object &quot;MGMT_SNAPSHOT&quot; of type TABLE not found in schema &quot;DBSNMP&quot;
ORA-06512: at &quot;SYS.DBMS_SYS_ERROR&quot;, line 105
ORA-06512: at &quot;SYS.DBMS_METADATA&quot;, line 2805
ORA-06512: at &quot;SYS.DBMS_METADATA&quot;, line 4333
ORA-06512: at line 1
</pre></p>
<p>The solution to this is <a href="http://docs.oracle.com/cd/E11882_01/appdev.112/e25788/d_metada.htm#i1016867" title="Oracle 11.2 documentation">documented</a> as below but I must admit I only discovered this once I&#8217;d figured things out the hard way. A classic case of something being obvious if you already know the answer.</p>
<blockquote><p>The DBMS_METADATA package considers a privileged user to be one who is connected as user SYS or who has the SELECT_CATALOG_ROLE role.</p></blockquote>
<p>So now anyone Googling &#8220;ORA-31603&#8243; has a potential answer I&#8217;ll show you how this is implemented.</p>
<p>When faced with the error above I enabled SQL_TRACE and tried again.</p>
<p><pre class="brush: plain; gutter: false;">
SQL&gt; exec dbms_monitor.session_trace_enable;
SQL&gt; SELECT DBMS_METADATA.GET_DDL('TABLE','MGMT_SNAPSHOT','DBSNMP') FROM dual;
ERROR:
ORA-31603: object &quot;MGMT_SNAPSHOT&quot; of type TABLE not found in schema &quot;DBSNMP&quot;
ORA-06512: at &quot;SYS.DBMS_SYS_ERROR&quot;, line 105
ORA-06512: at &quot;SYS.DBMS_METADATA&quot;, line 2805
ORA-06512: at &quot;SYS.DBMS_METADATA&quot;, line 4333
ORA-06512: at line 1



no rows selected
</pre></p>
<p>The penultimate fetch in the resulting trace file was for the statement below (reformatted for readability).</p>
<p><pre class="brush: plain; gutter: false;">
PARSING IN CURSOR #7 len=283 dep=1 uid=39 oct=3 lid=39 tim=2007863993 hv=2568162639 ad='af4fed2c'
SELECT /*+rule*/ SYS_XMLGEN(VALUE(KU$)
, XMLFORMAT.createFormat2('TABLE_T', '7'))
, KU$.OBJ_NUM 
FROM SYS.KU$_HTABLE_VIEW KU$ 
WHERE NOT (BITAND (KU$.PROPERTY,8192)=8192) 
AND  NOT BITAND(KU$.SCHEMA_OBJ.FLAGS,128)!=0 
AND  KU$.SCHEMA_OBJ.NAME=:NAME1 
AND  KU$.SCHEMA_OBJ.OWNER_NAME=:SCHEMA2
END OF STMT
PARSE #7:c=0,e=721,p=0,cr=0,cu=0,mis=0,r=0,dep=1,og=3,tim=2007863991
EXEC #7:c=0,e=674,p=0,cr=0,cu=0,mis=0,r=0,dep=1,og=3,tim=2007864789
FETCH #7:c=0,e=120,p=0,cr=14,cu=0,mis=0,r=0,dep=1,og=3,tim=2007866558
</pre></p>
<p>The FETCH line shows no rows were returned (&#8220;r=0&#8243;). Next I checked the definition of the view &#8211; using DBA_VIEWS as DBMS_METADATA isn&#8217;t working for other schemas <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><pre class="brush: plain; gutter: false; highlight: [9];">
SQL&gt; set pages 100
SQL&gt; select text from dba_views where view_name = 'KU$_HTABLE_VIEW';

TEXT
--------------------------------------------------------------------------------
... SNIP ...
AND (SYS_CONTEXT('USERENV','CURRENT_USERID') IN (o.owner_num, 0) OR
                EXISTS ( SELECT * FROM session_roles
                        WHERE role='SELECT_CATALOG_ROLE' ))
</pre></p>
<p>The role is hardcoded in the view.</p>
<p>After granting SELECT_CATALOG_ROLE to the READONLY_DBA role DBMS_METADATA.GET_DDL returns the desired DDL.</p>
<p><pre class="brush: plain; gutter: false;">
SQL&gt; SELECT DBMS_METADATA.GET_DDL('TABLE','MGMT_SNAPSHOT','DBSNMP') FROM dual;

DBMS_METADATA.GET_DDL('TABLE','MGMT_SNAPSHOT','DBSNMP')
--------------------------------------------------------------------------------

  CREATE TABLE &quot;DBSNMP&quot;.&quot;MGMT_SNAPSHOT&quot;
   (    &quot;INSTANCE_NUMBER&quot; NUMBER NOT NULL
</pre></p>
<p>Success.</p>
<p>Lessons learned:</p>
<p>1) Once again &#8211; read the documentation.<br />
2) Shying away from the 1600+ privileges (2100+ in 11.2) in SELECT_CATALOG_ROLE is not always ideal.<br />
3) Even Oracle aren&#8217;t averse to a bit of hardcoding</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/oraganism.wordpress.com/1744/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/oraganism.wordpress.com/1744/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/oraganism.wordpress.com/1744/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/oraganism.wordpress.com/1744/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/oraganism.wordpress.com/1744/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/oraganism.wordpress.com/1744/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/oraganism.wordpress.com/1744/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/oraganism.wordpress.com/1744/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/oraganism.wordpress.com/1744/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/oraganism.wordpress.com/1744/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/oraganism.wordpress.com/1744/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/oraganism.wordpress.com/1744/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/oraganism.wordpress.com/1744/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/oraganism.wordpress.com/1744/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=oraganism.wordpress.com&amp;blog=6580652&amp;post=1744&amp;subd=oraganism&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://oraganism.wordpress.com/2011/11/23/dbms_metadata-get_ddl-and-select_catalog_role/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/55ea924d6d316a670e89006c04d6a0b6?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Neil</media:title>
		</media:content>
	</item>
		<item>
		<title>Application Code Level script</title>
		<link>http://oraganism.wordpress.com/2011/10/30/application-code-level-script/</link>
		<comments>http://oraganism.wordpress.com/2011/10/30/application-code-level-script/#comments</comments>
		<pubDate>Sun, 30 Oct 2011 20:57:02 +0000</pubDate>
		<dc:creator>Eter Pani</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[PL/SQL]]></category>
		<category><![CDATA[useful scripts]]></category>

		<guid isPermaLink="false">http://oraganism.wordpress.com/?p=1734</guid>
		<description><![CDATA[With patches and fixes delivered to different sites and applying to different testing, verification and production regions, there is a need for a simple way to compare database objects in the application schema without having database link between different databases. This can be challenging as the PL/SQL code is usually encrypted and database segments have [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=oraganism.wordpress.com&amp;blog=6580652&amp;post=1734&amp;subd=oraganism&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>With patches and fixes delivered to different sites and applying to different testing, verification and production regions, there is a need for a simple way to compare database objects in the application schema without having database link between different databases. This can be challenging as the PL/SQL code is usually encrypted and database segments have different storage attributes. Here I show the method to achieve this comparison.<br />
The reason why I think it would be interesting to public is that the problem is very common and up to day. There is no common white paper that helps to solve it. The only note that pretends to cover the topic is 781719.1 But it speaks only about PL/SQL objects that are not enough in a real world.<br />
The attached script use MD5 hashing algorithm to get hash value associated to the version of database object. The hashing CLOB can be get from DBMS_METADATA package or from DBA_SOURCE view for PL/SQL objects. The principals are very simple but there are few points that have been raised during development.<br />
1. The tables, indexes and e.t.c. with different storage configuration should generate the same hash. This issue has been solved by DBMS_METADATA.SET_TRANSFORM_PARAM<br />
2. The tables with different order of columns and constraints have to provide the same hash too. The solution was to use Simple XML format of DBMS_METADATA output and sorting the columns and constraints alphabetically using XML functions.<br />
3. The nested and index organise service tables are included into DBA_OBJECTS as TABLES but DBMS_METADATA include their description into the master objects but failed on servant items. My solution was to use DBA_TABLES view to segregate only high level objects.<br />
4. Java objects has no option to generate description in XML format thus we generate it in general DDL format.<br />
5. Role description should include grants that have been granted to the role. The DBMS_METADA does not include grants into generated description thus again the XML functions was used to get proper CLOB</p>
<p>The following privileges required for the user who run the script<br />
<code><br />
-- GRANT CREATE PROEDURE<br />
-- GRANT EXECUTE ON DBMS_CRYPTO<br />
-- GRANT EXECUTE ON DBMS_METADATE<br />
-- GRANT SELECT ON DBA_SOURCE<br />
-- GRANT SELECT ON DBA_SYS_PRIVS<br />
-- GRANT SELECT ON DBA_TAB_PRIVS<br />
-- GRANT SELECT ON DBA_ROLE_PRIVS</code></p>
<p>The following script take one parameter &#8211; the application schema name and provide as output list of database objects with corresponding hash values.<br />
<code></p>
<p>create or replace function verify_source(p_source_type in varchar2,<br />
              p_source_name in varchar2,<br />
              p_source_owner in varchar2) return varchar2 AUTHID CURRENT_USER as<br />
  code_source clob;<br />
  md5hash     varchar2(32);<br />
  v_h         NUMBER;         -- handle returned by OPEN<br />
  v_th      NUMBER;         -- handle returned by ADD_TRANSFORM<br />
begin<br />
   IF p_source_type in ('VIEW','ROLE','TABLE','INDEX'<br />
                       ,'MATERIALIZED_VIEW','MATERIALIZED_VIEW_LOG','SEQUENCE','SYNONYM') THEN<br />
     v_h := DBMS_METADATA.OPEN(p_source_type);<br />
     if p_source_type not in ('ROLE') THEN<br />
       DBMS_METADATA.SET_FILTER(v_h,'SCHEMA',p_source_owner);<br />
     END IF;<br />
     DBMS_METADATA.SET_FILTER(v_h,'NAME',p_source_name);<br />
     v_th := DBMS_METADATA.ADD_TRANSFORM(v_h,'SXML');<br />
     if p_source_type not in ('VIEW','ROLE') THEN<br />
       DBMS_METADATA.SET_TRANSFORM_PARAM (v_th,'SEGMENT_ATTRIBUTES',FALSE);<br />
       DBMS_METADATA.SET_TRANSFORM_PARAM (v_th,'STORAGE',FALSE);<br />
       DBMS_METADATA.SET_TRANSFORM_PARAM (v_th,'TABLESPACE',FALSE);<br />
       DBMS_METADATA.SET_TRANSFORM_PARAM (v_th,'PARTITIONING',FALSE);<br />
     END IF;<br />
     code_source := DBMS_METADATA.FETCH_CLOB(v_h);<br />
     IF p_source_type in ('TABLE') THEN<br />
       -- get rid off sorting misconfigurations<br />
        SELECT UPDATEXML(<br />
          UPDATEXML(SRC,'/TABLE/RELATIONAL_TABLE/COL_LIST',<br />
                 XMLELEMENT("COL_LIST", (<br />
                     XMLQuery (<br />
                        'for $i in /TABLE/RELATIONAL_TABLE/COL_LIST/COL_LIST_ITEM<br />
                        order by $i/NAME<br />
                        return $i'<br />
                        passing by value SRC<br />
                        RETURNING CONTENT<br />
                              )<br />
                           )             )<br />
                    ) ,'/TABLE/RELATIONAL_TABLE/FOREIGN_KEY_CONSTRAINT_LIST',<br />
                 XMLELEMENT("FOREIGN_KEY_CONSTRAINT_LIST", (<br />
                     XMLQuery (<br />
                        'for $i in<br />
/TABLE/RELATIONAL_TABLE/FOREIGN_KEY_CONSTRAINT_LIST/FOREIGN_KEY_CONSTRAINT_LIST_ITEM<br />
                        order by $i/NAME<br />
                        return $i'<br />
                        passing by value SRC<br />
                        RETURNING CONTENT<br />
                              )<br />
                           )             )<br />
                ).getClobVal()     INTO code_source<br />
        FROM (         SELECT XMLQuery(<br />
                    'declare function local:removeNS($e as element()) as element()<br />
                    {<br />
                      element { QName("", local-name($e)) }<br />
                      {<br />
                        for $i in $e/node()|$e/attribute::*<br />
                        return typeswitch ($i)<br />
                        case element() return local:removeNS($i)<br />
                        default return $i<br />
                      }<br />
                    }; (::)<br />
                    local:removeNS($SRC/child::*)'<br />
                    passing XMLType(code_source) as "SRC"<br />
                    returning content<br />
                        ) SRC<br />
           FROM dual)  INITSRC;<br />
     END IF;<br />
     DBMS_METADATA.CLOSE(v_h);<br />
   ELSIF p_source_type in ('PROCEDURE','FUNCTION','TYPE','TYPE BODY','TRIGGER','PACKAGE','PACKAGE BODY')<br />
THEN<br />
     code_source := '';<br />
     for source_record in (select text from dba_source where owner = upper(p_source_owner) and name =<br />
upper(p_source_name) and type = upper(p_source_type) order by line)<br />
     loop<br />
        code_source := code_source||source_record.text;<br />
     end  loop;<br />
   ELSIF p_source_type in ('JAVA_CLASS','JAVA_SOURCE') THEN<br />
     code_source := DBMS_METADATA.GET_DDL(p_source_type,p_source_name,upper(p_source_owner));<br />
   ELSIF p_source_type in ('ROLE') THEN<br />
        SELECT<br />
          INSERTCHILDXMLAFTER(SRC,'/ROLE','TYPE[1]',<br />
            (SELECT<br />
               XMLAgg(<br />
                 XMLELEMENT("privs",<br />
                   XMLFOREST(OWNER, TABLE_NAME, PRIVILEGE)))<br />
         FROM<br />
           (SELECT DISTINCT *<br />
             FROM (<br />
                SELECT OWNER, TABLE_NAME, PRIVILEGE<br />
                  FROM dba_tab_privs<br />
                 WHERE GRANTEE IN<br />
                                  (SELECT GRANTED_ROLE<br />
                                     FROM DBA_ROLE_PRIVS<br />
                	            START WITH GRANTEE=p_source_name<br />
                         	  CONNECT BY NOCYCLE PRIOR GRANTED_ROLE=GRANTEE<br />
                                    UNION ALL<br />
                                   SELECT p_source_name FROM DUAL)<br />
                 UNION ALL<br />
                SELECT NULL OWNER, PRIVILEGE TABLE_NAME, NULL PRIVILEGE<br />
                  FROM dba_sys_privs<br />
                 WHERE GRANTEE IN (SELECT GRANTED_ROLE<br />
                                     FROM DBA_ROLE_PRIVS<br />
                 	            START WITH GRANTEE=p_source_name<br />
         	                  CONNECT BY NOCYCLE PRIOR GRANTED_ROLE=GRANTEE<br />
                                    UNION ALL<br />
                                   SELECT p_source_name FROM DUAL))<br />
                 ORDER BY 1,2,3))).getClobVal()     INTO code_source<br />
        FROM (         SELECT XMLQuery(<br />
                    'declare function local:removeNS($e as element()) as element()<br />
                    {<br />
                      element { QName("", local-name($e)) }<br />
                      {<br />
                        for $i in $e/node()|$e/attribute::*<br />
                        return typeswitch ($i)<br />
                        case element() return local:removeNS($i)<br />
                        default return $i<br />
                      }<br />
                    }; (::)<br />
                    local:removeNS($SRC/child::*)'<br />
                    passing XMLType(code_source) as "SRC"<br />
                    returning content<br />
                        ) SRC<br />
           FROM dual)  INITSRC;<br />
   END IF;</p>
<p>   md5hash := rawtohex(dbms_crypto.hash(typ =&gt; dbms_crypto.HASH_MD5,<br />
                                        src =&gt; code_source));<br />
   return md5hash;<br />
exception<br />
  WHEN OTHERS THEN<br />
   return p_source_type||p_source_name;<br />
end;<br />
/<br />
show error</p>
<p>Spool code_level_checksum.lst<br />
set pagesize 5000<br />
set heading off<br />
set echo off<br />
set feedback off</p>
<p>col OBJECT_TYPE FORMAT a30<br />
col OBJECT_NAME FORMAT a30<br />
col HASHVAL FORMAT a35</p>
<p>prompt ###################################<br />
prompt #             TABLES              #<br />
prompt ###################################</p>
<p>SELECT 'TABLE' OBJECT_TYPE, TABLE_NAME OBJECT_NAME , verify_source('TABLE',TABLE_NAME, OWNER)<br />
HASHVAL<br />
FROM DBA_TABLES WHERE OWNER='&amp;1'<br />
AND IOT_NAME IS NULL<br />
order by 1,2<br />
/</p>
<p>prompt ###################################<br />
prompt #             INDEXES             #<br />
prompt ###################################</p>
<p>SELECT 'INDEX' OBJECT_TYPE, INDEX_NAME OBJECT_NAME , verify_source('INDEX',INDEX_NAME, OWNER)<br />
HASHVAL<br />
FROM DBA_INDEXES WHERE OWNER='&amp;1'<br />
order by 1,2<br />
/</p>
<p>prompt ###################################<br />
prompt #               ROLES             #<br />
prompt ###################################</p>
<p>SELECT 'ROLE' OBJECT_TYPE, ROLE OBJECT_NAME , verify_source('ROLE',ROLE, 'TCTDBS') HASHVAL<br />
FROM DBA_ROLES<br />
order by 1,2<br />
/</p>
<p>prompt ###################################<br />
prompt #           JAVA SOURCES          #<br />
prompt ###################################</p>
<p>select OBJECT_TYPE, OBJECT_NAME, verify_source('JAVA_SOURCE',OBJECT_NAME, OWNER) HASHVAL FROM<br />
dba_objects<br />
 WHERE OWNER='&amp;1' and OBJECT_TYPE IN ('JAVA SOURCE')<br />
order by 1,2<br />
/</p>
<p>prompt ###################################<br />
prompt #           JAVA CLASSES          #<br />
prompt ###################################</p>
<p>select 'JAVA_CLASS' OBJECT_TYPE, NAME OBJECT_NAME, verify_source('JAVA_CLASS',NAME, OWNER) HASHVAL<br />
FROM dba_java_classes<br />
 WHERE OWNER='&amp;1'<br />
order by 1,2<br />
/</p>
<p>prompt ###################################<br />
prompt #               MISC              #<br />
prompt ###################################</p>
<p>select OBJECT_TYPE, OBJECT_NAME, verify_source(OBJECT_TYPE,OBJECT_NAME, OWNER) HASHVAL FROM<br />
dba_objects<br />
 WHERE OWNER='&amp;1' and OBJECT_TYPE IN ('PROCEDURE','FUNCTION','TYPE','TYPE<br />
BODY','TRIGGER','VIEW','MATERIALIZED_VIEW','MATERIALIZED_VIEW_LOG','SEQUENCE','SYNONYM','PACKAGE','PACKAG<br />
E BODY')<br />
order by 1,2<br />
/</p>
<p>spool off;</p>
<p>drop function verify_source<br />
/<br />
</code></p>
<p>Hope you will find it usefull.</p>
<p>The output from this script can be compared as simple flat file using any favorite comparison tool, e.g. <a href="http://winmerge.org/">WinMerge</a>.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/oraganism.wordpress.com/1734/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/oraganism.wordpress.com/1734/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/oraganism.wordpress.com/1734/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/oraganism.wordpress.com/1734/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/oraganism.wordpress.com/1734/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/oraganism.wordpress.com/1734/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/oraganism.wordpress.com/1734/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/oraganism.wordpress.com/1734/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/oraganism.wordpress.com/1734/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/oraganism.wordpress.com/1734/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/oraganism.wordpress.com/1734/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/oraganism.wordpress.com/1734/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/oraganism.wordpress.com/1734/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/oraganism.wordpress.com/1734/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=oraganism.wordpress.com&amp;blog=6580652&amp;post=1734&amp;subd=oraganism&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://oraganism.wordpress.com/2011/10/30/application-code-level-script/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/86cd31c275ead197c6278bc0980689ed?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">eterpani</media:title>
		</media:content>
	</item>
		<item>
		<title>LFPW Parameters</title>
		<link>http://oraganism.wordpress.com/2011/10/14/lfpw-parameters/</link>
		<comments>http://oraganism.wordpress.com/2011/10/14/lfpw-parameters/#comments</comments>
		<pubDate>Fri, 14 Oct 2011 14:06:38 +0000</pubDate>
		<dc:creator>Martin Nash</dc:creator>
				<category><![CDATA[Oracle]]></category>
		<category><![CDATA[blocks]]></category>
		<category><![CDATA[log file parallel write]]></category>
		<category><![CDATA[requests]]></category>

		<guid isPermaLink="false">http://oraganism.wordpress.com/?p=1704</guid>
		<description><![CDATA[During some recent investigations into &#8220;log file parallel write&#8221; (LFPW) performance I found myself looking at the Oracle 11.2 Database Reference and wondering about P2 of this wait event. In case you&#8217;re not familiar with the parameters they are: Parameter Description ------------ ------------------------------ files Number of files to be written blocks Number of blocks to [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=oraganism.wordpress.com&amp;blog=6580652&amp;post=1704&amp;subd=oraganism&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>During some recent investigations into &#8220;log file parallel write&#8221; (LFPW) performance I found myself looking at the <a href="http://download.oracle.com/docs/cd/E11882_01/server.112/e25513/waitevents003.htm#sthref3993">Oracle 11.2 Database Reference</a> and wondering about P2 of this wait event. In case you&#8217;re not familiar with the parameters they are:</p>
<pre>Parameter     Description
------------  ------------------------------
files         Number of files to be written
blocks        Number of blocks to be written
requests      Number of I/O requests
------------  ------------------------------</pre>
<p>File is obvious, the number of log file members in the current redo log group, but for the other two parameters I wasn&#8217;t sure if it is the number of blocks/request per file or in total. I assumed total, but wanted to be sure so did a quick bit of searching. This led me to <a href="http://oradbpedia.com/wiki/Wait_Events_-_log_file_parallel_write">OraDBPedia</a> where I read,</p>
<blockquote><p>P2=The number of redo blocks to be written to each log member.</p></blockquote>
<p>and</p>
<blockquote><p>P3=Total number of I/O requests needed to satisfy the write load (i.e. P2).</p></blockquote>
<p>For whatever reason, I didn&#8217;t feel 100% happy to accept this so did a quick test in 11.2.0.2 XE as shown below.</p>
<p>Test Details:</p>
<ol>
<li>Enable tracing of LGWR</li>
<li>Run &#8220;alter system switch logfile&#8221; to cause LGWR to flush the redo buffer (not shown in output below)</li>
<li>Run small insert statement</li>
<li>Commit</li>
<li>Examine trace file</li>
</ol>
<p>Starting off with the default in XE of 1 member per group:</p>
<p><pre class="brush: plain; light: true;">
14:01:19 SQL&gt; insert into t (c1, c2, c3) values (1,'DELETE', sysdate);

1 row created.

14:01:23 SQL&gt; commit;

Commit complete.

14:01:27 SQL&gt;
</pre></p>
<p>Looking at the 10046 trace reveals:</p>
<p><pre class="brush: plain; highlight: [2]; light: true;">
*** 2011-09-29 14:01:27.315
WAIT #0: nam='log file parallel write' ela= 374 files=1 blocks=2 requests=1 obj#=-1 tim=1481335308118
</pre></p>
<p>Adding another member to each of the 2 groups giving 2 members per group:</p>
<p><pre class="brush: plain; light: true;">
14:01:27 SQL&gt; insert into t (c1, c2, c3) values (1,'DELETE', sysdate);

1 row created.

14:04:48 SQL&gt; commit;

Commit complete.

14:04:53 SQL&gt;
</pre></p>
<p>Looking at the 10046 trace reveals:</p>
<p><pre class="brush: plain; highlight: [5]; light: true;">
*** 2011-09-29 14:04:52.477
WAIT #0: nam='rdbms ipc message' ela= 2969787 timeout=300 p2=0 p3=0 obj#=-1 tim=1481538543689
WAIT #0: nam='rdbms ipc message' ela= 30043 timeout=3 p2=0 p3=0 obj#=-1 tim=1481538574024
WAIT #0: nam='rdbms ipc message' ela= 567670 timeout=300 p2=0 p3=0 obj#=-1 tim=1481539141991
WAIT #0: nam='log file parallel write' ela= 550 files=2 blocks=4 requests=2 obj#=-1 tim=1481539142779
</pre></p>
<p>Adding another member to each of the 2 groups giving 3 members per group:</p>
<p><pre class="brush: plain; light: true;">
14:04:53 SQL&gt; insert into t (c1, c2, c3) values (1,'DELETE', sysdate);

1 row created.

14:07:51 SQL&gt; commit;

Commit complete.

14:07:53 SQL&gt;
</pre></p>
<p>Looking at the 10046 trace reveals:</p>
<p><pre class="brush: plain; highlight: [3]; light: true;">
*** 2011-09-29 14:07:53.980
WAIT #0: nam='rdbms ipc message' ela= 2560082 timeout=300 p2=0 p3=0 obj#=-1 tim=1481718344261
WAIT #0: nam='log file parallel write' ela= 1658 files=3 blocks=6 requests=3 obj#=-1 tim=1481718346216
WAIT #0: nam='rdbms ipc message' ela= 438069 timeout=44 p2=0 p3=0 obj#=-1 tim=1481718784548
</pre></p>
<p>Adding another member to each of the 2 groups giving 4 members per group:</p>
<p><pre class="brush: plain; light: true;">
14:07:53 SQL&gt; insert into t (c1, c2, c3) values (1,'DELETE', sysdate);

1 row created.

14:09:48 SQL&gt; commit;

Commit complete.

14:09:51 SQL&gt;
</pre></p>
<p>Looking at the 10046 trace reveals:</p>
<p><pre class="brush: plain; highlight: [3]; light: true;">
*** 2011-09-29 14:09:51.687
WAIT #0: nam='rdbms ipc message' ela= 1445500 timeout=300 p2=0 p3=0 obj#=-1 tim=1481834980859
WAIT #0: nam='log file parallel write' ela= 1910 files=4 blocks=8 requests=4 obj#=-1 tim=1481834983045
</pre></p>
<p>I see the above a conclusive evidence that both blocks (p2) and requests (p3) are the total rather than &#8220;per file&#8221;.</p>
<p>Maybe things have changed since the OraDBPedia articles was originally written, but I&#8217;ve contacted the guys behind the site and expect the page to be updated shortly.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/oraganism.wordpress.com/1704/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/oraganism.wordpress.com/1704/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/oraganism.wordpress.com/1704/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/oraganism.wordpress.com/1704/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/oraganism.wordpress.com/1704/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/oraganism.wordpress.com/1704/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/oraganism.wordpress.com/1704/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/oraganism.wordpress.com/1704/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/oraganism.wordpress.com/1704/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/oraganism.wordpress.com/1704/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/oraganism.wordpress.com/1704/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/oraganism.wordpress.com/1704/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/oraganism.wordpress.com/1704/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/oraganism.wordpress.com/1704/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=oraganism.wordpress.com&amp;blog=6580652&amp;post=1704&amp;subd=oraganism&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://oraganism.wordpress.com/2011/10/14/lfpw-parameters/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/7622f90e733399a783530d01fe3a9bb3?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">martinpaulnash</media:title>
		</media:content>
	</item>
		<item>
		<title>OOW11: The Come Down</title>
		<link>http://oraganism.wordpress.com/2011/10/09/oow11/</link>
		<comments>http://oraganism.wordpress.com/2011/10/09/oow11/#comments</comments>
		<pubDate>Sun, 09 Oct 2011 02:08:25 +0000</pubDate>
		<dc:creator>Martin Nash</dc:creator>
				<category><![CDATA[Oracle]]></category>
		<category><![CDATA[oow11]]></category>

		<guid isPermaLink="false">http://oraganism.wordpress.com/?p=1685</guid>
		<description><![CDATA[I&#8217;m on the way back to London. Having had a great time at OpenWorld and fantastic weather the last two days (plus the use of the Pythian Moon Dog) I feel a bit down to be leaving San Francisco&#8230; A few comments about my last post before I get into this one: DTrace support in Linux [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=oraganism.wordpress.com&amp;blog=6580652&amp;post=1685&amp;subd=oraganism&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m on the way back to London. Having had a great time at OpenWorld and fantastic weather the last two days (plus the use of the <a title="Pythian Moon Dog" href="http://yfrog.com/z/ntxtxgpj">Pythian Moon Dog</a>) I feel a bit down to be leaving San Francisco&#8230;</p>
<p>A few comments about my last post before I get into this one:</p>
<ol>
<li>DTrace support in Linux was deliberately missed off the list as it was conveyed in the Oracle Linux 6 session I attended that it was not production ready.</li>
<li>I&#8217;m an Oracle database geek. The other sessions I attended were not bad, but as someone that spends a lot of time trying to learn as much as possible about the Oracle database server, when I attend a presentation on a subject I&#8217;m much less familiar, but also very keen on, I tend to get a lot out of it &#8211; The point is, don&#8217;t get the impression that the other sessions were not good.</li>
</ol>
<p>This was my 3rd OpenWorld and the best experience for me by far. There are a number of factors contributing to that including an apparent increase in the number of technical sessions (necessary as Unconference was not run this year). I highly recommend attending OpenWorld. It is a different experience from the only other Oracle focused conference I&#8217;ve attended (<a href="http://techandebs.ukoug.org/">UKOUG Conference</a>), but they are both great from my point of view, which is why I plan to continue attending both&#8230; And hopefully getting to some more <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>Reasons to consider attending OpenWorld:</p>
<ol>
<li>The speakers are absolutely top notch &#8211; There are too many names to &#8220;drop&#8221; here, but you really do have the best independent and Oracle employed experts</li>
<li>The evening events provide an opportunity to meet like-minded people, and &#8220;talk tech&#8221;</li>
<li>You are there to hear the latest hardware and software releases as they happen</li>
<li>It&#8217;s in San Francisco!</li>
</ol>
<p>Anyone that follows me on Twitter may have noticed that I was <a href="https://twitter.com/#!/martinpaulnash/status/121990974045036544">very impressed</a> by what I saw of <a href="http://download.oracle.com/docs/cd/E24628_01/index.htm">Oracle Enterprise Manager 12c</a> &#8220;Cloud Control&#8221;. While watching the presentation I planned to get it installed on a VM as soon as I got back to the UK. Martin Bach was clearly as keen as I am and he&#8217;s posted details of his install <a href="http://martincarstenbach.wordpress.com/2011/10/07/installing-oracle-enterprise-manager-12c-on-ol-5-7/">here</a>. Boy, that man&#8217;s fast. 11.2.0.3 installed about as fast as humanly possible after the release and pretty much the same with this &#8211; Nice work Martin <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>Boarding call!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/oraganism.wordpress.com/1685/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/oraganism.wordpress.com/1685/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/oraganism.wordpress.com/1685/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/oraganism.wordpress.com/1685/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/oraganism.wordpress.com/1685/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/oraganism.wordpress.com/1685/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/oraganism.wordpress.com/1685/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/oraganism.wordpress.com/1685/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/oraganism.wordpress.com/1685/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/oraganism.wordpress.com/1685/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/oraganism.wordpress.com/1685/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/oraganism.wordpress.com/1685/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/oraganism.wordpress.com/1685/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/oraganism.wordpress.com/1685/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=oraganism.wordpress.com&amp;blog=6580652&amp;post=1685&amp;subd=oraganism&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://oraganism.wordpress.com/2011/10/09/oow11/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/7622f90e733399a783530d01fe3a9bb3?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">martinpaulnash</media:title>
		</media:content>
	</item>
		<item>
		<title>OOW11: Best Session So Far</title>
		<link>http://oraganism.wordpress.com/2011/10/05/oow11-best-session-so-far/</link>
		<comments>http://oraganism.wordpress.com/2011/10/05/oow11-best-session-so-far/#comments</comments>
		<pubDate>Wed, 05 Oct 2011 16:12:07 +0000</pubDate>
		<dc:creator>Martin Nash</dc:creator>
				<category><![CDATA[Oracle]]></category>
		<category><![CDATA[linux 6]]></category>
		<category><![CDATA[oow11]]></category>

		<guid isPermaLink="false">http://oraganism.wordpress.com/?p=1669</guid>
		<description><![CDATA[I&#8217;ve been a little slack getting my words down with respect to OpenWorld 2011 so far. There are many others faster at getting the news out as it breaks, so I won&#8217;t even try to cover the big announcements. You can find that elsewhere. Without a doubt the session that got me most excited so [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=oraganism.wordpress.com&amp;blog=6580652&amp;post=1669&amp;subd=oraganism&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been a little slack getting my words down with respect to OpenWorld 2011 so far. There are many others faster at getting the news out as it breaks, so I won&#8217;t even try to cover the big announcements. You can find that elsewhere.</p>
<p>Without a doubt the session that got me most excited so far was &#8220;Overview: New Features in Oracle Linux 6&#8243;. I&#8217;m a DBA, but take a very keen interest in Linux. I&#8217;ve been choosing Oracle Enterprise Linux (note that it has actually been renamed as Oracle Linux now) as my OS of choice for pretty much everything I do in my personal lab environment, not just for database servers. This is something that a couple of my Linux geek friends have questioned. They have extolled the joys of Debian and criticised Oracle for being lazy with Linux &#8211; &#8220;Just taking Red Hat and re-branding it.&#8221; I really wished they&#8217;d been in this session. I came away with a very strong impression that Oracle really do care about Linux, they do invest in Linux and they have some very smart guys onboard who really know what they are doing. It&#8217;s hard for me to cover everything that was discussed during the session here, but here&#8217;s an attempt to summarise:</p>
<ol>
<li>Oracle Linux is not a desktop distribution &#8211; Obvious, but worth stating</li>
<li>Focus is on the kernel &#8211; Hence Unbreakable Enterprise Kernel</li>
<li>Aim to stay close to the mainline as possible &#8211; Aim to release around once a year</li>
<li>9 month grace before expecting the new kernel to be used</li>
<li>Network optimisation such as receive packet steering (RPS) and transmit packet steering (XPS) sound very significant</li>
<li>Oracle Linux 6.2 is beta now or very very soon &#8211; This is wrong (see comment from Lenz below)</li>
<li><a href="http://oss.oracle.com/projects/tmem/">Transcendent Memory</a></li>
<li><a href="http://oss.oracle.com/projects/btrfs/">Btrfs</a> &#8211; &#8220;Build around snapshots&#8221; (Chris Mason)</li>
<li>Task Control Groups (<a href="http://en.wikipedia.org/wiki/Cgroups">Cgroups</a>) &#8211; Offer fine grained control of resources and particularly useful for NUMA systems</li>
<li>Linux Containers &#8211; Yes, that&#8217;s right</li>
<li><a href="http://www.ksplice.com/">Ksplice</a> &#8211; Patch your kernel with zero downtime&#8230; Oh, and you can rollback with no downtime too</li>
</ol>
<p>If you do nothing else after reading this post then checkout Ksplice! Read the official site and this on <a href="http://en.wikipedia.org/wiki/Ksplice">wikipedia</a></p>
<p>I should stress that there was the usual disclaimer about the information provided and there is always the possibility that I&#8217;ve misrepresented what was said, so do additional research before making big decisions based on the above.</p>
<p>Also mentioned was <a href="http://openvswitch.org/">Open vSwitch</a> which sounds like something I should look into.</p>
<p>While writing this I have been prompted to think about what matter to me with respect to Linux and I&#8217;ve concluded that exactly how much money (by paying kernel developers) Oracle have put into the Linux kernel is something that I don&#8217;t have the time or inclination to work out. What matters to me is that Linux is developing, Oracle are contributing and Oracle provide me with a completely free version that I can use in my lab for database servers and anything else I want to do.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/oraganism.wordpress.com/1669/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/oraganism.wordpress.com/1669/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/oraganism.wordpress.com/1669/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/oraganism.wordpress.com/1669/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/oraganism.wordpress.com/1669/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/oraganism.wordpress.com/1669/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/oraganism.wordpress.com/1669/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/oraganism.wordpress.com/1669/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/oraganism.wordpress.com/1669/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/oraganism.wordpress.com/1669/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/oraganism.wordpress.com/1669/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/oraganism.wordpress.com/1669/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/oraganism.wordpress.com/1669/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/oraganism.wordpress.com/1669/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=oraganism.wordpress.com&amp;blog=6580652&amp;post=1669&amp;subd=oraganism&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://oraganism.wordpress.com/2011/10/05/oow11-best-session-so-far/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/7622f90e733399a783530d01fe3a9bb3?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">martinpaulnash</media:title>
		</media:content>
	</item>
		<item>
		<title>Ad-hoc Users and Undo Usage</title>
		<link>http://oraganism.wordpress.com/2011/09/28/ad-hoc-users-and-undo-usage/</link>
		<comments>http://oraganism.wordpress.com/2011/09/28/ad-hoc-users-and-undo-usage/#comments</comments>
		<pubDate>Wed, 28 Sep 2011 21:09:15 +0000</pubDate>
		<dc:creator>Neil Johnson</dc:creator>
				<category><![CDATA[Oracle]]></category>
		<category><![CDATA[ORA-1555]]></category>
		<category><![CDATA[snapshot too old]]></category>
		<category><![CDATA[undo]]></category>

		<guid isPermaLink="false">http://oraganism.wordpress.com/?p=1651</guid>
		<description><![CDATA[Here is a quote from the Oracle Documentation about V$UNDOSTAT.MAXQUERYLEN: MAXQUERYLEN NUMBER Identifies the length of the longest query (in seconds) executed in the instance during the period. You can use this statistic to estimate the proper setting of the UNDO_RETENTION initialization parameter. The length of a query is measured from the cursor open time [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=oraganism.wordpress.com&amp;blog=6580652&amp;post=1651&amp;subd=oraganism&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Here is a quote from the <a href="http://download.oracle.com/docs/cd/B19306_01/server.102/b14237/dynviews_2174.htm#i1422075" title="Oracle Documentation">Oracle Documentation</a> about V$UNDOSTAT.MAXQUERYLEN:</p>
<blockquote><p>MAXQUERYLEN 	NUMBER 	Identifies the length of the longest query (in seconds) executed in the instance during the period. You can use this statistic to estimate the proper setting of the UNDO_RETENTION initialization parameter. The length of a query is measured from the cursor open time to the last fetch/execute time of the cursor. Only the length of those cursors that have been fetched/executed during the period are reflected in the view.</p></blockquote>
<p>And here is a quote from My Oracle Support note &#8220;V$UNDOSTAT MAXQUERYLEN Suddenly Appears With a High Value For a Simple Query [ID 1307600.1]&#8220;</p>
<blockquote><p>the MAXQUERYLEN value is defined as &#8220;the length of a query measured from the cursor open time to the last fetch/execute time of the cursor&#8221;.  Hence if the cursor is suspended (e.g. dbms_lock.sleep) or the session is switched out (session switching) then the MAXQUERYLEN time will continue to increase but will not be show as no current execution/fetch is occurring on the cursor.  </p>
<p>&#8230;</p>
<p>This is expected behaviour</p></blockquote>
<p>Nothing wrong with any of this but it is all relevant to the test that follows. In order to set up the test I change my local database to have a small undo tablespace and generate some workload. I&#8217;ve collapsed the code in case you want to jump straight to the story, in summary it generates some transactions and random queries with a duration between 1 and 10 minutes.</p>
<p><pre class="brush: plain; collapse: true; gutter: false; light: false; toolbar: true;">
alter system set undo_tablespace = undo scope=both sid='*';

create undo tablespace undo_small 
datafile 'C:\ORACLEXE\ORADATA\XE\UNDO_SMALL.DBF' size 30m reuse autoextend on maxsize 500m;

alter system set undo_tablespace = undo_small scope=both sid='*';

create or replace function slow_query(i_seconds_to_wait in number)
	return number
as
	l_n number;
	l_pad2 bigtab.pad2%TYPE;

	cursor c_bigtab is
		select pad2 from bigtab; 
begin
	open c_bigtab;
	fetch c_bigtab into l_pad2;

	sys.dbms_lock.sleep(i_seconds_to_wait);
	
	fetch c_bigtab into l_pad2;
	close c_bigtab;

	return i_seconds_to_wait;
end slow_query;
/

-- session #1 - generate trxns

declare
	L_rno number;
	L_i number;
	L_pad1 bigtab.pad1%TYPE;
begin
	while true loop
		L_i := L_i + 1;
		L_rno := round(dbms_random.value(1,1000000));

		update bigtab
		set pad1 = pad1 where rno = L_rno;

		commit;

		dbms_lock.sleep(0.01);
	end loop;
end;
/

-- session #2 - generate queries of random length betwen 1 min and 10 mins

declare
	l_sleep number;
	l_slept number;
begin
	while true loop
		l_sleep := round(dbms_random.value(60,600));

		select slow_query(l_sleep) into l_slept from dual;
	end loop;
end;
/
</pre></p>
<p>Output from V$UNDOSTAT after the background workload has been running for a while is below along with the current size of the undo tablespace.</p>
<p><pre class="brush: plain; gutter: false;">
END_TIME_CHAR          TXNCOUNT MAXQUERYLEN MAXQUERYID    ACTIVEBLKS UNEXPIREDBLKS EXPIREDBLKS TUNED_UNDORETENTION
-------------------- ---------- ----------- ------------- ---------- ------------- ----------- -------------------
28-SEP-2011 19:45:50      38118         584 200k2np23z57q        160           912         496             1425
28-SEP-2011 19:55:50      38404         452 200k2np23z57q        160          1120        1280             1292
28-SEP-2011 20:05:50      38507         479 200k2np23z57q        160          1704        1464             1320
28-SEP-2011 20:15:50      38340         383 200k2np23z57q        160          2656         496             1224

   FILE_ID FILE_NAME                                             MB
---------- --------------------------------------------- ----------
         5 C:\ORACLEXE\ORADATA\XE\UNDO_SMALL.DBF                 30
</pre></p>
<p>Now a simple query is executed from SQL Developer and the first set of rows is fetched. V$SESSION output below.</p>
<p><pre class="brush: plain; gutter: false;">
SQL&gt; select username,program,status,state,event,sql_id,seconds_in_wait siw
  2  from v$session
  3  where username = 'ADHOC';

USERNAME PROGRAM         STATUS   STATE               EVENT                       SQL_ID               SIW
-------- --------------- -------- ------------------- --------------------------- ------------- ----------
ADHOC    SQL Developer   INACTIVE WAITING             SQL*Net message from client 6fwqzurbc8y7k       7

SQL&gt; select sql_text from v$sql where sql_id = '6fwqzurbc8y7k';

SQL_TEXT
-----------------------------------------------------------------------
select * from bigtab
</pre></p>
<p>Another quote from the <a href="http://download.oracle.com/docs/cd/B19306_01/server.102/b14237/dynviews_2088.htm#i1414383" title="Oracle Documentation on SQL_ID">Oracle Documentation</a></p>
<blockquote><p>SQL_ID 	VARCHAR2(13) 	SQL identifier of the SQL statement that is currently being executed</p></blockquote>
<p>You can see from the V$SESSION output above that we have a SQL ID and therefore must be executing some SQL. But we also have a session status of &#8220;INACTIVE&#8221; and are waiting on event &#8220;SQL*Net message from client&#8221;. That is a nice way of spotting sessions that are similar to the focus of this post.</p>
<p>Around 15 minutes later the session is still waiting on the user to act and V$UNDOSTAT looks consistent with my steady state.</p>
<p><pre class="brush: plain; gutter: false;">
USERNAME PROGRAM         STATUS   STATE               EVENT                       SQL_ID               SIW
-------- --------------- -------- ------------------- --------------------------- ------------- ----------
ADHOC    SQL Developer   INACTIVE WAITING             SQL*Net message from client 6fwqzurbc8y7k        912

END_TIME_CHAR          TXNCOUNT MAXQUERYLEN MAXQUERYID    ACTIVEBLKS UNEXPIREDBLKS EXPIREDBLKS TUNED_UNDORETENTION
-------------------- ---------- ----------- ------------- ---------- ------------- ----------- -------------------
28-SEP-2011 19:45:50      38118         584 200k2np23z57q        160           912         496             1425
28-SEP-2011 19:55:50      38404         452 200k2np23z57q        160          1120        1280             1292
28-SEP-2011 20:05:50      38507         479 200k2np23z57q        160          1704        1464             1320
28-SEP-2011 20:15:50      38340         383 200k2np23z57q        160          2656         496             1224
28-SEP-2011 20:25:50      38557         985 200k2np23z57q        160          2592         816             1825
28-SEP-2011 20:31:28      20492         866 200k2np23z57q        160          2592         816             1706
</pre></p>
<p>We now fetch the next set of records and check V$SESSION and V$UNDOSTAT again.</p>
<p><pre class="brush: plain; gutter: false; highlight: [12];">
USERNAME PROGRAM         STATUS   STATE               EVENT                       SQL_ID               SIW
-------- --------------- -------- ------------------- --------------------------- ------------- ----------
ADHOC    SQL Developer   INACTIVE WAITING             SQL*Net message from client 6fwqzurbc8y7k      35

END_TIME_CHAR          TXNCOUNT MAXQUERYLEN MAXQUERYID    ACTIVEBLKS UNEXPIREDBLKS EXPIREDBLKS TUNED_UNDORETENTION
-------------------- ---------- ----------- ------------- ---------- ------------- ----------- -------------------
28-SEP-2011 19:45:50      38118         584 200k2np23z57q        160           912         496             1425
28-SEP-2011 19:55:50      38404         452 200k2np23z57q        160          1120        1280             1292
28-SEP-2011 20:05:50      38507         479 200k2np23z57q        160          1704        1464             1320
28-SEP-2011 20:15:50      38340         383 200k2np23z57q        160          2656         496             1224
28-SEP-2011 20:25:50      38557         985 200k2np23z57q        160          2592         816             1825
28-SEP-2011 20:32:49      26370         992 6fwqzurbc8y7k        160          2592         816             1766
</pre></p>
<p>V$UNDOSTAT.MAXQUERYID is now that of the SQL Developer session. What if an extra 10 minutes had elapsed?</p>
<p>10 minutes later&#8230;</p>
<p><pre class="brush: plain; gutter: false; highlight: [9];">
END_TIME_CHAR          TXNCOUNT MAXQUERYLEN MAXQUERYID    ACTIVEBLKS UNEXPIREDBLKS EXPIREDBLKS TUNED_UNDORETENTION
-------------------- ---------- ----------- ------------- ---------- ------------- ----------- -------------------
28-SEP-2011 19:45:50      38118         584 200k2np23z57q        160           912         496             1425
28-SEP-2011 19:55:50      38404         452 200k2np23z57q        160          1120        1280             1292
28-SEP-2011 20:05:50      38507         479 200k2np23z57q        160          1704        1464             1320
28-SEP-2011 20:15:50      38340         383 200k2np23z57q        160          2656         496             1224
28-SEP-2011 20:25:50      38557         985 200k2np23z57q        160          2592         816             1825
28-SEP-2011 20:35:50      41787         992 6fwqzurbc8y7k        160          3440         688             1833
28-SEP-2011 20:41:31      20088        1293 6fwqzurbc8y7k        160          3440         688             2134
</pre></p>
<p>The TUNED_UNDORETENTION is starting to climb but the number of expired blocks is unchanged because our UNDO tablespace is extending &#8211; it is now at 42M.</p>
<p><pre class="brush: plain; gutter: false;">
   FILE_ID FILE_NAME                                             MB
---------- --------------------------------------------- ----------
         5 C:\ORACLEXE\ORADATA\XE\UNDO_SMALL.DBF                 42
</pre></p>
<p>So let&#8217;s prevent it from extending and wait another 10 minutes before fetching the next set of rows.</p>
<p><pre class="brush: plain; gutter: false; highlight: [10];">
alter database datafile 5 autoextend off;

END_TIME_CHAR          TXNCOUNT MAXQUERYLEN MAXQUERYID    ACTIVEBLKS UNEXPIREDBLKS EXPIREDBLKS TUNED_UNDORETENTION
-------------------- ---------- ----------- ------------- ---------- ------------- ----------- -------------------
28-SEP-2011 20:05:50      38507         479 200k2np23z57q        160          1704        1464             1320
28-SEP-2011 20:15:50      38340         383 200k2np23z57q        160          2656         496             1224
28-SEP-2011 20:25:50      38557         985 200k2np23z57q        160          2592         816             1825
28-SEP-2011 20:35:50      41787         992 6fwqzurbc8y7k        160          3440         688             1833
28-SEP-2011 20:45:50      41534        1594 6fwqzurbc8y7k        160          4608         576             2752
28-SEP-2011 20:55:50      44669        2196 6fwqzurbc8y7k        160          5200         264             2766
</pre></p>
<p>We can see that the number of expired blocks is falling and the number of un-expired blocks is rising. 10 minutes later I click to fetch the next set of records and&#8230;</p>
<p><pre class="brush: plain; gutter: false;">

ORA-01555: snapshot too old: rollback segment number 17 with name &quot;_SYSSMU17$&quot; too small
01555. 00000 -  &quot;snapshot too old: rollback segment number %s with name \&quot;%s\&quot; too small&quot;
*Cause:    rollback records needed by a reader for consistent read are
           overwritten by other writers
*Action:   If in Automatic Undo Management mode, increase undo_retention
           setting. Otherwise, use larger rollback segments

</pre></p>
<p>That was only after 35-40 minutes &#8211; well within reach of a normal trip to the canteen (admittedly my undo tablespace is sized modestly in order to help me prove a point).</p>
<p>So, here, in reverse order, are my top 3 undo related threats when giving read only access via a tool such as SQL Developer or Toad to application support staff (even though they have the best of intentions).</p>
<p><em>#3 Undo tablespace pressure.</em><br />
Unbeknownst to the ad-hoc user he can quite easily cause pressure on the undo tablespace causing an AUTOEXTEND file to grow purely to satisfy their next page of data.</p>
<p><em>#2 Undo tablespace alerts</em><br />
For undo tablespaces with <strong>no</strong> AUTOEXTEND files Grid Control or some other monitoring tool will alert as the number of unexpired blocks starts to fall causing unnecessary (albeit low priority) work for your first line DBAs.</p>
<p><em>#1 ORA-1555</em><br />
For undo tablespaces with <strong>no</strong> AUTOEXTEND files and either a sufficiently high transaction rate or sufficiently high gap between page 1 and page <em>X</em> of our ad-hoc user&#8217;s query we may find that the undo required to construct page <em>X</em> has been overwritten. The user gets ORA-1555, thinks &#8220;no harm done&#8221; and re-starts the query. However the alert log now contains something like below and an alert is fired shortly afterwards. </p>
<p><pre class="brush: plain; gutter: false;">
Wed Sep 28 21:14:48 2011
ORA-01555 caused by SQL statement below (SQL ID: 6fwqzurbc8y7k, Query Duration=3538 sec, SCN: 0x0000.001aad4e):
</pre></p>
<p>If the hour is late and the company is pretty twitchy then this could involve someone getting out of bed to investigate a potentially failed batch run.</p>
<p>Have I missed any undo related threats?</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/oraganism.wordpress.com/1651/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/oraganism.wordpress.com/1651/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/oraganism.wordpress.com/1651/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/oraganism.wordpress.com/1651/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/oraganism.wordpress.com/1651/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/oraganism.wordpress.com/1651/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/oraganism.wordpress.com/1651/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/oraganism.wordpress.com/1651/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/oraganism.wordpress.com/1651/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/oraganism.wordpress.com/1651/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/oraganism.wordpress.com/1651/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/oraganism.wordpress.com/1651/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/oraganism.wordpress.com/1651/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/oraganism.wordpress.com/1651/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=oraganism.wordpress.com&amp;blog=6580652&amp;post=1651&amp;subd=oraganism&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://oraganism.wordpress.com/2011/09/28/ad-hoc-users-and-undo-usage/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/55ea924d6d316a670e89006c04d6a0b6?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Neil</media:title>
		</media:content>
	</item>
		<item>
		<title>Setting SDU Size (mainly in 11.2)</title>
		<link>http://oraganism.wordpress.com/2011/09/24/setting-sdu-size-mainly-in-11-2/</link>
		<comments>http://oraganism.wordpress.com/2011/09/24/setting-sdu-size-mainly-in-11-2/#comments</comments>
		<pubDate>Sat, 24 Sep 2011 11:46:09 +0000</pubDate>
		<dc:creator>Martin Nash</dc:creator>
				<category><![CDATA[Oracle]]></category>
		<category><![CDATA[listener.ora]]></category>
		<category><![CDATA[SDU]]></category>
		<category><![CDATA[SDU size]]></category>
		<category><![CDATA[sqlnet.ora]]></category>
		<category><![CDATA[tnsnames.ora]]></category>

		<guid isPermaLink="false">http://oraganism.wordpress.com/?p=1589</guid>
		<description><![CDATA[I&#8217;ve recently had some problems getting a change in SDU size to be picked up and I&#8217;m writing this post in the hope of saving others some time. Changing the SDU size is something to consider if you want to get the most out of your network. The situations where it will offer a notable [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=oraganism.wordpress.com&amp;blog=6580652&amp;post=1589&amp;subd=oraganism&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve recently had some problems getting a change in SDU size to be picked up and I&#8217;m writing this post in the hope of saving others some time.</p>
<p>Changing the SDU size is something to consider if you want to get the most out of your network. The situations where it will offer a notable benefit are covered in <a href="https://support.oracle.com/CSP/main/article?cmd=show&amp;type=NOT&amp;doctype=BULLETIN&amp;id=99715.1">MOS ID 99715.1</a><sup><a href="#footer1">[1]</a></sup>.</p>
<p>The 11.2 <a href="http://download.oracle.com/docs/cd/E14072_01/network.112/e10836/performance.htm#i1006332">Net Services Administrator&#8217;s Guide</a> and <a href="https://support.oracle.com/CSP/main/article?cmd=show&amp;type=NOT&amp;doctype=BULLETIN&amp;id=67983.1">MOS ID 67983.1</a> (Oracle Net Performance Tuning, which applies to &#8220;Oracle Net Services &#8211; Version: 8.1.7.4.0 to 11.2.0.1 &#8211; Release: 8.1.7 to 11.2&#8243;), both list two ways of setting SDU size. One method involves setting SDU in listener.ora (for a statically registered listeners) and the other setting it in sqlnet.ora.</p>
<p>The documentation also states:</p>
<blockquote><p>If you have configured the listener with a list of targets in the listener.ora file, then the value for SDU in the SID_LIST element overrides the current setting in the sqlnet.ora file when using dedicated server processes.</p></blockquote>
<p>There is a caveat in the &#8220;Purpose&#8221; section of <a href="https://support.oracle.com/CSP/main/article?cmd=show&amp;type=NOT&amp;doctype=BULLETIN&amp;id=67983.1">MOS ID 67983.1</a> which seems worth drawing attention to:</p>
<blockquote><p>Note: This document contains references to obsolete parameters.</p></blockquote>
<p>If this caveat is intended to alert the reader to what I cover below then I think it would be reasonable to be more explicit. <a href="https://support.oracle.com/CSP/main/article?cmd=show&amp;id=44694.1&amp;type=NOT">MOS ID 44694.1</a> also provides examples on setting SDU, but applies to &#8220;Oracle Net Services &#8211; Version: 8.0.5.0.0 to 11.1.0.6.0&#8243;.</p>
<p>It was the subtlties of the applicable versions in the MOS notes listed above and spotting something different in <a href="https://support.oracle.com/CSP/main/article?cmd=show&amp;type=NOT&amp;doctype=HOWTO&amp;id=1292915.1">MOS ID 1292915.1</a> (Scan Listener, Queuesize, SDU, Ports) that led me to get a change in SDU to be effective.</p>
<p>When it comes to establishing the negotiated SDU I have relied on <a href="https://support.oracle.com/CSP/main/article?cmd=show&amp;type=NOT&amp;doctype=HOWTO&amp;id=304235.1">MOS ID 304235.1</a> and <a href="http://www.jlcomp.demon.co.uk/sdu.html">this page</a> from Jonathan Lewis. The latter relates specifically to Oracle 7.3.4.1, but appears to still be relevant.</p>
<p>The system I was originally attempting to enable an increased SDU size on is an 11.2.0.2 Exadata environment, but when things didn&#8217;t go as planned I moved to XE 11.2.0.2 in order to experiment. The 11.2.0.2 testing below is from XE and the same approach has been confirmed as effective in the 11.2.0.2 Exadata environment (Enterprise Edition).</p>
<p>I have also carried out tests on 11.2.0.1, 11.1.0.6 and 10.2.0.5 (all Enterprise Edition) and reference to these versions is made where I have observed differences in behaviour.</p>
<p><strong>Testing</strong></p>
<p><strong>1. Validate SDU size used by default (&#8220;out of the box&#8221;)</strong></p>
<p>1.1. Set &#8220;TRACE_LEVEL_LISTENER = ADMIN&#8221; in listener.ora (only change to standard configuration)<br />
1.2. Connect via listener<sup><a href="#footer2">[2]</a></sup><br />
1.3. Searching for &#8220;sdu=&#8221; in the trace file reveals the following</p>
<p><pre class="brush: plain; light: true;">
2011-09-21 09:11:05.759068 : nsconneg:vsn=314, lov=300, opt=0x41, sdu=8192, tdu=65535, ntc=0xc60e
2011-09-21 09:11:05.759125 : nsconneg:vsn=314, gbl=0x1, sdu=8192, tdu=65535
</pre></p>
<p>Which, based the methods referenced above, shows that an SDU of 8192 bytes is used.</p>
<p><strong>2. Setting SDU size in sqlnet.ora</strong></p>
<p>2.1. Setting &#8220;DEFAULT_SDU_SIZE = 16384&#8243; in sqlnet.ora (both client and server)<br />
2.2. Connect via listener<sup><a href="#footer2">[2]</a></sup><br />
2.3. Searching for &#8220;sdu=&#8221; in the trace file reveals the following</p>
<p><pre class="brush: plain; light: true;">
2011-09-21 09:22:41.897852 : nsconneg:vsn=314, lov=300, opt=0x41, sdu=8192, tdu=65535, ntc=0xc60e
2011-09-21 09:22:41.897910 : nsconneg:vsn=314, gbl=0x1, sdu=8192, tdu=65535
</pre></p>
<p>&#8230; Showing that an SDU of 8192 bytes is used.</p>
<p>2.4. &#8220;DEFAULT_SDU_SIZE = 16384&#8243; removed from sqlnet.ora</p>
<p><strong>Note:</strong> One observation during this test on 11.2.0.1, and earlier, is that when sqlnet.ora is has DEFAULT_SDU_SIZE set the client will attempt to negotiate this SDU size.</p>
<p><strong>3. Setting SDU size in tnsnames.ora </strong></p>
<p>3.1. tnsnames.ora updated to (DESCRIPTION = (SDU = 16384) &lt;&#8211;snip&#8211;&gt;)<br />
3.2. Connect via listener<sup><a href="#footer2">[2]</a></sup><br />
3.3. Searching for &#8220;sdu=&#8221; in the trace file reveals the following</p>
<p><pre class="brush: plain; light: true;">
2011-09-21 09:30:21.498865 : nsconneg:vsn=314, lov=300, opt=0x41, sdu=16384, tdu=65535, ntc=0xc60e
2011-09-21 09:30:21.498925 : nsconneg:vsn=314, gbl=0x1, sdu=8192, tdu=65535
</pre></p>
<p>&#8230; Showing that SDU of 16384 was requested by the client, but the server would only go to 8192.</p>
<p><strong>4. Setting SDU size in listener.ora (static listener entry)</strong></p>
<p>4.1. listener.ora updated to include (SID_DESC = (SDU = 16384) &lt;&#8211;snip&#8211;&gt;)<br />
4.2. Connect via listener<sup><a href="#footer2">[2]</a></sup><br />
4.3. Searching for &#8220;sdu=&#8221; in the trace file reveals the following</p>
<p><pre class="brush: plain; light: true;">
2011-09-21 09:54:28.324832 : nsconneg:vsn=314, lov=300, opt=0x41, sdu=16384, tdu=65535, ntc=0xc60e
2011-09-21 09:54:28.324890 : nsconneg:vsn=314, gbl=0x1, sdu=8192, tdu=65535
</pre></p>
<p>&#8230; Showing that SDU of 16384 was requested by the client, but the server would only go to 8192.</p>
<p>4.4. Searching for SDU= in the trace file reveals a number of lines, including the line below, showing the SDU parameter</p>
<p><pre class="brush: plain; light: true;">
2011-09-21 09:54:28.339728 : snlpcss:Spawn Oracle completed oracle   (DESCRIPTION=(LOCAL=NO)(SDU=16384)) XE.
</pre></p>
<p>I&#8217;m taking this as showing that the syntax is not flagged as invalid, but as shown by the previous output, it is not being honored.</p>
<p>4.5. SDU parameter removed from this position in listener.ora</p>
<p><strong>5. Setting SDU size in listener.ora (Listener DESCRIPTION)</strong></p>
<p>5.1. listener.ora updated to include (DESCRIPTION_LIST = (DESCRIPTION = (SDU = 16384) &lt;&#8211;snip&#8211;&gt;))<br />
5.2. Connect via listener<sup><a href="#footer2">[2]</a></sup><br />
5.3. Searching for &#8220;sdu=&#8221; in the trace file reveals the following</p>
<p><pre class="brush: plain; light: true;">
2011-09-21 10:07:08.008144 : nsconneg:vsn=314, lov=300, opt=0x41, sdu=16384, tdu=65535, ntc=0xc60e
2011-09-21 10:07:08.008203 : nsconneg:vsn=314, gbl=0x1, sdu=16384, tdu=65535
</pre></p>
<p>&#8230; Showing that SDU of 16384 was requested by the client, and the server could match it.</p>
<p>5.4. Searching for SDU= reveals a number of lines, including the line below, showing the SDU parameter</p>
<p><pre class="brush: plain; light: true;">
2011-09-21 10:06:39.910083 : nsgllsn:Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))(SDU=16384))
</pre></p>
<p>I went on to experiment with combining the placement of SDU within listener.ora, but could not find a situation where placement within SID_DESC was honored.</p>
<p>After working through testing above, and finding my experiences did not match the documentation, I ran further tests on 10.2.0.5, which threw up some more interesting discoveries.</p>
<p>Simply enabling tracing and making a connection gave:</p>
<p><pre class="brush: plain; light: true;">
nsconneg: vsn=313, lov=300, opt=0x81, sdu=2048, tdu=32767, ntc=0x7308
nsconneg: vsn=313, gbl=0x81, sdu=2048, tdu=32767
</pre></p>
<p>This is expected as the default SDU in 10.2 is 2048 bytes.</p>
<p>Setting DEFAULT_SDU_SIZE = 8192 in sqlnet.ora gave:</p>
<p><pre class="brush: plain; light: true;">
nsconneg: vsn=313, lov=300, opt=0xc01, sdu=8192, tdu=32767, ntc=0x7f08
nsconneg: vsn=313, gbl=0xc01, sdu=8192, tdu=32767
</pre></p>
<p>OK! So now it&#8217;s working as documented and I didn&#8217;t even need to restart the listener <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>Setting DEFAULT_SDU_SIZE = 16384 in sqlnet.ora gave:</p>
<p><pre class="brush: plain; light: true;">
nsconneg: vsn=313, lov=300, opt=0xc01, sdu=16384, tdu=32767, ntc=0x7f08
nsconneg: vsn=313, gbl=0xc01, sdu=8192, tdu=32767
</pre></p>
<p>&#8230; and just for good measure setting DEFAULT_SDU_SIZE = 819<span style="color:#ff0000;"><strong>3</strong></span> in sqlnet.ora gave:</p>
<p><pre class="brush: plain; light: true;">
nsconneg: vsn=313, lov=300, opt=0xc01, sdu=8193, tdu=32767, ntc=0x7f08
nsconneg: vsn=313, gbl=0xc01, sdu=8192, tdu=32767
</pre></p>
<p>From this I&#8217;m concluding that it is not possible to increase the SDU size above 8K via the sqlnet.ora method alone. Values greater than 8192 are picked up the client, but not by the listener (at least until 11.2.0.2, where they are no longer picked up by the client either).</p>
<p>The next thing I wanted to test was setting the SDU size in listener.ora at 10.2.0.5. Try as I might, I could not get adding SDU to listener.ora using the syntax given in the <a href="http://download.oracle.com/docs/cd/B19306_01/network.102/b14212/performance.htm#i1006332">10.2 documentation</a> to work, i.e.:</p>
<p><pre class="brush: plain; light: true;">
SID_LIST_listener_name=
  (SID_LIST=
    (SID_DESC=
     (SDU=16384)
     (SID_NAME=sales)))
</pre></p>
<p>However, if used the approach I&#8217;d established on 11.2, as below, the SDU size change was picked up by the listener.</p>
<p><pre class="brush: plain; light: true;">
LISTENER_listener_name =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (SDU = 16384)
      (ADDRESS = (PROTOCOL = TCP)(HOST = hostname)(PORT = 1521))
    )
  )
</pre></p>
<p><strong>Key Points </strong>(it appears that):</p>
<ol>
<li>SDU size can&#8217;t be increased above 8192 in sqlnet.ora and be honored by the listener</li>
<li>From 11.2.0.2 changing DEFAULT_SDU_SIZE in sqlnet.ora does not affect the SDU size used by the client or the listener</li>
<li>The documented location of the SDU parameter within the listener.ora file in all locations apart from <a href="https://support.oracle.com/CSP/main/article?cmd=show&amp;type=NOT&amp;doctype=HOWTO&amp;id=1292915.1">MOS ID 1292915.1</a> (Scan Listener, Queuesize, SDU, Ports) is not effective</li>
</ol>
<p>I am not ruling out that I&#8217;ve missed something in my testing, so if you read this blog post and have different experiences, particularly with respect to the location of SDU within listener.ora, then I would be very happy to hear from you.<br />
________________</p>
<ol>
<a name="footer1" id="footer1"></a>
<li>The activity I was attempting to speed up by increasing the SDU did not show an improvement even when the increased SDU was successfully implemented (assuming the method used for establishing the SDU, detail above, is appropriate in 11.2.0.2).<br />
<a name="footer2" id="footer2"></a>
<li>The connection testing to produce trace output for analysis was done using a SYSDBA connection to a database that was shutdown in order to guarantee that my connection was going via the static listener registration.
</ol>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/oraganism.wordpress.com/1589/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/oraganism.wordpress.com/1589/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/oraganism.wordpress.com/1589/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/oraganism.wordpress.com/1589/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/oraganism.wordpress.com/1589/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/oraganism.wordpress.com/1589/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/oraganism.wordpress.com/1589/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/oraganism.wordpress.com/1589/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/oraganism.wordpress.com/1589/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/oraganism.wordpress.com/1589/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/oraganism.wordpress.com/1589/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/oraganism.wordpress.com/1589/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/oraganism.wordpress.com/1589/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/oraganism.wordpress.com/1589/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=oraganism.wordpress.com&amp;blog=6580652&amp;post=1589&amp;subd=oraganism&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://oraganism.wordpress.com/2011/09/24/setting-sdu-size-mainly-in-11-2/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/7622f90e733399a783530d01fe3a9bb3?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">martinpaulnash</media:title>
		</media:content>
	</item>
	</channel>
</rss>
