Creating CTXSYS.CONTEXT type index for orddoc

Hi,
We tried to create a index for a orddoc datatype , the syntax used was as below
CREATE INDEX CIX_DLX_ASSET1 ON DLX_ASSET(TEXT_ASSET.source.localdata) INDEXTYPE IS CTXSYS.CONTEXT;
where DLX_ASSET is the table name and TEXT_ASSET is of the type Orddoc.
When we tried to create the index we are getting the below error message
ORA-29855: error occurred in the execution of ODCIINDEXCREATE routine
ORA-20000: Oracle Text error:
ORA-06502: PL/SQL: numeric or value error: character string buffer too small
ORA-06512: at "CTXSYS.DRUE", line 157
ORA-06512: at "CTXSYS.TEXTINDEXMETHODS", line 204
But the index is being created but it is not proper and contain query doesnot work properly on it
However we were able to create an index for TEXT_ASSET.comments as below
CREATE INDEX CIX_TBL_ASSET1 ON TBL_ASSET(TEXT_ASSET.comments) INDEXTYPE IS CTXSYS.CONTEXT;
The step we had followed are as below
Granted required permission to the User owning the index.
GRANT CTXAPP to User
GRANT EXECUTE ON CTX_CLS TO User;
GRANT EXECUTE ON CTX_DDL TO User;
GRANT EXECUTE ON CTX_DOC TO User;
GRANT EXECUTE ON CTX_OUTPUT TO User;
GRANT EXECUTE ON CTX_QUERY TO User;
GRANT EXECUTE ON CTX_REPORT TO User;
GRANT EXECUTE ON CTX_THES TO User;
All the package of the ctxsys is complied
The ctxsrv has been stared as below
ctxsrv -user ctxsys/ctxsys
and is up and runing.

Dear
Here are the error explanations;
ORA-06502:     PL/SQL: numeric or value error string
Cause:     An arithmetic, numeric, string, conversion, or constraint error occurred. For example, this error occurs if an attempt is made to assign the value NULL to a variable declared NOT NULL, or if an attempt is made to assign an integer larger than 99 to a variable declared NUMBER(2).
Action:     Change the data, how it is manipulated, or how it is declared so that values do not violate constraints.
ORA-29855:
     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.Ogan

