Friday, June 20, 2014

DRG-11422: linguistic initialization failed in Oracle 12C Database

Version:

Oracle 12C Release 1 (12.1.0.1.0) 64 bit EE

OS: Solaris 11 on Sparc 64 Bit


Issue:

Getting linguistics errors on trying to rebuild indexes


Error Stack:


SQL> alter index DICT_CI1_IDX1 rebuild; 
alter index DICT_CI1_IDX1 rebuild 

ERROR at line 1: 
ORA-29874: warning in the execution of ODCIINDEXALTER routine 
ORA-29960: line 1, 
DRG-10595: ALTER INDEX DICT_CI1_IDX1 failed 
DRG-11422: linguistic initialization failed 
DRG-11446: supplied knowledge base file 
/u01/app/oracle/product/121010/ctx/data/enlx/droldUS.dat not installed 



Reason:

The Indexes in question uses Oracle Text option which require context knowledge bases. These contexts are not part of the typical Oracle software. It is only available with Examples (previously companion) CD.


Solution:

One method is to download and install the examples cd to the Oracle Home. In this case, we would have to install all the additional components available in examples. 

Another approach is to manually extract and copy the missing files from example CD to ORACLE_HOME. 
I have followed the second option here to install the CTX Knowledge Base.

1. Download the Oracle Examples CD for the Operating system we use. Solaris on Sparc in this case.

Download from OTN: http://www.oracle.com/technetwork/database/enterprise-edition/downloads/index.html

Eg: solaris.sparc64_12cR1_examples.zip

2. Unzip the file

unzip solaris.sparc64_12cR1_examples.zip

3. Move to CTX File groups folder in the unzipped location. In 12c the path is as follows

cd /u01/app/oracle/software/examples/stage/Components/oracle.ctx.companion/12.1.0.1.0/1/DataFiles


4. Extarct the content of filegroup1.jar file to get the knowledge base files in English. 

Note: filegroup1.jar for the english files (enlx) and filegroup2.jar for the french (frlx) and so on

unzip filegroup1.jar


This will create the ctx folder and its subdirectories

5. Move to ctx/data/enlx from the same location

ie, /u01/app/oracle/software/examples/stage/Components/oracle.ctx.companion/12.1.0.1.0/1/DataFiles/ctx/data/enlx

We will have all the missing files here

-rw-r--r--   1 oracle   dba      2585766 Aug 29  1999 drolkUS.dat
-rw-r--r--   1 oracle   dba      3263531 Aug 29  1999 droliUS.dat
-rw-r--r--   1 oracle   dba      37766593 Aug 29  1999 droldUS.dat
-rw-r--r--   1 oracle   dba      2652662 Aug 29  1999 drofiUS.dat
-rw-r--r--   1 oracle   dba      3497330 Aug 29  1999 drofdUS.dat
-rw-r--r--   1 oracle   dba           12 Feb 29  2000 drolsUS.dat


6. Copy all the files to $ORACLE_HOME/ctx/data/enlx location

Currently it has only two files as shown below

bash-4.1$ ls $ORACLE_HOME/ctx/data/enlx
dren.ds  dren.is


bash-4.1$ cp -r *.dat  $ORACLE_HOME/ctx/data/enlx/

7. Confirm that the files are available under $ORACLE_HOME 

bash-4.1$ ls $ORACLE_HOME/ctx/data/enlx
dren.ds      drofdUS.dat  droldUS.dat  drolkUS.dat
dren.is      drofiUS.dat  droliUS.dat  drolsUS.dat

8. Can continue with index rebuild/creation now.

1 comment: