<?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>An Oracle blog - Amardeep Sidhu &#187; Troubleshooting</title>
	<atom:link href="http://amardeepsidhu.com/blog/category/troubleshooting/feed/" rel="self" type="application/rss+xml" />
	<link>http://amardeepsidhu.com/blog</link>
	<description>Little bit of fun with Oracle and the related technologies...</description>
	<lastBuildDate>Thu, 22 Dec 2011 05:59:25 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>expdp not consistent</title>
		<link>http://amardeepsidhu.com/blog/2011/11/04/expdp-not-consistent/</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.<div class="addthis_toolbox addthis_default_style " addthis:url='http://amardeepsidhu.com/blog/2011/11/04/expdp-not-consistent/' addthis:title='expdp not consistent '  ><a class="addthis_button_facebook_like" fb:like:layout="button_count"></a><a class="addthis_button_tweet"></a><a class="addthis_counter addthis_pill_style"></a></div>]]></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>
<div class="addthis_toolbox addthis_default_style " addthis:url='http://amardeepsidhu.com/blog/2011/11/04/expdp-not-consistent/' addthis:title='expdp not consistent '  ><a class="addthis_button_facebook_like" fb:like:layout="button_count"></a><a class="addthis_button_tweet"></a><a class="addthis_counter addthis_pill_style"></a></div>]]></content:encoded>
			<wfw:commentRss>http://amardeepsidhu.com/blog/2011/11/04/expdp-not-consistent/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>dbc_min_pct and dbc_max_pct in HP-UX</title>
		<link>http://amardeepsidhu.com/blog/2011/05/25/dbc_min_pct-and-dbc_max_pct-in-hp-ux/</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 [...]<div class="addthis_toolbox addthis_default_style " addthis:url='http://amardeepsidhu.com/blog/2011/05/25/dbc_min_pct-and-dbc_max_pct-in-hp-ux/' addthis:title='dbc_min_pct and dbc_max_pct in HP-UX '  ><a class="addthis_button_facebook_like" fb:like:layout="button_count"></a><a class="addthis_button_tweet"></a><a class="addthis_counter addthis_pill_style"></a></div>]]></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>
<div class="addthis_toolbox addthis_default_style " addthis:url='http://amardeepsidhu.com/blog/2011/05/25/dbc_min_pct-and-dbc_max_pct-in-hp-ux/' addthis:title='dbc_min_pct and dbc_max_pct in HP-UX '  ><a class="addthis_button_facebook_like" fb:like:layout="button_count"></a><a class="addthis_button_tweet"></a><a class="addthis_counter addthis_pill_style"></a></div>]]></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>
		</item>
		<item>
		<title>ORA-12547: TNS:lost contact</title>
		<link>http://amardeepsidhu.com/blog/2011/05/18/ora-12547-tns-lost-contact/</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 [...]<div class="addthis_toolbox addthis_default_style " addthis:url='http://amardeepsidhu.com/blog/2011/05/18/ora-12547-tns-lost-contact/' addthis:title='ORA-12547: TNS:lost contact '  ><a class="addthis_button_facebook_like" fb:like:layout="button_count"></a><a class="addthis_button_tweet"></a><a class="addthis_counter addthis_pill_style"></a></div>]]></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>
