<?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/"
	>

<channel>
	<title>DBA survival BLOG &#187; RAC</title>
	<atom:link href="http://www.ludovicocaldara.net/dba/tag/rac/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.ludovicocaldara.net/dba</link>
	<description>Keep DBA job simple. Thanks.</description>
	<lastBuildDate>Sat, 01 Oct 2011 20:06:54 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>10gR2 RAC hangs and &#8220;KSV master wait&#8221;</title>
		<link>http://www.ludovicocaldara.net/dba/ksv-master-wait/</link>
		<comments>http://www.ludovicocaldara.net/dba/ksv-master-wait/#comments</comments>
		<pubDate>Fri, 03 Jun 2011 09:44:52 +0000</pubDate>
		<dc:creator>Ludovico</dc:creator>
				<category><![CDATA[Oracle Database]]></category>
		<category><![CDATA[aix]]></category>
		<category><![CDATA[asm]]></category>
		<category><![CDATA[autoextend]]></category>
		<category><![CDATA[bug]]></category>
		<category><![CDATA[hang]]></category>
		<category><![CDATA[RAC]]></category>

		<guid isPermaLink="false">http://www.ludovicocaldara.net/dba/?p=98</guid>
		<description><![CDATA[We recently migrated a customer&#8217;s 10gR2 RAC on AIX6.1 from GPFS+HACMP to a &#8220;basic&#8221; Clusterware with datafiles over ASM. After (many) problems related to various installation bugs (the list of requirements for AIX is very long, incomplete and requires many one-off patches to complete), we had a problem during an import of a new schema: [...]]]></description>
			<content:encoded><![CDATA[<p>We recently migrated a customer&#8217;s 10gR2 RAC on AIX6.1 from GPFS+HACMP to a &#8220;basic&#8221; Clusterware with datafiles over ASM.<br />
After (many) problems related to various installation bugs (the list of requirements for AIX is very long, incomplete and requires many one-off patches to complete), we had a problem during an import of a new schema: the import hung with no apparent wait events. We found that the event it was waiting for was classified as &#8216;Idle&#8217;:</p>

<div class="wp_syntax"><div class="code"><pre class="sql" style="font-family:monospace;">SQL&amp;gt; <span style="color: #993333; font-weight: bold;">SELECT</span> sid<span style="color: #66cc66;">,</span> username<span style="color: #66cc66;">,</span> <span style="color: #993333; font-weight: bold;">STATUS</span><span style="color: #66cc66;">,</span> event<span style="color: #66cc66;">,</span> wait_class<span style="color: #66cc66;">,</span> program <span style="color: #993333; font-weight: bold;">FROM</span> gv$session;
&nbsp;
 SID USERNAME   <span style="color: #993333; font-weight: bold;">STATUS</span>   EVENT                WAIT_CLASS PROGRAM
<span style="color: #808080; font-style: italic;">---- ---------- -------- -------------------- ---------- ----------------------------------------</span>
<span style="color: #66cc66;">...</span>
 <span style="color: #cc66cc;">135</span> SYS        ACTIVE   KSV master wait      Idle       imp@trndcsaixdb1 <span style="color: #66cc66;">&#40;</span>TNS V1<span style="color: #66cc66;">-</span>V3<span style="color: #66cc66;">&#41;</span>
<span style="color: #66cc66;">...</span></pre></div></div>

<p>The on ASM instance:</p>

<div class="wp_syntax"><div class="code"><pre class="sql" style="font-family:monospace;">SQL&amp;gt; @wait10g
&nbsp;
SID USERNAME   MACHINE         PROGRAM              EVENT                  SEQ#           P1  S_IN_WAIT STATE               <span style="color: #993333; font-weight: bold;">STATUS</span>
<span style="color: #808080; font-style: italic;">---- ---------- --------------- -------------------- -------------------- ------ ------------ ---------- ------------------- --------</span>
<span style="color: #cc66cc;">201</span> SYS        trndcsaixdb1    oracle@trndcsaixdb1  enq: FA <span style="color: #66cc66;">-</span> access file      <span style="color: #cc66cc;">6</span>   <span style="color: #cc66cc;">1178664965</span>        <span style="color: #cc66cc;">744</span> WAITING             ACTIVE</pre></div></div>

<p>The problem was related to datafile resize (we use autoextend) and according to MOS, we were encountering a bug:</p>
<p>Bug 11712836: RESIZING DATAFILE HUNG WAITING FOR KSV MASTER WAIT IN RAC</p>
<p>Shutting down one instance solved the problem. Now we have to avoid autoextend&#8230;&#8230;. We never encountered this bug in many 10.2.0.4 rac installations.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ludovicocaldara.net/dba/ksv-master-wait/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Dataguard check script for Real Application Clusters (MAA)</title>
		<link>http://www.ludovicocaldara.net/dba/dataguard-check-script-for-real-application-clusters-maa/</link>
		<comments>http://www.ludovicocaldara.net/dba/dataguard-check-script-for-real-application-clusters-maa/#comments</comments>
		<pubDate>Fri, 31 Dec 2010 13:46:30 +0000</pubDate>
		<dc:creator>Ludovico</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[cluster]]></category>
		<category><![CDATA[maximum availability architecture]]></category>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[Oracle Database]]></category>
		<category><![CDATA[Oracle Dataguard]]></category>
		<category><![CDATA[Oracle MAA]]></category>
		<category><![CDATA[Perl script]]></category>
		<category><![CDATA[RAC]]></category>
		<category><![CDATA[real-time apply]]></category>
		<category><![CDATA[Standby]]></category>

		<guid isPermaLink="false">http://www.ludovicocaldara.net/dba/?p=86</guid>
		<description><![CDATA[Two years after my posts: Quick Oracle Dataguard check script and More about Dataguard and how to check it I faced a whole new Dataguard between two Oracle Real Application Clusters, aka Oracle Maximum Availability Architecture (MAA). This enviromnent is relying on Windows OS. Don&#8217;t know how this could be called &#8220;availability&#8221; but here we [...]]]></description>
			<content:encoded><![CDATA[<p>Two years after my posts:<br />
<a href="http://www.ludovicocaldara.net/dba/quick-oracle-dataguard-check-script/">Quick Oracle Dataguard check script</a> and <a href="http://www.ludovicocaldara.net/dba/more-about-dataguard-and-how-to-check-it">More about Dataguard and how to check it</a> I faced a whole new <strong>Dataguard </strong> between two <strong>Oracle Real Application Clusters</strong>, aka <em>Oracle Maximum Availability Architecture (MAA)</em>.</p>
<p>This enviromnent is relying on Windows OS. Don&#8217;t know how this could be called &#8220;<em>availability</em>&#8221; but here we are. I revisited my scripts in a quick and very dirty way. Please consider that I did copy and paste to check the alignment once per thread, but it should be improved with some kind of iteration to check each thread in a more structured fashion.</p>

<div class="wp_syntax"><div class="code"><pre class="perl" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!D:\oracle\product\10.2.0\db_1\perl\5.8.3\bin\MSWin32-x86-multi-thread\perl.exe -w</span>
<span style="color: #000000; font-weight: bold;">use</span> DBI<span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">use</span> DBD<span style="color: #339933;">::</span><span style="color: #006600;">Oracle</span> <span style="color: #000066;">qw</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">:</span>ora_session_modes<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #666666; font-style: italic;"># DB connection #</span>
<span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$prod</span>  <span style="color: #339933;">=</span> <span style="color: #ff0000;">&quot;prod&quot;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$stby</span> <span style="color: #339933;">=</span> <span style="color: #ff0000;">&quot;stby&quot;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$prodh</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">unless</span> <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$prodh</span> <span style="color: #339933;">=</span> DBI<span style="color: #339933;">-</span><span style="color: #0000ff;">&amp;gt</span><span style="color: #339933;">;</span>connect<span style="color: #009900;">&#40;</span><span style="color: #ff0000;">'dbi:Oracle:'</span><span style="color: #339933;">.</span><span style="color: #0000ff;">$prod</span><span style="color: #339933;">,</span> 
    <span style="color: #ff0000;">'sys'</span><span style="color: #339933;">,</span> <span style="color: #ff0000;">'strongpwd'</span><span style="color: #339933;">,</span> 
    <span style="color: #009900;">&#123;</span>PrintError<span style="color: #339933;">=</span><span style="color: #0000ff;">&amp;gt</span><span style="color: #339933;">;</span><span style="color: #cc66cc;">0</span><span style="color: #339933;">,</span> AutoCommit <span style="color: #339933;">=</span><span style="color: #0000ff;">&amp;gt</span><span style="color: #339933;">;</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">,</span>
    ora_session_mode <span style="color: #339933;">=</span><span style="color: #0000ff;">&amp;gt</span><span style="color: #339933;">;</span> ORA_SYSDBA<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>  <span style="color: #009900;">&#123;</span>
<span style="color: #000066;">print</span> <span style="color: #ff0000;">&quot;Error connecting to DB: $DBI::errstr<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
<span style="color: #000066;">exit</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #0000ff;">$prodh</span><span style="color: #339933;">-</span><span style="color: #0000ff;">&amp;gt</span><span style="color: #339933;">;</span><span style="color: #009900;">&#123;</span>RaiseError<span style="color: #009900;">&#125;</span><span style="color: #339933;">=</span><span style="color: #cc66cc;">1</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$stbyh</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">unless</span> <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$stbyh</span> <span style="color: #339933;">=</span> DBI<span style="color: #339933;">-</span><span style="color: #0000ff;">&amp;gt</span><span style="color: #339933;">;</span>connect<span style="color: #009900;">&#40;</span><span style="color: #ff0000;">'dbi:Oracle:'</span><span style="color: #339933;">.</span><span style="color: #0000ff;">$stby</span><span style="color: #339933;">,</span>
    <span style="color: #ff0000;">'sys'</span><span style="color: #339933;">,</span> <span style="color: #ff0000;">'strongpwd'</span><span style="color: #339933;">,</span>
    <span style="color: #009900;">&#123;</span>PrintError<span style="color: #339933;">=</span><span style="color: #0000ff;">&amp;gt</span><span style="color: #339933;">;</span><span style="color: #cc66cc;">0</span><span style="color: #339933;">,</span> AutoCommit <span style="color: #339933;">=</span><span style="color: #0000ff;">&amp;gt</span><span style="color: #339933;">;</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">,</span>
    ora_session_mode <span style="color: #339933;">=</span><span style="color: #0000ff;">&amp;gt</span><span style="color: #339933;">;</span> ORA_SYSDBA<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>  <span style="color: #009900;">&#123;</span>
<span style="color: #000066;">print</span> <span style="color: #ff0000;">&quot;Error connecting to DB: $DBI::errstr<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
<span style="color: #0000ff;">$prodh</span><span style="color: #339933;">-</span><span style="color: #0000ff;">&amp;gt</span><span style="color: #339933;">;</span>disconnect<span style="color: #339933;">;</span>
<span style="color: #000066;">exit</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #0000ff;">$stbyh</span><span style="color: #339933;">-</span><span style="color: #0000ff;">&amp;gt</span><span style="color: #339933;">;</span><span style="color: #009900;">&#123;</span>RaiseError<span style="color: #009900;">&#125;</span><span style="color: #339933;">=</span><span style="color: #cc66cc;">1</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$sth</span><span style="color: #339933;">;</span>
<span style="color: #666666; font-style: italic;">### query stdby MRP0</span>
<span style="color: #0000ff;">$sth</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">$stbyh</span><span style="color: #339933;">-</span><span style="color: #0000ff;">&amp;gt</span><span style="color: #339933;">;</span>prepare<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">&amp;lt</span><span style="color: #339933;">;</span><span style="color: #0000ff;">&amp;lt</span><span style="color: #339933;">;</span>EOSQL <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000066;">select</span> thread<span style="color: #666666; font-style: italic;">#, SEQUENCE#, BLOCK#</span>
    from gv<span style="color: #0000ff;">\$managed_standby</span> 
    where process<span style="color: #339933;">=</span><span style="color: #ff0000;">'MRP0'</span>
EOSQL
<span style="color: #0000ff;">$sth</span><span style="color: #339933;">-</span><span style="color: #0000ff;">&amp;gt</span><span style="color: #339933;">;</span>execute<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">my</span> <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$mrpthread</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">$mrpsequence</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">$mrpblock</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">$sth</span><span style="color: #339933;">-</span><span style="color: #0000ff;">&amp;gt</span><span style="color: #339933;">;</span>fetchrow_array<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #0000ff;">$sth</span><span style="color: #339933;">-</span><span style="color: #0000ff;">&amp;gt</span><span style="color: #339933;">;</span>finish<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">### query stdby RFS</span>
<span style="color: #0000ff;">$sth</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">$stbyh</span><span style="color: #339933;">-</span><span style="color: #0000ff;">&amp;gt</span><span style="color: #339933;">;</span>prepare<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">&amp;lt</span><span style="color: #339933;">;</span><span style="color: #0000ff;">&amp;lt</span><span style="color: #339933;">;</span>EOSQL <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000066;">select</span> thread<span style="color: #666666; font-style: italic;">#, SEQUENCE#, BLOCK#</span>
    from gv<span style="color: #0000ff;">\$managed_standby</span> 
    where process<span style="color: #339933;">=</span><span style="color: #ff0000;">'RFS'</span> <span style="color: #b1b100;">and</span> client_process<span style="color: #339933;">=</span><span style="color: #ff0000;">'LGWR'</span> order by thread<span style="color: #666666; font-style: italic;">#</span>
EOSQL
<span style="color: #0000ff;">$sth</span><span style="color: #339933;">-</span><span style="color: #0000ff;">&amp;gt</span><span style="color: #339933;">;</span>execute<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">my</span> <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$rfsthread1</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">$rfssequence1</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">$rfsblock1</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">$sth</span><span style="color: #339933;">-</span><span style="color: #0000ff;">&amp;gt</span><span style="color: #339933;">;</span>fetchrow_array<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">my</span> <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$rfsthread2</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">$rfssequence2</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">$rfsblock2</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">$sth</span><span style="color: #339933;">-</span><span style="color: #0000ff;">&amp;gt</span><span style="color: #339933;">;</span>fetchrow_array<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #0000ff;">$sth</span><span style="color: #339933;">-</span><span style="color: #0000ff;">&amp;gt</span><span style="color: #339933;">;</span>finish<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">### query prod</span>
<span style="color: #0000ff;">$sth</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">$prodh</span><span style="color: #339933;">-</span><span style="color: #0000ff;">&amp;gt</span><span style="color: #339933;">;</span>prepare<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">&amp;lt</span><span style="color: #339933;">;</span><span style="color: #0000ff;">&amp;lt</span><span style="color: #339933;">;</span>EOSQL <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000066;">select</span> thread<span style="color: #666666; font-style: italic;">#, SEQUENCE#, BLOCK#</span>
    from gv<span style="color: #0000ff;">\$managed_standby</span>
    where process<span style="color: #339933;">=</span><span style="color: #ff0000;">'LNS'</span> order by thread<span style="color: #666666; font-style: italic;">#</span>
EOSQL
<span style="color: #0000ff;">$sth</span><span style="color: #339933;">-</span><span style="color: #0000ff;">&amp;gt</span><span style="color: #339933;">;</span>execute<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">my</span> <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$pthread1</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">$psequence1</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">$pblock1</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">$sth</span><span style="color: #339933;">-</span><span style="color: #0000ff;">&amp;gt</span><span style="color: #339933;">;</span>fetchrow_array<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">my</span> <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$pthread2</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">$psequence2</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">$pblock2</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">$sth</span><span style="color: #339933;">-</span><span style="color: #0000ff;">&amp;gt</span><span style="color: #339933;">;</span>fetchrow_array<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #0000ff;">$sth</span><span style="color: #339933;">-</span><span style="color: #0000ff;">&amp;gt</span><span style="color: #339933;">;</span>finish<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
&nbsp;
<span style="color: #000066;">printf</span> <span style="color: #009900;">&#40;</span><span style="color: #ff0000;">&quot;ENVIRONM  Thread Sequence   Block<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000066;">printf</span> <span style="color: #009900;">&#40;</span><span style="color: #ff0000;">&quot;--------- ------ ---------- ----------<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000066;">printf</span> <span style="color: #009900;">&#40;</span><span style="color: #ff0000;">&quot;PROD     LNS1  1 %10d %10d<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">$psequence1</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">$pblock1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000066;">printf</span> <span style="color: #009900;">&#40;</span><span style="color: #ff0000;">&quot;STANDBY  RFS1  1 %10d %10d<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">$rfssequence1</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">$rfsblock1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000066;">printf</span> <span style="color: #009900;">&#40;</span><span style="color: #ff0000;">&quot;PROD     LSN2  2 %10d %10d<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">$psequence2</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">$pblock2</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000066;">printf</span> <span style="color: #009900;">&#40;</span><span style="color: #ff0000;">&quot;STANDBY  RFS2  2 %10d %10d<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">$rfssequence2</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">$rfsblock2</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000066;">printf</span> <span style="color: #009900;">&#40;</span><span style="color: #ff0000;">&quot;STANDBY  MRP0  %d %10d %10d<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">$mrpthread</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">$mrpsequence</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">$mrpblock</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$psequence</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$pblock</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">$mrpthread</span> <span style="color: #339933;">==</span> <span style="color: #cc66cc;">1</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
<span style="color: #0000ff;">$psequence</span><span style="color: #339933;">=</span><span style="color: #0000ff;">$psequence1</span><span style="color: #339933;">;</span>
<span style="color: #0000ff;">$pblock</span><span style="color: #339933;">=</span><span style="color: #0000ff;">$pblock1</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span>
<span style="color: #0000ff;">$psequence</span><span style="color: #339933;">=</span><span style="color: #0000ff;">$psequence2</span><span style="color: #339933;">;</span>
<span style="color: #0000ff;">$pblock</span><span style="color: #339933;">=</span><span style="color: #0000ff;">$pblock2</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #0000ff;">$sth</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">$stbyh</span><span style="color: #339933;">-</span><span style="color: #0000ff;">&amp;gt</span><span style="color: #339933;">;</span>prepare<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">&amp;lt</span><span style="color: #339933;">;</span><span style="color: #0000ff;">&amp;lt</span><span style="color: #339933;">;</span>EOSQL <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000066;">select</span> nvl<span style="color: #009900;">&#40;</span>sum<span style="color: #009900;">&#40;</span>blocks<span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span>
<span style="color: #339933;">+</span> <span style="color: #0000ff;">$pblock</span> <span style="color: #339933;">-</span> <span style="color: #0000ff;">$mrpblock</span> as BLOCK_GAP
from gv<span style="color: #0000ff;">\$archived_log</span>
where thread<span style="color: #666666; font-style: italic;">#=$mrpthread and sequence#</span>
between <span style="color: #0000ff;">$mrpsequence</span> <span style="color: #b1b100;">and</span> <span style="color: #0000ff;">$psequence</span>
EOSQL
<span style="color: #0000ff;">$sth</span><span style="color: #339933;">-</span><span style="color: #0000ff;">&amp;gt</span><span style="color: #339933;">;</span>execute<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">my</span> <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$mrpblockgap</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">$sth</span><span style="color: #339933;">-</span><span style="color: #0000ff;">&amp;gt</span><span style="color: #339933;">;</span>fetchrow_array<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #0000ff;">$sth</span><span style="color: #339933;">-</span><span style="color: #0000ff;">&amp;gt</span><span style="color: #339933;">;</span>finish<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #0000ff;">$sth</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">$stbyh</span><span style="color: #339933;">-</span><span style="color: #0000ff;">&amp;gt</span><span style="color: #339933;">;</span>prepare<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">&amp;lt</span><span style="color: #339933;">;</span><span style="color: #0000ff;">&amp;lt</span><span style="color: #339933;">;</span>EOSQL <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000066;">select</span> nvl<span style="color: #009900;">&#40;</span>sum<span style="color: #009900;">&#40;</span>blocks<span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span>
<span style="color: #339933;">+</span> <span style="color: #0000ff;">$pblock1</span> <span style="color: #339933;">-</span> <span style="color: #0000ff;">$rfsblock1</span> as BLOCK_GAP
from gv<span style="color: #0000ff;">\$archived_log</span>
where thread<span style="color: #666666; font-style: italic;">#=1 and sequence#</span>
between <span style="color: #0000ff;">$rfssequence1</span> <span style="color: #b1b100;">and</span> <span style="color: #0000ff;">$psequence1</span>
EOSQL
<span style="color: #0000ff;">$sth</span><span style="color: #339933;">-</span><span style="color: #0000ff;">&amp;gt</span><span style="color: #339933;">;</span>execute<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">my</span> <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$rfsblockgap1</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">$sth</span><span style="color: #339933;">-</span><span style="color: #0000ff;">&amp;gt</span><span style="color: #339933;">;</span>fetchrow_array<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #0000ff;">$sth</span><span style="color: #339933;">-</span><span style="color: #0000ff;">&amp;gt</span><span style="color: #339933;">;</span>finish<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #0000ff;">$sth</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">$stbyh</span><span style="color: #339933;">-</span><span style="color: #0000ff;">&amp;gt</span><span style="color: #339933;">;</span>prepare<span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">&amp;lt</span><span style="color: #339933;">;</span><span style="color: #0000ff;">&amp;lt</span><span style="color: #339933;">;</span>EOSQL <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000066;">select</span> nvl<span style="color: #009900;">&#40;</span>sum<span style="color: #009900;">&#40;</span>blocks<span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span>
<span style="color: #339933;">+</span> <span style="color: #0000ff;">$pblock2</span> <span style="color: #339933;">-</span> <span style="color: #0000ff;">$rfsblock2</span> as BLOCK_GAP
from gv<span style="color: #0000ff;">\$archived_log</span>
where thread<span style="color: #666666; font-style: italic;">#=2 and sequence#</span>
between <span style="color: #0000ff;">$rfssequence2</span> <span style="color: #b1b100;">and</span> <span style="color: #0000ff;">$psequence2</span>
EOSQL
<span style="color: #0000ff;">$sth</span><span style="color: #339933;">-</span><span style="color: #0000ff;">&amp;gt</span><span style="color: #339933;">;</span>execute<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">my</span> <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">$rfsblockgap2</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">$sth</span><span style="color: #339933;">-</span><span style="color: #0000ff;">&amp;gt</span><span style="color: #339933;">;</span>fetchrow_array<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #0000ff;">$sth</span><span style="color: #339933;">-</span><span style="color: #0000ff;">&amp;gt</span><span style="color: #339933;">;</span>finish<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000066;">printf</span> <span style="color: #009900;">&#40;</span><span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\n</span><span style="color: #000099; font-weight: bold;">\n</span>%-10d blocks gap in TRANSMISSION<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">$rfsblockgap1</span><span style="color: #339933;">+</span><span style="color: #0000ff;">$rfsblockgap2</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000066;">printf</span> <span style="color: #009900;">&#40;</span><span style="color: #ff0000;">&quot;%-10d blocks gap in APPLY (MRP0)<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">$mrpblockgap</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #0000ff;">$stbyh</span><span style="color: #339933;">-</span><span style="color: #0000ff;">&amp;gt</span><span style="color: #339933;">;</span>disconnect<span style="color: #339933;">;</span>
<span style="color: #0000ff;">$prodh</span><span style="color: #339933;">-</span><span style="color: #0000ff;">&amp;gt</span><span style="color: #339933;">;</span>disconnect<span style="color: #339933;">;</span></pre></div></div>

<p>Please foreward me every improvement you implement over my code: it would be nice to post it here.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ludovicocaldara.net/dba/dataguard-check-script-for-real-application-clusters-maa/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Oracle RAC Standard Edition to achieve low cost and high performance</title>
		<link>http://www.ludovicocaldara.net/dba/oracle-rac-standard-edition-to-achieve-low-cost-and-high-performance/</link>
		<comments>http://www.ludovicocaldara.net/dba/oracle-rac-standard-edition-to-achieve-low-cost-and-high-performance/#comments</comments>
		<pubDate>Thu, 27 Nov 2008 23:43:04 +0000</pubDate>
		<dc:creator>Ludovico</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Oracle Database]]></category>
		<category><![CDATA[Performance]]></category>
		<category><![CDATA[cluster]]></category>
		<category><![CDATA[RAC]]></category>
		<category><![CDATA[Standard Edition]]></category>

		<guid isPermaLink="false">http://www.ludovicocaldara.net/dba/?p=29</guid>
		<description><![CDATA[I finished today to create a new production environment based on 2 Linux serverX86_64 and running Oracle RAC 10gR2. (I know, there is 11g right now, but I&#8217;m a conservative!) Wheeew, I just spent a couple of hours applying all the recommended patches! We choosed 2 nodes with a maximum of 2 multi-core processors each [...]]]></description>
			<content:encoded><![CDATA[<p>I finished today to create a new production environment based on 2 Linux serverX86_64 and running Oracle RAC 10gR2. (I know, there is 11g right now, but I&#8217;m a conservative!)<br />
Wheeew, I just spent a couple of hours applying all the recommended patches!<br />
We choosed 2 nodes with a maximum of 2 multi-core processors each one so we can license Standard Edition instead of Enterprise Edition. 64bits addressing allow us to allocate many gigabytes of SGA. I&#8217;m starting with 5Gb but I think we&#8217;ll need more. And a set of 6x300Gb 15krpms disks (it can be expanded with more disks and more shelves).<br />
This configuration keeps low the total cost of ownership but achieves best performance.<br />
Due to disks layout, costs and needed usable storage, we had to configure one huge RAID5 on the SAN with multi-path. I decided anyway to create 2 ASM disk groups (ASM is mandatory for Standard Edition RAC), one for the DB, the second one for the recovery area. With spare disks we should have enough availability and even if it&#8217;s a RAID5 I saw good write performances (&gt;150M/s).</p>
<p>Welcome new RAC, I hope we&#8217;ll feel good together!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ludovicocaldara.net/dba/oracle-rac-standard-edition-to-achieve-low-cost-and-high-performance/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

