Intermittent oracle errors with case-insensitive searches

Hi
I have a table with several columns, two of them are indexed with oracle text.
When I ask queries containing "CONTAINS"-clauses against these columns everything works great. However I have a few other columns in table that I want to run case-insensitive comparisons with.
So I enable case-insensitivity:
ALTER SESSION SET NLS_COMP=LINGUISTIC
ALTER SESSION SET NLS_SORT=BINARY_CI
Now I suddenly start getting intermittent errors.
When I call a query:
SELECT
FROM
article_table at
WHERE
CONTAINS(searchfield , '%MEAT%') > 0
Sometimes it works, but sometimes I get:
ERROR
ORA-29902: ett fel inträffade när rutinen ODCIIndexStart() kördes
ORA-20000: Oracle Text error:
DRG-00100: internal error, arguments : [50935],[drpn.c],[1051],[],[]
DRG-00100: internal error, arguments : [50935],[drpnw.c],[601],[],[]
DRG-00100: internal error, arguments : [51002],[drwa.c],[594],[],[]
DRG-00100: internal error, arguments : [51028],[drwaw.c],[297],[0],[%MEAT%]
DRG-00100: internal error, arguments : [50401],[dreb.c],[1033],[],[]
ORA-00600: intern felkod, argument: [qernsRowP], [1], [], [], [], [], [], []
Anyone knows what is going on? Is this bug? Is there a fox for it?
Thanks for any help anyone can provide.
/Kjell

Clearly that's a bug. Unless anyone here recognizes it and can point you to the bug/patch number I would strongly recomend you to take it to oracle support.
Incidently, doing a search for '%MEAT%' is usually a bad idea. Leading wildcards will disable the use of the index on the $I table, so unless you're using the SUBSTRING_INDEX option such searches will usually perform very badly. They shouldn't cause "internal errors", of course.

