Dbms_expfil

Hi,
Our department has upgraded to Oracle 10 and we are in the process of testing its new features.
I am trying to test/understand dbms_expfil package but it says that the package does not exists.
Is there any special step to load this package? Where can I get it? Was that a mistake in the db installation?
Thanks,
Maria

Maria,
A "typical" install of the 10g database should include the Expression Filter feature. In the case of a "custom" install, you can install this component by running the catexf.sql script from rdbms/admin directory. You can also find these instruction in the Appendix C of the "Application Developer's Guide - Expression Filter" 10.1.
For all resources related to this feature and the Rules Manager feature, please go to http://www.oracle.com/technology/products/database/rules_manager/index.html
Thanks,
-Aravind.

Similar Messages

  • Error while using dbms_expfil.assign_attribute_set

    Dear Guru's
    I am new to this feature and in the process of learning. I was trying out the examples provided by the Documentation
    These are the codes from the documentation
    CREATE TABLE traders
    (name VARCHAR2(10),
    email VARCHAR2(20),
    interest VARCHAR2(30));
    CREATE OR REPLACE TYPE ticker AS OBJECT
    (symbol VARCHAR2(20),
    price NUMBER,
    change NUMBER);
    BEGIN
    DBMS_EXPFIL.CREATE_ATTRIBUTE_SET
    (attr_set => 'ticker',
    from_type => 'YES');
    END;
    BEGIN
    DBMS_EXPFIL.ASSIGN_ATTRIBUTE_SET
    (attr_set => 'ticker',
    expr_tab => 'traders',
    expr_col => 'interest');
    END;
    INSERT INTO traders (name, email, interest)
    VALUES ('Vishu', '[email protected]', 'symbol = ''ABC'' AND price > 25')
    SELECT name, email
    FROM traders
    WHERE EVALUATE (interest,
    'symbol=>''ABC'',
    price=>31,
    change=>5.2'
    ) = 1
    Upto this fine it worked well . But i couldnt understand the usage of a parameter called Change in the Evaluate expression in the above select statment. Because in the above scripts , there is no data for the parameter . hence i Decided to do with that. I tried removing the CHANGE=>5.2 from the evaluate operator but ended with an Error.
    Hence i decided to drop the entire thing
    I used the following procedures
    BEGIN
    DBMS_EXPFIL.UNASSIGN_ATTRIBUTE_SET (expr_tab => 'traders'
    expr_col => 'Interest');
    END;
    and
    DBMS_EXPFIL.DROP_ATTRIBUTE_SET(attr_set => 'ticker');
    and
    Drop type ticker
    Then i created the following
    CREATE OR REPLACE TYPE Trinfo AS OBJECT
    (symbol VARCHAR2(20),
    price NUMBER
    BEGIN
    DBMS_EXPFIL.CREATE_ATTRIBUTE_SET
    (attr_set => 'trinfo',
    from_type => 'YES');
    END;
    so far no problem
    when i executed the following
    BEGIN
    DBMS_EXPFIL.ASSIGN_ATTRIBUTE_SET
    (attr_set => 'trinfo',
    expr_tab => 'traders',
    expr_col => 'interest');
    END;
    BEGIN
    ERROR at line 1:
    ORA-38464: expression set is not empty.
    ORA-06512: at "EXFSYS.DBMS_EXPFIL_DR", line 13
    ORA-06512: at "EXFSYS.DBMS_EXPFIL", line 450
    ORA-06512: at line 2
    I got the above error
    I am using Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
    With the Partitioning, OLAP and Data Mining options
    Kindly guide me
    with warm regards
    ssr

    Hello,
    It might help you to think of the Attribute set as the table and the expressions as the queries on the table. The table may have N number of columns. The corresponding queries may refer to some subset of these columns. In your case, you are defining an attribute set with 3 attributes. It so happened that none of the expressions you defined used the attribute "change". But the attribute set is created to allow expressions that include predicates on "change" attribute. Extending our attribute set - table analogy, a data item specified with an EVALUATE operator is like an INSERT statement into the table. Irrespective of the queries, the INSERT statement expects values for each of the columns in the table (the INSERT statement with column enumeration is another way of assigning NULLs for missing columns). So, the EVALUATE operator expects the values for all the attributes in the attribute set even when there are no expressions defined. In 11g Release 1, you could have default values for some of the attributes and the default value will be used if certain attribute is missing in the data item specification.
    Since the column you are assigning the attribute set to has some data, you should use FORCE to validate those expressions or empty the table prior to assigning the attribute set.
    38464, 00000, "expression set is not empty."
    // *Cause: An attempt was made to assign an attribute set to a non-empty
    // expression set.
    // *Action: Use FORCE = 'TRUE' to validate all the existing expressions.
    Hope this helps,
    -Aravind.

  • DBMS_EXPFIL.GRANT_PRIVILEGE to a Role?

    Sorry, I'm not the dba so I can't test this myself. Can the to_user parameter of DBMS_EXPFIL.GRANT_PRIVILEGE by a role?
    Thanks,
    Greg

    Greg,
    No, the Expression Filter privileges cannot be granted to roles. They can only be granted to users.
    Regards,
    -Aravind.

  • Urgent:JPublisher's default typemapping for PL/SQL Boolean not working

    I have a procedure that accepts a boolean.
    I have created this procedure on 2 oracle database installations. One is on Oracle8i and the other on Oracle9i.
    I invoke JPublisher with the following jpub.properties file:
    jpub.user=scott/tiger
    jpub.url=jdbc:oracle:thin:@database:1521:oracle
    jpub.dir=C:\Jpub
    jpub.package=BooleanMapping
    jpub.plsqlmap=always
    jpub.plsqlfile=C:\Jpub\BoolProc.sql
    jpub.plsqlpackage=BoolWrapper
    jpub.adddefaulttypemap=BOOLEAN:boolean:INTEGER:SYS.SQLJUTL.INT2BOOL:SYS.SQLJUTL.BOOL2INT
    This is the output of JPublisher from SCOTT schema in 8i and 9i databases respectively:
    Output from 8i:
    J2T-137, WARNING: mapping BOOLEAN:boolean was redefined to BOOLEAN:boolean.
    SCOTT.<top-level scope>
    Output from 9i:
    J2T-137, WARNING: mapping BOOLEAN:boolean was redefined to BOOLEAN:boolean.
    SCOTT.<top-level scope>
    J2T-138, NOTE: Wrote PL/SQL package BoolWrapper to file C:\Jpub\BoolProc.sql
    Why is the PL/SQL wrapper file not created in case of Oracle8i database?
    Is there a way to enable this?
    NB: I had to do a few workarounds to make this happen on 8i database.
    I copied over the .jar library files from sqlj folder from 9iHome to 8iHome. I also copied the jpub.exe from the bin folder. This is because the JPublisher in 8i does not accept addtypemap, defaulttypemap kind of arguments.

    Alex,
    For the predicate groups that are indexed/stored, the exact operator types (as in equality, inequality, like etc) that are indexed are specified while assigning the default index parameters. In the following example, exf$indexoper is used to specify the list of indexed operators.
    BEGIN
      DBMS_EXPFIL.DEFAULT_INDEX_PARAMETERS('Car4Sale',
        exf$attribute_list (
           exf$attribute (attr_name => 'HorsePower(Model, Year)',
                          attr_oper => exf$indexoper('=','<','>','>=','<='),
                          attr_indexed => 'FALSE')    --- stored predicate group
    END;
    /You can find more information about exf$indexoper at
    http://download.oracle.com/docs/cd/B28359_01/appdev.111/b28419/t_expfilobj.htm#ARPLS153
    Could you confirm that you chose to index 'is null' and 'is not null' while assigning the default index parameters ? This information is available in OPERATOR_LIST column of the USER_EXPFIL_DEF_INDEX_PARAMS view.
    Hope this helps,
    -Aravind.

  • Expression Filter Performance Issues / Misuse?

    I'm currently evaluating the Expression Filter functionality for a new requirement. The basic idea of the requirement is that I have a logging table that I want to get "interesting" records from. The way I want to set it up is to exclude known, "uninteresting", records or record patterns.
    So as far as an implementation I was considering a table of expressions that contained expression filter entries for the "uninteresting" records and checking this against my logging table using the EVALUATE operator and looking for a 0 result.
    In my testing I wanted to return results where the EVALUTE operator is equal to 1 to see if my expressions are correct. In doing this I was experiencing significant performance issues. For example my test filter matches 72 rows out of 61657 possible entries. It took Oracle almost 10 minutes to evaluate this expression. I tried it with and without an Expression Filter index with no noticeable change in execution time. The test case and query is provided below.
    Is this the right use case for Expression Filter? Am I misunderstanding how it works? What am I doing wrong?
    Test Case:
    Version
    BANNER
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
    PL/SQL Release 11.2.0.1.0 - Production
    CORE    11.2.0.1.0      Production
    TNS for 32-bit Windows: Version 11.2.0.1.0 - Production
    NLSRTL Version 11.2.0.1.0 - Production
    Objects & Query:
    CREATE TABLE expressions( white_list VARCHAR2(200));
    CREATE TABLE data
    AS
    SELECT OBJECT_ID
         , OWNER
         , OBJECT_NAME
         , CREATED
         , LAST_DDL_TIME
    FROM   DBA_OBJECTS
    BEGIN
      -- Create the empty Attribute Set --
      DBMS_EXPFIL.CREATE_ATTRIBUTE_SET('exptype');
      -- Define elementary attributes of EXF$TABLE_ALIAS type --
      DBMS_EXPFIL.ADD_ELEMENTARY_ATTRIBUTE('exptype','data',
                                            EXF$TABLE_ALIAS('test_user.data'));
    END;
    BEGIN
      DBMS_EXPFIL.ASSIGN_ATTRIBUTE_SET('exptype','expressions','white_list');
    END;
    INSERT INTO expressions(white_list) VALUES('data.owner=''TEST_USER'' AND data.created BETWEEN TO_DATE(''08/03/2010'',''MM/DD/YYYY'') AND TO_DATE(''08/05/2010'',''MM/DD/YYYY'')');
    exec dbms_stats.gather_table_stats(USER,'EXPRESSIONS');
    exec dbms_stats.gather_table_stats(USER,'DATA');
    CREATE INDEX expIndex ON Expressions (white_list) INDEXTYPE IS EXFSYS.EXPFILTER
      PARAMETERS ('STOREATTRS (data.owner,data.object_name,data.created)
                   INDEXATTRS (data.owner,data.object_name,data.created)');
    SELECT /*+ gather_plan_statistics */ data.* FROM data, expressions WHERE EVALUATE(white_list,exptype.getVarchar(data.rowid)) = 1;
    DROP TABLE expressions PURGE;
    BEGIN
            DBMS_EXPFIL.DROP_ATTRIBUTE_SET(attr_set => 'exptype');
    END;
    DROP TABLE data PURGE;

    Hi,
    If you are already using the queries and are stable enough then rather than modifying query you can try other options to improve the query performance like data compression of the cube, creation of aggregates, placing cube on BIA or creating cache for the query.
    Best Regards,
    Prashant Vankudre.

  • EBS ISG using custom PL/SQL functions that return XMLType

    Hi,
    We have a custom PL/SQL package that we use for interfacing systems and some of the functions in this package ruturn an XMLType. We want to deploy the package functions as web services through the ISG, but it is not working as expected. When deployed through the ISG, the functions with XMLType return type produce a null response from the ISG (they work fine when called in SQL or PL/SQL; functions with non-XMLTypes work fine).
    If we change the return type to CLOB (and use getClobVal() on the XMLType) then we get a response from the ISG, but it changes all the angle-brackets in the CLOB (which is still arbitrary XML text) to &lt; &gt; ...
    What is the proper way to get the complex XMLType output through the ISG? Anyone have any more experience?
    Thanks,
    --Walt                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

    Alex,
    For the predicate groups that are indexed/stored, the exact operator types (as in equality, inequality, like etc) that are indexed are specified while assigning the default index parameters. In the following example, exf$indexoper is used to specify the list of indexed operators.
    BEGIN
      DBMS_EXPFIL.DEFAULT_INDEX_PARAMETERS('Car4Sale',
        exf$attribute_list (
           exf$attribute (attr_name => 'HorsePower(Model, Year)',
                          attr_oper => exf$indexoper('=','<','>','>=','<='),
                          attr_indexed => 'FALSE')    --- stored predicate group
    END;
    /You can find more information about exf$indexoper at
    http://download.oracle.com/docs/cd/B28359_01/appdev.111/b28419/t_expfilobj.htm#ARPLS153
    Could you confirm that you chose to index 'is null' and 'is not null' while assigning the default index parameters ? This information is available in OPERATOR_LIST column of the USER_EXPFIL_DEF_INDEX_PARAMS view.
    Hope this helps,
    -Aravind.

  • Error data pump import: Worker unexpected fatal error in KUPW$WORKER.MAIN

    Hello.
    I try to import dump
    impdp DIRECTORY=data_pump_dir DUMPFILE=04-2013.dmp TRANSFORM=OID:n LOGFILE=04-2013.dmp.log
    (user - system (tried with sys) , (also with parallel=1 (or 2, or 8))and have following error:
    Import: Release 11.2.0.1.0 - Production on Fri May 31 12:55:42 2013
    Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.
    Connected to: Oracle Database 11g Release 11.2.0.1.0 - 64bit Production
    ORA-39014: One or more workers have prematurely exited.
    ORA-39029: worker 1 with process name "DW00" prematurely terminated
    ORA-31671: Worker process DW00 had an unhandled exception.
    ORA-39079: unable to enqueue message RQ
    ORA-06512: at "SYS.DBMS_SYS_ERROR", line 86
    ORA-06512: at "SYS.KUPC$QUE_INT", line 965
    ORA-00931: missing identifier
    ORA-06512: at "SYS.KUPW$WORKER", line 16746
    ORA-06512: at "SYS.KUPW$WORKER", line 19035
    ORA-06512: at "SYS.KUPW$WORKER", line 8191
    ORA-39126: Worker unexpected fatal error in KUPW$WORKER.MAIN []
    ORA-06512: at "SYS.KUPW$WORKER", line 1705
    ORA-44002: invalid object name
    ORA-06512: at line 2 
    How can I fix it?
    Alert_log
    Fri May 31 14:26:21 2013
    DM00 started with pid=32, OS id=36385, job SYSTEM.SYS_IMPORT_FULL_03
    Fri May 31 14:26:22 2013
    DW00 started with pid=33, OS id=36387, wid=1, job SYSTEM.SYS_IMPORT_FULL_03
    DW00 terminating with fatal err=39079, pid=33, wid=1, job SYSTEM.Also there is some invalid objects in SYS:
    SYS.DBMS_SQLTUNE_INTERNAL
    SYS.DBMS_SQLTUNE
    SYS.DBMS_WRR_INTERNAL
    SYS.DBMS_WORKLOAD_REPLAY
    SYS.PRVT_SQLPA
    SYS.DBMS_SMB_INTERNAL
    WMSYS.LTUTIL
    WMSYS.LTADM
    WMSYS.UD_TRIGS
    WMSYS.OWM_DDL_PKG
    WMSYS.OWM_MIG_PKG
    EXFSYS.DBMS_EXPFIL_DR
    EXFSYS.DBMS_EXPFIL
    EXFSYS.ADM_EXPFIL_SYSTRIG
    CTXSYS.DRVDDL
    XDB.DBMS_XDBZ0
    XDB.DBMS_XSLPROCESSOR
    XDB.DBMS_XDBUTIL_INT
    XDB.DBMS_CSX_ADMIN
    EXFSYS.DBMS_RLMGR_UTL
    EXFSYS.DBMS_RLMGR_IR
    EXFSYS.DBMS_RLMGR_IRPK
    EXFSYS.DBMS_RLMGR_DEPASEXP
    MDSYS.SDO_CS
    SYSMAN.EMD_MAINTENANCE
    SYSMAN.MGMT_ADMIN_DATA

    here are trace files [http://files.mail.ru/B05EBC4402A342D0AE1E88BFB04191DB|http://files.mail.ru/B05EBC4402A342D0AE1E88BFB04191DB]
    error here:
    KUPM:12:47:19.571: Error detected by MCP
    KUPM:12:47:19.572: ORA-39014: One or more workers have prematurely exited.
    KUPM:12:47:19.572: ORA-39029: worker 1 with process name "DW00" prematurely terminated
    KUPM:12:47:19.572: ORA-31671: Worker process DW00 had an unhandled exception.
    ORA-39079: unable to enqueue message RQ
    ORA-06512: at "SYS.DBMS_SYS_ERROR", line 86
    ORA-06512: at "SYS.KUPC$QUE_INT", line 965
    ORA-00931: missing identifier
    ORA-06512: at "SYS.KUPW$WORKER", line 16746
    ORA-06512: at "SYS.KUPW$WORKER", line 19035
    ORA-06512: at "SYS.KUPW$WORKER", line 8191
    ORA-39126: Worker unexpected fatal error in KUPW$WORKER.MAIN []
    ORA-06512: at "SYS.KUPW$WORKER", line 1705
    ORA-44002: invalid object name
    ORA-06512: at line 2
    KUPM:12:47:19.577: In restart_worker for worker 1...
    KUPM:12:47:19.577: Error being processed is:  -26457
    KUPM:12:47:19.577: worker id is:
    KUPM:12:47:19.577: Worker error is: 0
    KUPM:12:47:19.577: Exited main loop...
    KUPM:12:47:19.577: Returned to MAIN
    KUPV:12:47:19.577: Update request for job: SYSTEM.SYS_IMPORT_FULL_03, func: 1
    KUPM:12:47:19.578: Entered state: UNDEFINED
    KUPM:12:47:19.578: In RESPOND_TO_START
    KUPC:12:47:19.578: Before ENQ: Sending Type: 2041 ID:
    KUPC:12:47:19.578:  RP,KUPC$C_1_20130603124648,MCP,KUPC$A_1_20130603124649,10,Y
    kwqberlst !retval block
    kwqberlst rqan->lagno_kwqiia  5
    kwqberlst rqan->lascn_kwqiia > 0 block
    kwqberlst rqan->lascn_kwqiia  5
    kwqberlst ascn 2375213 lascn 22
    KUPM:12:47:19.579: In check_workers...
    KUPM:12:47:19.579: Live worker count is:  0
    KUPM:12:47:19.579: worker id is:
    KUPM:12:47:19.579: Worker error is: 0
    KUPM:12:47:19.579: Job is completing

Maybe you are looking for