Similar Messages

  • Cannot create ctxsys.context type index : ORA-29855 ORA-20000 DRG-11206 ...

    Hello everybody,
    I have from time to time to create Intermedia or Oracle text indexes in Oracle databes, most 10g ones.
    Today I did it in a Oracle 10g under Linux RHEL 5, with this few usual commands:
    1) connect SYS/**** as SYSDBA;
    2) CREATE TABLESPACE "DRSYS" LOGGING DATAFILE '/path_to_index_files/drsys.ora' SIZE 25M REUSE AUTOEXTEND ON NEXT 1280K MAXSIZE UNLIMITED EXTENT MANAGEMENT LOCAL AUTOALLOCATE SEGMENT SPACE MANAGEMENT AUTO;
    3) @$ORACLE_HOME/ctx/admin/catctx.sql ctxsys DRSYS TEMP NOLOCK
    4) connect ctxsys/ctxsys;
    5) @$ORACLE_HOME/ctx/admin/defaults/drdeff.sql;
    6) connect sa/*****;
    7) CREATE INDEX pj_index ON sa.tpiecejointe(pjcontenu) INDEXTYPE IS ctxsys.context parameters ('sync (every "SYSDATE+12/24")');
    My issue occured at the 7th step:
    CREATE INDEX pj_index ON sa.tpiecejointe(pjcontenu) INDEXTYPE IS ctxsys.context parameters ('sync (every "SYSDATE+12/24")')
    ERROR at line 1:
    ORA-29855: error occurred in the execution of ODCIINDEXCREATE routine
    ORA-20000: Oracle Text error:
    DRG-11206: user filter command /dk2/app/oracle/ctx/bin/ctxhx could not be
    executed
    ORA-06512: at "CTXSYS.DRUE", line 160
    ORA-06512: at "CTXSYS.TEXTINDEXMETHODS", line 364
    /dk2/app/oracle/ctx/bin/ctxhx is ok and may be executed by anyone.
    I found no reason for this problem on the Web.
    If somebody can help, thanks a lot...
    Thomas

    Hi,
    for using the sync parameter, the user needs to be granted to execute a job. Oracle makes a job to do the sync. So issue:
    GRANT CREATE JOB TO SMADMIN;
    from SYS/SYSTEM.
    Herald ten Dam
    superconsult.nl

  • Trying to create a Histogram type/object for aggregate functions

    Hi,
    I am trying to create an aggregate function that will return a histogram
    type.
    It doesn't have to be an object that is returned, I don't mind returning
    a string but I would like to keep the associative array (or something
    else indexed by varchar2) as a static variable between iterations.
    I started out with the SecondMax example in
    http://www.csis.gvsu.edu/GeneralInfo/Oracle/appdev.920/a96595/dci11agg.htm#1004821
    But even seems that even a simpler aggregate function like one strCat
    below (which works) has problems because I get multiple permutations for
    every combination. The natural way to solve this would be to create an
    associative array as a static variable as part of the Histogram (see
    code below). However, apparently Oracle refuses to accept associate
    arrays in this context (PLS-00355 use of pl/sql table not allowed in
    this context).
    If there is no easy way to do the histogram quickly can we at least get
    something like strCat to work in a specific order with a "partition by
    ... order by clause"? It seems that even with "PARALLEL_ENABLE"
    commented out strCat still calls merge for function calls like:
    select hr,qtr, count(tzrwy) rwys,
    noam.strCat(cnt) rwycnt,
    noam.strCat(tzrwy) config,
    sum(cnt) cnt, min(minscore) minscore, max(maxscore) maxscore from
    ordrwys group by hr,qtr
    Not only does this create duplicate entries in the query result like
    "A,B,C" and "A,C,B" it seems that the order in rwycnt and config are not
    always the same so a user can not match the results based on their
    order.
    The difference between my functions and functions like sum and the
    secondMax demonstrated in the documentation is that secondMax does not
    care about the order in which it gets its arguments and does not need to
    maintain an ordered set in order to return the correct results. A good
    example of a built in oracle function that does care about all its
    arguments and probably has to maintain a similar data structure to the
    one I want is the PERCTILE_DISC function. If you can find the code for
    that function (or something like it) and forward a reference to me that
    in itself would be very helpful.
    Thanks,
    K.Dingle
    CREATE OR REPLACE type Histogram as object
    -- TYPE Hist10 IS TABLE OF pls_integer INDEX BY varchar2(10),
    -- retval hist10;
    -- retval number,
    retval noam.const.hist10,
    static function ODCIAggregateInitialize (sctx IN OUT Histogram)
    return number,
    member function ODCIAggregateIterate (self IN OUT Histogram,
    value IN varchar2) return number,
    member function ODCIAggregateTerminate (self IN Histogram,
    returnValue OUT varchar2,
    flags IN number) return number,
    member function ODCIAggregateMerge (self IN OUT Histogram,
    ctx2 IN Histogram) return number
    CREATE OR REPLACE type body Histogram is
    static function ODCIAggregateInitialize(sctx IN OUT Histogram) return
    number is
    begin
    sctx := const.Hist10();
    return ODCIConst.Success;
    end;
    member function ODCIAggregateIterate(self IN OUT Histogram, value IN
    varchar2)
    return number is
    begin
    if self.retval.exist(value)
    then self.retval(value):=self.retval(value)+1;
    else self.retval(value):=1;
    end if;
    return ODCIConst.Success;
    end;
    member function ODCIAggregateTerminate(self IN Histogram,
    returnValue OUT varchar2,
    flags IN number)
    return number is
    begin
    returnValue := self.retval;
    return ODCIConst.Success;
    end;
    member function ODCIAggregateMerge(self IN OUT Histogram,
    ctx2 IN Histogram) return number is
    begin
    i := ctx2.FIRST; -- get subscript of first element
    WHILE i IS NOT NULL LOOP
    if self.retval.exist(ctx2(i))
    then self.retval(i):=self.retval(i)+ctx2.retval(i);
    else self.retval(value):=ctx2.retval(i);
    end if;
    i := ctx2.NEXT(i); -- get subscript of next element
    END LOOP;
    return ODCIConst.Success;
    end;
    end;
    CREATE OR REPLACE type stringCat as object
    retval varchar2(16383), -- concat of all value to now varchar2, --
    highest value seen so far
    static function ODCIAggregateInitialize (sctx IN OUT stringCat)
    return number,
    member function ODCIAggregateIterate (self IN OUT stringCat,
    value IN varchar2) return number,
    member function ODCIAggregateTerminate (self IN stringCat,
    returnValue OUT varchar2,
    flags IN number) return number,
    member function ODCIAggregateMerge (self IN OUT stringCat,
    ctx2 IN stringCat) return number
    CREATE OR REPLACE type body stringCat is
    static function ODCIAggregateInitialize(sctx IN OUT stringCat) return
    number is
    begin
    sctx := stringCat('');
    return ODCIConst.Success;
    end;
    member function ODCIAggregateIterate(self IN OUT stringCat, value IN
    varchar2)
    return number is
    begin
    if self.retval is null
    then self.retval:=value;
    else self.retval:=self.retval || ',' || value;
    end if;
    return ODCIConst.Success;
    end;
    member function ODCIAggregateTerminate(self IN stringCat,
    returnValue OUT varchar2,
    flags IN number)
    return number is
    begin
    returnValue := self.retval;
    return ODCIConst.Success;
    end;
    member function ODCIAggregateMerge(self IN OUT stringCat,
    ctx2 IN stringCat) return number is
    begin
    self.retval := self.retval || ctx2.retval;
    return ODCIConst.Success;
    end;
    end;
    CREATE OR REPLACE FUNCTION StrCat (input varchar2) RETURN varchar2
    -- PARALLEL_ENABLE
    AGGREGATE USING StringCat;

    GraphicsConfiguration is an abstract class. You would need to subclass it. From the line of code you posted, it seems like you are going about things the wrong way. What are you trying to accomplish? Shouldn't this question be posted in the Swing or AWT forum?

  • How to create new Wage type specifically for IT14 and IT15 only

    Hi Gurus,
    I was assigned to create a new wage type to be used for Infotypes 14 and 15 only.
    Another thing is to have this for % deduction rather than having a fixed amount ($).
    Appreciate all your help.
    thanks!

    FOR IT0014
    PM - - - -  > PA- - - -  >PAYROLL DATA- - - -  > RECURRING PAYMENTS AND DEDUCTIONS- - - -  >WAGE TYPES- - - -  >CREATE WAGE TYPE CATALOG
    PM - - - -  > PA- - - -  >PAYROLL DATA- - - -  > RECURRING PAYMENTS AND DEDUCTIONS- - - -  >WAGE TYPES- - - -  >Check wage type group 'Recurring Payments and Deductions
    PM - - - -  > PA- - - -  >PAYROLL DATA- - - -  > RECURRING PAYMENTS AND DEDUCTIONS- - - -  >WAGE TYPES- - - -  >CHECK WAGE TYPE CATALOG- - - -  >CHECK ENTRY PERMISSIBILITY PER INFOTYPE
    PM - - - -  > PA- - - -  >PAYROLL DATA- - - -  > RECURRING PAYMENTS AND DEDUCTIONS- - - -  >WAGE TYPES- - - -  >CHECK WAGE TYPE CATALOG- - - -  >Define Wage Type Permissibility for each PS and ESG
    PM - - - -  > PA- - - -  >PAYROLL DATA- - - -  > RECURRING PAYMENTS AND DEDUCTIONS- - - -  >WAGE TYPES- - - -  >CHECK WAGE TYPE CATALOG- - - -  >Check wage type characteristics
    FOR IT0015
    PM - - - -  > PA- - - -  >PAYROLL DATA- - - -  > ADDITIONAL PAYMENTS- - - -  >WAGE TYPES- - - -  >CREATE WAGE TYPE CATALOG
    PM - - - -  > PA- - - -  >PAYROLL DATA- - - -  > ADDITIONAL PAYMENTS- - - -  >WAGE TYPES- - - -  >Check wage type group ADDITIONAL PAYMENTS
    PM - - - -  > PA- - - -  >PAYROLL DATA- - - -  > ADDITIONAL PAYMENTS- - - -  >WAGE TYPES- - - -  >CHECK WAGE TYPE CATALOG- - - -  >CHECK ENTRY PERMISSIBILITY PER INFOTYPE
    PM - - - -  > PA- - - -  >PAYROLL DATA- - - -  > ADDITIONAL PAYMENTS- - - -  >WAGE TYPES- - - -  >CHECK WAGE TYPE CATALOG- - - -  >Define Wage Type Permissibility for each PS and ESG
    PM - - - -  > PA- - - -  >PAYROLL DATA- - - -  > ADDITIONAL PAYMENTS- - - -  >WAGE TYPES- - - -  >CHECK WAGE TYPE CATALOG- - - -  >Check wage type characteristics
    Last step of the both set you ( V_T511) have to define the indirect valuation method ( PRZNT, SUMME Etc)
    Don't forget to maintain V_T539J, the place where you defining your component is a percentage of another component

  • ME38 Scheduling agreement won't create a delivery due index for stock trans

    Hi,
    we've had a scheduling agreement that has been working fine since 2005 that has suddenly stopped producing a delivery due index for stock transfer record ( Table VETVG ).
    I cannot see any changes to the scheduling agreement which looks okay to me.  I'm not sure what else to check.
    Any ideas appreciated
    Thanks

    Hi Simon,
      This post is related to MM, so kindly post this issue in MM forum. Those will be the right guys to solve this issue..
    Cheers..
    Regards
    MBS

  • Creating a TOC or Index for a pdf?

    Is it possible to create a word index or table of contens for a pdf that doesn't have one from Acrobat Pro?

    Indices or TOC should be created in/from your original document. You can use the bookmarking feature in Acrobat to simulate the function of a TOC.

  • FM or BAPI to create new condition type / record for material - VK11

    Hi All,
        I need to copy condition records from one material to another material, to do that using the below FM. For the below values even its not raising any exception or creating pricing record. Could any one tell me am i missing any other parameters ?
    Please let me know.
    *& Report  Z_TEST292011
    REPORT  Z_TEST292011.
    data: ls_komg type KOMG,
          ls_komv type komv,
          lt_komv TYPE TABLE OF komv,
          lv_new_record.
    *ls_komg-kunnr = '0001000008'. " Cust number
    ls_komg-matnr = 'A0168L1600100006'. " Mat number
    ls_komg-VKORG = '3101'.
    ls_komg-vtweg = '10'.
    clear: Lt_komv,LS_KOMV.
    ls_komv-kappl = 'V '. " Application V = Sales
    ls_komv-kschl = 'ZR00'. " Condition type
    ls_komv-krech = 'B'. " calculation type; B -Fixed amount
    ls_komv-waers = 'USD'. " Currency
    ls_komv-kpein = '100'.
    ls_komv-kmein = 'EA'. " Unit of measurement
    ls_komv-kbetr = '121.50'. " new condition value
    append ls_komv to lt_komv.
    CALL FUNCTION 'RV_CONDITION_COPY'
      EXPORTING
        application                       = 'V'
        condition_table                   = '005'
        condition_type                    = 'ZR00'
    *    DATE_FROM                         = '20110629'
    *    DATE_TO                           = '99991231'
        ENQUEUE                           = 'X'
    *   I_KOMK                            = ' '
    *   I_KOMP                            = ' '
        key_fields                        = ls_komg
        MAINTAIN_MODE                     = 'A'
        NO_AUTHORITY_CHECK                = 'X'
        NO_FIELD_CHECK                    = 'X'
    *   SELECTION_DATE                    = '00000000'
        KEEP_OLD_RECORDS                  = 'X'
    *   MATERIAL_M                        =
    *   USED_BY_IDOC                      = ' '
    *   I_KONA                            =
        OVERLAP_CONFIRMED                 = 'X'
        NO_DB_UPDATE                      = ' '
    *   USED_BY_RETAIL                    = ' '
    IMPORTING
    *   E_KOMK                            =
    *   E_KOMP                            =
        NEW_RECORD                        = lv_new_record
    *   E_DATAB                           =
    *   E_DATBI                           =
    *   E_PRDAT                           =
      tables
        copy_records                      = lt_komv
    *   COPY_STAFFEL                      =
    *   COPY_RECS_IDOC                    =
    EXCEPTIONS
       ENQUEUE_ON_RECORD                 = 1
       INVALID_APPLICATION               = 2
       INVALID_CONDITION_NUMBER          = 3
       INVALID_CONDITION_TYPE            = 4
       NO_AUTHORITY_EKORG                = 5
       NO_AUTHORITY_KSCHL                = 6
       NO_AUTHORITY_VKORG                = 7
       NO_SELECTION                      = 8
       TABLE_NOT_VALID                   = 9
       NO_MATERIAL_FOR_SETTLEMENT        = 10
       NO_UNIT_FOR_PERIOD_COND           = 11
       NO_UNIT_REFERENCE_MAGNITUDE       = 12
       INVALID_CONDITION_TABLE           = 13
       OTHERS                            = 14
    IF sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    break jdonepud.
    call function 'RV_CONDITION_SAVE'.
    call function 'RV_CONDITION_RESET'.

    Hello ,
    why dont you try LSMW -RV14BTCI ?
    regards
    Prabhu

  • How to create a process type/variant for this in Process Chain

    i
    I created a Selective Delete Variant (Delete_Facts) with some data selection upon which data to be deleted, to be used in Process chain.
    My requirment is
    I need to include that in the process chain in a such a way that that variant should be executed only on FIRST DAY of every month.
    (First day of every month Selective deletion on data tardet will be performed....rest of the days no selective deletion is performed)
    Please advise how can i achieve this
    Thanks in advance

    Hi,
    You can probably create a seperate chain containing this variant alone, and schedule it to run on the first of every month.
    This can be done by right clicking on the start variant, and selecting the option periodic, and giving the periodic value, where you have values "hourly","daily", "weekly", "monthly", otherperiod.  Another try can be to click on the arrow at the top beside "At Operation Mode" and d specify a factory calendar. I am not much sure of this option.
    another option is that you can try using the procecc type "Decision Between Multiple Alternatives " and check if calendar day is first of the month then execute your variant, or else execute the other normal steps. You can get more info on this functionality from BI-ExpertOnline.
    Hope this helps.
    Thanks,
    Tintu

  • Recreating indexes of type: ctxsys.context

    For a database on Oracle 10g, I need to output a script that recreates all indexes of type of ctxsys.context type. I can do it running this query:
    SELECT owner, index_name, DBMS_METADATA.get_ddl('INDEX', index_name, owner)
    FROM all_indexes
    WHERE ityp_owner = 'CTXSYS' AND ityp_name = 'CONTEXT';However, if an index has parameters like this:
    CREATE INDEX <MySchema>.<Index_name> ON <MySchema>.<Index_name>
    (BL_RESOLUCION)
    INDEXTYPE IS CTXSYS.CONTEXT
    PARAMETERS('sync (every "FREQ=DAILY; BYHOUR=1")')
    NOPARALLEL;If I run DBMS_METADATA.get_ddl function, I get this output script:
    CREATE INDEX <MySchema>.<Index_name> ON <MySchema>.<Index_name>
    (BL_RESOLUCION)
    INDEXTYPE IS CTXSYS.CONTEXT;How to include the parameter line?
    Edited by: user521219 on 06-nov-2012 9:55

    >
    For a database on Oracle 10g, I need to output a script that recreates all indexes of type of ctxsys.context type. I can do it running this query:
    SELECT owner, index_name, DBMS_METADATA.get_ddl('INDEX', index_name, owner)
    FROM all_indexes
    WHERE ityp_owner = 'CTXSYS' AND ityp_name = 'CONTEXT';
    However, if an index has parameters like this:
    CREATE INDEX <MySchema>.<Index_name> ON <MySchema>.<Index_name>
    (BL_RESOLUCION)
    INDEXTYPE IS CTXSYS.CONTEXT
    PARAMETERS('sync (every "FREQ=DAILY; BYHOUR=1")')
    NOPARALLEL;
    If I run DBMS_METADATA.get_ddl function, I get this output script:
    CREATE INDEX <MySchema>.<Index_name> ON <MySchema>.<Index_name>
    (BL_RESOLUCION)
    INDEXTYPE IS CTXSYS.CONTEXT;
    How to include the parameter line?
    >
    When you post always provide your 4 digit Oracle version (result of SELECT * FROM V$VERSION); 10g is not a version.
    Works for me on Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Prod
      CREATE INDEX "SCOTT"."NDX_TEST_CONTEXT" ON "SCOTT"."DEPT" ("DNAME")
       INDEXTYPE IS "CTXSYS"."CONTEXT" PARAMETERS ('sync (every "FREQ=DAILY; BYHOUR=1")')Post information about which user is running that query and which user owns the index that is giving the problem.
    Have you tried the query using a DBA user?

  • Error occurred when creating a rule index for multiple RDF models.

    Hi,
    I want to create a RDFS rule index for two RDF models, using the following command, where 'family' and 'gender' are two RDF models I have successfully created.
    BEGIN
    SDO_RDF_INFERENCE.CREATE_RULES_INDEX(
    'rdfs_rix_family',
    SDO_RDF_Models('family', 'gender'),
    SDO_RDF_Rulebases('RDFS'));
    END;
    The error messages are:
    ERROR at line 1:
    ORA-29532: Java call terminated by uncaught Java exception:
    oracle.jdbc.driver.OracleSQLException: ORA-00907: missing right parenthesis
    ORA-06512: at "MDSYS.RDF_APIS_USER", line 7
    ORA-06512: at "MDSYS.RDF_APIS_USER", line 9
    ORA-06512: at "MDSYS.RDF_APIS", line 277
    ORA-06512: at line 1
    Any idea where the problem is? I am using the Oracle Database 10g Enterprise Edition Release 10.2.0.2.0.
    Thanks!
    -PQ

    Hi,
    I think you are hitting a known problem. This fix will be available in an upcoming patch release. We are exploring options of making it available earlier. Is this issue holding up your application development ?
    Melli

  • How to create function based index for TO_CHAR

    i need to create a function based index for the function to_char.when i tried ,i got an error,"only pure function can be indexed".what the error really means, help me in creating the index to reduce my query cost.

    It works fine on my database. version 9iR2
    create index IDX_TO_CHAR on emp(to_char(hiredate,'YYYY-MM-DD HH24:MI:SS'));
    explain plan for
    select hiredate from emp where to_char(hiredate,'YYYY-MM-DD HH24:MI:SS')='1981-05-01 00:00:00';
    | Id  | Operation                   |  Name        | Rows  | Bytes | Cost (%CPU)|
    |   0 | SELECT STATEMENT            |              |     1 |     8 |     2  (50)|
    |   1 |  TABLE ACCESS BY INDEX ROWID| EMP          |     1 |     8 |     2  (50)|
    |*  2 |   INDEX RANGE SCAN          | IDX_TO_CHAR  |     1 |       |     2  (50)|
    Predicate Information (identified by operation id):
       2 - access(TO_CHAR("EMP"."HIREDATE",'YYYY-MM-DD HH24:MI:SS')='1981-05-01 00
                  :00:00')Yours seem like a tuning issue, so why not give us your sql and execution plan and so on.
    maybe there is other ways to tune your sql than creating a function based index?

  • Oracle Text, ctxsys.context problem with number column

    Hi,
    DB 11.2.0.3
    Is there any solution to create ctxsys.context index on number column ? Or I have to create other index type ?
    When I try do that (create ctxsys.context index), I get
    09:01:18  ORA-29855: wystąpił błąd przy wykonywaniu podprogramu ODCIINDEXCREATE  (An error has occurred in the performance of the subprogram)
    09:01:18  ORA-20000: Oracle Text - błąd: (- error:)
    09:01:18  DRG-10509: niepoprawna kolumna tekstowa: ITEM_TYPE (invalid text column:)
    09:01:18  ORA-06512: przy "CTXSYS.DRUE", linia 160
    09:01:18  ORA-06512: przy "CTXSYS.TEXTINDEXMETHODS", linia 366Btw, is there possible to search like "*LIKE %123%*" clause any of index (in contains) ?
    Edited by: Ndejo on 2012-11-21 00:53

    The multi_column_datastore says that the text to be indexed should be fetched from the supplied COLUMNS list rather than from the actual column the index is created on.
    So in this case we're fetching the contents of "theNumber" column, converting it to text, and indexing it.
    You don't necessarily need a dummy column, if "a_title" is a varchar column you could create the index on that instead.
    For example:
    SQL> create table mytab( a_id number, a_code number, a_title varchar2(80), a_subtitle varchar2(80), a_info clob );
    Table created.
    SQL> insert into mytab values ( 12, 9812376, 'foo is the title',
      2  'foobar is the subtitle', 'the info column will not be indexed' );
    1 row created.
    SQL> exec ctx_ddl.drop_preference( 'myds' )
    PL/SQL procedure successfully completed.
    SQL> exec ctx_ddl.create_preference( 'myds', 'MULTI_COLUMN_DATASTORE' )
    PL/SQL procedure successfully completed.
    SQL> exec ctx_ddl.set_attribute( 'myds', 'COLUMNS', 'a_code, a_title, a_subtitle' )
    PL/SQL procedure successfully completed.
    SQL> create index myindex on mytab (a_title) indextype is ctxsys.context
      2  parameters ('datastore myds');
    Index created.
    SQL> select a_id from mytab where contains (a_title, '%123%') > 0;
          A_ID
            12
    SQL> select a_id from mytab where contains (a_title, 'foo') > 0;
          A_ID
            12If you want to be able to search within a particular column, then add "section group CTXSYS.AUTO_SECTION_GROUP" to the parameters clause, and you can then do:
    SQL> select a_id from mytab where contains (a_title, 'foobar WITHIN a_subtitle') > 0;
          A_ID
            12

  • Multi-column Index vs One index for each column

    Hello everyone,
    i have one table about 20 000 000 rows, some developers have to generate reports on it and i want to create indexes on this table.
    The table has 34 columns, no primary key, no unique keys.
    The "where..." clause of the reports usually use 8 columns but some reports uses 8 + some other columns.
    can any one help me on what kind of indexes do i have to create?
    1. one index for each column used in "where clause"
    2. one index for 8 columns and some other indexes for other used columns
    3. one index for all columns
    or something else etc...
    br flag

    i have one table about 20 000 000 rows, some developers have to generate reports on it and i want to create indexes on this table.
    The table has 34 columns, no primary key, no unique keys.
    The "where..." clause of the reports usually use 8 columns but some reports uses 8 + some other columns.
    can any one help me on what kind of indexes do i have to create?
    1. one index for each column used in "where clause"
    2. one index for 8 columns and some other indexes for other used columns
    3. one index for all columns
    or something else etc...What's the version of your data base? what kind of database you have, DWH or OTLP? The answer might depend on the type of database as far as bitmap indexes might suit or might not depending if you are runing DWH or OLTP kind of database
    Let me suppose that you are runing OLTP database and you have a where clause with 8 columns.
    1) are all those where clause equalities (where col1 = and col2 =) or there are inequalities?
    2) could you evaluate the most repetitive columns?
    3) could you know the column that could have the best clustering factor (the column which most follow a certain order in the table)
    Based on that I would suggest to create one b-tree index having 8 columns (even though that it seems for me to high) this index should follow the following points:
    1) put the most repetitive column at the leading edge (and compress the index if necessary)
    2) put the columns that are used in equalitity predicate first
    3) put the column having the best clustering factor first
    The most precise index you have the best access you could gain.
    Of course that you have to know that an index access is not always good and a FULL table scan is not always bad.
    Best regards
    Mohamed Houri
    www.hourim.wordpress.com

  • More than one index for a column.

    Hi,
    I am trying to create more than one index for a particular column of the table.But oracle does not allow more than one index for a column.
    I just want to make sure whether we can add more than one index for a column
    and if yes what are the scenarios.
    Because as far as i know some database allows more than one index for a single column.

    You cannot create more than one index for the same column(s).This is not so true Nicolas. Look at following example:
    SQL> create index idx_mytest_id on mytest(id);
    Index created.
    SQL> create index idx_mytest_id_desc on mytest(id desc);
    Index created.
    SQL> create index idx_fbi_mytest_id_upper on mytest(upper(id));
    Index created.
    SQL> create index idx_fbi_mytest_id_upper_desc on mytest(upper(id) desc);
    Index created.
    SQL> create index idx_fbi_mytest_id_lower_id on mytest(lower(id));
    Index created.
    SQL> create index idx_fbi_mytest_id_lower_id_dsc on mytest(lower(id) desc);
    Index created.
    SQL> create index idx_fbi_mytest_id_tr_up on mytest(trunc(upper(id)));
    Index created.
    -- I can still continue but for this example this will be enough
    SQL> select index_name from dba_indexes where table_name = 'MYTEST';
    INDEX_NAME                                                                                                    
    IDX_MYTEST_ID                                                                                                 
    IDX_FBI_MYTEST_ID_UPPER                                                                                       
    IDX_MYTEST_ID_DESC                                                                                            
    IDX_FBI_MYTEST_ID_UPPER_DESC                                                                                  
    IDX_FBI_MYTEST_ID_LOWER_ID                                                                                    
    IDX_FBI_MYTEST_ID_LOWER_ID_DSC                                                                                
    IDX_FBI_MYTEST_ID_TR_UP                                                                                       
    7 rows selected.You can see 7 indexes for one column (ID) and I could still continue...
    So according this test we can say you can't create more than one index for one column (or the same group of columns in case of composite index) with same condition(s).
    Message was edited by:
    Ivan Kartik
    Or simplified: you can't create the same index for same column(s) twice :-)

  • Problems on Creating INDEX for ORDSYS.ORDDOC type

    I have a table 'docs'
    CREATE TABLE "TEST"."DOCS"
    ("ID" VARCHAR2(2048 byte) NOT NULL,
    "DOCUMENT" "ORDSYS"."ORDDOC",
    "DUMMY" CHAR(1 byte) NOT NULL)
    The field DOCUMENT contains a number of documents a mixture of .doc and .pdf files. These where uploaded using the code wizards for the web toolkit. Now I want to INDEX DOCUMENT so I can implement a web search facility.
    I'm currently following the xamples on http://download-west.oracle.com/otndoc/oracle9i/901_doc/text.901/a90121/cdatadi3.htm#43365 NESTED_DATASTORE Example (Intermedia Documentation)
    I did this
    ctx_ddl.create_preference('ntds','nested_datastore');
    ctx_ddl.set_attribute('ntds','nested_column', 'dummy');
    ctx_ddl.set_attribute('ntds','nested_type', 'ordsys.orddoc');
    ctx_ddl.set_attribute('ntds','nested_lineno','source');
    ctx_ddl.set_attribute('ntds','nested_text', 'comments');
    when creating the index using ntds it is complaining about ordsys.orddoc
    create index docindx on docs(dummy) indextype is ctxsys.context parameters('data
    store ntds')
    ERROR at line 1:
    ORA-29855: error occurred in the execution of ODCIINDEXCREATE routine
    ORA-20000: Oracle Text error:
    DRG-50857: oracle error in dricon.get_type_data_type
    ORA-20000: Oracle Text error:
    DRG-12801: invalid type: ORDSYS.ORDDOC
    ORA-06512: at "CTXSYS.DRUE", line 157
    ORA-06512: at "CTXSYS.TEXTINDEXMETHODS", line 176
    I'm not convince on the 'nested_lineno' parameter can anybody tell me how this can be done.

    I'm forced to use ordsys.orddoc since 'interMedia Code Wizard for the PL/SQL Gateway' won't generate the code for a clob it only recognizes intermedia objects.
    since orddoc.comments is a clob I cannot see why there shouldn't be a way to index it. What's the use of storing documents in ORDDOC when you can't search them??

Maybe you are looking for

  • Printing a double to accuracy of 2 decimal places

    Hi, I have a double value and I want to print it to an accuracy of 2 decimal places. Is there any way to do this. I tried using the DecimalFormat by doing the following String str = Double.toString(value); DecimalFormat dec = new DecimalFormat(str);

  • Consolidating all Errors and sending mail in BPM

    Hi, I have a scenario in which i have the outbound IDOC zartmas04 I have to update 6 tables of another application table. the idoc can have a material and n number of plant information. I have to check the mandatory fields that are to be updated into

  • How to calculate the sum of the values of some columns of a table

    hi i want to get in the column averages just the average of the values of some columns not all the columns of the table.what i have to change exactly in this block diagram.even if the size of the table is 25,i want the division to be the number of va

  • Analyzer 6.5 JRE compatability

    Is there a list of JRE files which are compatible with Analyzer 6.5?

  • Usb Audio Codec doesn't work

    A few days ago I bought an USB Microphone (Samson G-Track). I don't know why It doesn't work. When I select in Sound/Preferences/Input the "Usb Audio Codec" but It says that there aren't input controls in the device. I tested it at Garage Band but It