Oracle Text indexation problem

Hello all,
we recently migrate one of our database from oracle 10.2.0.2 to an Oracle 10.2.0.4, and since then, Oracle Text indexer engine is unable to work properly.
Indexing datas systematically result in the following error :
DRG-50857: oracle error in dreii0fsh
ORA-06550: line 1, column 106:
PLS-00302: component 'S_MODE' must be declared
ORA-06550: line 1, column 10:
PL/SQL: Statement ignored
Note that datas that were indexed with the previous version of Oracle can still be found with "Select... where contains...", though new datas can't be indexed at all.
Can anybody help me with this issue ?
Edited by: methos on 11 mai 2010 06:59

See on metalink:
'DRG-50857: oracle error in dreii0fsh' when creating TEXT index [ID 750898.1]
It seems you upgraded the binaries,but not Oracle Text itself.
Werner

Similar Messages

  • Problem with oracle text indexes during import

    We have a 9.2.0.6 database using oracle text features on a server with windows 2000 5.00.2195 SP4.
    We need to export its data ( user ARIANE only ) and then import the result into another 9.2.0.6 database.
    The import never comes to an end.
    The only way to make it work is to use the "indexes=n" clause.
    Then ( without the indexes ), we tried to create manually the oracle text indexes.
    We get this error :
    CREATE INDEX ARIANE.DOSTEXTE_DTTEXTE_CTXIDX ON ARIANE.DOSTEXTE (DTTEXTE)
    INDEXTYPE IS CTXSYS.CONTEXT PARAMETERS('lexer ariane_lexer stoplist ctxsys.default_stoplist storage ariane_storage');
    ORA-29855: erreur d'exécution de la routine ODCIINDEXCREATE
    ORA-20000: Erreur Oracle Text :
    DRG-10700: préférence inexistante : ariane_lexer
    ORA-06512: à "CTXSYS.DRUE", ligne 157
    ORA-06512: à "CTXSYS.TEXTINDEXMETHODS", ligne 219
    We then tried to uninstall Oracle text and install it ( My Oracle Support [ID 275689.1] ). The index creation above still fails.
    We also checked our Text installation and setup through My Oracle Support FAQ ( ID 153264.1 ) and everything seems ok.
    Do we have to create some ARIANE* lexer preferences through specific pl/sql ( ctx_report* ? ) before importing anything from the ARIANE user ?
    What do we need to do exactly when exporting data with oracle text features from one database to another given we used to restore the database through a copy of the entire windows files ?
    Is there a specific order to follow to succeed an import ?
    Thank you for your help.
    Jean-michel, Nemours, FRANCE

    Hi
    index preferences are not exported, ie ariane_lexer + ariane_storage, only the Text index metada, thus the DRG-10700 from index DDL on target/import DB.
    I recommend to use ctx_report.create_index_script on source/export DB, see Doc ID 189819.1 for details, export with indexes=N and then create text indexes manually after data import.
    -Edwin

  • Oracle Text index hangs(Oracle 11g linux enterprise edition)

    Hi guru,
    One very criticial and showstopper issue coming in Oracle Text Indexing.
    I have table ResourceTable(ResId,Contents blob ,docformat)
    I am creating text index on Contents column by using follwing command:
    create index [IndexName] on [TableName] (contents) indextype is ctxsys.context ('lexer mylex stoplist ctxsys.default_stoplist format column ISDOCFORMAT sync(every "sysdate+1/24") storage my_text_storage memory 200M')parallel 2
    I found there is one document of text/html type which hangs oracle text indexing thread.Oracle doest not give any error message keep using CPU 100% and no progress.
    I then create test table with same stucture and put this corrupted documet record in this table.and did indexing again but its not doing index /not ignoring it and hangs .We have also tried to use timeout feature of inso filter so that if such type of document comes at the time of indexing oracle text indexing process will bypass it after specific time interval but still same issue comes and oracle is not bypassing such faulty document.
    This is realy show stopper issue and any kind of help will be greatly appricited.

    You need to raise an SR with Oracle Support for this, and send them the file which is causing the hang. It should then be easy to investigate the problem and schedule a fix.
    If you don't have a support contract, you could send the file to me and I'll raise a bug. However, if we fix it you won't be able to get the fix until it appears in the next downloadable version.
    - Roger
    roger.ford @ oracle.com

  • Help with creating oracle text index on 2 columns with partial html data

    Hi,
    I need to create an oracle text index on 2 columns.
    TITLE - varchar(255) = contains plain text data
    DESCRIPTION - CLOB = contains partial HTML data
    This is what I created.
    begin
    ctx_ddl.create_preference ('Title_Description_Pref', 'MULTI_COLUMN_DATASTORE');
    ctx_ddl.set_attribute('Title_Description_Pref', 'columns', 'TITLE, DESCRIPTION');
    end;
    begin
    ctx_ddl.create_preference ('bid_lexer', 'BASIC_LEXER');
    ctx_ddl.set_attribute('bid_lexer', 'index_stems', 'ENGLISH');
    ctx_ddl.create_section_group('htmgroup', 'HTML_SECTION_GROUP');
    end;
    create index Bid_Title_Index on Bid(title) indextype is ctxsys.context parameters ('LEXER bid_lexer sync (every "sysdate+(1/24)")');
    create index Bid_Title_Desc_Index on Bid(description) indextype is ctxsys.context parameters ('LEXER bid_lexer DATASTORE Title_Description_Pref sync (every "sysdate+(1/24)") filter ctxsys.null_filter section group htmgroup');
    The problem is when I do a CONTAINS(description, '$(auction)')>0. I get results where the descriptions have the "auction" word (which is correct). But, the results also returned rows where the search word is inside an IMG tag. e.g. <img src="http://auction.de/120483" alt="Auction Logo"/>.
    What I would like is to exclude rows where the search word is inside HTML tag attributes, results expected are rows having <a>Auction</a> or <p>For Auction</p> ... etc. Basically stripping the html tags and leave the text contents.
    I'd appreciate some input.
    Thanks,
    Amiel

    Hi,
    I need to create an oracle text index on 2 columns.
    TITLE - varchar(255) = contains plain text data
    DESCRIPTION - CLOB = contains partial HTML data
    This is what I created.
    begin
    ctx_ddl.create_preference ('Title_Description_Pref', 'MULTI_COLUMN_DATASTORE');
    ctx_ddl.set_attribute('Title_Description_Pref', 'columns', 'TITLE, DESCRIPTION');
    end;
    begin
    ctx_ddl.create_preference ('bid_lexer', 'BASIC_LEXER');
    ctx_ddl.set_attribute('bid_lexer', 'index_stems', 'ENGLISH');
    ctx_ddl.create_section_group('htmgroup', 'HTML_SECTION_GROUP');
    end;
    create index Bid_Title_Index on Bid(title) indextype is ctxsys.context parameters ('LEXER bid_lexer sync (every "sysdate+(1/24)")');
    create index Bid_Title_Desc_Index on Bid(description) indextype is ctxsys.context parameters ('LEXER bid_lexer DATASTORE Title_Description_Pref sync (every "sysdate+(1/24)") filter ctxsys.null_filter section group htmgroup');
    The problem is when I do a CONTAINS(description, '$(auction)')>0. I get results where the descriptions have the "auction" word (which is correct). But, the results also returned rows where the search word is inside an IMG tag. e.g. <img src="http://auction.de/120483" alt="Auction Logo"/>.
    What I would like is to exclude rows where the search word is inside HTML tag attributes, results expected are rows having <a>Auction</a> or <p>For Auction</p> ... etc. Basically stripping the html tags and leave the text contents.
    I'd appreciate some input.
    Thanks,
    Amiel

  • Oracle Text index

    Hi,
    I created an oracle text index on 10G database on a fairly large table (59 Mil recs) but when i go to Analyze it, i get the ora-29864 error message 'analyzing domain indexes marked LOADING/FAILED not supported'. The status of the index is valid. The index was created well over 24 hours ago. is it perhaps because the index is still loading?
    Has anyone run across this problem?
    Thanks

    "ORA-29864: analyzing domain indexes marked LOADING/FAILED not supported
    Cause: Tried to analyze a domain index which was marked as LOADING or FAILED.
    Action: If the index was marked LOADING, wait till it is marked valid before retrying the analyze. If index was marked FAILED, drop it OR rebuild it and retry the analyze."

  • Error When Creating Oracle Text index using Lexer Keyword

    Hi All,
    I am getting following error when i creating oracle text index using lexer & stoplist keyword.
    Pls Help me if any body know.
    Thanks in Advance.
    Error starting at line 1 in command:
    CREATE INDEX TXT_INX_TEXT_SEARCH ON TEXT_SEARCH (BFILE_DOC)
    Post INDEXTYPE IS "CTXSYS"."CONTEXT" LOCAL (
    PARTITION "BEFORE_2007" PARAMETERS ('LEXER dd_lexer STOPLIST dd_stoplist SYNC (ON COMMIT)') ,
    PARTITION "Q1_2007" PARAMETERS ('LEXER dd_lexer STOPLIST dd_stoplist SYNC (ON COMMIT)'),
    PARTITION "Q2_2007" PARAMETERS ('LEXER dd_lexer STOPLIST dd_stoplist SYNC (ON COMMIT)'),
    PARTITION "Q3_2007" PARAMETERS ('LEXER dd_lexer STOPLIST dd_stoplist SYNC (ON COMMIT)'),
    PARTITION "Q4_2007" PARAMETERS ('LEXER dd_lexer STOPLIST dd_stoplist SYNC (ON COMMIT)'),
    PARTITION "Q1_2008" PARAMETERS ('LEXER dd_lexer STOPLIST dd_stoplist SYNC (ON COMMIT)'),
    PARTITION "Q2_2008" PARAMETERS ('LEXER dd_lexer STOPLIST dd_stoplist SYNC (ON COMMIT)'),
    PARTITION "Q3_2008" PARAMETERS ('LEXER dd_lexer STOPLIST dd_stoplist SYNC (ON COMMIT)'),
    PARTITION "Q4_2008" PARAMETERS ('LEXER dd_lexer STOPLIST dd_stoplist SYNC (ON COMMIT)'),
    PARTITION "Q1_2009" PARAMETERS ('LEXER dd_lexer STOPLIST dd_stoplist SYNC (ON COMMIT)'),
    PARTITION "Q2_2009" PARAMETERS ('LEXER dd_lexer STOPLIST dd_stoplist SYNC (ON COMMIT)'),
    PARTITION "Q3_2009" PARAMETERS ('LEXER dd_lexer STOPLIST dd_stoplist SYNC (ON COMMIT)'),
    PARTITION "Q4_2009" PARAMETERS ('LEXER dd_lexer STOPLIST dd_stoplist SYNC (ON COMMIT)'),
    PARTITION "THE_REST" PARAMETERS ('LEXER dd_lexer STOPLIST dd_stoplist SYNC (ON COMMIT)')
    Error at Command Line:1 Column:13
    Error report:
    SQL Error: ORA-29855: error occurred in the execution of ODCIINDEXCREATE routine
    ORA-20000: Oracle Text error:
    DRG-11000: invalid keyword LEXER
    ORA-06512: at "CTXSYS.DRUE", line 160
    ORA-06512: at "CTXSYS.TEXTINDEXMETHODS", line 365
    29855. 00000 - "error occurred in the execution of ODCIINDEXCREATE routine"
    *Cause:    Failed to successfully execute the ODCIIndexCreate routine.
    *Action:   Check to see if the routine has been coded correctly.
    Regards,
    Jack R.

    Hi,
    it works if you put an extra PARAMETERS clause at the end so the creation looks like:
    CREATE INDEX TXT_INX_TEXT_SEARCH ON TEXT_SEARCH (BFILE_DOC)
    INDEXTYPE IS "CTXSYS"."CONTEXT" LOCAL (
    PARTITION "BEFORE_2007" PARAMETERS ('LEXER dd_lexer STOPLIST dd_stoplist SYNC (ON COMMIT)') ,
    PARTITION "Q1_2007" PARAMETERS ('LEXER dd_lexer STOPLIST dd_stoplist SYNC (ON COMMIT)'),
    PARTITION "Q2_2007" PARAMETERS ('LEXER dd_lexer STOPLIST dd_stoplist SYNC (ON COMMIT)'),
    PARTITION "Q3_2007" PARAMETERS ('LEXER dd_lexer STOPLIST dd_stoplist SYNC (ON COMMIT)'),
    PARTITION "Q4_2007" PARAMETERS ('LEXER dd_lexer STOPLIST dd_stoplist SYNC (ON COMMIT)'),
    PARTITION "Q1_2008" PARAMETERS ('LEXER dd_lexer STOPLIST dd_stoplist SYNC (ON COMMIT)'),
    PARTITION "Q2_2008" PARAMETERS ('LEXER dd_lexer STOPLIST dd_stoplist SYNC (ON COMMIT)'),
    PARTITION "Q3_2008" PARAMETERS ('LEXER dd_lexer STOPLIST dd_stoplist SYNC (ON COMMIT)'),
    PARTITION "Q4_2008" PARAMETERS ('LEXER dd_lexer STOPLIST dd_stoplist SYNC (ON COMMIT)'),
    PARTITION "Q1_2009" PARAMETERS ('LEXER dd_lexer STOPLIST dd_stoplist SYNC (ON COMMIT)'),
    PARTITION "Q2_2009" PARAMETERS ('LEXER dd_lexer STOPLIST dd_stoplist SYNC (ON COMMIT)'),
    PARTITION "Q3_2009" PARAMETERS ('LEXER dd_lexer STOPLIST dd_stoplist SYNC (ON COMMIT)'),
    PARTITION "Q4_2009" PARAMETERS ('LEXER dd_lexer STOPLIST dd_stoplist SYNC (ON COMMIT)'),
    PARTITION "THE_REST" PARAMETERS ('LEXER dd_lexer STOPLIST dd_stoplist SYNC (ON COMMIT)')
    PARAMETERS ('LEXER dd_lexer STOPLIST dd_stoplist SYNC (ON COMMIT)') <== Added
    Hope this helps
    Herald ten Dam

  • Oracle text indexed view is possible

    Oracle text indexed view is possible???

    ok,
    My table name is T_DOC :
    ID----------------> NUMBER(30)
    DESCRIPTION-------> VARCHAR2(2000 BYTE)
    DOC---------------> BLOB
    FILENAME----------> VARCHAR2(2000 BYTE)
    MIMETYPE----------> VARCHAR2(2000 BYTE)
    LAST_UPDATE_DATE--> DATE
    T_DOC
    | Id | DESCRIPTION | DOC | FILENAME | MIMETYPE | LAST_UPDATE_DATE |
    | 1 | THE DOG | *(!BLOB) | THE_CAT.PDF | application/pdf | 20/05/2010 15:06:15 |
    | 2 | THE BIRD | **(!BLOB) | THE_BIRD.PDF | application/pdf | 20/05/2010 15:06:15 |
    | 3 | THE HUMAN AND CAT | ***(!BLOB) | THE_HUMAN.PDF | application/pdf | 20/05/2010 15:06:15 |
    * is a document .pdf with content: "the dog and cat"
    ** is a document .pdf with content: "the bird in house"
    *** is a document .pdf with content: "the human from USA"
    Index the columns DESCRIPTION, DOC (document content), FILENAME
    begin
    ctx_ddl.create_preference('idxDoc_lx', 'BASIC_LEXER');
    ctx_ddl.set_attribute (' idxDoc_lx ', 'MIXED_CASE', 'NO');
    end;
    begin
    ctx_ddl.create_preference('idxDoc_ds', 'MULTI_COLUMN_DATASTORE');
    ctx_ddl.set_attribute ('idxDoc_ds', 'COLUMNS', 'DOC, FILENAME, DESCRIPTION');
    end;
    CREATE INDEX IDX_DOC
    ON T_DOC (FILENAME)
    INDEXTYPE IS CTXSYS.CONTEXT
    PARAMETERS ('lexer idxDoc_lx
    datastore idxDoc_ds
    filter CTXSYS.AUTO_FILTER
    sync (on commit)');Search Query:
    select ID
    from T_DOC
    where CONTAINS (DOCUMENTO, 'CAT', 1) > 0 RESULT ID = 1
    WHY NOT ALSO Returned ID 3 ??????

  • How to compute a global SCORE over a few oracle text indexed tables?

    Dear experts!
    I want to search a website with Oracle Text. The website consists of four tables:
    - site
    - chapter
    - text
    - binaries
    Each table has two or three columns which should be indexed with oracle text. So I have created a MULTI_COLUMN_DATASTORE oracle text index on each table - So I have four indexes on my website.
    When I want to search over the website I have to join my 4 tables (4 contain clauses). So how do I get a global SCORE over these 4 contains clauses?
    The next question is can I change the weight of my text indexes (useful for the search hit list)? For example the highest weight has the site index, the second highest weight the chapter index and so on?
    Thanks
    Markus

    If it's a simple JOIN, then you could just add the scores for each CONTAINS clause
    select score(1)+score(2)+score(3)+score(4)
    from table1 t1,table2 t2, table3 t3,table4 t4
    where [join conditions]
    and contains(t1.col, 'xxx', 1) > 0 or
    contains(t2, col, 'xxx', 2) > 0 or
    ... etc
    then to change the weight you just add a multiplying factor.
    Can't help thinking it's probably more complex than this, though.

  • Why oracle text index column taking long  time

    why oracle text index column is taking long time to return result.I created text index on a column if I run the query on a single table result is very fast.If I join table with other table (10 records only )
    it is taking long time but in explain plan it is searching by index only.
    I created this index for searching a varchar2 column,the data is comma seperated values like ( UK,US,IT,BR) and the table having records 20 lakhs.Normally if I query with like operater
    ( like '%US%' ) it is taking full table scan because I am using '%' both sides. Please help me on this regard how to search the data with less time. Here is may sample code and explain plan.
    SQL*Plus: Release 9.2.0.1.0 - Production on Wed Jan 28 16:54:22 2009
    Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.
    Connected to:
    Oracle9i Enterprise Edition Release 9.2.0.1.0 - Production
    With the Partitioning, OLAP and Oracle Data Mining options
    JServer Release 9.2.0.1.0 - Production
    SQL&gt; set timing on
    SQL&gt; set linesize 180
    SQL&gt; explain plan for SELECT T.esongid FROM (SELECT A.ESONGID FROM wcmedeco.EDECO_ESONGS_TERR_CTRY 
    A WHERE CONTAINS(A.TERR_CTRY_NAMES,'US')&gt;0  
      2  GROUP BY A.ESONGID)K,T
      3  WHERE  K.ESONGID=T.ESONGID;
    Explained.
    Elapsed: 00:00:00.01
    SQL&gt; select *from table(dbms_xplan.display);
    PLAN_TABLE_OUTPUT
    | Id  | Operation                      |  Name                   | Rows  | Bytes | Cost  |
    |   0 | SELECT STATEMENT               |                         |     1 |    26 |     4 |
    |   1 |  NESTED LOOPS                  |                         |     1 |    26 |     4 |
    |   2 |   VIEW                         |                         |     1 |    13 |     4 |
    |   3 |    SORT GROUP BY               |                         |     1 |    89 |     4 |
    |   4 |     TABLE ACCESS BY INDEX ROWID| EDECO_ESONGS_TERR_CTRY  |     1 |    89 |     2 |
    |   5 |      DOMAIN INDEX              | IDX_TERR_CTRY_NAMES     |       |       |     0 |
    |   6 |   INDEX RANGE SCAN             | IDX_ESONGID_T           |     1 |    13 |     1 |
    PLAN_TABLE_OUTPUT
    Note: cpu costing is off, 'PLAN_TABLE' is old version
    14 rows selected.
    Elapsed: 00:00:00.00
    SQL&gt; Regards,
    Rajasekhar

    You have not formatted your code properly so we cannot see the query you're executing. Please put some line breaks in.
    Secondly, how fresh are the statistics on those tables? Are you really returning one record out of twenty million?
    Cheers, APC
    blog: http://radiofreetooting.blogspot.com

  • Oracle Text Index Query

    Hello
    Had a query on oracle Text Index.
    1. I have created a table with column ID as sequence & column description as Varchar2(500)
    2. Inserted 3 records
    3. I created the Oracle Text index on column "description" as INDEXTYPE IS CTXSYS.CONTEXT
    4. Run a select using "contains" , get the records as required.
    5. I insert another new record & commit;
    6. Run the same old query using contains but for the new records I get 0 records
    7. Drop the Index and Recreate the index using same old index on column "description" as INDEXTYPE IS CTXSYS.CONTEXT
    8. Run the same old query using contains but for the new records and now I get the records as required.
    Does that mean every time I insert new records I have to rebuild the Oracle Text Index ?
    Your Help will be much appreciated
    Regards
    Harshad

    You need to use some method of updating your index. You can drop and recreate or you can rebuild or you can use ctx_ddl.sync_index or you can include sync(on commit) in your parameters when you create the index or various other methods of periodic synchronization and optimization.

  • SMB Server using Oracle Text  Index

    Hi folks,
    I am looking into IFS and can't find any info
    on whether IFS is able to use the Oracle Text
    indexing, when accessed through SMB (directory mount).
    If I search for a file containing a given string
    is that search executed within IFS and only the
    resultset returned to the client, or is every
    file read from IFS delivered to the client,
    searched there and then thrown away if it doesn't
    contain the string (rendering the Text Index useless)?
    Does anybody have background info / experience with this?
    Regards
    Jan-Peter

    Hi folks,
    I am looking into IFS and can't find any info
    on whether IFS is able to use the Oracle Text
    indexing, when accessed through SMB (directory mount).
    If I search for a file containing a given string
    is that search executed within IFS and only the
    resultset returned to the client, or is every
    file read from IFS delivered to the client,
    searched there and then thrown away if it doesn't
    contain the string (rendering the Text Index useless)?
    Does anybody have background info / experience with this?
    Regards
    Jan-Peter To answer your question, it would help to have a little more context (pardon the pun). Are you trying to (1) understand how the 9iFS Windows UI uses Oracle Text, or (2) are you trying to write a client application that somehow uses the Text index on 9iFS content?

  • Performance issue with Oracle Text index

    Hi Experts,
    We are on Oracle 11.2..0.3 on Solaris 10. I have implemented Oracle Text in our environment and I am facing a strange performance issue that is happening in our environment.
    One sql having CONTAINS clause is taking forever - more than 20 minutes and still does not complete. This sql has a contains clause and an exists clause and a not exists clause.
    Now if I remove the exists clause and a not exists clause , it completes fast. but with those two clauses it is just taking forever. It is late night so i am not able to post the table and sql query details and will do so tomorrow but based on this general description, are there any pointers for me to review?
    sql query doing fine:
    SELECT
        U.CLNT_OID, U.USR_OID, S.MAILADDR
    FROM
        access_usr U
        INNER JOIN access_sia S
            ON S.USR_OID = U.USR_OID AND S.CLNT_OID = U.CLNT_OID
        WHERE U.CLNT_OID = 'ABCX32S'
        AND CONTAINS(LAST_NAME , 'TO%' ) >0
    --sql query that hangs forever:
    SELECT
        U.CLNT_OID, U.USR_OID, S.MAILADDR
    FROM
        access_usr U
        INNER JOIN access_sia S
            ON S.USR_OID = U.USR_OID AND S.CLNT_OID = U.CLNT_OID
        WHERE U.CLNT_OID = 'ABCX32S'
        AND CONTAINS(LAST_NAME , 'TO%' ) >0
    and exists (--one clause here wiht a few table joins)
    and not exists (--one clause here wiht a few table joins);
    --Now another strange thing I found is if instead of 'TO%' in this sql, if I were to use 'ZZ%' or 'L1%' it works fast but for 'TO%' it goes slow with those two exists not exists clauses!
    I will be most thankful for the inputs.
    OrauserN

    Hi Barbara,
    First of all, thanks a lot for reviewing the issue.
    Unluckily making the change to empty_stoplist did not work out. I am today copying the entire sql here that has this issue and will be most thankful for more insights/pointers on what can be done.
    Here is the entire sql:
    SELECT U.CLNT_OID,
           U.USR_OID,
           S.EMAILADDRESS,
           U.FIRST_NAME,
           U.LAST_NAME,
           S.JOBCODE,
           S.LOCATION,
           S.DEPARTMENT,
           S.ASSOCIATEID,
           S.ENTERPRISECOMPANYCODE,
           S.EMPLOYEEID,
           S.PAYGROUP,
           S.PRODUCTLOCALE
      FROM    ACCESS_USR U
           INNER JOIN
              ACCESS_SIA S
           ON S.USR_OID = U.USR_OID AND S.CLNT_OID = U.CLNT_OID
    WHERE     U.CLNT_OID = 'G39NY3D25942TXDA'
           AND EXISTS
                  (SELECT 1
                     FROM ACCESS_USR_GROUP_XREF UGX
                          INNER JOIN ACCESS_GROUP RELG
                             ON     RELG.CLNT_OID = UGX.CLNT_OID
                                AND RELG.GROUP_OID = UGX.GROUP_OID
                          INNER JOIN ACCESS_GROUP G
                             ON     G.CLNT_OID = RELG.CLNT_OID
                                AND G.GROUP_TYPE_OID = RELG.GROUP_TYPE_OID
                    WHERE     UGX.CLNT_OID = U.CLNT_OID
                          AND UGX.USR_OID = U.USR_OID
                          AND G.GROUP_OID = 920512943
                          AND UGX.INCLUDED = 1)
           AND NOT EXISTS
                      (SELECT 1
                         FROM    ACCESS_USR_GROUP_XREF UGX
                              INNER JOIN
                                 ACCESS_GROUP G
                              ON     G.CLNT_OID = UGX.CLNT_OID
                                 AND G.GROUP_OID = UGX.GROUP_OID
                        WHERE     UGX.CLNT_OID = U.CLNT_OID
                              AND UGX.USR_OID = U.USR_OID
                              AND G.GROUP_OID = 920512943
                              AND UGX.INCLUDED = 1)
           AND CONTAINS (U.LAST_NAME, 'Bon%') > 0;
    Like I said before if the EXISTS and NOT EXISTS clause are removed it works in sub-second. But with those EXISTS and NOT EXISTS CLAUSE IT TAKES ANY WHERE FROM 25 minutes to more than one hour.
    NOte also that it was not TO% but Bon% in the CONTAINS clause that is giving the issue - sorry that was wrong on my part.
    Also please see below the ORACLE TEXT index defined on the table ACCESS_USER:
    --definition of preferences used in the index:
    SET SERVEROUTPUT ON size unlimited
    WHENEVER SQLERROR EXIT SQL.SQLCODE
    DECLARE
       v_err       VARCHAR2 (1000);
       v_sqlcode   NUMBER;
       v_count     NUMBER;
    BEGIN
       ctxsys.ctx_ddl.create_preference ('cust_lexer', 'BASIC_LEXER');
       ctxsys.ctx_ddl.set_attribute ('cust_lexer', 'base_letter', 'YES'); -- removes diacritics
    EXCEPTION
       WHEN OTHERS
       THEN
          v_err := SQLERRM;
          v_sqlcode := SQLCODE;
          v_count := INSTR (v_err, 'DRG-10701');
          IF v_count > 0
          THEN
             DBMS_OUTPUT.put_line (
                'The required preference named CUST_LEXER with BASIC LEXER is already set up');
          ELSE
             RAISE;
          END IF;
    END;
    DECLARE
       v_err       VARCHAR2 (1000);
       v_sqlcode   NUMBER;
       v_count     NUMBER;
    BEGIN
       ctxsys.ctx_ddl.create_preference ('cust_wl', 'BASIC_WORDLIST');
       ctxsys.ctx_ddl.set_attribute ('cust_wl', 'SUBSTRING_INDEX', 'true'); -- to improve performance
    EXCEPTION
       WHEN OTHERS
       THEN
          v_err := SQLERRM;
          v_sqlcode := SQLCODE;
          v_count := INSTR (v_err, 'DRG-10701');
          IF v_count > 0
          THEN
             DBMS_OUTPUT.put_line (
                'The required preference named CUST_WL with BASIC WORDLIST is already set up');
          ELSE
             RAISE;
          END IF;
    END;
    --now below is the code of the index:
    CREATE INDEX ACCESS_USR_IDX3 ON ACCESS_USR
    (FIRST_NAME)
    INDEXTYPE IS CTXSYS.CONTEXT
    PARAMETERS('LEXER cust_lexer WORDLIST cust_wl SYNC (ON COMMIT)');
    CREATE INDEX ACCESS_USR_IDX4 ON ACCESS_USR
    (LAST_NAME)
    INDEXTYPE IS CTXSYS.CONTEXT
    PARAMETERS('LEXER cust_lexer WORDLIST cust_wl SYNC (ON COMMIT)');
    The strange thing is that, like I said, If I remove the exists clause the query returns very fast. Also if I modify the query to use only one NOT EXISTS clause and remove the other EXISTS clause it returns in less than one second.  Also if I remove the EXISTS clause and use only the NOT EXISTS  clause it returns in less than 4 seconds. But with both clauses it runs forever!
    When I tried to get dbms_xplan.display_cursor to get the query plan (for the case of both exists and not exists clause in the query), it said that previous statement's sql id was 0 or something like that so that I was not able to see the query plan. I will keep trying to get this plan (it takes 25 minutes to one hour each time but will get this info soon). Again any pointers are most helpful.
    Regards
    OrauserN

  • Oracle Text Index on Materialized View

    Hello,
    I have designed a search engine for an internet application.
    We have different tables for our main business objects, the search is based on the content of all these dependent entities (Product, Company etc...)
    So I have created a materialized view to embody this aggregation.
    Then I have created a Multi column datastore index on top of the snapshot.
    The search engine has to be refreshed automatically 3 times a day, and manually anytime.
    This is achieved by executing a complete refresh on the view and rebuild the index, programmatically via Toplink (SqlCall).
    The MV refresh looks like this :
    alter index usr_batiprod.fullTextMulticolIdx rebuild
    and the index rebuild:
    begin
    DBMS_MVIEW.REFRESH('FT_TEST','C');
    end;
    Everything was fine until now, we have had lots of tuning on the index side, the refresh process was working fine...
    We have let the users access the engine since Thursday (the index had been created on the production environment a fews weeks ago) and since yesterday (or maybe before) we have been experiencing data incoherency on the index...
    I've tracked down the pb to the Fulltext Search's refresh process (manual and automatic share the same code) that was crashing on the Materialized view refresh :
    java.sql.SQLException: ORA-20000: Oracle Text error:
    DRG-50610: internal error: drexdsync
    DRG-50857: oracle error in drekrtd (lob erase)
    ORA-00060: deadlock detected while waiting for resource
    ORA-06512: at "SYS.DBMS_SNAPSHOT", line 794
    ORA-06512: at "SYS.DBMS_SNAPSHOT", line 851
    ORA-06512: at "SYS.DBMS_SNAPSHOT", line 832
    ORA-06512: at line 2
    Again, we had tested the functionality thoroughly and never experienced such behaviour before... even while refreshing the materialized view and the index 3 times (or more) a day..
    Once I dropped the Oracle Text Index, I was able to refresh the MV again..
    so it looks like the index was in some incoherent state and was holding a lock on the materialized view...
    Maybe my Index refresh call is wrong, and a stronger load on the functionality leads quickly to this pb, I dont know..
    I had always been a bit doubtful towards my index rebuild call, so Im thinking about using a more complete call :
    alter index usr_batiprod.fullTextMulticolIdx rebuild parameters ('sync')
    is it enough, or do I have to switch to a 'Oracle Text' specific call ?
    Is there another possible reason for the MV lock ?
    Thank you for your support
    Best Regards
    Olivier Cuzacq

    MVs are constructed in different ways and have lots of different uses.
    Why not just use MV as temp table for OT (Oracle Text) index?
    Refresh MV OT_TEMP.
    Delete all not matching rows from OT.
    Insert all missing missing rows from OT_TEMP to OT.
    sync OT index (online).
    Query table OT.

  • Oracle Text Index Error - DRG-10700: preference does not exist: CTXSYS.DEFA

    Hi we are having a Oracle 11g db.And we have installed CTX SYS package and provided the grants to the required schema.
    But while creating the oracle text index, following error is thrown:
    ORA-29855: error occurred in the execution of ODCIINDEXCREATE routine
    ORA-20000: Oracle Text error:
    DRG-10700: preference does not exist: CTXSYS.DEFAULT_LEXER
    ORA-06512: at "CTXSYS.DRUE", line 160
    ORA-06512: at "CTXSYS.TEXTINDEXMETHODS", line 365
    Following grnats are given :
    GRANT EXECUTE ON CTXSYS.CTX_DDL TO <schema_name>;
    GRANT APPOWN TO <schema_name>;
    GRANT CTXAPP TO <schema_name>;
    I have verifyed the ctxsys.CTX_PREFERENCES view which is having an entry as :
    SELECT PRE_OWNER, PRE_NAME
    FROM CTXSYS.CTX_PREFERENCES
    WHERE PRE_NAME = 'DEFAULT_LEXER';
    The Result is :
    PRE_OWNER     PRE_NAME
    SYS     DEFAULT_LEXER
    Can you please assist if there is a way to update the permission on this DEFAULT_LEXER preference to set the PRE_OWNER as CTXSYS ?
    Thanks

    That's odd. If I run the same query I see:
    SQL> SELECT PRE_OWNER, PRE_NAME
      2  FROM CTXSYS.CTX_PREFERENCES
      3  WHERE PRE_NAME = 'DEFAULT_LEXER';
    PRE_OWNER                      PRE_NAME
    CTXSYS                         DEFAULT_LEXERAre all your defaults like thsi? What do you see if you run
    select pre_owner, pre_name from ctxsys.ctx_preferences where pre_name like 'DEFAULT%';
    It would be easy enough to update the underlying table DR$PREFERENCES to fix the owner, but who knows what else might be wrong.
    Has this database been updated from a 9i installation by any chance?

  • Trouble creating Oracle Text index

    Hey all,
    I am having trouble creating an Oracle Text index. I am receiving the following error when I try to sync the index after inserting numerous rows (@170,000). I have also tried to insert the rows and then create the index afterword. See below.
    ORACLE_TEXT>insert into varchar_test_ot select doc from varchar_test;
    171327 rows created.
    Elapsed: 00:06:40.08
    ORACLE_TEXT>exec ctx_ddl.sync_index('VT_TEST_IDX_OT');
    BEGIN ctx_ddl.sync_index('VT_TEST_IDX_OT'); END;
    ERROR at line 1:
    ORA-20000: Oracle Text error:
    DRG-50857: oracle error in drekmap (lob write)
    ORA-22990: LOB locators cannot span transactions
    ORA-06512: at "CTXSYS.DRUE", line 157
    ORA-06512: at "CTXSYS.CTX_DDL", line 1328
    ORA-06512: at line 1
    Elapsed: 00:02:09.07

    CREATE TABLE varchar_test
    (doc VARCHAR2(4000)
    CREATE TABLE varchar_test_ot
    (doc VARCHAR2(4000)
    begin
    ctx_ddl.create_preference('storage_pref','BASIC_STORAGE');
    ctx_ddl.set_attribute('storage_pref', 'I_TABLE_CLAUSE',
    'tablespace ot_test_idx_space storage (initial 1M next 1M)');
    ctx_ddl.set_attribute('storage_pref', 'K_TABLE_CLAUSE',
    'tablespace ot_test_idx_space storage (initial 1M next 1M)');
    ctx_ddl.set_attribute('storage_pref', 'R_TABLE_CLAUSE',
    'tablespace ot_test_idx_space storage (initial 1M next 1M)');
    ctx_ddl.set_attribute('storage_pref', 'N_TABLE_CLAUSE',
    'tablespace ot_test_idx_space storage (initial 1M next 1M)');
    ctx_ddl.set_attribute('storage_pref', 'I_INDEX_CLAUSE',
    'tablespace ot_test_idx_space storage (initial 1M next 1M)');
    ctx_ddl.set_attribute('storage_pref', 'P_TABLE_CLAUSE',
    'tablespace ot_test_idx_space storage (initial 1M next 1M)');
    ctx_ddl.create_section_group('auto','AUTO_SECTION_GROUP');
    ctx_ddl.create_preference('mywordlist', 'BASIC_WORDLIST');
    ctx_ddl.set_attribute('mywordlist','SUBSTRING_INDEX', 'YES');
    end;
    CREATE INDEX vt_test_idx_ot
    ON varchar_test_ot(doc)
    INDEXTYPE IS CTXSYS.CONTEXT
    PARAMETERS ('datastore ctxsys.default_datastore
    filter ctxsys.null_filter
    wordlist mywordlist
    storage storage_pref
    section group auto
    memory 50M');

Maybe you are looking for

  • Did anyone try to upgrade the java compiler to jdk1.4?

    Hi All, Maybe I'm just too hurry to try new things off. With only changing the compiler to version 1.4.0 I got the attached error message. It would very kind of you to give me advices. Thanks, YH

  • Ext. Quefire drive CDRW broke, can I replace the drive with a NEC or Pionee

    I had one of those Quefire 16x10x40 CDRW firewire external drives and now the drive doesn't work. The Mac says it can't find the CDRW/brunner software or drive. I'm assuming the drive is bad and not the enclosure electronics. The drive inside is a Te

  • R/3 connection to BIW - No Idocs arrived from the source system

    Question, Hi Team, I have issues during loading attribute data from R/3 source system to BI, I go to the path Data Warehousing Workbench - Modeling window. In the DataSources view, my application component Group ##. On my DataSource i Create Info Pac

  • TimeMachine is spinning "forever"

    TimeMachine (TM) was working well during 2008 with my setup (Mac mini with external 320 GB HD via USB) until I updated Leopard 10.5 to the most recent version 10.5.5 and not running TM for a couple of days. Starting automatic backup, TM shows symptom

  • GDM and OpenBox - Wallpaper and background problem [SOLVED]

    I have a strange problem. I am using GDM as login manager. And I am using OpenBox as a window manager. As soon as GDM appears on the screen, my wifi connection is connected... so its good. But, when I login Feh loads my background picture and it disa