RE: Catbundle causes sessions using text index to throw ORA-4068 on RAC

It is a package referenced by a session is changed between executions of the 
package by the session the error message you received is normal and expected.  
In prior versions of Oracle we used to see 'package state has changed' as the 
error but on AIX since 9.2 we get the 'unable to load' which we used to get 
only when enough contiguous free space in the shared pool did not exist.


________________________________
From: Michael Wehrle [mailto:michaelw436@xxxxxxxxx]
Sent: Monday, March 29, 2010 2:00 PM
To: Powell, Mark; oracle-l@xxxxxxxxxxxxx
Subject: Re: Catbundle causes sessions using text index to throw ORA-4068 on RAC

The instructions for the CPU don't require you to run catbundle before the 
database is opened. I just installed this last week, and intalling it again 
tomorrow morning on another database. I have been running catbdundle psu apply 
per instructions right after the instance is back OPEN again.

Also, the package body in question doesn't need a recompile after the 
catbundle, it is just affecting users who have already accessed the package 
before the driutl.plb script is called to replace the package body. I know this 
because we ran a custom recompile script during the installation, which starts 
by storing in a table all invalid objects before the deployment, followed by 
only recompiling objects that are invalid after and NOT in the list from 
before. On my database, this package was not INVALID.

Michael Wehrle
Database Administrator

On Mon, Mar 29, 2010 at 11:27 AM, Powell, Mark 
<mark.powell2@xxxxxx<mailto:mark.powell2@xxxxxx>> wrote:

Did you check and revalidate all your objects prior to opening the database 
after you applied the patch?  That is, did you run 
$ORACLE_HOME/rdbms/admin/urlrp?



-----Original Message-----
From: oracle-l-bounce@xxxxxxxxxxxxx<mailto:oracle-l-bounce@xxxxxxxxxxxxx> 
[mailto:oracle-l-bounce@xxxxxxxxxxxxx<mailto:oracle-l-bounce@xxxxxxxxxxxxx>] On 
Behalf Of Yong Huang
Sent: Friday, March 26, 2010 4:52 PM
To: oracle-l@xxxxxxxxxxxxx<mailto:oracle-l@xxxxxxxxxxxxx>
Subject: Catbundle causes sessions using text index to throw ORA-4068 on RAC

FYI,

On two Oracle 10.2.0.4.0 RAC databases, after we applied Oct-2009 CPU patch, 
both times some users got errors similar to the following:

ORA-29877: failed in the execution of the ODCIINDEXUPDATE routine
ORA-20000: Oracle Text error:
DRG-50857: oracle error in textindexmethods.ODCIIndexUpdate
ORA-06502: PL/SQL: numeric or value error: character to number conversion error
ORA-06512: at "CTXSYS.DRIXMD", line 438
ORA-04061: existing state of package body "CTXSYS.DRIUTL" has been invalidated
ORA-04065: not executed, altered or dropped package body "CTXSYS.DRIUTL"
ORA-06508: PL/SQL: could not find program unit being called: "CTXSYS.DRIUTL"
ORA-06
SQL Statement:
...

This is because at the end of the patch, $ORACLE_HOME/rdbms/admin/catbundle.sql 
is run. On RAC, we apply the patch on local node, one node at a time. Before 
the patch, VIP is relocated to another node and the services on this node are 
stopped. So apps are running on other nodes. On the last node only, we run 
catbundle.sql. This script creates catbundle_CPU_<DBNAME>_APPLY.sql, where 
there is

@?/ctx/admin/driutl.plb

which replaces ctxsys.driutl package body. If a session on *any* node of the 
RAC updates a table using a text index after driutl package body is replaced 
with new code, the session will get the above error. (If it's a delete, the 
routine on the first line will be ODCIINDEXDELETE). This means that the rolling 
nature of the patch has a risk on production.

Eddie Awad summarizes three ways to avoid ORA-4068:
http://awads.net/wp/2007/04/04/here-is-how-to-unpersist-your-persistent-plsql-package-data/

But all need application code change. Since CPU patch is done only once per 
three months, to us, it's not worth it.

The package driutl is not changed much. I'm considering commenting out the line 
in catbundle_CPU_<DBNAME>_APPLY.sql and manually run it. (Also need to comment 
out the last line "@&sf" in catbundle.sql.)

If you need to reproduce the error:

create table testctx as select rownum id, object_name name from user_objects; 
create index indctx_testctx on testctx (name) indextype is ctxsys.context;

In another session (invalidate instead of replacing the package, because we 
don't have slightly modified code which is needed in 10g and up):
exec dbms_utility.invalidate(<object_id of ctxsys.driurl package>)

Back to the first session, run any of the following:
select * from testctx where contains(name, '<some name in testctx>') > 0; 
delete from testctx where id = 1; update testctx set name = 'xx' where id = 1;



--
http://www.freelists.org/webpage/oracle-l


--
http://www.freelists.org/webpage/oracle-l



Other related posts: