Function based indexes info,pls let me know data dictionary table name?

Hi,
pls let me know,Where can we find Function based index information ,that is data dictionary table name,.
that is information like function used, column name.
Thanks,
KUmar.

all_ind_expressions

Similar Messages

  • Where to find info on function based indexes

    Hello,
    Using Oracle 11.2, can someone tell me where I can find information about existing Function Based indexes in my database?
    I want to shrink the unused space on a table, but there is a FB index that I have to drop in order to shrink the space.
    Then, I need to recreate it after I shrink the space.
    But how do I find out what functions the index is created to be used for?
    I've already looked at dba_indexes, and dba_ind_expressions with no luck.
    I see the index, but I don't see what the functions are that are being applied for the FB index.
    Thanks in advance.

    Yes, this is why I'm also confused, which is what I pointed out in the first entry of this thread.
    Notice here:
    SQL> select index_name, index_type from dba_indexes where table_name = 'TQR1';
    INDEX_NAME                     INDEX_TYPE
    IDX$$_0FFD0001                 NORMAL
    IDX$$_211C0002                 NORMAL
    TQR1_C3                        FUNCTION-BASED NORMAL
    . . .Now, let's confirm another way....
    select OWNER, INDEX_NAME, INDEX_TYPE, TABLE_OWNER, TABLE_NAME
    from dba_indexes where index_name = 'TQR1_C3';
    OWNER      INDEX_NAME INDEX_TYPE                  TABLE_OWNER  TABLE_NAME
    TQ         TQR1_C3    FUNCTION-BASED NORMAL       TQ           TQR1
    1 row selected.Now, let's show the selection from dba_ind_expressions...
    INDEX_OWNER  INDEX_NAME TABLE_OWNER  TABLE_NAME COLUMN_EXPRESSI COLUMN_POSITION
    TQ           TQR1_C3    TQ           TQR1       "C3"                          1I don't know the password for the TQ owner, so I'll have to wait until I can find that out before I can run DBMS_METADATA.

  • Using function based index causing connection to abort

    My problem is as below
    I m using oracle 8i data base
    I have a table Dummy with column col1 .
    I have created a function based index on col1
    Now i try to update the table dummy using this function based index (i.e)
    i run the following query
    update dummy set col2='new value' where col1=ltrim(col2,'0')
    now when i execute this statement it causes the connection to abort. It gives the error
    ERROR at line 1:
    ORA-03113: end-of-file on communication channel
    But if i run select query (i.e) select col2 from dummy where col1=ltrim(col2,'0')
    it executes sucessfully.
    Also if i wrap the ltrim over some other function it works (i.e.)
    update dummy set col2='new value' where col1=upper(ltrim(col2,'0'))
    Any thoughts or ideas on what can be the reason...
    plese let me know for any questions,clarifications..
    Thanks in advance...
    Balaji

    Balaji, what is the exact error message returned? Remember to always include all the error details so that the problem can be identified and diagnosed.
    If you mean you are getting an ORA-03113: end-of-file on communication channel, this means that the Oracle Server Process that serviced your client session, crashed.
    In that case you need to refer to the alert log file on the database instance to see the server-side error message that resulted (often an ORA-0600 internal error) and the name of the trace file that was created at a result.
    You also failed to specify the exact Oracle 8i version you are using. Make sure you're on the very last patch set released for 8i - that should be 8.1.7.4 as far as I recall.

  • Function-based index with OR in the wher-clause

    We have some problems with functin-based indexes and
    the or-condition in a where-clause.
    --We use Oracle 8i (8.1.7)
    create table TPERSON(ID number(10),NAME varchar2(20),...);
    create index I_NORMAL_TPERSON_NAME on TPERSON(NAME);
    create index I_FUNCTION_TPERSON_NAME on TPERSON(UPPER(NAME));
    The following two statements run very fast on a large table
    and the execution-plan asure the usage of the indexes
    (-while the session is appropriate configured and the table is analyzed):
    1)     select count(ID) FROM TPERSON where upper(NAME) like 'MIL%';
    2)     select count(ID) from TPERSON where NAME like 'Mil%' or (3=5);
    In particular we see that a normal index is used while the where-clause contains
    an OR-CONDITION.
    But if we try the similarly select-statement
    3)     select count(ID) FROM TPERSON where upper(NAME) like 'MIL%' or (3=5);
    the CBO will not use the function-index I_FUNCTION_TPERSON_NAME and we have a full table scan in the execution-plan.
    (This behavior we only expect with views but not with indexes.)
    We ask for an advice like a hint, which enable the CBO-usage
    of function-based indexes in connection with OR.
    This problem seems to be artificial because it contains this dummy logic:
         or (3=5).
    This steams from an prepared statement, where this kind of boolean
    flag reduce the amount of different select-statements needed for
    covering the hole business-logic, while using bind-variables for the
    concrete query-parameters.
    A more realistic (still boild down) version of our select-statement is:
    select * FROM TPERSON
    where (upper(NAME) like 'MIL%' or (NAME is null))
    and (upper(FIRSTNAME) like 'MICH% or (FIRSTNAME is null))
    and ...;
    thank you for time..
    email: [email protected]

    In the realistic statement you write :
    select * FROM TPERSON
    where (upper(NAME) like 'MIL%' or (NAME is null))
    and (upper(FIRSTNAME) like 'MICH% or (FIRSTNAME is null))
    and ...;
    as far as i know, NULL values are not indexed, "or (NAME is NULL)" have to generate a full table scan.
    HTH
    We have some problems with functin-based indexes and
    the or-condition in a where-clause.
    --We use Oracle 8i (8.1.7)
    create table TPERSON(ID number(10),NAME varchar2(20),...);
    create index I_NORMAL_TPERSON_NAME on TPERSON(NAME);
    create index I_FUNCTION_TPERSON_NAME on TPERSON(UPPER(NAME));
    The following two statements run very fast on a large table
    and the execution-plan asure the usage of the indexes
    (-while the session is appropriate configured and the table is analyzed):
    1)     select count(ID) FROM TPERSON where upper(NAME) like 'MIL%';
    2)     select count(ID) from TPERSON where NAME like 'Mil%' or (3=5);
    In particular we see that a normal index is used while the where-clause contains
    an OR-CONDITION.
    But if we try the similarly select-statement
    3)     select count(ID) FROM TPERSON where upper(NAME) like 'MIL%' or (3=5);
    the CBO will not use the function-index I_FUNCTION_TPERSON_NAME and we have a full table scan in the execution-plan.
    (This behavior we only expect with views but not with indexes.)
    We ask for an advice like a hint, which enable the CBO-usage
    of function-based indexes in connection with OR.
    This problem seems to be artificial because it contains this dummy logic:
         or (3=5).
    This steams from an prepared statement, where this kind of boolean
    flag reduce the amount of different select-statements needed for
    covering the hole business-logic, while using bind-variables for the
    concrete query-parameters.
    A more realistic (still boild down) version of our select-statement is:
    select * FROM TPERSON
    where (upper(NAME) like 'MIL%' or (NAME is null))
    and (upper(FIRSTNAME) like 'MICH% or (FIRSTNAME is null))
    and ...;
    thank you for time..
    email: [email protected]

  • Function-Based Indexes for 8.1.6 SE and 9iAS

    I have installed the 9iAS Portal into a 8.1.6 SE database, and I cannot get the Function-Based Index feature to turn on. I have set QUERY_REWRITE_INTEGRITY=trusted, QUERY_REWRITE_ENABLED=true and COMPATIBLE="8.1.0.0.0". The feature will still not enable.
    I have 2 questions:
    1. Is there anything else I can do to turn this feature on.
    2. If not, do I have to upgrade to 8.1.7 or to 8.1.* Enterprise Edition to make use of this feature.

    Could you give the statement for the index you have used, the query you try to do and a description of columns and datatypes of the table? How do you know/check that is doesn't work? Execution plan, errors?...

  • Query not considering function based index in oracle 11g

    I have a query which used Function Based Index when run in oracle 9i but when I run the same query
    without any changes, it does not consider index. Below is the query:
    SELECT distinct patient_role.domain_key, patient_role.patient_role_key,
    patient_role.emergency_contact_name,
    patient_role.emergency_contact_phone, patient_role.emergency_contact_note,
    patient_role.emergency_contact_relation_id,
    patient_role.financial_class_desc_id, no_known_allergies, patient_role.CREATED_BY,
    patient_role.CREATED_TIMESTAMP,
    patient_role.CREATED_TIMESTAMP_TZ, patient_role.UPDATED_BY, patient_role.UPDATED_TIMESTAMP,
    patient_role.UPDATED_TIMESTAMP_TZ,
    patient_role.discontinued_date
    FROM encounter, patient_role
    WHERE patient_role.patient_role_key = encounter.patient_role_key
    AND UPPER(TRIM(leading :SYS_B_0 from encounter.account_number)) = UPPER(TRIM(leading :SYS_B_1 from
    :SYS_B_2))
    AND patient_role.discontinued_date IS null
    AND encounter.discontinued_date IS null ;
    Index definition:
    CREATE INDEX "user1"."IX_TRIM_ACCOUNT_NUMBER" ON "user1."ENCOUNTER" (UPPER(TRIM(LEADING
    '0' FROM "ACCOUNT_NUMBER")), "PATIENT_ROLE_KEY", "DOMAIN_KEY", "DISCONTINUED_DATE")
    PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
    STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
    PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
    BUFFER_POOL DEFAULT)
    TABLESPACE "user1"
    Database : Oracle 11g (11.2.0.3)
    O/S : Linux 64 bit (the query does not consider index even on windows os)
    Any suggestions?
    -Onkar
    Edited by: onkar.nath on Jul 2, 2012 3:32 PM

    Onkar,
    I don't appreciate you posting this question in several forums at the same time.
    If I would know you also posted this on Asktom, I wouldn't even have bothered.
    As to your 'issue':
    First of all: somehow cursor_sharing MUST have been set to FORCE. Oracle is a predictable system, not a fruitmachine.
    Your statement the '0' is replaced by a bind variable anyway is simply false. If you really believe it is not false, SUBMIT a SR.
    But your real issue is not Oracle: it is your 'application', which is a mess anyway. Allowing for alphanumeric numbers is a really bad idea.
    Right now you are already putting workaround on workaround on workaround on workaround.
    Issue is the application: it is terminal., and you either need to kill it, or to replace it.
    Sybrand Bakker
    Senior Oracle DBA

  • Function-based indexes

    Oracle documentation on "How Function-Based Indexes Work" states that for the creation of a function-based index in the user's own schema, the user must be granted the QUERY REWRITE system privileges. And MUST have the following initialization parameters defined to create a function-based index:
    QUERY_REWRITE_INTEGRITY set to TRUSTED
    QUERY_REWRITE_ENABLED set to TRUE.
    I have created a function-based unique index, which uses the SQL function DECODE(). But the user doesn't have the QUERY REWRITE sytem privilege. The user has the following privileges:
    CREATE PROCEDURE
    CREATE SEQUENCE
    CREATE SESSION
    CREATE TABLE
    CREATE TRIGGER
    CREATE VIEW
    And also the initialization parameters for QUERY_REWRITE_INTEGRITY and QUERY_REWRITE_ENABLED are set to their DEFAULT values as follows:
    QUERY_REWRITE_INTEGRITY set to ENCFORCED
    QUERY_REWRITE_ENABLED set to FALSE.
    Note: The index is an unique index for data integrity purpose. I am using Oracle 9.2.0.6 version.
    Kindly explain me the reason how the function-based index is created without the system privilege and the initialization parmaters defined as stated in the Oracle9i Database Administrator's Guide Release 2 (9.2).

    You can change those parameter at session level as well.
    Following link would be helpful:
    http://asktom.oracle.com/pls/ask/f?p=4950:8:2552324147195810457::NO::F4950_P8_DISPLAYID,F4950_P8_CRITERIA:667694821129
    Jaffar

  • Function Based Index on Date Column

    Hi All,
    I need to execute a query like this :
    SELECT * FROM ORDERS WHERE APPROVE_DATE IS NULL
    I read anywhere that this will cause unnecessary FTS so that I should create function based index.
    I have tried one below , but not sure that this is correct approach :
    CREATE INDEX idx_1
    ON ORDERS (NVL(APPROVE_DATE, '01-JAN-1900'));
    SELECT * FROM ORDERS WHERE NVL(APPROVE_DATE, '01-JAN-1900') = '01-JAN-1900'
    Is this a correct approach ?
    Thank you,
    xtanto

    A SQL_TRACE output will explain clearly what Justin has stated.
    I have created a table T based on all_objects.
    SQL> desc t
    Name                                      Null?    Type
    OWNER                                     NOT NULL VARCHAR2(30)
    OBJECT_NAME                               NOT NULL VARCHAR2(30)
    SUBOBJECT_NAME                                     VARCHAR2(30)
    OBJECT_ID                                 NOT NULL NUMBER
    DATA_OBJECT_ID                                     NUMBER
    OBJECT_TYPE                                        VARCHAR2(19)
    CREATED                                            DATE
    LAST_DDL_TIME                             NOT NULL DATE
    TIMESTAMP                                          VARCHAR2(19)
    STATUS                                             VARCHAR2(7)
    TEMPORARY                                          VARCHAR2(1)
    GENERATED                                          VARCHAR2(1)
    SECONDARY                                          VARCHAR2(1)
    CASE I_
    SQL> select count(1) from t
      2  /
      COUNT(1)
        934320
    SQL> select count(1) from t where created is null
      2  /
      COUNT(1)
          2376The number of null values in CREATED column is proportionately very small.
    Now i execute the query without function based index.
    select *
      from t
    where created is null
    call     count       cpu    elapsed       disk      query    current        rows
    Parse        1      0.00       0.09          0          0          0           0
    Execute      1      0.00       0.00          0          0          0           0
    Fetch      160      0.04       0.10          0      12662          0        2376
    total      162      0.04       0.19          0      12662          0        2376
    Rows     Execution Plan
          0  SELECT STATEMENT   GOAL: ALL_ROWS
       2376   TABLE ACCESS   GOAL: ANALYZED (FULL) OF 'T' (TABLE)And here is the query that uses the function based index
    select *
      from t
    where nvl(created,to_date('01-01-1900','DD-MM-YYYY')) = to_date('01-01-1900','DD-MM-YYYY')
    call     count       cpu    elapsed       disk      query    current        rows
    Parse        1      0.01       0.00          0          0          0           0
    Execute      1      0.00       0.00          0          0          0           0
    Fetch      160      0.01       0.01          0        698          0        2376
    total      162      0.03       0.01          0        698          0        2376
    Rows     Execution Plan
          0  SELECT STATEMENT   GOAL: ALL_ROWS
       2376   TABLE ACCESS   GOAL: ANALYZED (BY INDEX ROWID) OF 'T' (TABLE)
       2376    INDEX   GOAL: ANALYZED (RANGE SCAN) OF 'T_FN_IDX' (INDEX)Its very obvious from the above output that the Function Based Index as increased the performance.
    CASE II_
    SQL> select count(1) from t
      2  /
      COUNT(1)
        934320
    SQL> select count(1) from t where created is null
      2  /
      COUNT(1)
        202168Now the null values in the CREATED column is proportionately large than the first test case.
    Now lets see without using the function based index
    select *
      from t
    where created is null
    call     count       cpu    elapsed       disk      query    current        rows
    Parse        1      0.00       0.00          0          0          0           0
    Execute      1      0.00       0.00          0          0          0           0
    Fetch    13479      0.46       0.71          2      25832          0      202168
    total    13481      0.46       0.71          2      25832          0      202168
    Rows     Execution Plan
          0  SELECT STATEMENT   GOAL: ALL_ROWS
    202168   TABLE ACCESS   GOAL: ANALYZED (FULL) OF 'T' (TABLE)Now iam trying to use the function based index
    select *
      from t
    where nvl(created,to_date('01-01-1900','DD-MM-YYYY')) = to_date('01-01-1900','DD-MM-YYYY')
    call     count       cpu    elapsed       disk      query    current        rows
    Parse        1      0.00       0.00          0          0          0           0
    Execute      1      0.00       0.00          0          0          0           0
    Fetch    13479      0.54       0.84          0      33826          0      202168
    total    13481      0.54       0.84          0      33826          0      202168
    Rows     Execution Plan
          0  SELECT STATEMENT   GOAL: ALL_ROWS
    202168   TABLE ACCESS   GOAL: ANALYZED (FULL) OF 'T' (TABLE)Its obvious from the result that oracle has decided to go for a FULL TABLE SCAN even when an index was available.
    So just having a function based index is not going to increase the query performance. There are lot of other factors to be considered as stated above.
    Thanks,
    Karthick.

  • Function-Based Index enabling.

    Hi...
    I'm trying to create a function-based index along the lines of:
    CREATE INDEX x_ssn4
    ON table_y(SUBSTR(ssn,6,4))
    UNRECOVERABLE;
    ...so as to be able to query the final 4 digits of social security numbers. Problem is that the above elicits an ORA-00439 "feature not enabled" message. I'm running 8.1.6 and have tried setting the Oracle parameter QUERY_REWRITE_ENABLED to 'TRUE' via an ALTER SESSION command, but to no avail.
    Anyone know how to 'turn the feature on'?
    Thanks, Rob

    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Rick Post:
    I've always done it by logging on as SYS and executing a 'grant query rewrite to myuser'.
    <HR></BLOCKQUOTE>
    Thanks... but turns out that the privilege is not really the issue, as the ALTER SESSION command works. I figured out that the problem was the setting for COMPATIBLE. It pointed to 8.0.0 instead of 8.1.x which is what was needed to permit function-based indexing.
    ~Rob
    null

  • Function-based index error due to fine-grained security

    Hi, i'm working on Oracle version 9.2.0.5.
    I'm trying to create a function-based index but i'm getting an error due to fine-grained security. I checked resource_view but if i'm not wrong I should have all necessary roles. I also added xdbadmin to this user to be sure.
    I tried also to alter my session but it didn't worked.
    Connected to Oracle9i Enterprise Edition Release 9.2.0.5.0
    Connected as test_ste
    SQL>
    SQL> create index fbidx_schede_xml
      2  on schede_progetti_xml p
      3  (p.PROGETTO.extract('/Project/Elenco_unita/Unita/Responsabile/Cognome/text()').getStringVal());
    create index fbidx_schede_xml
    on schede_progetti_xml p
    (p.PROGETTO.extract('/Project/Elenco_unita/Unita/Responsabile/Cognome/text()').getStringVal())
    ORA-28133: full table access is restricted by fine-grained security
    ORA-06512: at "SYS.XMLTYPE", line 0
    ORA-06512: at line 1
    SQL>
    SQL> alter session set query_rewrite_enabled = true;
    Session altered
    SQL> alter session set query_rewrite_integrity = trusted;
    Session altered
    SQL> create index fbidx_schede_xml
      2  on schede_progetti_xml p
      3  (p.PROGETTO.extract('/Project/Elenco_unita/Unita/Responsabile/Cognome/text()').getStringVal());
    create index fbidx_schede_xml
    on schede_progetti_xml p
    (p.PROGETTO.extract('/Project/Elenco_unita/Unita/Responsabile/Cognome/text()').getStringVal())
    ORA-28133: full table access is restricted by fine-grained security
    ORA-06512: at "SYS.XMLTYPE", line 0
    ORA-06512: at line 1
    SQL> select * from user_role_privs;
    USERNAME                       GRANTED_ROLE                   ADMIN_OPTION DEFAULT_ROLE OS_GRANTED
    TEST_STE                      CONNECT                        NO           YES          NO
    TEST_STE                      CTXAPP                         NO           YES          NO
    TEST_STE                      RESOURCE                       NO           YES          NO
    TEST_STE                      XDBADMIN                       NO           YES          NO
    SQL> This are ACL on my schema:
      <ACL>
        <acl description="Private:All privileges to OWNER only and not accessible to others" xmlns="http://xmlns.oracle.com/xdb/acl.xsd" xmlns:dav="DAV:"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.oracle.com/xdb/acl.xsd                           http://xmlns.oracle.com/xdb/acl.xsd">
          <ace>
            <principal>dav:owner</principal>
            <grant>true</grant>
            <privilege>
              <all/>
            </privilege>
          </ace>
        </acl>
      </ACL>I tried to create a similar function-based index on Oracle 10.2.0.3 without any problem and without touching any ACL, is an Oracle 9.2.0.5 problem?
    Thanks for your attention.

    I didn't really (production wise)work yet with VPD. I know a lot is based on DBMS_RLS and I guess (IF it is VPD related) it should be to hard to find in the doc's how you could check what is beyond your privileges. As a DBA I noticed that even the dba account SYSTEM isn't always allow to export the full content for the tables anymore.
    There is a privilege that grants you all access that you need, despite the fact that you are not allowed to read certain rows from a table. Look it up.
    In all, as I said, it looks like account is not allowed to see all data from a table. In that respect it sounds logical that you also are, in that case, not allowed to build a function based index on that data

  • Function-based index, NOT NULL bug?

    ALTER SESSION SET OPTIMIZER_MODE = FIRST_ROWS_10;
    ALTER SESSION SET QUERY_REWRITE_ENABLED = TRUE;
    CREATE TABLE xxx (code CHAR(6) NOT NULL);
    create index xxx_idx on xxx (upper(code));
    select * from xxx order by upper(code);
    -> ORA-03113: end-of-file on communication channel
    (Oracle 9.0.1, Windows 2000)

    I know it's quite a long-time that anyone replied this post, but I just need to report our attempts to workaround that.
    Dropping function-based indexes in primary database, just before creation of Logical Dataguard hasn't solved our problem, neither dropping indexes in logical database.
    In my opinion and after some docs in metalink, I think there's no way to solve it.
    Or you drop them or you migrate to 10g.
    Regards.

  • Function-based indexes don't seem to work in Oracle 8.1.5?

    Hi,
    What gives? What am I doing wrong? I have a table AIRPORT with a column (varchar2(64)) which I have specified a function based index for, but I can't get SQL wueries to use it!!!! the following SQL executes a FULL TABLE SCAN:
    select /*+ index (a idx_upper_cityname) */ *
    from airport a
    where nls_upper(cityName) = 'dfdf'
    ...as does...
    select *
    from airport a
    where nls_upper(cityName) = 'dfdf'
    Table and index code is as follows:
    CREATE TABLE airport
    id NUMBER NOT NULL,
    citycode VARCHAR2(3) NOT NULL,
    cityname VARCHAR2(64) NOT NULL,
    state VARCHAR2(2),
    country VARCHAR2(2) NOT NULL,
    region CHAR(1),
    airportcode VARCHAR2(3) NOT NULL,
    airportname VARCHAR2(64),
    code VARCHAR2(4)
    drop index idx_upper_cityname
    CREATE INDEX idx_upper_cityname ON airport nls_upper(substr(cityName, 0, 64) )
    Environment is as follows:
    Oracle8i v8.1.5 running on WinNT v4.0 (SP 5)
    Client is running on the same machine
    thanks in advance,
    Alexander

    New data point: when I set the handler in my logging.properties file thusly,
    org.apache.catalina.core.ContainerBase.[Catalina].[info-dev].[/infoisland].level = ALL
    org.apache.catalina.core.ContainerBase.[Catalina].[info-dev].[/infoisland].handlers = java.util.logging.ConsoleHandlerI get 0 bytes in the info-dev log (which used to have the aforementioned expception in it). Where is my console going?

  • Importing error: related to function-based indexes?

    I've come across a strange error. I've got a user that has an export dump file who wants me to import the data into a new database. (Its an Oracle 10G database.)
    When I use the 'imp' command, the table import completes successfully, but I end up receiving the following warnings:
    IMP-00003: oracle error 942 encountered
    ORA-00942: table or view does not exist
    IMP-00017: following statement failed with ORACLE error 942
    "CREATE INDEX "X" on "Y" (TO_CHAR("Z",'yyyymmdd')) P"
    "CTFREE 10 INITRANS 2 MAXTRANS 255 STORAGE(INITIAL 3145728 FREELISTS 1 FREEL"
    "IST GROUPS 1 BUFFER_POOL DEFAULT) TABLESPACE "TBSPC" LOGGING"
    The table itself seems to have been imported correctly; and all data rows exist. Its just the index that isn't being imported/rebuilt. (Other indexes on the same table were imported properly.)
    The only thing that I could find that seems odd is that this index uses functions (the "TO_CHAR" in the index above). All of the other indexes on the table refer to basic fields. And I can rebuild the index manually.
    Is the 'imp' command able to handle function-based indexes? Is there some parameter than I need to set to allow it to import these indexes?
    (I know the more efficient thing to do would be to do an import with no indexes and rebuild them later...)
    Edited by: user588235 on Dec 9, 2009 5:16 PM

    Function based indexes should be supported. If it is exported, then it should be able to be imported. This just seems like a weird case. Have you tried to create a different table and then create a function based index on that table then see if exp/imp work?Yes, I have tried creating new versions of the tables (both with and without function-based indexes).
    During my tests, I found that I can recreate the problem if I create the table in Oracle 9 and import it into Oracle 10; the problem doesn't occur when importing/exporting between Oracle9->Oracle9 or Oracle10->Oracle10. (However, the user told me that this was an export from Oracle 10.)
    One other thing: I've noticed that if, instead of importing into a user account, I import into the system account, it works with no problems. For example:
    imp userid='sys/xyz as sysdba' file=mydata.dmp fromuser=use1 touser=use2 ->Results in warnings while reading indexes
    imp userid='sys/xyz as sysdba' file=mydata.dmp fromuser=use1 touser=sys ->works with no warning
    This makes me suspect that its a problem with the permissions that have been granted. (I've granted 'create any index' and 'query rewrite' to the user account however.)
    Not to change the issue, but since this is 10g, have you tried using datapump to expdp/impdp the same information?Might be an option; problem is, I'm dealing with a legacy system that was set up to use 'imp/exp', so altering backup and restore methods will require a lot of work.

  • Limit on number of function based indexes ?

    What is the limit on the number of function based indexes that can exist on a table ?
    I haven't been able to find this info in the Oracle docs yet . I'd RTFM, but which one ? There's so many ! :-)

    http://download-east.oracle.com/docs/cd/B19306_01/server.102/b14237/limits003.htm#sthref4186

  • Dilemma regarding function based indexes

    Hello,
    I have a dilemma regarding function based indexes.
    I have read Note:66277.1 on the Metalink discussing thoroughly the subject of “Concepts and Usage of Function Based Indexes”.
    This doc was revised on 30-May-2006 so I was sure it referred to 9i and 10g.
    This doc as well as other docs on the web claim that in order to use FBI (function based indexes) one must set the following parameters (can be done also at session level)
    QUERY_REWRITE_ENABLED = TRUE
    QUERY_REWRITE_INTEGRITY = TRUSTED
    Also the schema that is owner of the FBI should be granted with QUERY REWRITE sys priv and statistics should be collected since FBI is usable only by CBO (cost based optimizer).
    I have tested it and it works, my problem was that it worked
    (1)     Without granting the QUERY REWRITE to the owning schema.
    (2)     QUERY_REWRITE_ENABLED was set to false.
    (3)     QUERY_REWRITE_INTEGRITY was set to enforced.
    I have conducted my tests on 9.2.0.6 and found no evidence in the docs (10g) saying the above is required or not.
    I found at http://asktom.oracle.com/pls/ask/f?p=4950:8:::::F4950_P8_DISPLAYID:1197786003246 the following:
    “Oracle9iR2 relaxed this so that the FBI on the builtin function may be used.”
    so I have tested it with my own function:
    create or replace function upper2( p_str in varchar2 ) return
    varchar2 DETERMINISTIC
    as
    begin
    return upper(p_str);
    end;
    =>
    Also (yes you guessed right), without any privilege granted nor parameter setting the optimizer picked my FBI.
    Can anyone refer me to a place documenting this behavior as a correct one?
    Other comments?
    Regards,
    Tal Olier ([email protected])

    Got an answer from Oracle support:
    19-DEC-06 18:04:31 GMT
    (Update for record id(s): 101017780,101017796)
    QUESTION
    ========
    Questions about the options required in 10g related to Function Based Indexes, and the correct
    behaviors associated with them.
    ANSWER
    ======
    For 10g:
    These requirements are no longer true in 10g. This has already clarified by
    development in the Bug 3999326 which is available on metalink.
    For 9I:
    For the creation of a function-based index in your own schema, you must be
    granted the QUERY REWRITE system privileges. To create the index in another
    schema or on another schema's tables, you must have the CREATE ANY INDEX
    and GLOBAL QUERY REWRITE privileges.
    You must have the following initialization parameters defined to create a
    function-based index:
    QUERY_REWRITE_INTEGRITY set to TRUSTED
    QUERY_REWRITE_ENABLED set to TRUE
    COMPATIBLE set to 8.1.0.0.0 or a greater value
    Additionally, to use a function-based index:
    The table must be analyzed after the index is created.
    The query must be guaranteed not to need any NULL values from the indexed
    expression, since NULL values are not stored in indexes.
    However, in 9.2.0.4 patchset, these prerequisites do not apply and one can
    create function-based indexes without any of the above to be true. This is not
    the case in 9.2.0.3, not in 8.1.7.
    Reference: Oracle 9i R2 Administrators Guide
    So as mentioned above that is why you didnt have any errors
    Please back to us if any further information is need, and we will be pleased to
    assist you further.
    Thank You,
    Best Regards,
    Mina Anes

Maybe you are looking for

  • How can I install windows 8.1 on my macbook pro late 2013?

    I bought a new Macbook pro 15" late 2013 and i want to install windows 8.1 on it. I tried several times but it always says me that windows cannot be installed on the partition that i made with bootcamp assistant. Thank you for your answers Alessandro

  • Pages 5.0 and chapter numbering

    Hello, Does anyone know how I could add automatic numbering to my chapters in Pages 5.0. In "format" table I can see a numbering fonction but I can't set it in my header style. Any bug somewhere ? Thanks !

  • Receiver Determination

    Hi, We are running SAP PI 7.11. Input message: <?xml version="1.0" standalone="yes"?> <SITE_ERROR xmlns="http://test.com/SITE_Error">   <ERROR_DATA>     <ERROR_DATE>20110120</ERROR_DATE>     <ERROR_TIME>060002</ERROR_TIME>   </ERROR_DATA>   <SITE_INF

  • Reg Table Control ---- URGENT

    HI to ALL, i have a table control with some fields.On that, if Form type = F, then program allows user to enter vendor code in vendor field. if form type = E, then program  didnt allow users to enter vendor in vendor field. How will i do it for that

  • IOS 8 with two phones now getting messages on both

    We have two iPhones and with the iOS 8 update we are now both getting the same calls, messages and calendar reminders. How can we make them both be different devices again.