<?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>DBA n00b</title>
	<atom:link href="http://dban00b.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://dban00b.wordpress.com</link>
	<description>adventures in becoming a DBA</description>
	<lastBuildDate>Wed, 11 Jan 2012 15:26:06 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='dban00b.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>DBA n00b</title>
		<link>http://dban00b.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://dban00b.wordpress.com/osd.xml" title="DBA n00b" />
	<atom:link rel='hub' href='http://dban00b.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Oracle GoldenGate v11 and RMAN-08137</title>
		<link>http://dban00b.wordpress.com/2011/12/08/oracle-goldengate-v11-and-rman-08137/</link>
		<comments>http://dban00b.wordpress.com/2011/12/08/oracle-goldengate-v11-and-rman-08137/#comments</comments>
		<pubDate>Thu, 08 Dec 2011 18:35:26 +0000</pubDate>
		<dc:creator>tylerv</dc:creator>
				<category><![CDATA[Dataguard]]></category>
		<category><![CDATA[GoldenGate]]></category>
		<category><![CDATA[rman]]></category>

		<guid isPermaLink="false">http://dban00b.wordpress.com/?p=234</guid>
		<description><![CDATA[This is worth a post, despite my dearth of time to post lately &#8230; just had an interesting one and found the perfect blog article to resolve my issue, so definitely need to send a shoutout to the author, Andy Black. In a nutshell, v11 of GG now uses the same sort of &#8220;delete only when applied&#8221; [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dban00b.wordpress.com&amp;blog=3769795&amp;post=234&amp;subd=dban00b&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>This is worth a post, despite my dearth of time to post lately &#8230; just had an interesting one and found <a href="http://otipstricks.blogspot.com/2011/07/be-careful-when-you-stop-using-v11.html">the perfect blog article to resolve my issue</a>, so definitely need to send a shoutout to the author, Andy Black.</p>
<p>In a nutshell, v11 of GG now uses the same sort of &#8220;delete only when applied&#8221; method that logicals do.  v10 does not.  If you create an extract and don&#8217;t delete it, it thinks the archive logs are still needed  and won&#8217;t delete them when you do an rman backup.  I did have the extract enabled for a bit, I think that is also needed to create this situation, not just an unused extract.</p>
<p>This of course can provide no end of confusion if you have a primary database with both dataguard and goldengate running, and you don&#8217;t know GG v11 made this change.  I was so confused as to why my logicals weren&#8217;t telling the primary that they were long done with these logs.  Turns out GG was the holdup.</p>
<p>Andy provides more than enough info to fix the problem, and I also left a comment there about a specific situation and how to fix it (quick ref &#8211; make sure to dblogin before you delete an extract, or it will leave a record in db_capture and you&#8217;ll end up with RMAN-08137 issues).</p>
<p>Gotta love Oracle / DBA work, learn something new every day.</p>
<p>UPDATE 12/14: we had the same problem but in a restored non-prod copy of the database. Even after installing goldengate and trying to use ggsci to remove the extract, it wouldn&#8217;t budge from dba_capture. So I put in an oracle SR. They came back with this oracle article (<a href="https://support.oracle.com/CSP/main/article?cmd=show&amp;type=NOT&amp;doctype=HOWTO&amp; id=1351352.1">1351352.1</a>) and this DBMS to remove things manually from dba_capture &#8211; DBMS_CAPTURE_ADM.DROP_CAPTURE.  I used the following:</p>
<p>select &#8216;exec DBMS_CAPTURE_ADM.DROP_CAPTURE (&#8221;&#8217;||capture_name||&#8221;&#8217;);&#8217; from dba_capture;</p>
<p>then run whichever bits of the output need to be removed.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/dban00b.wordpress.com/234/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/dban00b.wordpress.com/234/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/dban00b.wordpress.com/234/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/dban00b.wordpress.com/234/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/dban00b.wordpress.com/234/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/dban00b.wordpress.com/234/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/dban00b.wordpress.com/234/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/dban00b.wordpress.com/234/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/dban00b.wordpress.com/234/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/dban00b.wordpress.com/234/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/dban00b.wordpress.com/234/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/dban00b.wordpress.com/234/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/dban00b.wordpress.com/234/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/dban00b.wordpress.com/234/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dban00b.wordpress.com&amp;blog=3769795&amp;post=234&amp;subd=dban00b&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://dban00b.wordpress.com/2011/12/08/oracle-goldengate-v11-and-rman-08137/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8bdc333e76f7f0a1704816ad5a55d2c6?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">tylerv</media:title>
		</media:content>
	</item>
		<item>
		<title>DBMS_SPM.EVOLVE_SQL_PLAN_BASELINE runs and evolves successfully, but errors when returning output (ORA-06502)</title>
		<link>http://dban00b.wordpress.com/2011/08/30/dbms_spm-evolve_sql_plan_baseline-runs-and-evolves-successfully-but-errors-when-returning-output-ora-06502/</link>
		<comments>http://dban00b.wordpress.com/2011/08/30/dbms_spm-evolve_sql_plan_baseline-runs-and-evolves-successfully-but-errors-when-returning-output-ora-06502/#comments</comments>
		<pubDate>Tue, 30 Aug 2011 23:20:13 +0000</pubDate>
		<dc:creator>tylerv</dc:creator>
				<category><![CDATA[Baselines / Profiles]]></category>
		<category><![CDATA[Performance]]></category>
		<category><![CDATA[Script]]></category>
		<category><![CDATA[Script / Automation]]></category>
		<category><![CDATA[Tuning]]></category>

		<guid isPermaLink="false">http://dban00b.wordpress.com/?p=227</guid>
		<description><![CDATA[We recently have upgraded many of our databases to 11g.  One of our tools to make sure performance did not degrade was to implement SQL Plan Baselines for our top queries, as identified a few different ways via AWR.  That&#8217;s a long story, but one interesting short note is that after you have Baselines, you [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dban00b.wordpress.com&amp;blog=3769795&amp;post=227&amp;subd=dban00b&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>We recently have upgraded many of our databases to 11g.  One of our tools to make sure performance did not degrade was to implement SQL Plan Baselines for our top queries, as identified a few different ways via AWR.  That&#8217;s a long story, but one interesting short note is that after you have Baselines, you might want to evaluate them periodically to see if there is a better plan available.  Oracle provides DBMS_SPM.EVOLVE_SQL_PLAN_BASELINE so you can do this.</p>
<p>I chose to wrap my evolve in a shell script and call it from cron.  The script worked perfectly for just over a month, then one day all my log had in it was an error:</p>
<pre>DECLARE
*
ERROR at line 1:
ORA-06502: PL/SQL: numeric or value error
ORA-06512: at line 13</pre>
<p>I tried increasing my SET LONG statement &#8211; no dice.  Also, it was clear from the baselines themselves and the total run time before the error that the evolve was actually working, it was just the log/text output at the end that was failing.  In fact, the DBMS_SPM.EVOLVE_SQL_PLAN_BASELINE wasn&#8217;t failing at all.  It was actually DBMS_OUTPUT.PUT_LINE that was failing.</p>
<p>Finally I read that DBMS_OUTPUT.PUT_LINE has a 32767 character limit for a single line.   Since I could see that my output had grown slowly but steadily each day, and on the day it started failing it had grown beyond this limit, this was the answer.  This is not exactly a bug in the DBMS_SPM package, however since this output should be expected to be long, one wonders why a better output method wasn&#8217;t developed.  Oh well &#8211; on to the solution.</p>
<p>Many  smart people have posted about how to chunk up a clob to get around this limit and print it to the screen/sqlplus.  I happened to <a href="http://www.astral-consultancy.co.uk/cgi-bin/hunbug/doco.cgi?11070">like and use this one</a> (modified to use put_line instead of writing to a file).</p>
<p>My working evolve script &#8212; leaving out the surrounding shell stuff which you&#8217;d want to customize for your environment anyway &#8212; looks like this:</p>
<pre>set serveroutput on
SET LONG 1000000
DECLARE
  results  CLOB;
  r_len    NUMBER;
  putlimit constant binary_integer := 32767;
  r_buffer VARCHAR2(32767);
  r_pos    PLS_INTEGER := 1;
BEGIN
  results := DBMS_SPM.EVOLVE_SQL_PLAN_BASELINE (
   time_limit   =&gt; 180,
   verify       =&gt; 'YES',
   commit       =&gt; 'YES'
    );
  dbms_output.put_line('finished with the evolve here, no errors so far.');
  r_len := dbms_lob.getlength(results);
  dbms_output.put_line('length of results var: '||r_len);
  while r_pos &lt; r_len loop
    r_buffer := dbms_lob.substr(results, putlimit, r_pos);
    exit when r_buffer is null;
    DBMS_OUTPUT.PUT_LINE(r_buffer);
    r_pos := r_pos + LEAST(LENGTH(r_buffer)+1,putlimit);
  end loop;
END;
/</pre>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/dban00b.wordpress.com/227/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/dban00b.wordpress.com/227/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/dban00b.wordpress.com/227/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/dban00b.wordpress.com/227/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/dban00b.wordpress.com/227/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/dban00b.wordpress.com/227/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/dban00b.wordpress.com/227/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/dban00b.wordpress.com/227/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/dban00b.wordpress.com/227/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/dban00b.wordpress.com/227/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/dban00b.wordpress.com/227/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/dban00b.wordpress.com/227/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/dban00b.wordpress.com/227/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/dban00b.wordpress.com/227/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dban00b.wordpress.com&amp;blog=3769795&amp;post=227&amp;subd=dban00b&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://dban00b.wordpress.com/2011/08/30/dbms_spm-evolve_sql_plan_baseline-runs-and-evolves-successfully-but-errors-when-returning-output-ora-06502/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8bdc333e76f7f0a1704816ad5a55d2c6?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">tylerv</media:title>
		</media:content>
	</item>
		<item>
		<title>Oracle GoldenGate and compressed tables</title>
		<link>http://dban00b.wordpress.com/2011/01/25/oracle-goldengate-and-compressed-tables/</link>
		<comments>http://dban00b.wordpress.com/2011/01/25/oracle-goldengate-and-compressed-tables/#comments</comments>
		<pubDate>Tue, 25 Jan 2011 18:56:04 +0000</pubDate>
		<dc:creator>tylerv</dc:creator>
				<category><![CDATA[GoldenGate]]></category>

		<guid isPermaLink="false">http://dban00b.wordpress.com/?p=222</guid>
		<description><![CDATA[Oracle GoldenGate does not support reading from compressed tables.  When we asked Oracle about this, the response from Product Management was, &#8220;Currently GoldenGate does not support capturing from compressed objects, but it can deliver to compressed objects. It’s on the roadmap but definitely not in the short term.&#8221;<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dban00b.wordpress.com&amp;blog=3769795&amp;post=222&amp;subd=dban00b&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><a href="http://deciphercorp.wordpress.com/2011/01/06/oracle-11g-goldengate-and-compressed-tables/" target="_blank">Oracle GoldenGate does not support reading from compressed tables</a>.  When we asked Oracle about this, the response from Product Management was, &#8220;Currently GoldenGate does not support capturing from compressed objects, but it can deliver to compressed objects. It’s on the roadmap but definitely not in the short term.&#8221;</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/dban00b.wordpress.com/222/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/dban00b.wordpress.com/222/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/dban00b.wordpress.com/222/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/dban00b.wordpress.com/222/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/dban00b.wordpress.com/222/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/dban00b.wordpress.com/222/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/dban00b.wordpress.com/222/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/dban00b.wordpress.com/222/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/dban00b.wordpress.com/222/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/dban00b.wordpress.com/222/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/dban00b.wordpress.com/222/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/dban00b.wordpress.com/222/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/dban00b.wordpress.com/222/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/dban00b.wordpress.com/222/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dban00b.wordpress.com&amp;blog=3769795&amp;post=222&amp;subd=dban00b&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://dban00b.wordpress.com/2011/01/25/oracle-goldengate-and-compressed-tables/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8bdc333e76f7f0a1704816ad5a55d2c6?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">tylerv</media:title>
		</media:content>
	</item>
		<item>
		<title>Oracle SQL Trace paper by Cary Millsap</title>
		<link>http://dban00b.wordpress.com/2011/01/20/oracle-sql-trace-paper-by-cary-millsap/</link>
		<comments>http://dban00b.wordpress.com/2011/01/20/oracle-sql-trace-paper-by-cary-millsap/#comments</comments>
		<pubDate>Thu, 20 Jan 2011 22:16:58 +0000</pubDate>
		<dc:creator>tylerv</dc:creator>
				<category><![CDATA[Performance]]></category>
		<category><![CDATA[Tracing]]></category>

		<guid isPermaLink="false">http://dban00b.wordpress.com/?p=216</guid>
		<description><![CDATA[Really enjoyed this SQL trace paper by Cary Millsap. I noticed his footnote on Solaris and microstate accounting, which led me to ask our Unix admins about it. Learned from them that microstate accounting cannot be disabled in Solaris 10, so nice to be able to assume more accuracy on that OS. More info: Sun [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dban00b.wordpress.com&amp;blog=3769795&amp;post=216&amp;subd=dban00b&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Really enjoyed <a href="http://carymillsap.blogspot.com/2011/01/new-paper-mastering-performance-with.html?showComment=1295560447461">this SQL trace paper by Cary Millsap</a>.</p>
<p>I noticed his footnote on Solaris and microstate accounting, which led me to ask our Unix admins about it. Learned from them that microstate accounting cannot be disabled in Solaris 10, so nice to be able to assume more accuracy on that OS. More info: <a href="http://tinyurl.com/4z2xv54">Sun blog article on microstate accounting in Solaris 10</a>.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/dban00b.wordpress.com/216/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/dban00b.wordpress.com/216/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/dban00b.wordpress.com/216/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/dban00b.wordpress.com/216/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/dban00b.wordpress.com/216/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/dban00b.wordpress.com/216/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/dban00b.wordpress.com/216/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/dban00b.wordpress.com/216/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/dban00b.wordpress.com/216/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/dban00b.wordpress.com/216/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/dban00b.wordpress.com/216/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/dban00b.wordpress.com/216/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/dban00b.wordpress.com/216/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/dban00b.wordpress.com/216/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dban00b.wordpress.com&amp;blog=3769795&amp;post=216&amp;subd=dban00b&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://dban00b.wordpress.com/2011/01/20/oracle-sql-trace-paper-by-cary-millsap/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8bdc333e76f7f0a1704816ad5a55d2c6?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">tylerv</media:title>
		</media:content>
	</item>
		<item>
		<title>Proxy user connection</title>
		<link>http://dban00b.wordpress.com/2010/11/18/proxy-user-connection/</link>
		<comments>http://dban00b.wordpress.com/2010/11/18/proxy-user-connection/#comments</comments>
		<pubDate>Thu, 18 Nov 2010 16:07:18 +0000</pubDate>
		<dc:creator>tylerv</dc:creator>
				<category><![CDATA[Access / Users]]></category>

		<guid isPermaLink="false">http://dban00b.wordpress.com/?p=200</guid>
		<description><![CDATA[It seems I should have run across this before, but it doesn&#8217;t seem to get talked about much.  This is my new favorite thing when making sure user permissions are what I think they are.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dban00b.wordpress.com&amp;blog=3769795&amp;post=200&amp;subd=dban00b&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>It seems I should have run across this before, but it doesn&#8217;t seem to get talked about much.  <a href="http://www.dba-oracle.com/t_proxy_connect_authentication.htm">This is my new favorite thing</a> when making sure user permissions are what I think they are.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/dban00b.wordpress.com/200/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/dban00b.wordpress.com/200/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/dban00b.wordpress.com/200/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/dban00b.wordpress.com/200/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/dban00b.wordpress.com/200/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/dban00b.wordpress.com/200/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/dban00b.wordpress.com/200/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/dban00b.wordpress.com/200/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/dban00b.wordpress.com/200/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/dban00b.wordpress.com/200/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/dban00b.wordpress.com/200/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/dban00b.wordpress.com/200/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/dban00b.wordpress.com/200/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/dban00b.wordpress.com/200/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dban00b.wordpress.com&amp;blog=3769795&amp;post=200&amp;subd=dban00b&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://dban00b.wordpress.com/2010/11/18/proxy-user-connection/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8bdc333e76f7f0a1704816ad5a55d2c6?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">tylerv</media:title>
		</media:content>
	</item>
		<item>
		<title>Lots of small databases on a big Solaris server, part 3</title>
		<link>http://dban00b.wordpress.com/2010/11/17/lots-of-small-databases-on-a-big-solaris-server-part-3/</link>
		<comments>http://dban00b.wordpress.com/2010/11/17/lots-of-small-databases-on-a-big-solaris-server-part-3/#comments</comments>
		<pubDate>Wed, 17 Nov 2010 23:46:28 +0000</pubDate>
		<dc:creator>tylerv</dc:creator>
				<category><![CDATA[unix]]></category>
		<category><![CDATA[zones]]></category>

		<guid isPermaLink="false">http://dban00b.wordpress.com/?p=174</guid>
		<description><![CDATA[This is turning into a series; I have already written about issues on large boxes hosting a lot of databases, once on the Listener handling incoming requests for tons of databases all using connection pooling, and once on the danger of letting Oracle pick a parallel degree all by itself during an 11g database upgrade. [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dban00b.wordpress.com&amp;blog=3769795&amp;post=174&amp;subd=dban00b&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>This is turning into a series; I have already written about issues on large boxes hosting a lot of databases, once on the <a href="http://dban00b.wordpress.com/2010/10/01/listener-queuesize-and-solaris-tcpip/">Listener handling incoming requests for tons of databases all using connection pooling</a>, and once on<a href="http://dban00b.wordpress.com/2010/10/18/upgrading-small-databases-on-big-servers-ora-04031-11g/"> the danger of letting Oracle pick a parallel degree all by itself during an 11g database upgrade</a>.</p>
<p>The next (and hopefully last) challenge we faced turned out to be related to default Solaris settings that are too low for how we are using the box.  The box in question is a <a href="http://www.oracle.com/us/products/servers-storage/servers/sparc-enterprise/031732.htm">Sun M5000</a> with 256G memory, 8 cpus, 4 cores each, 2 threads / core running Solaris 10; it hosts 1 global zone running 3 zones, which are home to 42 non-production databases that see intermittent, light usage.  We have other similar boxes hosting other non-production databases, but this one in particular was experiencing signs of distress.  It also had the most databases.  At seemingly random times, or sometimes correlated to heavy backup and restore activity, the entire global zone would become partially unresponsive, enough to disrupt traffic to the databases for most of the applications.</p>
<p>We spent some time troubleshooting tcp/ip stack as part of the aforementioned listener issue, but we just weren&#8217;t seeing the same symptoms of that being exhausted, this time.  We spent time looking at i/o and in particular the settings on our NFS mount that we write our rman backups to, dialed them back a bit, etc., but it didn&#8217;t help.  Finally we started getting fork errors, such as &#8221;fork: Resource temporarily unavailable&#8221; which immediately send our unix admin looking at processes.  We were exhausting LWPs on the box.</p>
<p>A bit about LWPs, otherwise known as light weight processes.  <a href="http://en.wikipedia.org/wiki/Light-weight_process">The basics are here</a> and <a href="http://www.princeton.edu/~unix/Solaris/troubleshoot/process.html">here</a>.  The crux of our issue: &#8220;From Solaris 8 software onwards, the 64-bit kernel allows segkp to be sized from 512 MB to 24 GB, with the default being two gigabtyes (sufficient for more than 87,000 kernel thread stacks/LWPs),&#8221; (<a href="http://www.sun.com/software/whitepapers/solaris9/multithread.pdf">Multithreading in the Solaris™ Operating Environment</a>).  Another resource said there is a theoretical limit of 88,000 LWPs.  Theoretical &#8230; meaning you may see system performance degrade when using fewer LWPs than the limit.</p>
<p><a href="http://www.comp.dit.ie/btierney/oracle11gdoc/server.111/b28310/manproc005.htm">Oracle decides how how many db writers (DBWn) to spin up</a> based on &#8211; you guessed it &#8211; the number of CPUs in the box.  The rule of thumb listed in the <a href="http://download.oracle.com/docs/cd/E11882_01/server.112/e16638/instance_tune.htm#PFGRF94511">Oracle Performance docs is at least 1 DBWr per 8 CPU</a>s.  Oracle sees our M5000s as having 64 cpus (they are 8 cpus, 4 cores each, 2 threads / core).  You can see Oracle&#8217;s count of cpus that it uses for its calculations by using this query:</p>
<p><!-- p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; line-height: 14.0px; font: 11.0px 'Lucida Grande'; color: #141414} -->select STAT_NAME, VALUE from V$OSSTAT where stat_name = &#8216;NUM_CPUS&#8217;;</p>
<p>Our bad that we hadn&#8217;t set DB_WRITER_PROCESSES explicitly, but we didn&#8217;t know it would try to go so high.  So every single one of our 42 databases spun up 8 db writers.  From what we can see, every single one of them uses up 258 LWPs.  They do not use this many immediately after the database is started, but eventually they climb to 258 and stop there, after they&#8217;ve had some usage.  So 42 * 8 * 258 = 86,688 &#8230; more than enough to cause problems, given that every other activity on the box would grab at least one LWP as well.</p>
<p>You can see how many LWPs are being used with ps: ps -efL | wc -l</p>
<p>You can see the number of LWPs by pid using ps with these flags: ps -ef -o &#8220;pid nlwp&#8221;</p>
<p>Make sure to run these commands on the global zone to ensure you see all LWPs.</p>
<p>To fix the issue, you assign more memory to segkp.  The default is 2gb; our unix admin quadrupled ours to 8gb.</p>
<p>To see your segkp currently: kstat -n segkp</p>
<p>This wasn&#8217;t an easy one to diagnose since the behavior took a while to produce &#8216;real&#8217; errors that led to LWPs as the issue.  If you have a similar setup and are having random performance issues, it certainly doesn&#8217;t hurt to check your usage of LWPs.</p>
<p>Errors that pointed us toward forking and thereby, LWPs:</p>
<ul>
<li>ORA-12518: TNS:listener could not hand off client connection (DBD ERROR: OCIServerAttach).</li>
<li>ORA-12537: TNS:connection closed (DBD ERROR: OCIServerAttach).</li>
<li>Agent is Unreachable (REASON = IOException in sending Request :: Socket is closed) but the host is reachable.</li>
</ul>
<p>These look like a listener problem, but are actually the inability of the listener to handoff to the OS by forking a process to handle the connection. Enterprise Manager repeatedly sent critical alerts about this error, then cleared them, since the issues were intermittent rather than being completely down.</p>
<p>At the apex of the issue, we were intermittently unable to login to the box at all.  When we did get in, we saw the message &#8220;fork: Resource temporarily unavailable&#8221; on and off when trying to run routine commands. Additionally, after reaching this level of LWP exhaustion, when we later restarted the box overnight to add the memory to segkp, I had to shut down the listeners and the Enterprise Manager agents just to free up resources enough so that I could do a &#8216;shutdown immediate&#8217; and have it complete.  Despite this, about 30% of the databases would not shut down (they just sat there) and I had to use &#8216;shutdown abort.&#8217;  I would guess that all processes were responding sluggishly when Oracle tried to do its <a href="http://www.dba-oracle.com/concepts/shutdown_commands.htm">normal shutdown cleanup</a>.</p>
<p>Once the segkp was increased and the box was restarted, the databases all started with no problems, and we have not had any further problems with this host.  We had had issues with multiple rman backups running at once on this box recently, so to test our change to segkp we ran a stress test with all the databases online, two 8 channel rman backups writing to NFS, and a 12 channel rman restore writing to the SAN (fibre channel) all running at once.  While we drove load up due to heavy i/o, everything stayed performant.</p>
<p>As a precaution we have also added the initialization parameter <code>DB_WRITER_PROCESSES</code> to our standard database template (we script our new database builds), as well as all of our non-production databases (set to 2).  We are also evaluating what we need to set it to for each Production database.</p>
<p><strong><span style="font-family:Calibri, Verdana, Helvetica, Arial;"> </span></strong><!--EndFragment--></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/dban00b.wordpress.com/174/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/dban00b.wordpress.com/174/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/dban00b.wordpress.com/174/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/dban00b.wordpress.com/174/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/dban00b.wordpress.com/174/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/dban00b.wordpress.com/174/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/dban00b.wordpress.com/174/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/dban00b.wordpress.com/174/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/dban00b.wordpress.com/174/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/dban00b.wordpress.com/174/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/dban00b.wordpress.com/174/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/dban00b.wordpress.com/174/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/dban00b.wordpress.com/174/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/dban00b.wordpress.com/174/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dban00b.wordpress.com&amp;blog=3769795&amp;post=174&amp;subd=dban00b&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://dban00b.wordpress.com/2010/11/17/lots-of-small-databases-on-a-big-solaris-server-part-3/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8bdc333e76f7f0a1704816ad5a55d2c6?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">tylerv</media:title>
		</media:content>
	</item>
		<item>
		<title>Free Perl Book: Modern Perl</title>
		<link>http://dban00b.wordpress.com/2010/11/17/free-perl-book-modern-perl/</link>
		<comments>http://dban00b.wordpress.com/2010/11/17/free-perl-book-modern-perl/#comments</comments>
		<pubDate>Wed, 17 Nov 2010 17:38:55 +0000</pubDate>
		<dc:creator>tylerv</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://dban00b.wordpress.com/?p=159</guid>
		<description><![CDATA[Buy the book from any book seller, or download the PDF free and donate if you find it useful.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dban00b.wordpress.com&amp;blog=3769795&amp;post=159&amp;subd=dban00b&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.onyxneon.com/books/modern_perl/index.html">Buy the book from any book seller, or download the PDF free</a> and donate if you find it useful.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/dban00b.wordpress.com/159/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/dban00b.wordpress.com/159/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/dban00b.wordpress.com/159/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/dban00b.wordpress.com/159/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/dban00b.wordpress.com/159/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/dban00b.wordpress.com/159/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/dban00b.wordpress.com/159/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/dban00b.wordpress.com/159/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/dban00b.wordpress.com/159/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/dban00b.wordpress.com/159/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/dban00b.wordpress.com/159/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/dban00b.wordpress.com/159/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/dban00b.wordpress.com/159/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/dban00b.wordpress.com/159/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dban00b.wordpress.com&amp;blog=3769795&amp;post=159&amp;subd=dban00b&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://dban00b.wordpress.com/2010/11/17/free-perl-book-modern-perl/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8bdc333e76f7f0a1704816ad5a55d2c6?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">tylerv</media:title>
		</media:content>
	</item>
		<item>
		<title>variable/column names and making code tiny</title>
		<link>http://dban00b.wordpress.com/2010/10/22/variablecolumn-names-and-making-code-tiny/</link>
		<comments>http://dban00b.wordpress.com/2010/10/22/variablecolumn-names-and-making-code-tiny/#comments</comments>
		<pubDate>Fri, 22 Oct 2010 15:18:41 +0000</pubDate>
		<dc:creator>tylerv</dc:creator>
				<category><![CDATA[Code]]></category>

		<guid isPermaLink="false">http://dban00b.wordpress.com/?p=167</guid>
		<description><![CDATA[I loved this one &#8230; yes my code is wordy, it prints a lot of helpful text, and it has a lot of comments. Funny how anyone can open up my scripts and edit them without any other documentation or discussion.  To be fair, I don&#8217;t know if his prices came from server-class hardware, but [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dban00b.wordpress.com&amp;blog=3769795&amp;post=167&amp;subd=dban00b&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I <a href="http://ayende.com/Blog/archive/2010/10/22/you-saved-5-cents-and-your-code-is-not-readable.aspx" target="_blank">loved this one</a> &#8230; yes my code is wordy, it prints a lot of helpful text, and it has a lot of comments.  Funny how anyone can open up my scripts and edit them without any other documentation or discussion.  To be fair, I don&#8217;t know if his prices came from server-class hardware, but I bet it would still work out in favor of the longer names, because he didn&#8217;t cost out the time spent being confused.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/dban00b.wordpress.com/167/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/dban00b.wordpress.com/167/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/dban00b.wordpress.com/167/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/dban00b.wordpress.com/167/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/dban00b.wordpress.com/167/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/dban00b.wordpress.com/167/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/dban00b.wordpress.com/167/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/dban00b.wordpress.com/167/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/dban00b.wordpress.com/167/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/dban00b.wordpress.com/167/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/dban00b.wordpress.com/167/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/dban00b.wordpress.com/167/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/dban00b.wordpress.com/167/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/dban00b.wordpress.com/167/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dban00b.wordpress.com&amp;blog=3769795&amp;post=167&amp;subd=dban00b&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://dban00b.wordpress.com/2010/10/22/variablecolumn-names-and-making-code-tiny/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8bdc333e76f7f0a1704816ad5a55d2c6?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">tylerv</media:title>
		</media:content>
	</item>
		<item>
		<title>Upgrading small databases on big servers (ORA-04031 / 11g)</title>
		<link>http://dban00b.wordpress.com/2010/10/18/upgrading-small-databases-on-big-servers-ora-04031-11g/</link>
		<comments>http://dban00b.wordpress.com/2010/10/18/upgrading-small-databases-on-big-servers-ora-04031-11g/#comments</comments>
		<pubDate>Mon, 18 Oct 2010 17:04:37 +0000</pubDate>
		<dc:creator>tylerv</dc:creator>
				<category><![CDATA[Memory]]></category>
		<category><![CDATA[unix]]></category>
		<category><![CDATA[Upgrade]]></category>
		<category><![CDATA[zones]]></category>

		<guid isPermaLink="false">http://dban00b.wordpress.com/?p=160</guid>
		<description><![CDATA[Today I received an ORA-04031 error when upgrading to 11.2.0.2, with the memory allocation error happening during the final utlrp.sql recompilation step and referring consistently to the large pool. ERROR at line 1: ORA-12801: error signaled in parallel query server P237 ORA-12853: insufficient memory for PX buffers: current 84352K, max needed 13280400K ORA-04031: unable to [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dban00b.wordpress.com&amp;blog=3769795&amp;post=160&amp;subd=dban00b&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Today I received an ORA-04031 error when upgrading to 11.2.0.2, with the memory allocation error happening during the final utlrp.sql recompilation step and referring consistently to the large pool.</p>
<p>ERROR at line 1:<br />
ORA-12801: error signaled in parallel query server P237<br />
ORA-12853: insufficient memory for PX buffers: current 84352K, max needed 13280400K<br />
ORA-04031: unable to allocate 65560 bytes of shared memory (&#8220;large pool&#8221;,&#8221;unknown object&#8221;,&#8221;large pool&#8221;,&#8221;PX msg pool&#8221;)<br />
ORA-06512: at &#8220;SYS.UTL_RECOMP&#8221;, line 804<br />
ORA-06512: at line 4</p>
<p>First thing that stands out is P237, not to mention that it claims it needs 13G of memory to perform this task without erroring.  That&#8217;s a heck of a lot of memory and parallel threads for a tiny database with not much data in it.  It turned out to be because I was working with a small database that lives on a Solaris 10 zone that lives on large server (M5000) with tons of cpus available.  Of course, we have this problem because we use zones set up a certain way, and not containers or other configurations that do not allow the logical host to see all the physical host&#8217;s cpus, but we like the benefits we get from flexible resource sharing.</p>
<p>The database has a memory_target of 2G.  It turns out that utlrp.sql issues a PARALLEL with no limiting number, and on a large server that can be bad.  It ran out of memory to handle all these threads and died.</p>
<p>&#8212;&#8211; utlrp.sql passes in a 0 to utlprp.sql (and this is all it does):</p>
<p>Rem ===========================================================================<br />
Rem BEGIN utlrp.sql<br />
Rem ===========================================================================</p>
<p>@@utlprp.sql 0</p>
<p>&#8212;&#8211; utlprp.sql then uses that 0 as the number of parallel threads:</p>
<p>DECLARE<br />
threads pls_integer := &amp;&amp;1;<br />
BEGIN<br />
utl_recomp.recomp_parallel(threads);<br />
END;</p>
<p>So you can either modify utlrp.sql or issue @@utlprp.sql X to pass in a reasonable number of threads, or you can set a max on the number of parallel threads anything can spin up (a good idea anyway):</p>
<p>alter system set PARALLEL_MAX_SERVERS=5 scope=both;<br />
alter system set PARALLEL_SERVERS_TARGET=2 scope=both;</p>
<p>You&#8217;ll have to experiment to find the right number.  I found that sometimes 5 worked, sometimes the recompilation still failed.  And if I received an error, then the next time I might get a memory error on another part of memory (shared pool vs large pool).  Repeatedly running the script eventually resulted in having to shutdown abort, couldn&#8217;t shutdown cleanly due to memory allocation errors on the shared pool.</p>
<p>With this low sga I also had to increase the java_pool_size manually so that memory_target would give it that as a minimum; otherwise catupgrd.sql failed with a java pool memory allocation error on Oracle Multimedia.  An error you can even see in the example in Oracle&#8217;s docs; <a href="http://download.oracle.com/docs/cd/E14072_01/server.112/e10819/upgrade.htm" target="_blank">go here</a> and search for ORA-04031.  Rerunning catupgrd.sql with more java pool memory allowed it to complete successfully.  I then set java_pool_size back to 0 so it could be managed by memory_target again.</p>
<p>alter system set java_pool_size=256M scope=spfile;  (restart)<br />
alter system set java_pool_size=0 scope=spfile;  (restart)</p>
<p>Great finds along the way:</p>
<p>See memory allocation in 11g with memory_target, <a href="http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:2102436700346140870" target="_blank">from asktom</a>:</p>
<p>with data<br />
as<br />
(<br />
select decode( grouping( pool ), 1, &#8216;total:&#8217;, pool ) &#8220;Pool&#8221;,<br />
sum(bytes) bytes<br />
from (select nvl(pool,&#8217;*'||name) pool, bytes from v$sgastat )<br />
group by rollup (pool)<br />
)<br />
select &#8220;Pool&#8221;, bytes, round(bytes/1024/1024) mbytes<br />
from data<br />
union all<br />
select &#8216;PGA target&#8217;, v-bytes, round((v-bytes)/1024/1024)<br />
from data, (select to_number(value) v<br />
from v$parameter<br />
where name = &#8216;memory_target&#8217;)<br />
where &#8220;Pool&#8221; = &#8216;total:&#8217;<br />
/</p>
<p>With small memory databases, especially on virtualized servers that can still &#8220;see&#8221; all the cpus, need to set these parameters / change these defaults:</p>
<p><a href="http://download.oracle.com/docs/cd/E11882_01/server.112/e17110/initparams182.htm#REFRN10158" target="_blank">PARALLEL_MAX_SERVERS</a><br />
<a href="http://download.oracle.com/docs/cd/E14072_01/server.112/e10820/initparams182.htm" target="_blank">PARALLEL_SERVERS_TARGET</a>: (note that it is plural, the documentation writes it incorrectly a few times)<br />
<a href="http://download.oracle.com/docs/cd/E11882_01/server.112/e17110/initparams108.htm#REFRN10077" target="_blank">JOB_QUEUE_PROCESS</a></p>
<p>I also <a href="http://forums.oracle.com/forums/message.jspa?messageID=7421557#7421557" target="_blank">posted in the OTN forums about this here</a>.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/dban00b.wordpress.com/160/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/dban00b.wordpress.com/160/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/dban00b.wordpress.com/160/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/dban00b.wordpress.com/160/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/dban00b.wordpress.com/160/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/dban00b.wordpress.com/160/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/dban00b.wordpress.com/160/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/dban00b.wordpress.com/160/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/dban00b.wordpress.com/160/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/dban00b.wordpress.com/160/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/dban00b.wordpress.com/160/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/dban00b.wordpress.com/160/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/dban00b.wordpress.com/160/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/dban00b.wordpress.com/160/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dban00b.wordpress.com&amp;blog=3769795&amp;post=160&amp;subd=dban00b&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://dban00b.wordpress.com/2010/10/18/upgrading-small-databases-on-big-servers-ora-04031-11g/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8bdc333e76f7f0a1704816ad5a55d2c6?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">tylerv</media:title>
		</media:content>
	</item>
		<item>
		<title>ggrep is my new BFF</title>
		<link>http://dban00b.wordpress.com/2010/10/15/ggrep-is-my-new-bff/</link>
		<comments>http://dban00b.wordpress.com/2010/10/15/ggrep-is-my-new-bff/#comments</comments>
		<pubDate>Fri, 15 Oct 2010 20:40:24 +0000</pubDate>
		<dc:creator>tylerv</dc:creator>
				<category><![CDATA[unix]]></category>

		<guid isPermaLink="false">http://dban00b.wordpress.com/?p=155</guid>
		<description><![CDATA[Picked up a handy log file search tip today, for searching those pesky log file formats that list date on one line, then the log message on the next line (alert logs, for instance).  It&#8217;s annoying to grep for just what you want to see, then not have any idea what the timestamp was.  I&#8217;ve [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dban00b.wordpress.com&amp;blog=3769795&amp;post=155&amp;subd=dban00b&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Picked up a handy log file search tip today, for searching those pesky log file formats that list date on one line, then the log message on the next line (alert logs, for instance).  It&#8217;s annoying to grep for just what you want to see, then not have any idea what the timestamp was.  I&#8217;ve seen it done with some sed or awk, but this is the simplest yet:</p>
<pre>$ ggrep -B 1 "advanced" alert_SID.log
Fri Oct 15 09:50:06 2010
Thread 1 advanced to log sequence 2805 (LGWR switch)
--
Fri Oct 15 09:50:06 2010
Thread 1 advanced to log sequence 2806 (LGWR switch)
--
Fri Oct 15 09:50:09 2010
Thread 1 advanced to log sequence 2807 (LGWR switch)</pre>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/dban00b.wordpress.com/155/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/dban00b.wordpress.com/155/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/dban00b.wordpress.com/155/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/dban00b.wordpress.com/155/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/dban00b.wordpress.com/155/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/dban00b.wordpress.com/155/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/dban00b.wordpress.com/155/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/dban00b.wordpress.com/155/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/dban00b.wordpress.com/155/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/dban00b.wordpress.com/155/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/dban00b.wordpress.com/155/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/dban00b.wordpress.com/155/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/dban00b.wordpress.com/155/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/dban00b.wordpress.com/155/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=dban00b.wordpress.com&amp;blog=3769795&amp;post=155&amp;subd=dban00b&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://dban00b.wordpress.com/2010/10/15/ggrep-is-my-new-bff/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8bdc333e76f7f0a1704816ad5a55d2c6?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">tylerv</media:title>
		</media:content>
	</item>
	</channel>
</rss>