Similar Messages

  • Jbo:DataQuery with case insensitive search

    I'm working on a BC4J JSP project. I cannot find a way to search in the case insensitive mode. I'm using JDeveloper 9.0.3.1. I looked in the DataQueryComponent.jsp, the xxxx_Query.jsp, and all the files generated under the ViewObject to find a way to accomplish this but no luck. Please advise. Thank you.

    For those who e-mailed me about this question and you who are searching an answer for this question, here is the solution.
    I added some codes in DataQueryComponent.jsp. I put the following codes right after the closing of the "Add Criteria" jbo:OnEvent. It works for me and it will work for you.
    <jbo:OnEvent name="Search" >
    <% String rowParam = params.getParameter("nRows");
    int nCriteria = 0;
    if (rowParam != null)
    try {
    nCriteria = Integer.parseInt(rowParam);
    catch (Exception ex) { }
    %>
    <jbo:ViewCriteria id="vc" datasource="ds" action="new">
    <% for (int i=0; i < nCriteria-1; i++)
    { %>
    <jbo:CriteriaRow id="row<%=i%>" uppercolumns="true">
    <jbo:AttributeIterate id="attrvc" datasource="ds" queriableonly="true">
    <% String item = attrvc.getName();
    String value = params.getParameter("row" + i + "_" + item);
    value = value.toUpperCase(); %>
    <jbo:Criteria dataitem="<%=item%>" value="<%=value%>" />
    </jbo:AttributeIterate>
    </jbo:CriteriaRow>
    <%
    %>
    </jbo:ViewCriteria>
    </jbo:OnEvent>

  • Case Insensitive Search coupled with "LIKE" operator.

    Greetings All, I am running Oracle 11gR1 RAC patchet 25 on Windows X64.
    This db supports and application that requires case insensitive searches.
    Because there are a few entry points into the db I created an "after login" trigger:
    CREATE OR REPLACE TRIGGER MyAppAfterLogon_TRGR
    AFTER LOGON
    ON DATABASE
    DECLARE
    vDDL VARCHAR2(200) := 'alter session set nls_comp=''linguistic''';
    vDDL2 VARCHAR2(200) := 'alter session set nls_sort=''binary_ci''';
    BEGIN
    IF ((USER = 'MyAppUSER') OR(USER = 'MyAppREPORTINGUSER')) THEN
    EXECUTE IMMEDIATE vDDL;
    EXECUTE IMMEDIATE vDDL2;
    END IF;
    END MyAppAfterLogon_TRGR;
    This ensures that everyone connecting to the DB via any mechanism will automatically have case insensitive searches.
    Now, to optimize the know queries I created the standard index to support normal matching queries:
    select * from MyTable where Name = 'STEVE';
    The index looks like:
    CREATE INDEX "CONTACT_IDX3 ON MYTABLE (NLSSORT("NAME",'nls_sort=''BINARY_CI'''))
    This all works fine, no issues.
    The problem is when I write a query that uses the "LIKE" operator:
    select * from MyTable where Name like 'STEV%';
    I get back the record set I expect. However, my index is not used? I can't for the life of me get this query to use an index.
    The table has about 600,000 rows and I have run gather schema stats.
    Does anyone know of any issues with case insensitive searches and the "LIKE" clause?
    Any and all help would be appreciated.
    L

    I think there is issue with your logon trigger :
    "IF ((USER = 'MyAppUSER') OR(USER = 'MyAppREPORTINGUSER')) THEN"
    it should be :
    IF UPPER(USER) = 'MYAPPUSER' OR UPPER(USER) = 'MYAPPREPORTINGUSER' THEN
    because user name stored in Upper case. Check and try.
    HTH
    Girish Sharma

  • Error in a report after enabling case insensitive search in conn pool prop

    Hi All,
    I put the below code in connection pool's connection string to enable case insensitive search.
    alter session set NLS_SORT=BINARY_CI
    alter session set NLS_COMP=LINGUISTIC
    After putting this code one of my report started giving the below error which was working fine otherwise.
    Error Codes: OPR4ONWY:U9IM8TAC:OI2DL65P
    State: HY000. Code: 10058. NQODBC SQL_STATE: HY000 nQSError: 10058 A general error has occurred. nQSError: 16001 ODBC error state: S1000 code: 1791 message: OracleODBCOraORA-01791: not a SELECTed expression. nQSError: 16001 ODBC error state: S1000 code: 1791 message: OracleODBCOraORA-01791: not a SELECTed expression. nQSError: 16015 SQL statement execution failed. (HY000)
    The report gives error for the below divide condition when I select a column from a different dimension (eg: region)
    COUNT(DISTINCT RMA.RMA)/COUNT(DISTINCT User."User Name")
    Can anyone please throw a light why this is happening.

    Below is the SQL which is throwing error in OBIEE. It was working fine when I tried running it in toad:
    select T1609.ATTRIB_05 as c1,
    count(distinct T1609.ATTRIB_42) as c2,
    TRUNC(T1159.FSCL_WEEK_START_DT) as c3
    from
    WC_DAY_D T1159 /* RMA_RECEIVED_DT(WC_DAY_D) */ ,
    WC_RMA_D T571,
    WC_FV_FA_D T1609,
    WC_FV_FA_F T1679
    where ( T571.ROW_WID = T1679.RMA_WID and T1159.ROW_WID = T1679.RMA_RECEIVED_WID and T1609.ROW_WID = T1679.FV_FA_WID and T1609.ATTRIB_39 <> 'FV' and (T571.STATUS_CD in ('2nd FA', '2nd FA Review', 'Closed')) and TRUNC(T1609.TODO_ACTL_END_DT) is not null and TRUNC(T1159.FSCL_WEEK_START_DT) between TIMESTAMP '2009-03-22 00:00:00' and TIMESTAMP '2009-04-12 00:00:00' )
    group by T1609.ATTRIB_05, TRUNC(T1159.FSCL_WEEK_START_DT)
    order by c3
    -------------------- Query Status: Query Failed: [nQSError: 16001] ODBC error state: S1000 code: 1791 message: [Oracle][ODBC][Ora]ORA-01791: not a SELECTed expression.
    [nQSError: 16001] ODBC error state: S1000 code: 1791 message: [Oracle][ODBC][Ora]ORA-01791: not a SELECTed expression.
    [nQSError: 16015] SQL statement execution failed.

  • Case-insensitive Search with Search Form

    I am using a Search Form with a UIX Page. One of the issue that need to be resolved is to be able to do case-insensitive search for text information stored in some database columns. Please advise me how to implement case_insensitive search with JDeveloper's Search Form.
    Thanks in advance,

    Hi Qian,
    This article (below) by Steve Muench explains how you can customize Query by example behaviour of ADF BCs and if you really want, how to create your own ViewCriteriaAdapter (but you don't have to go quite that far - luckily :) ).
    http://radio.weblogs.com/0118231/2005/02/10.html#a492
    Here is what I did. I implemented the following method in my base view object class (MyBaseViewObject). Note that this code is based on a piece of code that Steve posted on his blog (http://radio.weblogs.com/0118231/stories/2003/07/11/implementingAViewCriteriaAdapterToCustomizeQueryByExampleFunctionality.html); originally an example about creating your own ViewCriteriaAdapter.
    Since applyViewCriteria(oracle.jbo.ViewCriteria) is used by the query-by-example mechanism you're able to "intercept" the ViewCriteria on "it's way in". After that the standard ViewCriteria does it's job as ususal and generated the where clause when required.
    public void applyViewCriteria(ViewCriteria vc)
         if( null == vc || vc.size() == 0 ) super.applyViewCriteria(vc);
         ViewCriteriaRow criteriaRow = (ViewCriteriaRow)vc.first();
         StructureDef def = criteriaRow.getStructureDef();
         AttributeDef[] attrs = def.getAttributeDefs();
         System.out.println(getClass().getName() + ": applyViewCriteria()");
         boolean bFirst = true;
         do{
           if(vc.hasNext() && !bFirst) criteriaRow = (ViewCriteriaRow)vc.next();
           criteriaRow.setUpperColumns(true);
           for (int j = 0, attrCt = attrs.length; j < attrCt; j++)
             String criteriaAttrVal = ((String)criteriaRow.getAttribute(j));
             if (criteriaAttrVal != null && !criteriaAttrVal.equals("") && !JboTypeMap.isNumericType(attrs[j].getSQLType()))
              criteriaRow.setAttribute(j,criteriaAttrVal.toUpperCase());
           bFirst=false;
         }while(vc.hasNext());
         super.applyViewCriteria(vc);
    NOTE that doing this makes all your views case insensitive (to vc search) you may want to implement more functionality in your base view object to set whether a view is in case insensitive mode or not.
    ALSO that flag will not be passivated (if I remember correctly - someone correct me if I'm wrong) so you'll have to add that flag to the passivated data.
    Cheers!
    Sacha

  • Case insensitive search and replace using ASP and Oracle database

    I am interested in providing a case insensitive search and replace query in a Active server page. At present data is collected from a html form which passes the text values to a ASP page. The ASP page runs a search (select query) to find if the data is already in the Oracle database, if it isn't the ASP page runs sql (INSERT) to insert the record, if not the page returns a form indicating that the record already exists. At present we can convert the case of new records using the VB UCase() function. But can't do a insensitive search with the existing records. *The Query must be able to utilize ASP variables.
    Any help would be much appreciated.
    David Cheryk
    null

    I can't check your script right now since I'm not on Mac. I recommend you to use FindChangeByList script for CS4 instead (it works with CS3): http://forums.adobe.com/servlet/JiveServlet/download/2080627-12695/FindChangeByListCS4.zip together with Martin Fisher's: http://www.kasyan.ho.com.ua/downloads/RecordFindChange_CS3_Kas.zip
    Use this script to record settings from Text and GREP tabs, then copy and paste them into FindChandgeList.txt file.
    Or, optionally you can use this script: http://www.kasyan.ho.com.ua/find_change_by_queries.html.
    Kasyan

  • Phonetic and case insensitive searches in Oracle

    Hi,
    Do you know if Oracle 9i allows phonetic searches ? I've found several solutions for case insensitive searches, but I'd need phonetic searches too (like 'había' vs. 'havia' vs. 'habia', etc)
    Any comment would be really welcome.
    Thanks in advance,
    Juan

    lookup soundex in the SQL Reference guide.

  • Possible to do case-insensitive searches?

    G'day,
    I was wondering if it's possible to do case-insensitive searches in oracle/HTMLDB?
    I've tried what I thought would work
    "select * from application where name like '%microsoft%'", this unfortunately doesn't return any records with a capital in it(eg "Microsoft").
    If there is no way to do case-insensitive searches what is the best way around it?
    Thanks
    -Colin

    Colin,
    Yes it is possible to do case insensitive searches using SQL. Try, for example:
    select * from application where upper(name) like '%ORACLE%'
    The trick is to upper() both sides of the like operator.
    Sergio

  • Case insensitive search working in dev but not in prod

    Hello All,
    I had set the CASE_SENSITIVE_CHARACTER_COMPARISON parameter as OFF in NQSConfig.ini file for enabling the case insensitive search in OBIEE.
    This setup is letting me do the case insensitive search in Dev env but the same doesnt work in prod env. I tried pointing both prod and dev rpd to same prod db.
    With same db also, case insensitive search doesnt work in prod env.
    Any idea for which other configuration I can look for.
    Thanks in advance.

    Thanks Stijin. I had seen this post earlier. Case insensitive search works fine after setting the value for NLS_SORT and NLS_COMP in production RPD but the other report with distinct clause starts failing. Not sure about the reason.
    Saw this comment from you in that post:
    The only compromise solution we could find was to "cache" the column value we wanted to use in insensitive searches. These were mainly used in "show all choices" while setting prompts. Other than that there isn't much you can do in an Oracle database.
    Can you please tell me how to implement the above.

  • Case-Insensitive Searching on Content Server

    Hello everyone,
    I have a Content Server 10gr3 using an Oracle 11g DB. All of my searches are case sensitive, but we need case-insensitive searching. I've tried changing the DatabasePreserveCase variable in the config.cfg to 1, 0, true, and false, rebuilt the indexes in between each reboot (not sure if that's necessary or not), tried checking in new documents after making the changes and searching for those, but no matter, searches stay case sensitive.
    We have another UCM install running on a 10.2.0.3.0 DB, and case insensitivity works on that Content Server with DatabasePreserveCase=1.
    What could we be doing wrong? I've found several documents which have stated that case-insensitivity is impossible with an Oracle DB, but I think those are all old and from before Oracle's acquisition of the product (and obviously it is possible, since we have another install with it working).
    Thanks in advance for any help you can give!

    I'm not quite sure what you mean by Search Engine... we simply installed the Oracle 11g Database, then installed Content Server and configured it to run using that database. We haven't done anything with full-text search.
    Edit: Do you mean the SearchIndexerEngineName value in the config file? It's DATABASE.METADATA, though at some point we also need to get full-text up and running which to my understanding requires it to be DATABASE.FULLTEXT.
    As to the OracleCaseInsensitiveSearch component, where can I find it? Google shows up nothing, and MetaLink has one page saying that it exists but nothing more...
    Message was edited by:
    user573973

  • Case-insensitive searches on lob

    Hi,
    I work with oracle 10 on linux.
    I have a table with clob.
    I need to do case-insensitive searches on this field.
    How can I do? I can't use upper or lower function.

    Yes, you can :
    SQL> desc PS_RC_SOL_PRODSRCH
    Name                                      Null?    Type
    SETID                                     NOT NULL VARCHAR2(5 CHAR)
    SOLUTION_ID                               NOT NULL NUMBER(15)
    PROD_DESCRLONG                                     CLOB
    SQL> select setid,PROD_DESCRLONG
      2  from   PS_RC_SOL_PRODSRCH
      3  where dbms_lob.instr(lower(PROD_DESCRLONG),'n') > 0
      4  and   rownum<3;
    SETID
    PROD_DESCRLONG
    NLCOM
    |NLC0001|Benefits|
    NLCOM
    |NLC0001|Benefits|Nicolas.

  • Case insensitive searching in Interactive Page

    Hi all,
    I am currently working on the interactive report, and wondering is it possible to perform case insensitive search for the data in the textbox besides the magnifying class.
    By the default, the system uses "=" for searching. I tried the searching option using "contains", and it would be able to search the content in uppercase and lower case scenario. Is it possible to make "contains" as the default?
    Thanks,
    Thomas.

    By the default, the system uses "=" for searching.I get "Row text contains..." as the filter when entering text directly into the default search box. Perhaps you are working with a saved report?
    There's a way to make all IR comparisons case insensitive. See this <a ref="http://apex.oracle.com/pls/otn/f?p=34839:18">example of case/accent insensitive search</a> on a standard report.
    That code can't be put in a Before Regions process as described to work with IRs as page processes are not executed by the AJAX call that refreshes the report. However, IR refreshes do run the Virtual Private Database PL/SQL call defined in the application security attributes, so putting the NLS modification code there will work.
    Go to Application > Shared Components > Edit Security Attribute | Virtual Private Database (VPD), and make the call from there. Due to the specific requirements of the code that has to be called from here when used for security purposes, this is probably best done by setting this up to make separate calls to packages defined outside APEX, one to handle any actual VPD and other security-related details, and others to orchestrate any other code that has to be run. (For example, in this case it may not be desired to alter the NLS environment on every page, so the program could take a parameter specifying the current page and apply the ALTER SESSION conditionally on this.)

  • IPM 11g case insensitive searching

    Is it possible in IPM 11g (11.1.1.5) to do an case insensitive search?
    For example, setting the operator to Begins with and enter "And" would return Anderson, Andersons, and Andreeson. But if searching on "and" we get nothing. I would like to be able to search 'and' and return Anderson, Andersons, Andreeson, apple, a-team, etc.

    FYI... Oracle has confirmed that IPM is case SENSITIVE only. Maybe a feature patch or 12g will address this.

  • Case sensitive and case insensitive Search

    Hi friends,
         Iam doing an Search RFC which will search records based on the search parameters provided at the portal side.
    One of the search parameter is a field with 40 character which holds the description(title) of the record.
    With this search paramter iam facing case sensitive problem.
    Example:
    Values in Database Table: ( Can be in any case)
           Record 1:  Sensitive
           Record 2:  SENSITIVE
           Record 3:  SensTive
           Record 4:  sensitive
           Record 5:  sensTive
         Input to RFC:  sens*
         Output: Getting only 4rth and 5th record but not all the records.
           The same is the case with the remaining search parameters(Like user name..).
           Is there any way of getting all the records when searching from the data base (with case insensitive).
           Kindly let me know if there is any possibility.
    Thanks in advance.
    Regards,
    Swarna Munukoti.

    Generally, no.  So, you'll either have to use EXEC SQL, or add more fields to the table.  You can do this using APPEND structures, which is the SAP approved way of adding fields.  If there are suitable user exits in the standard SAP code, then you'll be able to populate the additional fields there, as new records are created, or amended.
    Alternatively, create your own Z table with the same key as the standard table and a "search field" which contains the uppercase version of the field you're wanting to search.  You can either, again populate in suitable user exits, or, in worst case, have job that runs regularly populating your Z table.
    matt

  • Case insensitive search in SE16

    Hello Community,
    We have a Z table which contains the field "filename," containing both upper & lowercase alphanumeric values. 
    I was surprised to find that it is not so easy to perform a case insensitive search against those field values using SE16.
    It would be perfect if:
       1. a search in SE16 for `file.txt` will find the results of all records related to the file "file.txt"
       2. a search in SE16 for `FiLe.TxT` will also find all records related to the file "file.txt"
    Can someone help me to accomplish this ?
    Thanks!
    Keith Helfrich

    Hi everyone,
    The goal is to perform a case insensitive search in SE16.  Is there no way to do this ?
    While there are a variety of work-arounds, for example : it is possible to store all the values in the table in UPPERCASE, these work-arounds do not solve our problem. 
    The values in the table need to be stored with the accurate case, exactly as the file is named at the UNIX level.  Since UNIX is also case sensitive, we need to be accurate with the case when storing statistics data about the files. 
    Yet, when searching in SE16, it is problematic because we don't always know the correct case.  For that reason, a case insensitive search is required.
    This seems to be a very basic function that I am surprised SAP doesn't provide...

Maybe you are looking for

  • How do I sync my email with iphone, ipad and personal pc?

    I have to go into my personal pc and delete emails, as I do on iphone and ipad. When I delete from one device, I want them to delete from ALL three.

  • Distribution of cost center

    All, I want to create a PR for one material and the distribute the amount to 2 cost center's  . In the account assignment tab , I have distributed wrt to percentage  for different cost centers . Now while MIGO , no accounting documents is coming . Wh

  • Quick Question About Multiple Clips

    Hey guys, Is there any way to turn multiple clips into one single clip? More specifically, multiple clips that have already been placed on the timeline. I have ten clips right next to each other on the timeline and I would like to turn them into one

  • Photoshop elements 9 installation problem

    I can't install the program on my PC. As soon as I begin installation, a screen pops up that says the wizard was interrupted before installation could be completed.  Any help with this would be greatly appreciated.

  • Broadcast Pro CS5 & 5.5 info wanted

    I'm looking for some fellow broadcast guys who work at a TV station. Please, One-Man-Company guys, no matter how much I respect your hard working and forum answers; I ask you not to respond. A. Tell me which station you work at. This gives me an idea