<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>An Oracle blog - Amardeep Sidhu</title>
	
	<link>http://amardeepsidhu.com/blog</link>
	<description>Little bit of fun with Oracle and the related technologies...</description>
	<lastBuildDate>Sun, 16 Jun 2013 17:04:56 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/OracleAndMore" /><feedburner:info uri="oracleandmore" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><feedburner:emailServiceId>OracleAndMore</feedburner:emailServiceId><feedburner:feedburnerHostname>http://feedburner.google.com</feedburner:feedburnerHostname><item>
		<title>agent deployment error in EM 12c</title>
		<link>http://feedproxy.google.com/~r/OracleAndMore/~3/7_8nodbfZ9o/</link>
		<comments>http://amardeepsidhu.com/blog/2013/06/16/agent-deployment-error-in-em-12c/#comments</comments>
		<pubDate>Sun, 16 Jun 2013 17:04:56 +0000</pubDate>
		<dc:creator>Sidhu</dc:creator>
				<category><![CDATA[EM]]></category>
		<category><![CDATA[12c]]></category>

		<guid isPermaLink="false">http://amardeepsidhu.com/blog/?p=423</guid>
		<description><![CDATA[Yesterday I was configuring EM 12c for a Sun Super Cluster system. There were a total of 4 LDOMs where I needed to deploy the agent (Setup –&#62; Add targets –&#62; Add targets manually). Out of these 4 everything went fine for 2 LDOMs but for the other two it failed with an error message. [...]]]></description>
				<content:encoded><![CDATA[<p>Yesterday I was configuring EM 12c for a Sun Super Cluster system. There were a total of 4 LDOMs where I needed to deploy the agent (Setup –&gt; Add targets –&gt; Add targets manually). Out of these 4 everything went fine for 2 LDOMs but for the other two it failed with an error message. It didn’t give much details on the EM screen but rather gave a message to try to secure/start the agent manually. When I tried to do that manually the secure agent part worked fine but the start agent command failed with the following error message:</p>
<p><font face="Courier New">oracle@app1:~$emctl start agent      <br />Oracle Enterprise Manager Cloud Control 12c Release 2       <br />Copyright (c) 1996, 2012 Oracle Corporation.&#160; All rights reserved.       <br />Starting agent &#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;. failed.       <br />HTTP Listener failed at Startup       <br />Possible port conflict on port(3872): Retrying the operation&#8230;       <br />Failed to start the agent after 1 attempts.&#160; Please check that the port(3872) is available.</font></p>
<p>I thought that there was something wrong with the port thing so I cleaned the agent installation, made sure that the port wasn’t being used and did the agent deployment again. This time it again failed with the same message but it reported a different port number ie 1830 agent port no:</p>
<p><font face="Courier New">oracle@app1:~$emctl start agent      <br />Oracle Enterprise Manager Cloud Control 12c Release 2       <br />Copyright (c) 1996, 2012 Oracle Corporation.&#160; All rights reserved.       <br />Starting agent &#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;. failed.       <br />HTTP Listener failed at Startup       <br />Possible port conflict on port(1830): Retrying the operation&#8230;       <br />Failed to start the agent after 1 attempts.&#160; Please check that the port(1830) is available.</font></p>
<p>Again checked few things but found nothing wrong. All the LDOMs had similar configuration so what worked for the other two should have worked for these two also.</p>
<p>Before starting with the installation I had noted the LDOM hostnames and IPs in a notepad file and had swapped the IPs of two LDOMs (actually these two only <img style="border-bottom-style: none; border-right-style: none; border-top-style: none; border-left-style: none" class="wlEmoticon wlEmoticon-smilewithtongueout" alt="Smile with tongue out" src="http://amardeepsidhu.com/blog/wp-content/uploads/2013/06/wlEmoticon-smilewithtongueout.png" /> ). But later on I found that and corrected. While looking at the notepad file it occurred to me that the same stuff could be wrong in /etc/hosts of the server where EM is deployed. Oh boy that is what it was. While making the entries in /etc/hosts of EM server, I copied it from the notepad and the wrong entries got copied. The IPs for these two LDOMs got swapped with each other and that was causing the whole problem.</p>
<p>deinstalled the agent, correct the /etc/hosts and tried to deploy again…all worked well ! </p>
<img src="http://feeds.feedburner.com/~r/OracleAndMore/~4/7_8nodbfZ9o" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://amardeepsidhu.com/blog/2013/06/16/agent-deployment-error-in-em-12c/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://amardeepsidhu.com/blog/2013/06/16/agent-deployment-error-in-em-12c/</feedburner:origLink></item>
		<item>
		<title>Updating to Exadata 11.2.3.1.1</title>
		<link>http://feedproxy.google.com/~r/OracleAndMore/~3/hR13g6S5mVM/</link>
		<comments>http://amardeepsidhu.com/blog/2012/08/19/updating-to-exadata-11-2-3-1-1/#comments</comments>
		<pubDate>Sun, 19 Aug 2012 17:07:41 +0000</pubDate>
		<dc:creator>Sidhu</dc:creator>
				<category><![CDATA[Exadata]]></category>
		<category><![CDATA[11.2.3.1.1]]></category>
		<category><![CDATA[Patching]]></category>

		<guid isPermaLink="false">http://amardeepsidhu.com/blog/?p=420</guid>
		<description><![CDATA[Just a quick note about change in the way the compute nodes are patched starting from version 11.2.3.1.1. For earlier versions Oracle provided the minimal pack for patching the compute nodes. Starting with version 11.2.3.1.1 Oracle has discontinued the minimal pack and the updates to compute nodes are done via Unbreakable Linux Network (ULN). Now [...]]]></description>
				<content:encoded><![CDATA[<p>Just a quick note about change in the way the compute nodes are patched starting from version 11.2.3.1.1. For earlier versions Oracle provided the minimal pack for patching the compute nodes. Starting with version 11.2.3.1.1 Oracle has discontinued the minimal pack and the updates to compute nodes are done via Unbreakable Linux Network (ULN). </p>
<p>Now there are three ways to update the compute nodes:</p>
<p>1) You have internet access on the Compute nodes. In this case you can download patch <strong>13741363</strong>, complete the one time setup and start the update.</p>
<p>2) In case you don’t have internet access on the Compute nodes you can choose some intermediate system (that has internet access) to create a local repository and then point the Compute nodes to this system to install the updates.</p>
<p>3) Oracle will also provide all the future updates via an downloadable ISO image file (patch 14245540 for 11.2.3.1.1). You can download that ISO image file, mount it on some local system and point the compute nodes to this system for updating the rpms (the readme has all the details on how to do this).</p>
<p>Some useful links:</p>
<p><a href="https://blogs.oracle.com/XPSONHA/entry/updating_exadata_compute_nodes_using">https://blogs.oracle.com/XPSONHA/entry/updating_exadata_compute_nodes_using</a></p>
<p><a href="https://blogs.oracle.com/XPSONHA/entry/new_channels_for_exadata_11">https://blogs.oracle.com/XPSONHA/entry/new_channels_for_exadata_11</a></p>
<p>Metalink note <strong>1466459.1</strong></p>
<img src="http://feeds.feedburner.com/~r/OracleAndMore/~4/hR13g6S5mVM" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://amardeepsidhu.com/blog/2012/08/19/updating-to-exadata-11-2-3-1-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://amardeepsidhu.com/blog/2012/08/19/updating-to-exadata-11-2-3-1-1/</feedburner:origLink></item>
		<item>
		<title>ORA-01422 while compiling objects</title>
		<link>http://feedproxy.google.com/~r/OracleAndMore/~3/M7rd96BpIls/</link>
		<comments>http://amardeepsidhu.com/blog/2012/07/31/ora-01422-while-compiling-objects/#comments</comments>
		<pubDate>Tue, 31 Jul 2012 16:34:28 +0000</pubDate>
		<dc:creator>Sidhu</dc:creator>
				<category><![CDATA[Troubleshooting]]></category>
		<category><![CDATA[Compile objects]]></category>

		<guid isPermaLink="false">http://amardeepsidhu.com/blog/?p=415</guid>
		<description><![CDATA[There was an interesting issue at one of the customer sites. Few tables in the database were altered and the dependent objects became invalid. But the attempts to compile the objects using utlrp.sql or manually were failing. In all the cases it was giving the same error: SQL&#62; alter function SCOTT.SOME_FUNCTION compile; alter function SCOTT.SOME_FUNCTION [...]]]></description>
				<content:encoded><![CDATA[<p>There was an interesting issue at one of the customer sites. Few tables in the database were altered and the dependent objects became invalid. But the attempts to compile the objects using utlrp.sql or manually were failing. In all the cases it was giving the same error:</p>
<pre>SQL&gt; alter function SCOTT.SOME_FUNCTION compile;
 alter function SCOTT.SOME_FUNCTION compile
*
ERROR at line 1:
ORA-00604: error occurred at recursive SQL level 1
ORA-01422: exact fetch returns more than requested number of rows
ORA-06512: at line 27

SQL&gt;</pre>
<p>&#160;</p>
<p>At first look it sounded like some issue with the dictionary as the error in case of every object (be it a view, function or package) was the same.</p>
<p>Everybody was trying to compile the invalid objects and surprisingly few VIEWs (that were not getting compiled from SQL*Plus) got compiled from Toad ! But that didn&#8217;t explain anything. In fact it was more confusing.</p>
<p>Finally I enabled errorstack for event 1422 and tried to compile a view. Here is the relevant content from the trace file</p>
<pre>----- Error Stack Dump -----
ORA-01422: exact fetch returns more than requested number of rows
----- Current SQL Statement for this session (sql_id=7kb01v7t6s054) -----
SELECT SQL_TEXT FROM V$OPEN_CURSOR VOC, V$SESSION VS WHERE VOC.SADDR = VS.SADDR AND AUDSID=USERENV('sessionid') AND UPPER(SQL_TEXT) LIKE 'ALTER%'</pre>
<p>&#160;</p>
<p>I took it to be some system SQL and started searching in that direction and obviously that was of no use.</p>
<p>In the mean time another guy almost shouted…”oh there is a trigger to capture DDL operations in the database; it must be that”. And indeed it was. Here is the code that was creating the problem:</p>
<pre> select sql_text into vsql_text
           from v$open_cursor voc, v$session vs
           where voc.saddr = vs.saddr
           and audsid=userenv('sessionid')
           and upper(sql_text) like 'ALTER%';</pre>
<pre>&#160;</pre>
<p>As v$open_cursor was returning multiple rows, hence the problem !</p>
<p>Moral is that the errorstack traces do tell a lot (of course if you listen carefully) <img src='http://amardeepsidhu.com/blog/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<img src="http://feeds.feedburner.com/~r/OracleAndMore/~4/M7rd96BpIls" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://amardeepsidhu.com/blog/2012/07/31/ora-01422-while-compiling-objects/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://amardeepsidhu.com/blog/2012/07/31/ora-01422-while-compiling-objects/</feedburner:origLink></item>
		<item>
		<title>Configure GoldenGate Extract to read from remote logs</title>
		<link>http://feedproxy.google.com/~r/OracleAndMore/~3/OtmlV6jtjzQ/</link>
		<comments>http://amardeepsidhu.com/blog/2012/05/26/configure-goldengate-extract-to-read-from-remote-logs/#comments</comments>
		<pubDate>Sat, 26 May 2012 12:43:02 +0000</pubDate>
		<dc:creator>Sidhu</dc:creator>
				<category><![CDATA[GoldenGate]]></category>
		<category><![CDATA[Extract]]></category>
		<category><![CDATA[Remote logs]]></category>

		<guid isPermaLink="false">http://amardeepsidhu.com/blog/?p=398</guid>
		<description><![CDATA[Sometimes you may need to run GoldenGate on some different machine than the one that hosts the database. It is very much possible but some kind of restrictions apply. First is that the Endian order of both the systems should be same and the second is the bit width has to be same. For example [...]]]></description>
				<content:encoded><![CDATA[<p style="text-align: justify;">Sometimes you may need to run GoldenGate on some different machine than the one that hosts the database. It is very much possible but some kind of restrictions apply. First is that the Endian order of both the systems should be same and the second is the bit width has to be same. For example it is not possible to run GoldenGate on a 32 bit system to read from a database that runs on some 64 bit platform. Assuming that the environemnt satisfies the above two conditions; we can use the LOGSOURCE option of TRANSLOGOPTIONS to achieve this.</p>
<p style="text-align: justify;">Here we run GG on host goldengate1 (192.168.0.109) and the database from which we want to capture the changes runs on the host goldengate3 (192.168.0.111). Both the systems run 11.2.0.2 on RHEL 5.5. On goldengate3 redo logs are in the mount point /home which has been NFS mounted on goldengate1 as /home_gg3</p>
<pre>Filesystem           1K-blocks      Used Available Use% Mounted on

192.168.0.111:/home   12184800   7962496   3593376  69% /home_gg3</pre>
<p style="text-align: justify;">
<p> The Extract parameters are as follows:</p>
<pre>EXTRACT ERMT01

USERID ggadmin@orcl3, PASSWORD ggadmin

EXTTRAIL ./dirdat/er

TRANLOGOPTIONS LOGSOURCE LINUX, PATHMAP /home/oracle/app/oracle/oradata/orcl /home_gg3/oracle/app/oracle/oradata/or
cl, PATHMAP /home/oracle/app/oracle/flash_recovery_area/ORCL/archivelog /home_gg3/oracle/app/oracle/flash_recovery_
area/ORCL/archivelog

TABLE HR.*;

(The text in the line starting with TRANLOGOPTIONS is a single line)</pre>
</p>
<p>So using PATHMAP we can make GG aware about the actual location of the red logs &amp; archive logs on the remote server and the mapped location on the system where GG is running (It is somewhat like db_file_name_convert option for Data Guards).</p>
<p>We fire some DMLs on the source database and then run stats command for the Extract</p>
<pre>GGSCI (goldengate1) 93&gt; stats ermt01 totalsonly *

Sending STATS request to EXTRACT ERMT01 ...

Start of Statistics at 2012-05-26 05:17:05.

Output to ./dirdat/er:

Cumulative totals for specified table(s):

*** Total statistics since 2012-05-26 04:51:10 ***
        Total inserts                                1.00
        Total updates                                0.00
        Total deletes                                1.00
        Total discards                               0.00
        Total operations                             2.00
.
.
.

End of Statistics.

GGSCI (goldengate1) 94&gt;</pre>
</p>
<p>For more details have a look at the <a href="http://docs.oracle.com/cd/E35209_01/doc.1121/e29399.pdf" target="_blank">GG reference guide (Page 402)</a>.</p>
<p>&nbsp;</p>
<img src="http://feeds.feedburner.com/~r/OracleAndMore/~4/OtmlV6jtjzQ" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://amardeepsidhu.com/blog/2012/05/26/configure-goldengate-extract-to-read-from-remote-logs/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://amardeepsidhu.com/blog/2012/05/26/configure-goldengate-extract-to-read-from-remote-logs/</feedburner:origLink></item>
		<item>
		<title>Tuning GoldenGate Extract Pump performance</title>
		<link>http://feedproxy.google.com/~r/OracleAndMore/~3/55D-UP6Dtpk/</link>
		<comments>http://amardeepsidhu.com/blog/2012/05/25/tuning-goldengate-extract-pump-performance/#comments</comments>
		<pubDate>Fri, 25 May 2012 15:08:18 +0000</pubDate>
		<dc:creator>Sidhu</dc:creator>
				<category><![CDATA[GoldenGate]]></category>
		<category><![CDATA[Extract Pump]]></category>
		<category><![CDATA[Performance]]></category>

		<guid isPermaLink="false">http://amardeepsidhu.com/blog/?p=387</guid>
		<description><![CDATA[Just a quick note/post about the significance of COMPRESS and TCPBUFSIZE parameter in performance of a GoldenGate Extract Pump process. COMPRESS helps in compressing the outgoing blocks hence helping in better utilization of the bandwidth from source to target. GG is going to uncompress the blocks before writing them to the remote trail file on the target. Compression ratios [...]]]></description>
				<content:encoded><![CDATA[<p style="text-align: justify;">Just a quick note/post about the significance of COMPRESS and TCPBUFSIZE parameter in performance of a GoldenGate Extract Pump process. COMPRESS helps in compressing the outgoing blocks hence helping in better utilization of the bandwidth from source to target. GG is going to uncompress the blocks before writing them to the remote trail file on the target. Compression ratios of 4:1 or better can be achieved. Of course, use of COMPRESS may result in increased CPU usage on both the sides.</p>
<p style="text-align: justify;">TCPBUFSIZE controls the size of the TCP buffer socket that is going to be used by the Extract. If the bandwidth allows, it will be a good idea to send larger packets. So depending upon the available bandwidth one can experiment with the values of TCPBUFSIZE. At one of the client sites, I saw a great increase in the performance after setting TCPBUFSIZE. The trail file (10 MB size) that was taking almost a minute to transfer started getting through in few seconds after setting this parameter. Documentation (<a href="http://docs.oracle.com/cd/E35209_01/doc.1121/e29399.pdf">http://docs.oracle.com/cd/E35209_01/doc.1121/e29399.pdf</a> page 313) provides the method to calculate the optimum value for TCPBUFSIZE for your environment.</p>
<p style="text-align: justify;">While using TCPBUFSIZE value for TCPFLUSHBYTES (at least equal to the value of TCPBUFSIZE) also needs to be set. It is the buffer that collects the data that is going to be transferred to the target.</p>
<p style="text-align: justify;">These parameters can be used like following:</p>
<pre>rmthost, mgrport, compress, tcpbufsize 10000, tcpflushbytes 10000</pre>
</p>
<p>Also see the metalink note <strong>1071892.1</strong>.</p>
<img src="http://feeds.feedburner.com/~r/OracleAndMore/~4/55D-UP6Dtpk" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://amardeepsidhu.com/blog/2012/05/25/tuning-goldengate-extract-pump-performance/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://amardeepsidhu.com/blog/2012/05/25/tuning-goldengate-extract-pump-performance/</feedburner:origLink></item>
		<item>
		<title>DML and HCC – Exadata</title>
		<link>http://feedproxy.google.com/~r/OracleAndMore/~3/FYT9vg0jZnw/</link>
		<comments>http://amardeepsidhu.com/blog/2011/12/22/dml-and-hcc-exadata/#comments</comments>
		<pubDate>Wed, 21 Dec 2011 18:31:11 +0000</pubDate>
		<dc:creator>Sidhu</dc:creator>
				<category><![CDATA[Exadata]]></category>
		<category><![CDATA[HCC]]></category>

		<guid isPermaLink="false">http://amardeepsidhu.com/blog/?p=379</guid>
		<description><![CDATA[Hybrid Columnar Compression (HCC) is a new awesome feature in Exadata that helps in saving a lot of storage space in your environment. This whitepaper on Oracle website explains this feature in detail. Also Uwe Hesse has an excellent how to use all this post on his blog. You can see the compression levels one can [...]]]></description>
				<content:encoded><![CDATA[<p style="text-align: justify;">Hybrid Columnar Compression (HCC) is a new awesome feature in Exadata that helps in saving a lot of storage space in your environment. <a href="http://www.oracle.com/technetwork/middleware/bi-foundation/ehcc-twp-131254.pdf">This whitepaper</a> on Oracle website explains this feature in detail. Also Uwe Hesse has an excellent <em>how to use all this </em><a href="http://uhesse.wordpress.com/2011/01/21/exadata-part-iii-compression/">post on his blog</a>. You can see the compression levels one can achive by making use of HCC. It is very simple to use feature but one needs to be aware of few things before using HCC extensively as otherwise all your storage calculations may go weird. Here are few of the things to keep in mind:</p>
<ul style="text-align: justify;">
<ul>
<li>HCC works with direct path loads only that includes: CTAS, running impdp with ACCESS_METHOD=DIRECT or direct path inserts. If you insert data using a normal insert, it will not be HCC compressed.</li>
</ul>
</ul>
<ul style="text-align: justify;">
<ul>
<li>It is most suited for tables that aren&#8217;t going to be updated once loaded. There are some complications (next point) that arise if some DML is going to be run on HCC compressed data.</li>
</ul>
</ul>
<ul style="text-align: justify;">
<ul>
<li>At block level HCC stores data as compression units. A compression unit can be defined as a set of blocks. Now if some rows (stored with HCC) are updated, they need to be decompressed first. Also in that case the database needs to read the compression unit, not a single block. So once you do some update on the data stored in HCC, it will be moved out of HCC compression. To HCC compress it again you will need to do <em>alter table table_name move compress for </em>(Also see Metalink note 1332853.1)<em>.</em> So if the tables you are planning to use HCC upon, undergo frequent DML, HCC may not be best suited for that scenario. Not only it will add the additional overhead of running <em>alter table move</em> statement every time some updates happen, it may screw up the storage space calculations as well.</li>
</ul>
</ul>
<p style="text-align: justify;">
<img src="http://feeds.feedburner.com/~r/OracleAndMore/~4/FYT9vg0jZnw" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://amardeepsidhu.com/blog/2011/12/22/dml-and-hcc-exadata/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://amardeepsidhu.com/blog/2011/12/22/dml-and-hcc-exadata/</feedburner:origLink></item>
		<item>
		<title>OGG-01004  Aborted grouped transaction on ‘, Database error 1403 ()</title>
		<link>http://feedproxy.google.com/~r/OracleAndMore/~3/Q3sR5oRPrvg/</link>
		<comments>http://amardeepsidhu.com/blog/2011/11/04/ogg-01004-aborted-grouped-transaction-on-database-error-1403/#comments</comments>
		<pubDate>Fri, 04 Nov 2011 11:08:39 +0000</pubDate>
		<dc:creator>Sidhu</dc:creator>
				<category><![CDATA[GoldenGate]]></category>

		<guid isPermaLink="false">http://amardeepsidhu.com/blog/?p=371</guid>
		<description><![CDATA[The last post was just like that. It was this GoldenGate issue that woke me up from the deep sleep to do a post after a long time . Well it was a simple schema to schema replication setup using GoldenGate. We were using the SCN method (Metalink Doc ID 1276058.1 &#38; 1347191.1) to do [...]]]></description>
				<content:encoded><![CDATA[<p style="text-align: justify;">The <a href="http://amardeepsidhu.com/blog/2011/11/04/expdp-not-consistent/" target="_blank">last post</a> was just like that. It was this GoldenGate issue that woke me up from the deep sleep to do a post after a long time <img src='http://amardeepsidhu.com/blog/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' />  .</p>
<p style="text-align: justify;">Well it was a simple schema to schema replication setup using GoldenGate. We were using the SCN method (Metalink Doc ID 1276058.1 &amp; 1347191.1) to do the intial load so that there is no overlvapping of transactions and the replicat runs with minimum issues. Even after following this method, the replicat was hitting</p>
<pre class="brush: plain; title: ; notranslate">2011-10-31 19:25:17  WARNING OGG-01004  Aborted grouped transaction on 'SCHEMA.TABLE', Database error 1403 ().

2011-10-31 19:25:17  WARNING OGG-01003  Repositioning to rba 3202590 in seqno 1.

2011-10-31 19:25:18  WARNING OGG-01154  SQL error 1403 mapping SCHEMA.TABLE TO SCHEMA.TABLE.

2011-10-31 19:25:18  WARNING OGG-01003  Repositioning to rba 3468713 in seqno 1.</pre>
<p>If we managed to bypass this error somehow, it hit:</p>
<pre class="brush: plain; title: ; notranslate">2011-10-24 19:58:15  WARNING OGG-00869  OCI Error ORA-00001: unique constraint (SCHEMA.UK) violated (status = 1), SQL &lt;INSERT INTO &quot;SCHEMA&quot;.&quot;TABLE&quot; (&lt;INSERT HERE&gt;

2011-10-24 19:58:15  WARNING OGG-01004  Aborted grouped transaction on 'SCHEMA.TABLE', Database error 1 (OCI Error ORA-00001: unique constraint (SCHEMA.UK) violated (status = 1), SQL &lt;INSERT HERE&gt;).

2011-10-24 19:58:15  WARNING OGG-01003  Repositioning to rba 1502788 in seqno 3.

2011-10-24 19:58:15  WARNING OGG-01154  SQL error 1 mapping SCHEMA.TABLE to SCHEMA.TABLE OCI Error ORA-00001: unique constraint (SCHEMA.UK) violated (status = 1), SQL &lt;INSERT HERE&gt;.

2011-10-24 19:58:15  WARNING OGG-01003  Repositioning to rba 1502788 in seqno 3.</pre>
<p>1403 means that GoldenGate couldn&#8217;t find the record it wanted to update.</p>
<p>00001 would mean that the record GoldenGate tried to insert was already there.</p>
<p style="text-align: justify;">In our case, as we used SCN method so none of them was expected. So these weird errors left us totally confused. Some guys suggested that expdp was not taking a consistent image and some transactions were getting overlapped (picked up by both expdp &amp; GG extract trail). We took the database down and repeated the exercise but oops ! it hit almost the same errors again. So it was not about consistency for sure.</p>
<p style="text-align: justify;">Till now we haven&#8217;t been examining the contents of discard file very seriously. As the errors were pretty simple so we always suspected that some transactions were getting overlapped. Now it was high time to take some help from discard file as well <img src='http://amardeepsidhu.com/blog/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  . We took the before/after image of the record from the discard file and checked it in the target database &amp; values in one or two columns were different (that is why GG couldn&#8217;t find that record). The new values were the actual hint towards the solution [It was a table storing the mail requests and their statuses. This update that GG was trying to run was updating the status from NOT-SENT TO SENT but here on the target the status was already set to 'ORA-something......']. We got the clue that something must have run on the target itself that spoiled this record and now GG is not able to find it and abending with 1403. select * from dba_jobs cleared it all. While doing the initial load with expdp/impdp, job also got imported and some of them were in not broken state. They were firing according to their schedule and making changes to data in the target. So before GG came to update/insert record the job had already done its game and the replicat was hitting different errors. We did the initial load again (this time by using flashback_scn in the running database), disabled all the jobs and ran the replicat. It went through without any errors.</p>
<p style="text-align: justify;">So things to take care of, in such cases:</p>
<p style="text-align: justify;">1) Disable all the triggers on the target side (or exclude triggers while running expdp)</p>
<p style="text-align: justify;">2) Look for and disable any scheduled jobs (could be dba_jobs, dba_scheduler_jobs or cron)</p>
<p style="text-align: justify;">Happy GoldenGate&#8217;ing !</p>
<p style="text-align: justify;">
<img src="http://feeds.feedburner.com/~r/OracleAndMore/~4/Q3sR5oRPrvg" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://amardeepsidhu.com/blog/2011/11/04/ogg-01004-aborted-grouped-transaction-on-database-error-1403/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://amardeepsidhu.com/blog/2011/11/04/ogg-01004-aborted-grouped-transaction-on-database-error-1403/</feedburner:origLink></item>
		<item>
		<title>expdp not consistent</title>
		<link>http://feedproxy.google.com/~r/OracleAndMore/~3/tfAFal0TETo/</link>
		<comments>http://amardeepsidhu.com/blog/2011/11/04/expdp-not-consistent/#comments</comments>
		<pubDate>Fri, 04 Nov 2011 09:40:26 +0000</pubDate>
		<dc:creator>Sidhu</dc:creator>
				<category><![CDATA[Troubleshooting]]></category>
		<category><![CDATA[expdp]]></category>

		<guid isPermaLink="false">http://amardeepsidhu.com/blog/?p=368</guid>
		<description><![CDATA[Came across this small oddity that documentation of 10.2 and 11.2 states that expdp by default takes consistent image of the database. But actually it is not so. You need to use flashback_scn/flashback_time for that. Metalink doc 377218.1 explains the scenario.]]></description>
				<content:encoded><![CDATA[<p>Came across this small oddity that documentation of 10.2 and 11.2 states that expdp by default takes consistent image of the database. But actually it is not so. You need to use flashback_scn/flashback_time for that. Metalink doc 377218.1 explains the scenario.</p>
<img src="http://feeds.feedburner.com/~r/OracleAndMore/~4/tfAFal0TETo" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://amardeepsidhu.com/blog/2011/11/04/expdp-not-consistent/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://amardeepsidhu.com/blog/2011/11/04/expdp-not-consistent/</feedburner:origLink></item>
		<item>
		<title>dbc_min_pct and dbc_max_pct in HP-UX</title>
		<link>http://feedproxy.google.com/~r/OracleAndMore/~3/AmjOi_o7Qgc/</link>
		<comments>http://amardeepsidhu.com/blog/2011/05/25/dbc_min_pct-and-dbc_max_pct-in-hp-ux/#comments</comments>
		<pubDate>Wed, 25 May 2011 11:15:56 +0000</pubDate>
		<dc:creator>Sidhu</dc:creator>
				<category><![CDATA[Oracle Tuning]]></category>
		<category><![CDATA[Troubleshooting]]></category>
		<category><![CDATA[dbc_max_pct]]></category>
		<category><![CDATA[dbc_min_pct]]></category>
		<category><![CDATA[HP-UX]]></category>

		<guid isPermaLink="false">http://amardeepsidhu.com/blog/?p=357</guid>
		<description><![CDATA[It was a 10g (10.2.0.5 on HP-UX 11.23 RISC) database which was recently upgraded from 9.2.0.8. The CPU and memory utilization was going really high. After tuning few of the queries coming in top, CPU usage was coming within accetable limits but the memory usage was still high. There was a total of 16 GB [...]]]></description>
				<content:encoded><![CDATA[<p style="text-align: justify;">It was a 10g (10.2.0.5 on HP-UX 11.23 RISC) database which was recently upgraded from 9.2.0.8. The CPU and memory utilization was going really high. After tuning few of the queries coming in top, CPU usage was coming within accetable limits but the memory usage was still high. There was a total of 16 GB of RAM on the server and the usage was above 90%, constantly. One of the reasons behind high usage was increase in the SGA size. It was increased from 2.5 GB (in 9i) to around 5 GB (in 10g). Another major chunk was being eaten by OS buffer cache. While looking at the memory usage with kmeminfo:
<pre class="brush: bash; title: ; notranslate">Buffer cache        =  1048448    4.0g  25%  details with -bufcache</pre>
</p>
<p style="text-align: justify;">In HP-UX, The memory allocated to (dynamic) buffer cache is controlled by two parameters <strong>dbc_min_pct</strong> and <strong>dbc_max_pct</strong>. It can vary between dbc_min_pct and dbc_max_pct percent of the total RAM. They default to 5 and 50 respectively. For a system that is running an Oracle database value of 50 for dbc_max_pct is way too high. That means half of the memory is going to be allocated to OS buffer cache. As Oracle has got its own buffer cache so the OS cache is not of much use. As mentioned in the metalink note 726652.1, the value of dbc_max_pct can be safely lowered without impacting the Oracle database performance. In many of the threads (on HP website) people have suggested the value of 10 for db_max_pct. Not sure if it is more like a thumb rule but in the same metalink note (726652.1) it is mentioned that if %rcache in sar -b is above 90, that means your OS buffer cache is adequately sized.</p>
<p>After setting the value of dbc_max_pct to 15 (It will be changed to 10, finally), around 1.6 GB more memory was freed. Also there was no impact on the database or OS performance. Here are few of the metalink notes and threads on HP-UX website that talk about these parameters in detail:</p>
<p><a href="https://supporthtml.oracle.com/ep/faces/secure/km/DocumentDisplay.jspx?id=434535.1" target="_blank">Oracle Shadow Processes Are Taking Too Much Memory (Doc ID 434535.1)</a></p>
<p><a href="https://supporthtml.oracle.com/ep/faces/secure/km/DocumentDisplay.jspx?id=726652.1" target="_blank">How OS Buffer Cache Size Affects Db Performance (Doc ID 726652.1) </a></p>
<p><a href="https://supporthtml.oracle.com/ep/faces/secure/km/DocumentDisplay.jspx?id=68105.1" target="_blank">Commonly Misconfigured HP-UX Kernel Parameters (Doc ID 68105.1) </a></p>
<p><a href="http://forums11.itrc.hp.com/service/forums/questionanswer.do?admit=109447626+1306231311459+28353475&amp;threadId=1266914" target="_blank">http://forums11.itrc.hp.com/service/forums/questionanswer.do?admit=109447626+1306231311459+28353475&amp;threadId=1266914</a></p>
<p><a href="http://forums11.itrc.hp.com/service/forums/questionanswer.do?threadId=727618" target="_blank">http://forums11.itrc.hp.com/service/forums/questionanswer.do?threadId=727618</a></p>
<p><a href="http://forums11.itrc.hp.com/service/forums/questionanswer.do?threadId=467288" target="_blank">http://forums11.itrc.hp.com/service/forums/questionanswer.do?threadId=467288</a></p>
<p><a href="http://forums11.itrc.hp.com/service/forums/questionanswer.do?threadId=750342" target="_blank">http://forums11.itrc.hp.com/service/forums/questionanswer.do?threadId=750342</a></p>
<p>&nbsp;</p>
<img src="http://feeds.feedburner.com/~r/OracleAndMore/~4/AmjOi_o7Qgc" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://amardeepsidhu.com/blog/2011/05/25/dbc_min_pct-and-dbc_max_pct-in-hp-ux/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://amardeepsidhu.com/blog/2011/05/25/dbc_min_pct-and-dbc_max_pct-in-hp-ux/</feedburner:origLink></item>
		<item>
		<title>ORA-12547: TNS:lost contact</title>
		<link>http://feedproxy.google.com/~r/OracleAndMore/~3/RI5ORnu6LPo/</link>
		<comments>http://amardeepsidhu.com/blog/2011/05/18/ora-12547-tns-lost-contact/#comments</comments>
		<pubDate>Wed, 18 May 2011 05:43:08 +0000</pubDate>
		<dc:creator>Sidhu</dc:creator>
				<category><![CDATA[Troubleshooting]]></category>
		<category><![CDATA[ORA-12547]]></category>
		<category><![CDATA[TNS:lost contact]]></category>

		<guid isPermaLink="false">http://amardeepsidhu.com/blog/?p=351</guid>
		<description><![CDATA[Very simple issue but took some amount of time in troubleshooting so thought about posting it here. May be it proves to be useful for someone. Scenario was: Oracle is installed from &#8220;oracle&#8221; user and all runs well. There is a new OS user &#8220;test1&#8243; that also needs to use sqlplus. So granted the necessary [...]]]></description>
				<content:encoded><![CDATA[<p style="text-align: justify;">Very simple issue but took some amount of time in troubleshooting so thought about posting it here. May be it proves to be useful for someone.</p>
<p>Scenario was: Oracle is installed from &#8220;oracle&#8221; user and all runs well. There is a new OS user &#8220;test1&#8243; that also needs to use sqlplus. So granted the necessary permissions on ORACLE_HOME to test1. Tried to connect sqlplus scott/tiger@DB and yes it works. But while trying sqlplus scott/tiger it throws:</p>
<p style="text-align: justify;">
<pre class="brush: sql; title: ; notranslate">$ sqlplus scott/tiger

SQL*Plus: Release 10.2.0.5.0 - Production on Wed May 18 09:32:35 2011

Copyright (c) 1982, 2010, Oracle.  All Rights Reserved.

ERROR:
ORA-12547: TNS:lost contact


Enter user-name: ^C
$</pre>
</p>
<p style="text-align: justify;">Did a lot of troubleshooting including checking tnsnames.ora, sqlnet.ora, listener.ora and so on. Nothing was hitting my mind so finally raised an SR. And it has to do with the permissions of the $ORACLE_HOME/bin/oracle binary. The permissions of oracle executable should be rwsr-s&#8211;x or 6751 but they were not. See below:</p>
<p style="text-align: justify;">
<pre class="brush: sql; title: ; notranslate">$ id
uid=241(test1) gid=202(users) groups=1(staff),13(dba)
$

$ cd $ORACLE_HOME/bin
$ ls -ltr oracle
-rwxr-xr-x    1 oracle   dba       136803483 Mar 16 20:32 oracle
$

$ chmod 6751 oracle
$ ls -ltr oracle
-rwsr-s--x    1 oracle   dba       136803483 Mar 16 20:32 oracle
$

$ sqlplus scott/tiger

SQL*Plus: Release 10.2.0.5.0 - Production on Wed May 18 10:23:27 2011

Copyright (c) 1982, 2010, Oracle.  All Rights Reserved.


Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL&gt; show user
USER is &quot;SCOTT&quot;
SQL&gt;</pre></p>
<img src="http://feeds.feedburner.com/~r/OracleAndMore/~4/RI5ORnu6LPo" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://amardeepsidhu.com/blog/2011/05/18/ora-12547-tns-lost-contact/feed/</wfw:commentRss>
		<slash:comments>18</slash:comments>
		<feedburner:origLink>http://amardeepsidhu.com/blog/2011/05/18/ora-12547-tns-lost-contact/</feedburner:origLink></item>
	</channel>
</rss>