<div class="addthis_toolbox addthis_default_style " addthis:url='http://amardeepsidhu.com/blog/2011/05/18/ora-12547-tns-lost-contact/' addthis:title='ORA-12547: TNS:lost contact '  ><a class="addthis_button_facebook_like" fb:like:layout="button_count"></a><a class="addthis_button_tweet"></a><a class="addthis_counter addthis_pill_style"></a></div>]]></content:encoded>
			<wfw:commentRss>http://amardeepsidhu.com/blog/2011/05/18/ora-12547-tns-lost-contact/feed/</wfw:commentRss>
		<slash:comments>16</slash:comments>
		</item>
		<item>
		<title>waiting for resmgr:become active &#8211; can&#8217;t login</title>
		<link>http://amardeepsidhu.com/blog/2011/03/04/waiting-for-resmgr-become-active-cant-login/</link>
		<comments>http://amardeepsidhu.com/blog/2011/03/04/waiting-for-resmgr-become-active-cant-login/#comments</comments>
		<pubDate>Fri, 04 Mar 2011 11:49:33 +0000</pubDate>
		<dc:creator>Sidhu</dc:creator>
				<category><![CDATA[Troubleshooting]]></category>
		<category><![CDATA[resmgr:become active]]></category>

		<guid isPermaLink="false">http://amardeepsidhu.com/blog/?p=342</guid>
		<description><![CDATA[Some time back, I was at a client where the customer complained that no one was able to log in to the database. It was Oracle 10.2.0.4 running on HP-Ux. I logged in to the database and checked the wait events: Tanel&#8217;s snapper showed something like: If we check the description of the wait event, [...]<div class="addthis_toolbox addthis_default_style " addthis:url='http://amardeepsidhu.com/blog/2011/03/04/waiting-for-resmgr-become-active-cant-login/' addthis:title='waiting for resmgr:become active &#8211; can&#8217;t login '  ><a class="addthis_button_facebook_like" fb:like:layout="button_count"></a><a class="addthis_button_tweet"></a><a class="addthis_counter addthis_pill_style"></a></div>]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;">Some time back, I was at a client where the customer complained that no one was able to log in to the database. It was Oracle 10.2.0.4 running on HP-Ux. I logged in to the database and checked the wait events:</p>
<pre class="brush: sql; title: ; notranslate">SQL&gt; @wait

EVENT                                                              COUNT(*)
---------------------------------------------------------------- ----------
wait for possible quiesce finish                                          1
Streams AQ: qmn coordinator idle wait                                     1
Streams AQ: qmn slave idle wait                                           1
Streams AQ: waiting for time management or cleanup tasks                  1
SQL*Net message to client                                                 1
smon timer                                                                1
pmon timer                                                                1
jobq slave wait                                                           4
rdbms ipc message                                                        11
SQL*Net message from client                                              27
resmgr:become active                                                    322

11 rows selected.

SQL&gt;</pre>
<p>Tanel&#8217;s snapper showed something like:</p>
<pre class="brush: sql; title: ; notranslate">SQL&gt; @snapper ash 5 1 all
Sampling with interval 5 seconds, 1 times...

-- Session Snapper v3.11 by Tanel Poder @ E2SN ( http://tech.e2sn.com )

-----------------------------------------------------------------------
Active% | SQL_ID          | EVENT                     | WAIT_CLASS
-----------------------------------------------------------------------
 26322% | 4ffu7nb93c2c9   | resmgr:become active      | Scheduler
  1900% | 2wn958z7gzh57   | resmgr:become active      | Scheduler
  1400% | 9d9bg2r538nd2   | resmgr:become active      | Scheduler
   600% | 4d3k70q6y344k   | resmgr:become active      | Scheduler
   500% | d6vwqbw6r2ffk   | resmgr:become active      | Scheduler
   500% | 4tsrz92mmshbw   | resmgr:become active      | Scheduler
   200% | 37td1bbvc1a69   | resmgr:become active      | Scheduler
   100% | ftdjfxws0s8q9   | resmgr:become active      | Scheduler
   100% | 41apc1bjqrfbv   | resmgr:become active      | Scheduler
   100% | af9d8aqtkvn02   | resmgr:become active      | Scheduler

--  End of ASH snap 1, end=2011-02-10 11:06:40, seconds=5, samples_taken=23

PL/SQL procedure successfully completed.

SQL&gt;</pre>
<p>If we check the <a href="http://download.oracle.com/docs/cd/B19306_01/server.102/b14237/waitevents003.htm#sthref3161" target="_blank">description of the wait event</a>, it says:</p>
<blockquote><p>The session is waiting for a resource manager active session slot. This event occurs when the resource manager is enabled and the number of active sessions in the session&#8217;s current consumer group exceeds the current resource plan&#8217;s active session limit for the consumer group. To reduce the occurrence of this wait event, increase the active session limit for the session&#8217;s current consumer group.</p></blockquote>
<p>But if we check the resource_limit settings:</p>
<pre class="brush: sql; title: ; notranslate">SQL&gt; show parameter resource

NAME_COL_PLUS_SHOW_PARAM   TYPE		VALUE_COL_PLUS_SHOW_PARAM
----------------------- -----------     --------------------------
resource_limit            boolean		FALSE
resource_manager_plan     string

SQL&gt;</pre>
<p>What ? Resource manager is not enabled. But why all the sessions are waiting for<strong> resmgr:become active</strong> and nobody is able to login ?</p>
<p>A bit of googling lead me to <a href="http://www.saptechies.com/oracle-wait-events" target="_blank">this page</a> from where I got the clue.</p>
<blockquote><p>Generally, this wait situation occurs when you execute certain EMCA operations such as the operation for creating the EM repository. As a result of these operations, the systems implicity switches to QUIESCE mode. Therefore, all database connections (except users SYS and SYSTEM) must wait for &#8220;resmgr:become active&#8221;. In this case, refer to Note 1044758 and execute the following command if necessary:</p>
<p>ALTER SYSTEM UNQUIESCE;</p></blockquote>
<p style="text-align: justify;">I asked around in the DBA team and one of the guys was trying to configure EM for the database due to which system switched tto QUIESCE mode and all the sessions were waiting on <strong>resmgr:become active</strong>.</p>
<p style="text-align: justify;">After canceling the operation, the wait event was gone and everything was working normally.</p>
<div class="addthis_toolbox addthis_default_style " addthis:url='http://amardeepsidhu.com/blog/2011/03/04/waiting-for-resmgr-become-active-cant-login/' addthis:title='waiting for resmgr:become active &#8211; can&#8217;t login '  ><a class="addthis_button_facebook_like" fb:like:layout="button_count"></a><a class="addthis_button_tweet"></a><a class="addthis_counter addthis_pill_style"></a></div>]]></content:encoded>
			<wfw:commentRss>http://amardeepsidhu.com/blog/2011/03/04/waiting-for-resmgr-become-active-cant-login/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Issues in upgrading from 9i to 10g</title>
		<link>http://amardeepsidhu.com/blog/2011/01/29/issues-in-upgrading-from-9i-to-10g/</link>
		<comments>http://amardeepsidhu.com/blog/2011/01/29/issues-in-upgrading-from-9i-to-10g/#comments</comments>
		<pubDate>Sat, 29 Jan 2011 17:00:29 +0000</pubDate>
		<dc:creator>Sidhu</dc:creator>
				<category><![CDATA[Troubleshooting]]></category>
		<category><![CDATA[10g]]></category>
		<category><![CDATA[9i]]></category>
		<category><![CDATA[Upgrade]]></category>

		<guid isPermaLink="false">http://amardeepsidhu.com/blog/2011/01/29/issues-in-upgrading-from-9i-to-10g/</guid>
		<description><![CDATA[Last week I had a chance to upgrade a 9.2.0.7 database to 10.2.0.5. The size of the database was around 800 GB. The major applications connecting to the database were developed in Pro*C and Oracle Forms. The upgrade itself pretty smooth but there were few glitches around that needed to be handled. Just thought about [...]<div class="addthis_toolbox addthis_default_style " addthis:url='http://amardeepsidhu.com/blog/2011/01/29/issues-in-upgrading-from-9i-to-10g/' addthis:title='Issues in upgrading from 9i to 10g '  ><a class="addthis_button_facebook_like" fb:like:layout="button_count"></a><a class="addthis_button_tweet"></a><a class="addthis_counter addthis_pill_style"></a></div>]]></description>
			<content:encoded><![CDATA[<p align="justify">Last week I had a chance to upgrade a 9.2.0.7 database to 10.2.0.5. The size of the database was around 800 GB. The major applications connecting to the database were developed in Pro*C and Oracle Forms. The upgrade itself pretty smooth but there were few glitches around that needed to be handled. Just thought about documenting all the issues:</p>
<ul>
<li>
<div align="justify">Few users in the database were assigned the CREATE SESSION privilege through a password protected role (That role was the default role for that user). 10.2.0.5 onwards, password protected roles can’t be set as default roles. The alternate is to either disable the password for the role or assign CREATE SESSION directly to the user, not through a role.</div>
</li>
<li>
<div align="justify">After the upgrade, few procedures became invalid and while compiling started giving <strong>ORA-00918: COLUMN AMBIGUOUSLY DEFINED</strong>. The issue was bug 2846640 which is fixed in 10.2. Actually, in few of the queries using ANSI syntax, the developer didn’t qualify the column names with table names. It worked fine in 9i but due to the bug getting fixed in 10g, it started giving ORA-00918. The simple solution is to prefix the column name with the table name.</div>
</li>
<li>
<div align="justify">Few of the application schema owner users complained that they were not able to modify the procedures/packages in their own schemas. The schemas were not assigned CREATE PROCEDURE privilege but as per <a href="http://download.oracle.com/docs/cd/B19306_01/network.102/b14266/authoriz.htm#sthref453" target="_blank">documentation</a>, they should be able to modify the existing procedures/packages owned by them. This again is a documentation bug. It worked fine in 9i but in 10g onwards you need to have either a CREATE PROCEDURE or ALTER ANY PROCEDURE privilege (a risky one) to be able to edit the PL/SQL units in your own schema. </div>
</li>
</ul>
<p>These were few of the issues encountered, rest of the upgrade was super smooth !</p>
<p>Happy upgrading !</p>
<div class="addthis_toolbox addthis_default_style " addthis:url='http://amardeepsidhu.com/blog/2011/01/29/issues-in-upgrading-from-9i-to-10g/' addthis:title='Issues in upgrading from 9i to 10g '  ><a class="addthis_button_facebook_like" fb:like:layout="button_count"></a><a class="addthis_button_tweet"></a><a class="addthis_counter addthis_pill_style"></a></div>]]></content:encoded>
			<wfw:commentRss>http://amardeepsidhu.com/blog/2011/01/29/issues-in-upgrading-from-9i-to-10g/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ORA-39083: Object type INDEX failed to create with error</title>
		<link>http://amardeepsidhu.com/blog/2010/12/04/ora-39083-object-type-index-failed-to-create-with-error/</link>
		<comments>http://amardeepsidhu.com/blog/2010/12/04/ora-39083-object-type-index-failed-to-create-with-error/#comments</comments>
		<pubDate>Sat, 04 Dec 2010 11:52:56 +0000</pubDate>
		<dc:creator>Sidhu</dc:creator>
				<category><![CDATA[Troubleshooting]]></category>
		<category><![CDATA[ORA-14102]]></category>
		<category><![CDATA[ORA-39083]]></category>

		<guid isPermaLink="false">http://amardeepsidhu.com/blog/?p=290</guid>
		<description><![CDATA[Another let-us-help-Google post . While running impdp import in 11g, you hit: It is related to bug 9015411 where DBMS_METADATA.GET_DDL creates incorrect create index statement by dumping both LOGGING and NO LOGGING clauses. Due to this the CREATE INDEX statement, while running impdp fails with the above error. It applies to 11.2.0.1 (Metalink doc id [...]<div class="addthis_toolbox addthis_default_style " addthis:url='http://amardeepsidhu.com/blog/2010/12/04/ora-39083-object-type-index-failed-to-create-with-error/' addthis:title='ORA-39083: Object type INDEX failed to create with error '  ><a class="addthis_button_facebook_like" fb:like:layout="button_count"></a><a class="addthis_button_tweet"></a><a class="addthis_counter addthis_pill_style"></a></div>]]></description>
			<content:encoded><![CDATA[<p>Another let-us-help-Google post <img src='http://amardeepsidhu.com/blog/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> .</p>
<p>While running impdp import in 11g, you hit:</p>
<pre class="brush: sql; title: ; notranslate">ORA-39083: Object type INDEX failed to create with error:
ORA-14102: only one LOGGING or NOLOGGING clause may be specified</pre>
<p style="text-align: justify;">It is related to bug 9015411 where DBMS_METADATA.GET_DDL creates incorrect create index statement by dumping both LOGGING and NO LOGGING clauses. Due to this the CREATE INDEX statement, while running impdp fails with the above error. It applies to 11.2.0.1 (Metalink doc id 1066635.1)</p>
<p>Fix is to install the patch, if it is available for your platform. Another workaround is given in <a href="http://forums.oracle.com/forums/thread.jspa?messageID=4512555" target="_blank">this OTN thread</a> i.e. strip the create index statement of storage related information by using TRANSFORM=SEGMENT_ATTRIBUTES:N:INDEX &amp; TRANSFORM=SEGMENT_ATTRIBUTES:N:CONSTRAINT</p>
<div class="addthis_toolbox addthis_default_style " addthis:url='http://amardeepsidhu.com/blog/2010/12/04/ora-39083-object-type-index-failed-to-create-with-error/' addthis:title='ORA-39083: Object type INDEX failed to create with error '  ><a class="addthis_button_facebook_like" fb:like:layout="button_count"></a><a class="addthis_button_tweet"></a><a class="addthis_counter addthis_pill_style"></a></div>]]></content:encoded>
			<wfw:commentRss>http://amardeepsidhu.com/blog/2010/12/04/ora-39083-object-type-index-failed-to-create-with-error/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>EXP-00056: ORACLE error 28002 encountered</title>
		<link>http://amardeepsidhu.com/blog/2010/11/14/exp-00056-oracle-error-28002-encountered/</link>
		<comments>http://amardeepsidhu.com/blog/2010/11/14/exp-00056-oracle-error-28002-encountered/#comments</comments>
		<pubDate>Sat, 13 Nov 2010 18:54:30 +0000</pubDate>
		<dc:creator>Sidhu</dc:creator>
				<category><![CDATA[Troubleshooting]]></category>
		<category><![CDATA[Bug 1654141]]></category>
		<category><![CDATA[EXP-00056]]></category>
		<category><![CDATA[ORA-24309]]></category>
		<category><![CDATA[ORA-28002]]></category>

		<guid isPermaLink="false">http://amardeepsidhu.com/blog/?p=281</guid>
		<description><![CDATA[Yesterday, a friend of mine asked me about an error he was getting while running a schema level export in Oracle 8i: I googled and metalink&#8217;ed (oops&#8230;is there anything like that ? ) a bit and found that it was bug 1654141 where user accounts in grace period cannot perform export. It is fixed in [...]<div class="addthis_toolbox addthis_default_style " addthis:url='http://amardeepsidhu.com/blog/2010/11/14/exp-00056-oracle-error-28002-encountered/' addthis:title='EXP-00056: ORACLE error 28002 encountered '  ><a class="addthis_button_facebook_like" fb:like:layout="button_count"></a><a class="addthis_button_tweet"></a><a class="addthis_counter addthis_pill_style"></a></div>]]></description>
			<content:encoded><![CDATA[<p>Yesterday, a friend of mine asked me about an error he was getting while running a schema level export in Oracle 8i:</p>
<pre class="brush: sql; title: ; notranslate">exp system/manager@DB owner=ABC file=ABC.dmp log =ABC.log

Export: Release 8.1.7.1.0 - Production on Fri Nov 12 04:21:05 2010

(c) Copyright 2000 Oracle Corporation.  All rights reserved.

EXP-00056: ORACLE error 28002 encountered
ORA-28002: the password will expire within 11 days
EXP-00056: ORACLE error 24309 encountered
ORA-24309: already connected to a server
EXP-00000: Export terminated unsuccessfully</pre>
<p style="text-align: justify;">I googled and metalink&#8217;ed (oops&#8230;is there anything like that ? <img src='http://amardeepsidhu.com/blog/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  ) a bit and found that it was bug 1654141 where user accounts in grace period cannot perform export. It is fixed in Oracle 9i (version 9.0.0.0 as per metalink). The obvious work around is to change the password and then try again. Thought about posting it here so that Google can give little better results if someone in trouble comes searching for it <img src='http://amardeepsidhu.com/blog/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> .</p>
<div class="addthis_toolbox addthis_default_style " addthis:url='http://amardeepsidhu.com/blog/2010/11/14/exp-00056-oracle-error-28002-encountered/' addthis:title='EXP-00056: ORACLE error 28002 encountered '  ><a class="addthis_button_facebook_like" fb:like:layout="button_count"></a><a class="addthis_button_tweet"></a><a class="addthis_counter addthis_pill_style"></a></div>]]></content:encoded>
			<wfw:commentRss>http://amardeepsidhu.com/blog/2010/11/14/exp-00056-oracle-error-28002-encountered/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>ORA-30019: Illegal rollback Segment operation in Automatic Undo mode</title>
		<link>http://amardeepsidhu.com/blog/2009/07/09/ora-30019-illegal-rollback-segment-operation-in-automatic-undo-mode/</link>
		<comments>http://amardeepsidhu.com/blog/2009/07/09/ora-30019-illegal-rollback-segment-operation-in-automatic-undo-mode/#comments</comments>
		<pubDate>Thu, 09 Jul 2009 17:56:59 +0000</pubDate>
		<dc:creator>Sidhu</dc:creator>
				<category><![CDATA[Troubleshooting]]></category>
		<category><![CDATA[ORA-30019]]></category>

		<guid isPermaLink="false">http://amardeepsidhu.com/blog/?p=245</guid>
		<description><![CDATA[Today i was refreshing a MVIEW (Oracle 9.2.0.1.0 on Windows 2000) and instead of writing i wrote And it gave me: ERROR at line 1: ORA-30019: Illegal rollback Segment operation in Automatic Undo mode ORA-06512: at &#8220;SYS.DBMS_SNAPSHOT&#8221;, line 794 ORA-06512: at &#8220;SYS.DBMS_SNAPSHOT&#8221;, line 851 ORA-06512: at &#8220;SYS.DBMS_SNAPSHOT&#8221;, line 832 ORA-06512: at line 1 which has nothing to [...]<div class="addthis_toolbox addthis_default_style " addthis:url='http://amardeepsidhu.com/blog/2009/07/09/ora-30019-illegal-rollback-segment-operation-in-automatic-undo-mode/' addthis:title='ORA-30019: Illegal rollback Segment operation in Automatic Undo mode '  ><a class="addthis_button_facebook_like" fb:like:layout="button_count"></a><a class="addthis_button_tweet"></a><a class="addthis_counter addthis_pill_style"></a></div>]]></description>
			<content:encoded><![CDATA[<p>Today i was refreshing a MVIEW (Oracle 9.2.0.1.0 on Windows 2000) and instead of writing</p>
<pre class="brush: sql; title: ; notranslate">exec dbms_mview.refresh('SCHEMA1.MVIEW1','C'); </pre>
<p>i wrote</p>
<pre class="brush: sql; title: ; notranslate">exec dbms_mview.refresh('SCHEMA1','MVIEW1','C');</pre>
<p>And it gave me:</p>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">ERROR at line 1:</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">ORA-30019: Illegal rollback Segment operation in Automatic Undo mode</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">ORA-06512: at &#8220;SYS.DBMS_SNAPSHOT&#8221;, line 794</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">ORA-06512: at &#8220;SYS.DBMS_SNAPSHOT&#8221;, line 851</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">ORA-06512: at &#8220;SYS.DBMS_SNAPSHOT&#8221;, line 832</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">ORA-06512: at line 1</div>
<pre class="brush: sql; title: ; notranslate">ERROR at line 1:
ORA-30019: Illegal rollback Segment operation in Automatic Undo mode
ORA-06512: at &quot;SYS.DBMS_SNAPSHOT&quot;, line 794
ORA-06512: at &quot;SYS.DBMS_SNAPSHOT&quot;, line 851
ORA-06512: at &quot;SYS.DBMS_SNAPSHOT&quot;, line 832
ORA-06512: at line 1</pre>
<pre><span style="font-family: Georgia; line-height: 19px; white-space: normal; font-size: 13px;">which has nothing to do with the real error. Take care !</span></pre>
<div class="addthis_toolbox addthis_default_style " addthis:url='http://amardeepsidhu.com/blog/2009/07/09/ora-30019-illegal-rollback-segment-operation-in-automatic-undo-mode/' addthis:title='ORA-30019: Illegal rollback Segment operation in Automatic Undo mode '  ><a class="addthis_button_facebook_like" fb:like:layout="button_count"></a><a class="addthis_button_tweet"></a><a class="addthis_counter addthis_pill_style"></a></div>]]></content:encoded>
			<wfw:commentRss>http://amardeepsidhu.com/blog/2009/07/09/ora-30019-illegal-rollback-segment-operation-in-automatic-undo-mode/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>GATHER_SCHEMA_STATS &amp; ORA-03001: unimplemented feature</title>
		<link>http://amardeepsidhu.com/blog/2009/07/08/gather_schema_stats-ora-03001-unimplemented-feature/</link>
		<comments>http://amardeepsidhu.com/blog/2009/07/08/gather_schema_stats-ora-03001-unimplemented-feature/#comments</comments>
		<pubDate>Wed, 08 Jul 2009 18:03:47 +0000</pubDate>
		<dc:creator>Sidhu</dc:creator>
				<category><![CDATA[Troubleshooting]]></category>
		<category><![CDATA[Bug 5767661]]></category>
		<category><![CDATA[DBMS_STATS]]></category>
		<category><![CDATA[GATHER_SCHEMA_STATS]]></category>

		<guid isPermaLink="false">http://amardeepsidhu.com/blog/?p=233</guid>
		<description><![CDATA[Today i was gathering stats on one schema (10.2.0.3 on AIX 5.3, 64 bit) and it said: Little bit of searching on Metalink revealed that i had hit Bug no 6011068 which points to the base Bug 576661 which is related to function based indexes. There were 2 function based indexes in the schema. Before [...]<div class="addthis_toolbox addthis_default_style " addthis:url='http://amardeepsidhu.com/blog/2009/07/08/gather_schema_stats-ora-03001-unimplemented-feature/' addthis:title='GATHER_SCHEMA_STATS &#38; ORA-03001: unimplemented feature '  ><a class="addthis_button_facebook_like" fb:like:layout="button_count"></a><a class="addthis_button_tweet"></a><a class="addthis_counter addthis_pill_style"></a></div>]]></description>
			<content:encoded><![CDATA[<p>Today i was gathering stats on one schema (10.2.0.3 on AIX 5.3, 64 bit) and it said:</p>
<pre class="brush: sql; title: ; notranslate">ERROR at line 1:
ORA-03001: unimplemented feature
ORA-06512: at &quot;SYS.DBMS_STATS&quot;, line 13336
ORA-06512: at &quot;SYS.DBMS_STATS&quot;, line 13682
ORA-06512: at &quot;SYS.DBMS_STATS&quot;, line 13760
ORA-06512: at &quot;SYS.DBMS_STATS&quot;, line 13719
ORA-06512: at line 1</pre>
<p>Little bit of searching on Metalink revealed that i had hit Bug no 6011068 which points to the base <a href="https://metalink2.oracle.com/metalink/plsql/f?p=130:14:5335018637904207860::::p14_database_id,p14_docid,p14_show_header,p14_show_help,p14_black_frame,p14_font:NOT,559389.1,1,1,1,helvetica">Bug 576661</a> which is related to function based indexes. There were 2 function based indexes in the schema. Before talking about the workaround let us re-produce the test case. Here i am doing it on my laptop (10.2.0.1 on Windows XP 32 bit)</p>
<pre class="brush: sql; title: ; notranslate">SCOTT@TESTING &gt;create table test1 as select * from emp;

Table created.

SCOTT@TESTING &gt;create index ind1 on test1(comm,1);

Index created.

SCOTT@TESTING &gt;

SYSTEM@TESTING&gt;exec dbms_stats.gather_schema_stats('SCOTT');
BEGIN dbms_stats.gather_schema_stats('SCOTT'); END;

*
ERROR at line 1:
ORA-03001: unimplemented feature
ORA-06512: at &quot;SYS.DBMS_STATS&quot;, line 13210
ORA-06512: at &quot;SYS.DBMS_STATS&quot;, line 13556
ORA-06512: at &quot;SYS.DBMS_STATS&quot;, line 13634
ORA-06512: at &quot;SYS.DBMS_STATS&quot;, line 13593
ORA-06512: at line 1

SYSTEM@TESTING&gt;</pre>
<p>As suggested in the metalink article let us set event 3001 before running the GATHER_SCHEMA_STATS command.</p>
<pre class="brush: sql; title: ; notranslate">SYSTEM@TESTING &gt;alter session set tracefile_identifier=stats1;

Session altered.

SYSTEM@TESTING &gt;alter session set events '3001 trace name ERRORSTACK level 3';

Session altered.

SYSTEM@TESTING &gt;exec dbms_stats.gather_schema_stats('SCOTT');
BEGIN dbms_stats.gather_schema_stats('SCOTT'); END;

*
ERROR at line 1:
ORA-03001: unimplemented feature
ORA-06512: at &quot;SYS.DBMS_STATS&quot;, line 13210
ORA-06512: at &quot;SYS.DBMS_STATS&quot;, line 13556
ORA-06512: at &quot;SYS.DBMS_STATS&quot;, line 13634
ORA-06512: at &quot;SYS.DBMS_STATS&quot;, line 13593
ORA-06512: at line 1

SYSTEM@TESTING &gt;</pre>
<p>Part of the trace file reads:</p>
<pre class="brush: sql; title: ; notranslate">ksedmp: internal or fatal error
ORA-03001: unimplemented feature
Current SQL statement for this session:
select /*+ no_parallel_index(t,IND1) dbms_stats cursor_sharing_exact use_weak_name_resl dynamic_sampling(0) no_monitoring no_expand index(t,&quot;IND1&quot;) */ count(*) as nrw,count(distinct sys_op_lbid(51966,'L',t.rowid)) as nlb,count(distinct hextoraw(sys_op_descend(&quot;COMM&quot;)||sys_op_descend(1))) as ndk,sys_op_countchg(substrb(t.rowid,1,15),1) as clf from &quot;SCOTT&quot;.&quot;TEST1&quot; t where &quot;COMM&quot; is not null or 1 is not null
----- PL/SQL Call Stack -----
object      line  object
handle    number  name
65AA77D4      9406  package body SYS.DBMS_STATS
65AA77D4      9919  package body SYS.DBMS_STATS</pre>
<p>So the problem is being caused by the index ind1 we created on (comm,1). This bug has been fixed in 10.2.0.5 and 11.1.0.7. The available workaround for other versions is to create index using 1 as character instead of number.</p>
<pre class="brush: sql; title: ; notranslate">SCOTT@TESTING &gt;drop index ind1;

Index dropped.

SCOTT@TESTING &gt;create index ind1 on test1(comm,'1');

Index created.

SCOTT@TESTING &gt;</pre>
<p>And now running GATHER_SCHEMA_STATS:</p>
<pre class="brush: sql; title: ; notranslate">SYSTEM@TESTING &gt;exec dbms_stats.gather_schema_stats('SCOTT');

PL/SQL procedure successfully completed.

SYSTEM@TESTING &gt;</pre>
<div class="addthis_toolbox addthis_default_style " addthis:url='http://amardeepsidhu.com/blog/2009/07/08/gather_schema_stats-ora-03001-unimplemented-feature/' addthis:title='GATHER_SCHEMA_STATS &amp; ORA-03001: unimplemented feature '  ><a class="addthis_button_facebook_like" fb:like:layout="button_count"></a><a class="addthis_button_tweet"></a><a class="addthis_counter addthis_pill_style"></a></div>]]></content:encoded>
			<wfw:commentRss>http://amardeepsidhu.com/blog/2009/07/08/gather_schema_stats-ora-03001-unimplemented-feature/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>DBMS_SCHEDULER, DBMS_RLS and SYS_CONTEXT</title>
		<link>http://amardeepsidhu.com/blog/2009/06/19/dbms_scheduler-dbms_rls-and-sys_context/</link>
		<comments>http://amardeepsidhu.com/blog/2009/06/19/dbms_scheduler-dbms_rls-and-sys_context/#comments</comments>
		<pubDate>Fri, 19 Jun 2009 18:12:40 +0000</pubDate>
		<dc:creator>Sidhu</dc:creator>
				<category><![CDATA[PL/SQL]]></category>
		<category><![CDATA[Troubleshooting]]></category>
		<category><![CDATA[DBMS_RLS]]></category>
		<category><![CDATA[DBMS_SCHEDULER]]></category>
		<category><![CDATA[SYS_CONTEXT]]></category>
		<category><![CDATA[VPD]]></category>

		<guid isPermaLink="false">http://amardeepsidhu.com/blog/?p=221</guid>
		<description><![CDATA[Today one of my colleague was working on development of a screen in Oracle Forms to give the end user an option to schedule a job using dbms_scheduler. With the hope that i would be able to explain it properly, the whole scenario is like this: User will log in to the application with his [...]<div class="addthis_toolbox addthis_default_style " addthis:url='http://amardeepsidhu.com/blog/2009/06/19/dbms_scheduler-dbms_rls-and-sys_context/' addthis:title='DBMS_SCHEDULER, DBMS_RLS and SYS_CONTEXT '  ><a class="addthis_button_facebook_like" fb:like:layout="button_count"></a><a class="addthis_button_tweet"></a><a class="addthis_counter addthis_pill_style"></a></div>]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;">Today one of my colleague was working on development of a screen in Oracle Forms to give the end user an option to schedule a job using dbms_scheduler. With the hope that i would be able to explain it properly, the whole scenario is like this:</p>
<ol style="text-align: justify;">
<li>User will log in to the application with his username (Lets say USER01) and password (basically every application user is a database user).</li>
<li>He is provided with a screen where he can enter details about the job and the code behind the button calls a PL/SQL procedure in the main application schema (lets say APP1) which in turn uses DBMS_SCHEDULER.CREATE_JOB to schedule the new job.</li>
<li>The ultimate task of the job is to move data from one table in the first database to a table in the second database using a DB Link.</li>
<li>There is a VPD policy applied on all the application users to restrict the view of data. Policy function uses SYS_CONTEXT to fetch some information about the logged in user. The main application user APP1 is exempted from policy and can see the whole data.</li>
</ol>
<p style="text-align: justify;">Things seem to work fine till the schedule part. But when the job runs it hits <em><strong>ORA-02070: database does not support operator SYS_CONTEXT in this context</strong></em> as SYS_CONTEXT and DB link doesn&#8217;t go together.</p>
<p style="text-align: justify;">I did a bit of troubleshooting and came to know that the job gets created with JOB_CREATOR (a field in DBA_SCHEDULER_JOBS) as the user who is logged in (ie USER001). Now when the job runs from USER001, there is a VPD policy which is going to append a where clause to the query and there is a DB link being used, hence <strong>ORA-02070</strong>.</p>
<p style="text-align: justify;">So the way out would be to schedule and run the job from some user that has no VPD policy applied to it. The best choice would obviously be the main application user; APP1 but as the user logs in with his own username so the job would always be created with JOB_CREATOR as USER001. After a bit of thought provoking an idea hit me:</p>
<p style="text-align: justify;">Create a table in the APP1 schema. Now when the user schedules the job, insert the values of the parameters required to schedule the job in the table. Schedule one master job in APP1 schema which would read this table and in turn call DBMS_SCHEDULER.CREATE_JOB to schedule the job required by the user. Now as there is no policy applied on the APP1 database user so the job is not going to hit <strong>ORA-02070</strong>. The frequency of the master job can be set as per the requirements. To identify which entries in the table have been processed either keep a flag which can be updated or delete the record from the table after scheduling.</p>
<p style="text-align: justify;">That is how it clicked in my mind at that time. Suggestions about any other better (or worse <img src='http://amardeepsidhu.com/blog/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  ) methods are welcome <img src='http://amardeepsidhu.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p style="text-align: justify;"><strong>PS:</strong> About the title: Nothing really was coming into my mind so i picked up the all three words and titled it DBMS_SCHEDULER, DBMS_RLS and SYS_CONTEXT <img src='http://amardeepsidhu.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<div class="addthis_toolbox addthis_default_style " addthis:url='http://amardeepsidhu.com/blog/2009/06/19/dbms_scheduler-dbms_rls-and-sys_context/' addthis:title='DBMS_SCHEDULER, DBMS_RLS and SYS_CONTEXT '  ><a class="addthis_button_facebook_like" fb:like:layout="button_count"></a><a class="addthis_button_tweet"></a><a class="addthis_counter addthis_pill_style"></a></div>]]></content:encoded>
			<wfw:commentRss>http://amardeepsidhu.com/blog/2009/06/19/dbms_scheduler-dbms_rls-and-sys_context/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

