Ctxcat index supporting multicolumn datastore

I've been looking to see if a ctxcat index supports something like a multicolumn datastore.
What I'm trying to do is to search multiple columns (all 256 bytes in size or less) using a like query on each of those columns with the result being ordered by up to 3 different non searched columns
For example, the book scenerio
A table with the following columns
title
publisher
author
publication_date
quantity
location
I want to be able to search on title, publisher, and author all at once (optionally searching the tokens with % symbols), and then sorting on publication_date, quantity and location.
Now doing the context index, it worked fine, until I started ordering the results. Straight "like" queries with the ordering were returning quicker.
So I've started looking at ctxcat indexes to provide the flexibility of mixed query searching using the "order by" in the catsearch function.
The question is, how do I setup and search all three columns(title, publisher, author) at once with ctxcat index? Since ctxcat indexes don't support support the datastore option, how do you search on multi-columns? Do I need to make a concatenated column with title, publisher and author, or is there something in the configuration of the ctxcat index that I'm missing?

i have exactly the same situation - that is i need to search on four columns and am trying to use ctxcat ...
but the twist i have is - based on what coulmns the user wants to search - i want to limit the serach to ONLY those columns
Is there some way to do that using ctxcat ? ... other than creating a large number of extra columns containing different combinations of searchable columns... yikes ... wont even go there ....

