<?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>Journey with Oracle and PeopleSoft</title>
	<atom:link href="http://orapsdba.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://orapsdba.wordpress.com</link>
	<description>Never believe all you read..Test it and test it</description>
	<lastBuildDate>Fri, 01 Jul 2011 11:04:57 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='orapsdba.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Journey with Oracle and PeopleSoft</title>
		<link>http://orapsdba.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://orapsdba.wordpress.com/osd.xml" title="Journey with Oracle and PeopleSoft" />
	<atom:link rel='hub' href='http://orapsdba.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Dropping Unused Object Storage in Oracle 11.2.0.2</title>
		<link>http://orapsdba.wordpress.com/2011/06/28/dropping-unused-object-storage-in-oracle-11-2-0-2/</link>
		<comments>http://orapsdba.wordpress.com/2011/06/28/dropping-unused-object-storage-in-oracle-11-2-0-2/#comments</comments>
		<pubDate>Tue, 28 Jun 2011 16:53:12 +0000</pubDate>
		<dc:creator>orapsdba</dc:creator>
				<category><![CDATA[Oracle 11.2.0.2]]></category>

		<guid isPermaLink="false">http://orapsdba.wordpress.com/?p=55</guid>
		<description><![CDATA[Beginning with Oracle Database 11g release 2 (11.2.0.2), the DBMS_SPACE_ADMIN package includes the DROP_EMPTY_SEGMENTS procedure, which enables you to drop segments for empty tables and partitions that have been migrated from previous releases. This includes segments of dependent objects of the table, such as index segments, where possible.The following example drops empty segments from every [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=orapsdba.wordpress.com&amp;blog=13337270&amp;post=55&amp;subd=orapsdba&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Beginning with Oracle Database 11g release 2 (<strong>11.2.0.2</strong>), the DBMS_SPACE_ADMIN package includes the DROP_EMPTY_SEGMENTS procedure, which enables you to drop segments for empty tables and partitions that have been migrated from previous releases. This includes segments of dependent objects of the table, such as index segments, where possible.The following example drops empty segments from every table in the database.</p>
<p><strong>BEGIN<br />
DBMS_SPACE_ADMIN.DROP_EMPTY_SEGMENTS();<br />
END;</strong></p>
<p>This is a great news for DBAs who are working with PeopleSoft applications.In PeopleSoft applications there are thousands of tables were created and never populated with any rows.In my present HRMS 9.0 production database,there are 23091 tables and 26228 indexes are with zero rows.If I use this package,I would save approximately 60GB of space.</p>
<p>We have 10s of non-production databases,which are getting refreshed every now and then with the copy of production and this new feature will save us a lots of disk space and some cost.</p>
<p>Now time to test this feature.</p>
<p>SQL&gt; select count(*) from sysadm.PS_UPG_APPL_RES;<br />
 </p>
<p>COUNT(*)<br />
&#8212;&#8212;&#8212;-<br />
         0</p>
<p>SQL&gt; @tbl PS_UPG_APPL_RES<code><br />
 </code></p>
<p><code>   BLOCKS   NUM_ROWS SAMPLE_SIZE Analyzed          AVG_ROW_LEN<br />
---------- ---------- ----------- ----------------- -----------<br />
         0          0           0 06/20/11 22:32:17           0</code></p>
<p>SEGMENT_NAME           BLOCKS    EXTENTS INITIAL_EXTENT<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212; &#8212;&#8212;&#8212;- &#8212;&#8212;&#8212;- &#8212;&#8212;&#8212;&#8212;&#8211;<br />
PS_UPG_APPL_RES             8          1          40960</p>
<p>SQL&gt; exec dbms_space_admin.drop_empty_segments(schema_name=&gt;&#8217;SYSADM&#8217;,table_name=&gt;&#8217;PS_UPG_APPL_RES&#8217;);</p>
<p>PL/SQL procedure successfully completed.</p>
<p>SQL&gt; select segment_name,bytes,extents from dba_segments where segment_name=&#8217;PS_UPG_APPL_RES&#8217;;</p>
<p>no rows selected</p>
<p>I also tested with dropping segment that has more than one row.</p>
<p>SQL&gt; create table t1(id number);</p>
<p>Table created.</p>
<p>SQL&gt; select segment_created from user_tables where table_name=&#8217;T1&#8242;;</p>
<p>SEG<br />
&#8212;<br />
NO</p>
<p>SQL&gt; select segment_name,bytes,extents from user_segments where segment_name=&#8217;T1&#8242;;</p>
<p>no rows selected</p>
<p>SQL&gt; begin<br />
  2  for i in 1..2000 loop<br />
  3  insert into t1 values(i);<br />
  4  end loop;<br />
  5  end;<br />
  6  /</p>
<p>PL/SQL procedure successfully completed.<br />
 <br />
SQL&gt; select segment_created from user_tables where table_name=&#8217;T1&#8242;;</p>
<p>SEG<br />
&#8212;<br />
YES</p>
<p>SQL&gt; select segment_name,bytes,extents from user_segments where segment_name=&#8217;T1&#8242;;</p>
<p>SEGMENT_NAME        BYTES    EXTENTS<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8211; &#8212;&#8212;&#8212;- &#8212;&#8212;&#8212;-<br />
T1                 65536          1<br />
 </p>
<p>SQL&gt; exec dbms_space_admin.drop_empty_segments(schema_name=&gt;&#8217;TEST&#8217;,table_name =&gt;&#8217;T1&#8242;);</p>
<p>PL/SQL procedure successfully completed.<br />
 </p>
<p>SQL&gt; select segment_name,bytes,extents from user_segments where segment_name=&#8217;T1&#8242;;</p>
<p>SEGMENT_NAME        BYTES    EXTENTS<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8211; &#8212;&#8212;&#8212;- &#8212;&#8212;&#8212;-<br />
T1                 65536          1<br />
 </p>
<p>SQL&gt; select count(*) from test.t1;</p>
<p>  COUNT(*)<br />
&#8212;&#8212;&#8212;-<br />
      2000</p>
<p>As expected,the procedure drops only empty segments.It would be ideal to get an error message when we try to drop non-empty segments instead of &#8220;successfully completed&#8221; message.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/orapsdba.wordpress.com/55/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/orapsdba.wordpress.com/55/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/orapsdba.wordpress.com/55/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/orapsdba.wordpress.com/55/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/orapsdba.wordpress.com/55/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/orapsdba.wordpress.com/55/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/orapsdba.wordpress.com/55/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/orapsdba.wordpress.com/55/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/orapsdba.wordpress.com/55/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/orapsdba.wordpress.com/55/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/orapsdba.wordpress.com/55/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/orapsdba.wordpress.com/55/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/orapsdba.wordpress.com/55/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/orapsdba.wordpress.com/55/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=orapsdba.wordpress.com&amp;blog=13337270&amp;post=55&amp;subd=orapsdba&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://orapsdba.wordpress.com/2011/06/28/dropping-unused-object-storage-in-oracle-11-2-0-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/b6bf21d4ce10f284cf4951bd0da8c56b?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">orapsdba</media:title>
		</media:content>
	</item>
		<item>
		<title>PeopleTools 8.50 &#8211; Good news for Oracle DBAs</title>
		<link>http://orapsdba.wordpress.com/2011/06/22/peopletools-8-50-good-news-for-oracle-dbas/</link>
		<comments>http://orapsdba.wordpress.com/2011/06/22/peopletools-8-50-good-news-for-oracle-dbas/#comments</comments>
		<pubDate>Wed, 22 Jun 2011 21:15:19 +0000</pubDate>
		<dc:creator>orapsdba</dc:creator>
				<category><![CDATA[PeopleSoft]]></category>

		<guid isPermaLink="false">http://orapsdba.wordpress.com/?p=33</guid>
		<description><![CDATA[And finally it comes with PeopleTools 8.50,the increased monitoring capabilities.The  MODULE and ACTION fields of v$session and v$sql are now being populated with values from PeopleSoft applications.But it doesn&#8217;t cover every requirments as we all expecting from PeopleSoft for long long time.I should say at least they&#8217;re moving in the right direction. Ok.let&#8217;s see what [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=orapsdba.wordpress.com&amp;blog=13337270&amp;post=33&amp;subd=orapsdba&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>And finally it comes with PeopleTools 8.50,the increased monitoring capabilities.The  MODULE and ACTION fields of v$session and v$sql are now being populated with values from PeopleSoft applications.But it doesn&#8217;t cover every requirments as we all expecting from PeopleSoft for long long time.I should say at least they&#8217;re moving in the right direction.</p>
<p>Ok.let&#8217;s see what Tools 8.50 provides?</p>
<p><a href="http://orapsdba.files.wordpress.com/2011/06/mon3.png"><img class="alignnone size-medium wp-image-39" title="mon" src="http://orapsdba.files.wordpress.com/2011/06/mon3.png?w=300&#038;h=75" alt="" width="300" height="75" /></a></p>
<p>Let me navigate into PeopleSoft to see whether the columns are getting updated correctly or not.</p>
<p>I navigated to User Profiles page which is a search page before going into the component.I checked the columns and surprised to see the one on the ACTION column.</p>
<p><a href="http://orapsdba.files.wordpress.com/2011/06/up.png"><img class="alignnone size-medium wp-image-42" title="up" src="http://orapsdba.files.wordpress.com/2011/06/up.png?w=300&#038;h=171" alt="" width="300" height="171" /></a></p>
<p> PROGRAM            MODULE            ACTION            CLIENT_INFO<br />
&#8212;&#8212;&#8212;&#8212;-             &#8212;&#8212;&#8212;-              &#8212;&#8212;&#8212;              &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
 PSAPPSRV.exe  USERMAINT     <strong>xyzzy</strong>                PS,,oraclevm,HR9DMO,PSAPPSRV.exe</p>
<p>What is the meaning of  <strong>&#8220;xyzzy&#8221;??? </strong>It is one of most essential monitoring statistics.Because I have had many cases where user used to complain that my search page is taking too long to display.Oracle sets &#8220;xyzzy&#8221; for all search pages and so what is the use of this data?</p>
<p>Then after I entered into the component,it&#8217;s setting the ACTION value as documented.</p>
<p><a href="http://orapsdba.files.wordpress.com/2011/06/pg.png"><img class="alignnone size-medium wp-image-43" title="pg" src="http://orapsdba.files.wordpress.com/2011/06/pg.png?w=300&#038;h=240" alt="" width="300" height="240" /></a><br />
PROGRAM        MODULE        ACTION<br />
&#8212;&#8212;&#8212;&#8212;&#8211; &#8212;&#8212;&#8212;&#8212;- &#8212;&#8212;&#8212;&#8212;&#8211;<br />
PSAPPSRV.exe   USERMAINT     USER_GENERAL</p>
<p>As far as Application engine is concerned,we only get very limited information i.e. the program name.It doesn&#8217;t update ACTION with each step of the program which is desirable for analyzing ASH and AWR data.It&#8217;s not uncommon to run AE programs parallely or concurrently.If we group ASH data by ACTION,we cannot correlate the data with a particular session.</p>
<p>Similarly,the values for SQR program is disappointing.They should atleast set ACTION to the program name.I am not sure what&#8217;s the logic behind pouplating both module and action with &#8220;sqrw.exe&#8221;.</p>
<p>On the whole,I welcome this move from Oracle  and we certainly expect better instrumentation in the future releases..</p>
<p>In the mean time,I am happily use my own triggers to get the data which I wanted for anlysis and troubleshooting..</p>
<p>Cheers!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/orapsdba.wordpress.com/33/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/orapsdba.wordpress.com/33/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/orapsdba.wordpress.com/33/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/orapsdba.wordpress.com/33/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/orapsdba.wordpress.com/33/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/orapsdba.wordpress.com/33/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/orapsdba.wordpress.com/33/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/orapsdba.wordpress.com/33/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/orapsdba.wordpress.com/33/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/orapsdba.wordpress.com/33/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/orapsdba.wordpress.com/33/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/orapsdba.wordpress.com/33/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/orapsdba.wordpress.com/33/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/orapsdba.wordpress.com/33/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=orapsdba.wordpress.com&amp;blog=13337270&amp;post=33&amp;subd=orapsdba&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://orapsdba.wordpress.com/2011/06/22/peopletools-8-50-good-news-for-oracle-dbas/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/b6bf21d4ce10f284cf4951bd0da8c56b?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">orapsdba</media:title>
		</media:content>

		<media:content url="http://orapsdba.files.wordpress.com/2011/06/mon3.png?w=300" medium="image">
			<media:title type="html">mon</media:title>
		</media:content>

		<media:content url="http://orapsdba.files.wordpress.com/2011/06/up.png?w=300" medium="image">
			<media:title type="html">up</media:title>
		</media:content>

		<media:content url="http://orapsdba.files.wordpress.com/2011/06/pg.png?w=300" medium="image">
			<media:title type="html">pg</media:title>
		</media:content>
	</item>
		<item>
		<title>Another Latch:Cache Buffer Chains Troubleshooting</title>
		<link>http://orapsdba.wordpress.com/2011/06/21/another-latchcache-buffer-chains-troubleshooting/</link>
		<comments>http://orapsdba.wordpress.com/2011/06/21/another-latchcache-buffer-chains-troubleshooting/#comments</comments>
		<pubDate>Tue, 21 Jun 2011 17:05:52 +0000</pubDate>
		<dc:creator>orapsdba</dc:creator>
				<category><![CDATA[Latches]]></category>

		<guid isPermaLink="false">http://orapsdba.wordpress.com/?p=26</guid>
		<description><![CDATA[I got an emergency call early in the morning from my IDM support team.It looks like their OID (Oracle internet Directory) production server is not responding well and the CPU utilization always 99-100%.What a way to start the day   As usuall,I have gone through OS utility nmon(OS is AIX 6.1) and verified the CPU [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=orapsdba.wordpress.com&amp;blog=13337270&amp;post=26&amp;subd=orapsdba&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I got an emergency call early in the morning from my IDM support team.It looks like their OID (Oracle internet Directory) production server is not responding well and the CPU utilization always 99-100%.What a way to start the day <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /><br />
 <br />
As usuall,I have gone through OS utility nmon(OS is AIX 6.1) and verified the CPU utilization and top processes.There are 4 Oracle procsses from OID application using most of the CPUs.<br />
 <br />
A quick look at the v$session_wait shows me all top processes&#8217;s sessions were waiting on a event &#8220;latch:cache buffer chains&#8221;<br />
 <br />
Since the customer has dignostic package license,I have a cushion of selecting from ASH.<br />
 <br />
SQL&gt; SELECT * FROM (<br />
          SELECT<br />
            event<br />
          , TRIM(TO_CHAR(p1, &#8216;XXXXXXXXXXXXXXXX&#8217;)) latch_addr<br />
          , TRIM(ROUND(RATIO_TO_REPORT(COUNT(*)) OVER () * 100, 1))||&#8217;%&#8217; PCT<br />
          , COUNT(*)<br />
        FROM<br />
            v$active_session_history<br />
        WHERE<br />
           event = &#8216;latch: cache buffers chains&#8217;<br />
       AND session_state = &#8216;WAITING&#8217;<br />
       GROUP BY<br />
           event<br />
         , p1<br />
       ORDER BY<br />
           COUNT(*) DESC<br />
   )<br />
   WHERE ROWNUM &lt;= 10<br />
/<br />
 <br />
EVENT                                                            LATCH_ADDR        PCT                                         COUNT(*)<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;&#8211; &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211; &#8212;&#8212;&#8212;-<br />
latch: cache buffers chains                                      70000003DF39DD8   10.3%                                              3<br />
latch: cache buffers chains                                      70000003D868120   6.9%                                               2<br />
latch: cache buffers chains                                      70000003D8CF450   6.9%                                               2<br />
latch: cache buffers chains                                      70000003DED2DC8   6.9%                                               2<br />
latch: cache buffers chains                                      70000003D90F498   6.9%                                               2<br />
latch: cache buffers chains                                      70000003DEF9D90   6.9%                                               2<br />
latch: cache buffers chains                                      70000003D876838   3.4%                                               1<br />
latch: cache buffers chains                                      70000003D8DFAA0   3.4%                                               1<br />
latch: cache buffers chains                                      70000003D986E18   3.4%                                               1<br />
latch: cache buffers chains                                      70000003D90CA70   3.4%                                               1<br />
 <br />
To keep the blog small,I kept only the first three latch information.<br />
 <br />
SQL&gt; @latchprofx sid,name,sqlid,object % 3DF39DD8 100000<br />
 <br />
       SID NAME                                SQLID                    OBJECT       Held       Gets  Held %     Held ms Avg hold ms<br />
&#8212;&#8212;&#8212;- &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211; &#8212;&#8212;&#8212;&#8212;- &#8212;&#8212;&#8212;&#8212;&#8212;&#8211; &#8212;&#8212;&#8212;- &#8212;&#8212;&#8212;- &#8212;&#8212;- &#8212;&#8212;&#8212;&#8211; &#8212;&#8212;&#8212;&#8211;<br />
       612 cache buffers chains                62k5ha59gm0ur           1800527         44         44     .04       2.891        .066<br />
       626 cache buffers chains                ap466g3x7zyby           1800527         26         26     .03       1.708        .066<br />
 <br />
SQL&gt; @latchprof sid,name,sqlid,object % 3D868120 100000<br />
 <br />
       SID NAME                                SQLID                    OBJECT       Held       Gets  Held %     Held ms Avg hold ms<br />
&#8212;&#8212;&#8212;- &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211; &#8212;&#8212;&#8212;&#8212;- &#8212;&#8212;&#8212;&#8212;&#8212;&#8211; &#8212;&#8212;&#8212;- &#8212;&#8212;&#8212;- &#8212;&#8212;- &#8212;&#8212;&#8212;&#8211; &#8212;&#8212;&#8212;&#8211;<br />
       619 cache buffers chains                dprdb6ng88vch           18000DD         30         30     .03       2.004        .067<br />
       644 cache buffers chains                dz3j9dty68rgm           18000DD         25         25     .03       1.670        .067<br />
       616 cache buffers chains                dnjk9235k62by           18000DD         23         23     .02       1.536        .067<br />
 <br />
SQL&gt; @latchprofx sid,name,sqlid,object % 3D8CF450 100000<br />
 </p>
<p>       SID NAME                                SQLID                    OBJECT       Held       Gets  Held %     Held ms Avg hold ms<br />
&#8212;&#8212;&#8212;- &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211; &#8212;&#8212;&#8212;&#8212;- &#8212;&#8212;&#8212;&#8212;&#8212;&#8211; &#8212;&#8212;&#8212;- &#8212;&#8212;&#8212;- &#8212;&#8212;- &#8212;&#8212;&#8212;&#8211; &#8212;&#8212;&#8212;&#8211;<br />
       644 cache buffers chains                f5wauqmvrv4af           18000DA         34         34     .03       2.475        .073<br />
       616 cache buffers chains                17bysmbufufc2           18000DA         32         32     .03       2.330        .073<br />
       619 cache buffers chains                dprdb6ng88vch           18000DA         30         30     .03       2.184        .073<br />
 <br />
&#8211; Find the hot block<br />
 <br />
SQL&gt; @dba 1800527<br />
    RFILE#     BLOCK# DUMP_CMD<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;<br />
         6       1319 &#8212; alter system dump datafile 6 block 1319</p>
<p>STATE      BLOCK_CLASS        OBJECT_TYPE         DATA_OBJECT_ID object                                          TCH  MODE_HELD D T P S D FLG_LRUFLG                  DQ<br />
&#8212;&#8212;&#8212;- &#8212;&#8212;&#8212;&#8212;&#8212;&#8212; &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;- &#8212;&#8212;&#8212;&#8212;&#8211; &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;- &#8212;&#8212;&#8212;- &#8212;&#8212;&#8212;- &#8211; - &#8211; - &#8211; &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;- &#8212;&#8212;&#8212;-<br />
xcur       data block         INDEX                        70409 ODS.ST_P1_ORCLEVENTTIME                           71          0 N N N N N 80000:4                      0</p>
<p> <br />
It&#8217;s evident that the sessions were trying to acquire the same block and thereby causes contention on CBC latch.<br />
Further looking into the index reveals that there are 124 keys are packed into one leaf block.<br />
 <br />
Table_Name                       Index_Name                          Tbl_Blocks      Num_Rows     BLEVEL LEAF_BLOCKS            CF DISTINCT_KEYS<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211; &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211; &#8212;&#8212;&#8212;&#8212;- &#8212;&#8212;&#8212;&#8212;- &#8212;&#8212;&#8212;- &#8212;&#8212;&#8212;&#8211; &#8212;&#8212;&#8212;&#8212;- &#8212;&#8212;&#8212;&#8212;-<br />
P1_CT_ORCLEVENTTIME              ST_P1_ORCLEVENTTIME                         20          4855          1          20            18          4855<br />
P1_CT_ORCLEVENTTIME              VA_P1_ORCLEVENTTIME                         20          4855          1          20            18          4855<br />
 <br />
 <br />
SQL&gt; SELECT<br />
  2  keys_per_leaf,<br />
  3  count(*) &#8220;LeafBlocks&#8221;<br />
  4  from<br />
  5  (<br />
  6  select sys_op_lbid(70409,&#8217;L',t.rowid) block_id,<br />
  7  count(*)  keys_per_leaf<br />
  8  from<br />
  9  ODS.P1_CT_ORCLEVENTTIME t<br />
 10  where (ENTRYID is not null or ATTRVALUE is not null or ATTRTYPE is not null)<br />
 11  group by<br />
 12  sys_op_lbid(70409,&#8217;L',t.rowid)<br />
 13  )<br />
 14  group by keys_per_leaf<br />
 15  order by keys_per_leaf<br />
 16  ;<br />
 <br />
KEYS_PER_LEAF LeafBlocks<br />
&#8212;&#8212;&#8212;&#8212;- &#8212;&#8212;&#8212;-<br />
          124          1    &gt;&gt;&gt;  124 keys in 1 block<br />
          249         19<br />
 <br />
It&#8217;s time to verify the SQLs and their plan.Most of the SQLs are using Nested Loops join.The estimated cardinality with the default statistics values was wrong which leads the optimizer to choose a sub-optimal plan.<br />
 <br />
Then I verified the statistics of the associated tables.I am shell shocked to see none of them are having statistics.The application&#8217;s admin team  forgot to run oidstats.sql which is the utility provided by oracle to collect statistics on ODS schema after each bulk load.Once the statistics are collected and the application was restarted,the CPU consumption was back to normal and the problematic SQLs are now using hash joins as expected.<br />
 <br />
Again,the right tool at the right time and it&#8217;s Tanel&#8217;s (My Oracle Guru) latchprofx makes my job easier.<br />
 <br />
I will see you all soon with another interesting blog&#8230;<br />
 <br />
Cheers!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/orapsdba.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/orapsdba.wordpress.com/26/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/orapsdba.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/orapsdba.wordpress.com/26/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/orapsdba.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/orapsdba.wordpress.com/26/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/orapsdba.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/orapsdba.wordpress.com/26/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/orapsdba.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/orapsdba.wordpress.com/26/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/orapsdba.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/orapsdba.wordpress.com/26/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/orapsdba.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/orapsdba.wordpress.com/26/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=orapsdba.wordpress.com&amp;blog=13337270&amp;post=26&amp;subd=orapsdba&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://orapsdba.wordpress.com/2011/06/21/another-latchcache-buffer-chains-troubleshooting/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/b6bf21d4ce10f284cf4951bd0da8c56b?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">orapsdba</media:title>
		</media:content>
	</item>
	</channel>
</rss>
