Intermedia Crashes connection

I have an index on a two column table

sql_str := 'create index ' || index_name || ' on ' ||
packed_table_name || '(text) indextype is ctxsys.context';

execute immediate sql_str;

When I try to query with
select trn from ft200203_packed where contains (text, 'MILAN')>0; I get the expected output.

If I run this same code as a stored procedure as,

sql_str:= 'select trn from ft200203_packed where contains (text, ''MILAN'')>0 ';
execute immediate sql_str;

I get:
Execution failed: ORA-03113: end-of-file on communication channel

If I debug with SQLNavigator it hangs at execute immediate statement. If I tell it to stop, I get
3:38:37 PM  ORA-29902: error in executing ODCIIndexStart() routine
3:38:37 PM  ORA-20000: interMedia Text error:
3:38:37 PM  DRG-50857: oracle error in drexrpref
3:38:37 PM  ORA-06543: PL/SQL: execution error - execution aborted

And I have no idea what's a drexerpref. The Oracle docs are useless here.

I am on NT4 and 8.1.7. I have removed Oracle and re-installed.

This stored procedure was working on 8.1.6 on Solaris, but I don't have access to that box anymore.

Does anyone have a clue?
Who is Participating?
mnicorasConnect With a Mentor Commented:

the drexerpref it's just a string on which Oracle get's an error (some excerpt from the index file, so don't bother). ORA-29902 and DRG-50857 are related with the problem that CTXSYS schema is not updated to version 8.1.7. I have seen several Metalink's notes regarding this kind of the error on which they suggest to upgrade the CTXSYS schema from previous version to the new one. I'm just guessing that you have imported the dump from Solaris and Oracle 8.1.6 to the new NT4 and Oracle 8.1.7.

This is an excerpt from a Metalink Note:
Manual Upgrade From 8.1.6

  This process assumes that you are starting with a valid 8.1.6 ctxsys data
dictionary, and that the system is not being used for index, DML, or query.
Please use SQL*Plus to run all scripts, and NOT svrmgrl.

    1. run ?/ctx/admin/upgrade/s0801070.sql as SYS
       this grants new, needed database privileges to ctxsys

    2. run ?/ctx/admin/upgrade/u0801070.sql as CTXSYS
       this upgrades the ctxsys schema to 8.1.7

    3. run ?/ctx/admin/dr0typec.pkh as CTXSYS
       this creates the CTXCAT index type, which is new for 8.1.7

    4. run ?/ctx/admin/dr0pkh.sql as CTXSYS
       this re-creates all public and private package headers

    5. run ?/ctx/admin/dr0plb.sql as CTXSYS
       this re-creates all public and private package bodies

    6. run ?/ctx/admin/dr0type.plb as CTXSYS
       this re-creates the CONTEXT index type body

    7. run ?/ctx/admin/dr0typec.plb as CTXSYS
       this creates the CTXCAT index type body, new for 8.1.7

    8. run ?/ctx/admin/dr0itypc.sql as CTXSYS
       this creates the bindings and index type for CTXCAT, new for 8.1.7

    9. check for any invalid ctxsys objects and alter compile as needed

Upgrading Existing Indexes

  Nothing needs to be done to upgrade existing 8.1.6 context indexes.
These should still work without any problems in 8.1.7.  However, you may
choose to re-build the $X index on the $I table.  Indexes built with 8.1.7
will have a $X index comprised of 5 columns.  Indexes that were built with
8.1.5 or 8.1.6 have a $X index comprised of 3 columns.  While a $X with the
old definition will still work, we believe the new $X index offers better
performance for large data sets.

  A utility script -- ?/ctx/sample/util/dr817rx.sql -- is provided to rebuild
existing $X indexes.  It should be run as ctxsys, and should be passed the
index owner and index name, as in:

  sqlplus ctxsys/ctxsys
  SQL> @dr817rx scott myindex

Please ensure that ctxsys' TEMP tablespace has sufficient space to
re-create the $X index.

I also suggest to look on the Note:120611.1 from Metalink.

best regards,
Marius Nicoras
md041797Author Commented:
Thanks rpai, but I am not using NAMES.DEFAULT_DOMAIN.

This is a fresh install, right off the CD and no diddling with any files.
Cloud Class® Course: CompTIA Healthcare IT Tech

This course will help prep you to earn the CompTIA Healthcare IT Technician certification showing that you have the knowledge and skills needed to succeed in installing, managing, and troubleshooting IT systems in medical and clinical settings.

Have you checked for invalid objects in the CTXSYS schema?
Also, check for the required privileges needed for utilizing Oracle intermedia Text.

md041797Author Commented:
There are no invalid objects and I have all privileges including sysdba.
How much free space in the Temp tablespace for the CTXSYS user?
You need enough free space, especially if the column being indexed is large sized!

what is your decalration for sql_str
md041797Author Commented:
Temp for CTXSYS is DRSYS and it has 4% used. All tablespaces have plenty of free space.

The problem is not in building the indexes, its in running a query against the index, and only in a stored procedure. The query works fine from sqlplus.

I am not upgrading at all. I started with a fresh Oracle install, sqlldr to bring in the data, ran 'create index index_name on table_name (column) indextype is ctxsys.context'

declaration: sql_str varchar2 (2000);

No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:
Accept mnicoras's comment as answer
Questioner gave conflicting info ("was on 8.1.6, now on 8.1.7" / "I am not upgrading at all") and mnicoras's comment is most likely to lead to a solution given that the upgrade of the database was the cause of the problem with CTXSYS.
Please leave any comments here within the next seven days.
EE Cleanup Volunteer
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.