Similar Messages

  • CTXCAT index support MULTI_COLUMN_DATASTORE?

    I've been using a CONTEXT index in my app, however, having to re-synchronize the index is an issue with my high insert rate. So, I'm considering using a CTXCAT since all db updates are transactional.
    However, my CONTEXT query uses a MULTI_COLUMN_DATASTORE to query multiple columns via the concatenated column and it doesn't look like the CTXCAT index will support MULTI_COLUMN_DATASTORE? Does anyone know?
    If the MULTI_COLUMN_DATASTORE is not supported, is there an alternative query I could use whilst still being able to use CTXCAT index?
    Many thanks!

    Hi David,
    Until you get to 10g would a job that sync's frequently work? It sounds like the new sync on commit is what you need (provided it wouldn't cause performance problems for you), so would the job be an acceptable workaround until you upgrade?
    -Ron

  • CTXCAT index problem: SUBSTRING_INDEX parameter doesn't work

    Hi,
    I need a help with ctxcat index on Oracle 10g. I need to improve searching using CTXCAT index. All is working quite well except SUBSTRING_INDEX parameter. I thought that following was necessary and sufficient:
    EXEC ctx_ddl.create_preference('KEVFT_WL', 'BASIC_WORDLIST');
    EXEC ctx_ddl.set_attribute('KEVFT_WL', 'substring_index', 'YES');
    EXEC ctx_ddl.set_attribute('KEVFT_WL', 'prefix_index', 'YES');
    EXEC ctx_ddl.set_attribute('KEVFT_WL', 'prefix_min_length', 1);
    EXEC ctx_ddl.set_attribute('KEVFT_WL', 'prefix_max_length', 6);
    This BASIC_WORDLIST preference set is used for index creation. But the problem is, that when I try to search using query:
    SELECT * FROM TMP_FULLTEXT
    WHERE CATSEARCH(fulltext, '%abc', null)> 0;
    then I get no rows in results. Despite the fact that row with the text 'aabc' exists in the table.
    Can anyone tell me what the problem is?
    Thank you,
    Julius Chrobak

    With a catsearch query operator, the wildcard is an asterisk (*), not a percent sign (%) as with a contains query operator. However, even with the correct wildcard, left truncation is not supported with ctxcat. However, if you use a query template, then you can use the context grammar with the % wildcard for context grammar and left truncation is supported. Please see the demonstration below that reproduces the problem, then corrects it.
    SCOTT@10gXE> SELECT * FROM v$version
      2  /
    BANNER
    Oracle Database 10g Express Edition Release 10.2.0.1.0 - Product
    PL/SQL Release 10.2.0.1.0 - Production
    CORE     10.2.0.1.0     Production
    TNS for 32-bit Windows: Version 10.2.0.1.0 - Production
    NLSRTL Version 10.2.0.1.0 - Production
    SCOTT@10gXE> CREATE TABLE tmp_fulltext (fulltext VARCHAR2 (30))
      2  /
    Table created.
    SCOTT@10gXE> INSERT ALL
      2  INTO tmp_fulltext VALUES ('aabc')
      3  INTO tmp_fulltext VALUES ('abcd')
      4  SELECT * FROM DUAL
      5  /
    2 rows created.
    SCOTT@10gXE> BEGIN
      2    ctx_ddl.create_preference ('KEVFT_WL', 'BASIC_WORDLIST');
      3    ctx_ddl.set_attribute      ('KEVFT_WL', 'substring_index',   'YES');
      4    ctx_ddl.set_attribute      ('KEVFT_WL', 'prefix_index',        'YES');
      5    ctx_ddl.set_attribute      ('KEVFT_WL', 'prefix_min_length', 1);
      6    ctx_ddl.set_attribute      ('KEVFT_WL', 'prefix_max_length', 6);
      7  END;
      8  /
    PL/SQL procedure successfully completed.
    SCOTT@10gXE> CREATE INDEX fulltext_idx ON tmp_fulltext (fulltext)
      2  INDEXTYPE IS CTXSYS.CTXCAT
      3  PARAMETERS ('WORDLIST KEVFT_WL')
      4  /
    Index created.
    SCOTT@10gXE> -- reproduction of original problem using wrong wildcard for catsearch:
    SCOTT@10gXE> SELECT * FROM TMP_FULLTEXT
      2  WHERE CATSEARCH (fulltext, '%abc', null) > 0
      3  /
    no rows selected
    SCOTT@10gXE> SELECT * FROM TMP_FULLTEXT
      2  WHERE CATSEARCH (fulltext, 'abc%', null) > 0
      3  /
    no rows selected
    SCOTT@10gXE> -- left truncation not supported, even with correct wildcard:
    SCOTT@10gXE> SELECT * FROM TMP_FULLTEXT
      2  WHERE CATSEARCH (fulltext, '*abc', null) > 0
      3  /
    no rows selected
    SCOTT@10gXE> SELECT * FROM TMP_FULLTEXT
      2  WHERE CATSEARCH (fulltext, 'abc*', null) > 0
      3  /
    FULLTEXT
    abcd
    SCOTT@10gXE> -- query using template with context grammar:
    SCOTT@10gXE> SELECT * FROM TMP_FULLTEXT
      2  WHERE CATSEARCH
      3            (fulltext,
      4             '<query>
      5             <textquery grammar="context">
      6               %abc
      7             </textquery>
      8              <query>',
      9             null) > 0
    10  /
    FULLTEXT
    aabc
    SCOTT@10gXE>

  • Error when hit ctxsys.ctxcat index

    I use SQL query to generated report page in HTML DB, the query hit Oracle ctxsys.ctxcat indexes, after sent query, I got this error message. My question is: Does HTML DB support ctxsys.ctxcat index?
    report error:
    ORA-20000: Oracle Text error:
    DRG-10849: catsearch does not support functional invocation
    My sample query:
    SELECT distinct(FEATURE_ID),
    FEATURE_NAME
    from maint_query_view
    where FEATURE_NAME_OFFICIAL = 'Y'
    and feature_id in (select feature_id from maint_query_view
    where (catsearch(:FEATURENAME, 'index',null)>0);
    Thanks
    Lei

    Lei,
    1) HTML DB does support the CTXCAT index type.
    2) The error you've encountered seems specific to Oracle Text and not HTML DB (I would suspect you would encounter the same error if you issued the query from SQL*Plus).
    It's best to file a TAR with Oracle Worldwide Support on this one.
    Joel

  • How to give more relevance to one of the column in multicolumn datastore

    Hi Gurus,
    While using multicolumn datastore needed to give more importance to one of the column than the other one. How can we achieve the same ?
    SQL> create table test_sh4 (text1 clob,text2 clob);
    Table created.
    SQL> alter table test_sh4 add (text3 clob);
    Table altered.
    SQL> begin
    2 ctx_ddl.create_preference ('nd_mcd', 'multi_column_datastore');
    3 ctx_ddl.set_attribute
    4 ('nd_mcd',
    5 'columns',
    6 'replace (text1, '' '', '''') nd, text1 text1,replace (text1, '' '', '''') nd, text1 text1');
    7 ctx_ddl.set_attribute ('nd_mcd', 'delimiter', 'newline');
    8 ctx_ddl.create_preference ('test_lex1', 'basic_lexer');
    9 ctx_ddl.set_attribute ('test_lex1', 'whitespace', '/\|-_+');
    10 end;
    11 /
    PL/SQL procedure successfully completed.
    SQL> create index IX_test_sh4 on test_sh4 (text3)
    indextype is ctxsys.context
    parameters
    ('datastore nd_mcd
    lexer test_lex1')
    / 2 3 4 5 6
    Index created.Here while querying how can I give more relevance to text1 column than text2 column ?

    Every time that you post code, whatever you are using eliminates all formatting and changes any multiple spaces to single spaces, so it makes it hard to tell what your code really is. Within the function, you need to remove the special characters and double spaces before you use the string for anything else. In the first part of your output string, you were only putting a % in front of the first word and after the last word. I fixed it so that it puts % before and after every word. I also added some code to return a score of 100 when an exact match is found in any column. You can use the function in a select from dual to see what it is returning. Please see the demonstration below. I will provide a copy of the function in a separate post that you can copy and paste. You may want to adjust the values that you multiply by. The values of 10 and 5 and .5 and .1 were just examples.
    SCOTT@orcl_11gR2> create table test_sh (text1 clob,text2 clob);
    Table created.
    SCOTT@orcl_11gR2> alter table test_sh add (text3 clob);
    Table altered.
    SCOTT@orcl_11gR2> insert all
      2  into test_sh (text1, text2, text3)
      3    values ('staple card', 'word2', 'word3')
      4  into test_sh (text1, text2, text3)
      5    values ('word4', 'staple card', 'word5')
      6  into test_sh (text1, text2, text3)
      7    values ('staplecard', 'word2', 'word3')
      8  into test_sh (text1, text2, text3)
      9    values ('word4', 'staplecard', 'word5')
    10  into test_sh (text1, text2, text3) values
    11    ('Weber Genesis S-310 Gas Grill',
    12       'Weber Genesis S-310 Gas Grill',
    13       'Weber Genesis S-310 Gas Grill')
    14  select * from dual
    15  /
    5 rows created.
    SCOTT@orcl_11gR2> begin
      2    ctx_ddl.create_preference ('nd_mcd', 'multi_column_datastore');
      3    ctx_ddl.set_attribute
      4        ('nd_mcd',
      5         'columns',
      6         'replace (text1, '' '', '''') nd1,
      7          text1 text1,
      8          replace (text2, '' '', '''') nd2,
      9          text2 text2');
    10    ctx_ddl.create_preference ('test_lex1', 'basic_lexer');
    11    ctx_ddl.set_attribute ('test_lex1', 'whitespace', '/\|-_+');
    12    ctx_ddl.create_section_group ('test_sg', 'basic_section_group');
    13    ctx_ddl.add_field_section ('test_sg', 'text1', 'text1', true);
    14    ctx_ddl.add_field_section ('test_sg', 'nd1', 'nd1', true);
    15    ctx_ddl.add_field_section ('test_sg', 'text2', 'text2', true);
    16    ctx_ddl.add_field_section ('test_sg', 'nd2', 'nd2', true);
    17  end;
    18  /
    PL/SQL procedure successfully completed.
    SCOTT@orcl_11gR2> create index IX_test_sh on test_sh (text3)
      2  indextype is ctxsys.context
      3  parameters
      4    ('datastore     nd_mcd
      5        lexer          test_lex1
      6        section group     test_sg')
      7  /
    Index created.
    SCOTT@orcl_11gR2> create or replace function text_format
      2    (p_string in varchar2)
      3    return         varchar2
      4  as
      5    v_string     varchar2 (32767);
      6    v_string_out varchar2 (32767);
      7    v_string_in1 varchar2 (32767);
      8    v_string_in2 varchar2 (32767);
      9    V_TOKEN         VARCHAR2 (32767);
    10  BEGIN
    11    -- remove special characters and double spaces before using in anything else:
    12    v_string := trim (translate (p_string, '/\|-_+&', '      '));
    13    v_string := replace (v_string, '''', '');
    14    while instr (v_string, '  ') > 0 loop
    15        v_string := replace (v_string, '  ', ' ');
    16    end loop;
    17    -- fixed 2 lines below:
    18    v_string_out := '(%' || replace (v_string, ' ', '% %') || '%) ' || ',';
    19    v_string_out := v_string_out || '(' || v_string || ')' || ',';
    20    -- first search string with spaces:
    21    v_string_in1 := v_string || ' ';
    22    -- second search string without spaces:
    23    v_string_in2 := replace (v_string_in1, ' ', '') || ' ';
    24    if v_string_in2 = v_string_in1 then
    25        v_string_in2 := null;
    26    end if;
    27    -- format search string one token at a time:
    28    while v_string_in1 is not null loop
    29        v_token := substr (v_string_in1, 1, instr (v_string_in1, ' ') - 1);
    30        v_string_out := v_string_out
    31        || '('
    32        || '?' || v_token || ' or '
    33        || '!' || v_token || ' or '
    34        || '$' || v_token
    35        || '),';
    36        v_string_in1 := substr (v_string_in1, instr (v_string_in1, ' ') + 1);
    37    end loop;
    38    while v_string_in2 is not null loop
    39        v_token := substr (v_string_in2, 1, instr (v_string_in2, ' ') - 1);
    40        v_string_out := v_string_out
    41        || '('
    42        || '%' || v_token || '% or '
    43        || '?' || v_token || ' or '
    44        || '!' || v_token || ' or '
    45        || '$' || v_token
    46        || '),';
    47        v_string_in2 := substr (v_string_in2, instr (v_string_in2, ' ') + 1);
    48    end loop;
    49    -- return formatted string (added score of 100 for exact match in any column:
    50    return
    51        '(' || v_string            || ') * 10 * 10 or
    52         (' || rtrim (v_string_out, ',') || ' within text1) * 10 or
    53         (' || rtrim (v_string_out, ',') || ' within nd1) * 5 or
    54         (' || rtrim (v_string_out, ',') || ' within text2) * .5 or
    55         (' || rtrim (v_string_out, ',') || ' within nd2) * .1';
    56  end text_format;
    57  /
    Function created.
    SCOTT@orcl_11gR2> show errors
    No errors.
    SCOTT@orcl_11gR2> select text_format ('STAPLE CARD') from dual
      2  /
    TEXT_FORMAT('STAPLECARD')
    (STAPLE CARD) * 10 * 10 or
         ((%STAPLE% %CARD%) ,(STAPLE CARD),(?STAPLE or !STAPLE or $STAPLE),(?CARD or
    !CARD or $CARD),(%STAPLECARD% or ?STAPLECARD or !STAPLECARD or $STAPLECARD) wit
    hin text1) * 10 or
         ((%STAPLE% %CARD%) ,(STAPLE CARD),(?STAPLE or !STAPLE or $STAPLE),(?CARD or
    !CARD or $CARD),(%STAPLECARD% or ?STAPLECARD or !STAPLECARD or $STAPLECARD) wit
    hin nd1) * 5 or
         ((%STAPLE% %CARD%) ,(STAPLE CARD),(?STAPLE or !STAPLE or $STAPLE),(?CARD or
    !CARD or $CARD),(%STAPLECARD% or ?STAPLECARD or !STAPLECARD or $STAPLECARD) wit
    hin text2) * .5 or
         ((%STAPLE% %CARD%) ,(STAPLE CARD),(?STAPLE or !STAPLE or $STAPLE),(?CARD or
    !CARD or $CARD),(%STAPLECARD% or ?STAPLECARD or !STAPLECARD or $STAPLECARD) wit
    hin nd2) * .1
    1 row selected.
    SCOTT@orcl_11gR2> column text1 format a11
    SCOTT@orcl_11gR2> column text2 format a11
    SCOTT@orcl_11gR2> column text3 format a11
    SCOTT@orcl_11gR2> SELECT SCORE(1), t.* FROM test_sh t
      2  WHERE  CONTAINS (text3, text_format ('STAPLE CARD'), 1) > 0
      3  ORDER  BY 1 DESC
      4  /
      SCORE(1) TEXT1       TEXT2       TEXT3
           100 staple card word2       word3
           100 word4       staple card word5
           100 staplecard  word2       word3
            10 word4       staplecard  word5
    4 rows selected.

  • CONTEXT index vs a CTXCAT index

    I'm puzzled as to which of these indexes is meant for what purpose. I like the auto-update feature of the CTXCAT index, so I'm leaning that direction.
    Here's our situation. We have a table with about 2 million rows, where there's an EMPLOYER_NAME field. Users are constantly executing queries like:
    where EMPLOYER_NAME like '%CHEVRON%'The CTXCAT index is also described as "Typically, with this index type, you index small documents or text fragments". I would consider this EMPLOYER_NAME column (VARCHAR2(50)) to fit this description, more or less.
    The main thing that has me confused is that our vendor is pushing for a CONTEXT index, as they've got experience setting these up. We're not storing "text consists of large coherent documents.", but we are storing plain text.
    Could someone offer some guidance? Thanks for your help,
    --=Chuck

    Depends on whether the words are predictable. You indicated in your first post they are employer names. If they are then presumably there is a table/list of valid values. Otherwise a CTX index may be your best shot but understand that you will be indexing every word and, I assume, most will be irrelevant.

  • Error while importing table having ctxcat index

    Hi
    I created a table and ctxcat index on the same. I exported the same. While importing, table got imported but for index creation it gave error imp-00017 with ora-29855.
    Though the index have been created but with some errors. I can see the index in all_indexes table but if i try to see the entry in dba_segments, record is not found.
    Seems that index is not created properly.
    Pls suggest ASAP.
    Regards
    Rajiv

    What's your source and target Oracle version ?
    1) make sure context option is installed on target DB
    2) create a user ctxsys, the schema where the context related objects resides

  • SQL Azure indexer support for Collection(Edm.String)

    Is there a plan to support "Collection(Edm.String)
    " with a SQL Azure indexer? Maybe via an XML type?
    Unless I'm misunderstanding the supported types
    https://msdn.microsoft.com/en-us/library/azure/dn946880.aspx
    It sort of fizzles out after "time, timespan" but I'm assuming it's Not Supported's all the way down

    http://feedback.azure.com/forums/263029-azure-search/suggestions/7189214-sql-azure-indexer-support-for-collection-edm-strin
    Was going to start there but just wanted to vet that it indeed wasn't there.... I realize it's a bit awkward and anti - sql storing data like that in a column and will probably annoy DBAs.
     Currently the data we'd use this for would be Customer phone numbers, addresses, VIN for vehicles, and some account numbers... So nothing super fancy...   Straight delimiters might get funky with addresses but maybe a standard backspace escape
    sequence or letting user use ascii hexcode if the delimiter is in the text..  
    For now we already have a comma separated SearchText field we've indexed for use with FTS and I just pointed an Edm.string at that column in our DB and it seems to pick up all the comma separated elements... But I'm guessing it's not as efficient as if it
    was stored in more specific collections.

  • Any way to utilize CTXCAT index?

    I’ve been looking into trying to add indexes to columns in a table which have a data type of VARCHAR2(4000). Does anyone know if there is a way to utilize a CTXCAT index from an OBIEE request? It requires a special syntax in the where clause so I'm not sure if there is a way to make OBIEE actual take advantage of the index if I do create it.
    Edited by: PBizme on May 6, 2010 2:31 PM

    Incase anyone else needs it, here are the pinouts:
    - Analog Ground
    2 - Analog Headphone Out Left
    3 - Audio Backpanel Mute -- short to ground to mute the backpanel (when headphones are plugged in)
    4 - Analog Headphone Out Right
    5 - same as #3
    6 - Mic input from front panel
    7 - key pin (shouldn't be there)
    8 - VREF out -- voltage reference for Mic
    9 - MIC IN MUTE -- ground when mic isn't plugged in, +2VDC when mic is plugged in
    0 - Audio cable detect -- will be ground when headphones are plugged in (not normally used)
    Side view of the card:
    [img"]http://www.cs.rpi.edu/&#37;7Ehollec/images/sonata+audigy.jpg">

  • CTXSYS.CTXCAT index and CATSEARCH problem

    I have table with just one column indexed (CBG_COMPANY_HOUSE_STREET_DIST) with CTXSYS.CTXCAT index. And the problem is that
    words like 'OR', 'IF', 'MR', 'MRS', 'A' and some more like these are NOT INDEXED at all..! So simply when I try to use CATSEARCH like
    select * from ros_dev.MAD_PLACES_DEDUPE where CATSEARCH(CBG_COMPANY_HOUSE_STREET_DIST,'MRS',null) > 0
    I get no results at all...
    What is the reason? What is the solution? Please, it is URGENT, I develope some software , I am not a DBA, and I have a deadline on Friday :(
    Thanks for any help!

    Ok - I just responded to your post over in the database forum. Same answer applies here. If you need help redoing the index, best to post here rather than the General Database forum though since it is definitely Text specific.
    Thanks,
    Ron

  • Create CTXCAT  index in parallel mode

    I am using Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production with oracle text version 11.2.0.2.0.
    Following script is used to create the ctxcat index but I noticed it is not creating the index in parallel. We have 16 cpu server. The table onto which text index is created has no partition.
    BEGIN
    --Storage preference
    Ctx_Ddl.Create_Preference ('IDX_STORE', 'basic_storage');
    Ctx_Ddl.Set_Attribute (preference_name => 'IDX_STORE',
    attribute_name => 'I_TABLE_CLAUSE',
    attribute_value => 'TABLESPACE C_DATA_02');
    Ctx_Ddl.set_attribute ('IDX_STORE',
    'I_INDEX_CLAUSE',
    'TABLESPACE C_IDX_02 COMPRESS 2');
    Ctx_Ddl.set_attribute (
    'IDX_STORE',
    'R_TABLE_CLAUSE',
    'TABLESPACE C_DATA_02 LOB(DATA) STORE AS (CACHE)'
    --Wordlist
    ctx_ddl.create_preference ('nbcwordlist', 'BASIC_WORDLIST');
    ctx_ddl.set_attribute ('nbcwordlist', 'PREFIX_INDEX', 'TRUE');
    ctx_ddl.set_attribute ('nbcwordlist', 'PREFIX_MIN_LENGTH', 1);
    ctx_ddl.set_attribute ('nbcwordlist', 'PREFIX_MAX_LENGTH', 64);
    ctx_ddl.set_attribute ('nbcwordlist', 'SUBSTRING_INDEX', 'NO');
    END;
    CREATE INDEX FTS_IDX ON INDVL_SRCH_NM (SRCH_NM)
    INDEXTYPE IS CTXSYS.CTXCAT
    PARAMETERS('STORAGE IDX_STORE STOPLIST C_STOPLIST WORDLIST C_WORDLIST')
    PARALLEL (DEGREE 16);
    What should be done to create this index in parallel? Is there any other thing that can be done to speed up creation without disabling prefix index.
    Thanks. I appreciate you time and effort.
    Edited by: spur230 on Nov 14, 2011 4:53 PM

    Hi,
    in the manual some remarks are made for parallel indexing, see http://download.oracle.com/docs/cd/E14072_01/text.112/e10945/ind.htm#CIHCBABI
    So it is possible to index in parallel, but you don't have control, the oracle db decides this for you. So it is possible that Oracle thinks that single indexing is faster, more work is done in the database besides the index creation, and many more factors (also mentioned in above document).
    I did many parallel indexing on systems, but always on quiet moments, so I have the most resources for creating indexes. Furthermore I noticed that system statistics can influence the creation. If the statistics are good for the CPU and I/O, the parallel creation can be optimised by the db.
    Herald ten Dam
    http://htendam.wordpress.com

  • CTXCAT index and VPD?

    Hi all,
    after looking into the logfile of IMPDP, i found this:
    Failing sql is:
    CREATE INDEX "Q1"."CTX1_AX_CODE" ON "Q1"."XREF" ("CODE")  INDEXTYPE IS "CTXSYS"."CTXCAT"  PARAMETERS ('STOPLIST CTXSYS.EMPTY_STOPLIST
                 LEXER global_lexer
                 WORDLIST global_wordlist
                 STORAGE CTXSTORE')P
    ORA-39083: Object type INDEX failed to create with error:
    ORA-29855: error occurred in the execution of ODCIINDEXCREATE routine
    ORA-20000: Oracle Text error:
    DRG-50857: oracle error in drsxsopen
    ORA-28100: policy function schema LICENSE is invalidI think the first 8 lines are saying some errors regarding ORACLE TEXT, and the last line is a VPD error, right?
    it's confusing, how could an ORACLE TEXT index have anything to do with VPD? I don't see any relations between them.
    anyone have any ideas?
    thanks in advance

    Rafi (Oracle DBA) wrote:
    Hi,
    Cause:
    Starting with 10g CTXSYS no longer has DBA privileges. Traditionally, in previous releases, CTXSYS has been allowed to sync any index. But we have been moving toward the model that only the index owner or DBA can sync a given index.
    Solution
    To implement the solution, please upgrade to 11gR2, 11.2.0.2, where the problem is fixed.
    Prior 11.2.0.2 you should change your PL/SQL code and use the owner of the index to SYNC, or a DBA user.
    For more details check the below MY ORACLE SUPPORT NOTE:
    DRG-50857 When Synchronizing Indexes as CTXSYS [ID 351361.1]
    Best regards,
    Rafi.
    http://rafioracledba.blogspot.com/
    Hi,
    version: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0
    I use SYS to do the IMPDP, can this avoid the privilege issue you mentioned?

  • Add text to specified index in multicolumn listbox

    Hi!
    I have smal problem with multicolumn listbox. My application should
    create list of values where user can increase and decrease values of 1
    or more tester at same time.
    e.g when user gives for tester 1 values 1 - 5, my vi creates list where values are displayd like this:
    1
    2
    3
    4
    5
    after that user gives for tester 2 values 5-1 and my vi creates list where values are displayd like this:
    1
    5
    2
    4
    3
    3
    4
    2
    5
    1
    etc.
    First I planned use insert into array function where for 1:st tester
    row index would be 0,1,2,... and for 2:nd tester row index would be
    1,3,5,... etc. One problem in this solution is that if tester 2 have
    more values than tester 1, there will be left empty rows between
    values. I planned use string replace to solve that problem, but then I
    noticed antoher nasty feature of multicolumn listbox.
    More serious problem with this structure is, that if tester 2 have more
    values than tester 1, multicolumn listbox shows only same amount of
    values than what tester 1 have and rest of values are lost in
    kyberspace, because in multicolumn listbox values can be added only
    places where already are values or to last row +1. Do anyone have any
    ideas how to prevent this or how I should build my VI so I could create
    test list for testers?

    hi Janne.
    it took me a while to get back
    sorry!
    good to know u have been able to solve it!
    anyhow, do look this vi  i have attached.  This also takes care of extra elements in the larger array and appends them into the interleaved list box entry.
    hope it can be of help to u.
    ciao
    Devchander
    Attachments:
    listbox_vi.vi ‏90 KB

  • XMLType index supporting position in XPath

    I would like to know if it is possible to create index which will support position function in XPath.
    For example:
    Xpath:
    select extractValue(p.pack_content,'/Data/Contractors/Contractor[278]/PermissionNumber')
    from packages p;
    The table packages is based on the schema and it is created by the statement:
    CREATE TABLE packages
    (pack_id NUMBER primary key,
    pack_content XMLType
    XMLTYPE COLUMN pack_content
    XMLSCHEMA "http://www.example.com/example" ELEMENT "Data"
    VARRAY pack_content."XMLDATA"."Contractors"."Contractor"
    STORE AS TABLE pkg_contractors
    ((PRIMARY KEY (NESTED_TABLE_ID, SYS_NC_ARRAY_INDEX$))
    ORGANIZATION INDEX OVERFLOW);
    What kind of indexes should I create?
    Grzegorz.

    Just a stupid example to see if it could be done (not that it works);
    Does it make any sense ?
    No idea if this will work for you, you should further test it
    SQL> select * from v$version;
    BANNER
    Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - Prod
    PL/SQL Release 10.2.0.3.0 - Production
    CORE    10.2.0.3.0      Production
    TNS for 32-bit Windows: Version 10.2.0.3.0 - Production
    NLSRTL Version 10.2.0.3.0 - Production
    5 rows selected.
    SQL> create table temp
      2  (lclob xmltype)
      3  ;
    Table created.
    SQL> insert into temp
      2  values('<itemMaster>
      3  <itemNumber>001000222</itemNumber>
      4  <itemDesc>HGR REUSE BX FOR HANGERRTNS </itemDesc>
      5  <paltSize>1</paltSize>
      6  <stdUOM>1</stdUOM>
      7  <shflfUOM>1</shflfUOM>
      8  <aliases>
      9  <upcCode>123456</upcCode>
    10  <upcCode>490010002222</upcCode>
    11  </aliases>
    12  </itemMaster>
    13  ')
    14  ;
    1 row created.
    SQL> commit;
    Commit complete.
    SQL> select extractvalue(lclob,'/itemMaster/aliases/upcCode[position()=2]') from temp;
    EXTRACTVALUE(LCLOB,'/ITEMMASTER/ALIASES/UPCCODE[POSITION()=2]')
    490010002222
    1 row selected.
    SQL> set autotrace on
    SQL> select extractvalue(lclob,'/itemMaster/aliases/upcCode[position()=2]') from temp;
    EXTRACTVALUE(LCLOB,'/ITEMMASTER/ALIASES/UPCCODE[POSITION()=2]')
    490010002222
    1 row selected.
    Execution Plan
    Plan hash value: 1896031711
    | Id  | Operation         | Name | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT  |      |     1 |  2002 |     3   (0)| 00:00:01 |
    |   1 |  TABLE ACCESS FULL| TEMP |     1 |  2002 |     3   (0)| 00:00:01 |
    Note
       - dynamic sampling used for this statement
    Statistics
              0  recursive calls
              0  db block gets
              7  consistent gets
              0  physical reads
              0  redo size
            476  bytes sent via SQL*Net to client
            385  bytes received via SQL*Net from client
              2  SQL*Net roundtrips to/from client
              0  sorts (memory)
              0  sorts (disk)
              1  rows processed
    SQL> create index pos_idx on temp
      2  (extractvalue(lclob,'/itemMaster/aliases/upcCode[position()]'));
    Index created.
    SQL> select extractvalue(lclob,'/itemMaster/aliases/upcCode[position()=2]') from temp;
    EXTRACTVALUE(LCLOB,'/ITEMMASTER/ALIASES/UPCCODE[POSITION()=2]')
    490010002222
    1 row selected.
    Execution Plan
    Plan hash value: 1896031711
    | Id  | Operation         | Name | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT  |      |     1 |  2002 |     3   (0)| 00:00:01 |
    |   1 |  TABLE ACCESS FULL| TEMP |     1 |  2002 |     3   (0)| 00:00:01 |
    Note
       - dynamic sampling used for this statement
    Statistics
             19  recursive calls
              0  db block gets
             19  consistent gets
              0  physical reads
              0  redo size
            476  bytes sent via SQL*Net to client
            385  bytes received via SQL*Net from client
              2  SQL*Net roundtrips to/from client
              0  sorts (memory)
              0  sorts (disk)
              1  rows processed
    SQL> begin  dbms_stats.set_table_stats
      2  ( ownname => 'MARCO'
      3  , tabname => 'TEMP'
      4  , numrows => 50000000  , numblks => 1200000  );
      5  end;
      6  /
    PL/SQL procedure successfully completed.
    SQL> select extractvalue(lclob,'/itemMaster/aliases/upcCode[position()=1]') from temp;
    EXTRACTVALUE(LCLOB,'/ITEMMASTER/ALIASES/UPCCODE[POSITION()=1]')
    123456
    1 row selected.
    Execution Plan
    Plan hash value: 1896031711
    | Id  | Operation         | Name | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT  |      |    50M|  4768M|   265K  (2)| 00:53:04 |
    |   1 |  TABLE ACCESS FULL| TEMP |    50M|  4768M|   265K  (2)| 00:53:04 |
    Statistics
              8  recursive calls
              0  db block gets
              9  consistent gets
              0  physical reads
              0  redo size
            470  bytes sent via SQL*Net to client
            385  bytes received via SQL*Net from client
              2  SQL*Net roundtrips to/from client
              0  sorts (memory)
              0  sorts (disk)
              1  rows processedMessage was edited by:
    mgralike

  • "Failed to open cursor" while creating CTXCAT index. Bug?

    Hi,
    I'm trying to create a catalog index on a rather large table. And I am consistently getting the following error. When the table was half the size, the same CREATE INDEX statement worked just fine. However, when the table grows to a certain size, that statement no longer works.
    I searched the whole forum and I did not find anything about this error. Am I the first to encounter it? Can this be a bug?
    Any advice is greatly appreciated.
    Yongtao
    SQL>create index myindex on mytable(mycolumn) indextype is ctxsys.ctxcat parameters ('index set myindexset section group mysectiongroup stoplist mystoplist storage mystorage lexer mylexer');
    create index myindex on mytable(mycolumn) indextype is ctxsys.ctxcat parameters ('index set myindexset section group mysectiongroup stoplist mystoplist storage mystorage lexer mylexer')
    ERROR at line 1:
    ORA-29855: error occurred in the execution of ODCIINDEXCREATE routine
    ORA-20000: Oracle Text error:
    DRG-50800: failed to open cursor
    DRG-50857: oracle error in drsxsopen
    ORA-00942: table or view does not exist
    ORA-06512: at "CTXSYS.DRUE", line 160
    ORA-06512: at "CTXSYS.CATINDEXMETHODS", line 97
    Elapsed: 09:07:26.25
    SQL>

    Looks like a bug to me. Did it error out immediately, or only after processing for some time?
    Do you get the same problem without the storage clause?

Maybe you are looking for

  • Error in analyzer Log file (/sapdb/data/wrk/ACP/analyzer--- DBAN.err)

    Hello All, I am getting the following Error message in analyzer Log file (/sapdb/data/wrk/ACP/analyzer---> DBAN.err). the details are as follows:- ===================================================== <i>2006-07-24 08:55:59 ERROR 5: Cannot execute SQ

  • Java career advice, now that I've been laid off

    After nearly 13 years at the same company (my only job since finishing college), I was laid off. One would think that with such experience, a new job would be easy to find. The problem is that in those 12+ years I've focused on a rather narrow set of

  • How can I get my Boot Camp partition off my old drive?

    I swapped out the stock 160gb drive that came in my MacBook Pro since it was acting up. I installed a new drive and restored it with Time Machine, but now my Boot Camp partition is still on my old drive. I slipped my old drive into a usb sata enclosu

  • What is a Cross Change Document in FI?

    Hi All, What is a Cross Change Document in FI? Thanks and Regards, soumya Note: Helpful Answers will be rewarded.

  • HttpProxyServlet - need run-time config NOT deploy-time

              HI,           I've looked through a lot of the traffic and haven't seen           anything along the lines of this question. I have a system           which we compile and build and then start up in a specific           mode (i.e. productio