10g - cache, report contains oracle user defined function

hi, experts,
from http://obiee101.blogspot.com/2008/07/obiee-cache-management.html
Reasons Why a Query is Not Added to the Cache:
•Non-cacheable SQL element. If a SQL request contains Current_Timestamp, Current_Time, Rand, Populate, or a parameter marker then it is not added to the cache.
•Non-cacheable table. Physical tables in the Oracle BI Server repository can be marked 'noncacheable'. If a query references any non-cacheable table then the query results will not be added to the cache.
•Cache hit. In general, if the query gets a cache hit on a previously cached query, then the results of the current query are not added to the cache. The exception is query hits that are aggregate roll-up hits.
•Result set is too big.
Query is cancelled. This can happen by explicit cancellation from Oracle BI Presentation Services or the Administration Tool, or implicitly through timeout.
•Oracle BI Server is clustered. Queries that fall into the ‘cache seeding’ family are propagated throughout the cluster. Other queries continue to be stored locally. Therefore, even though a query may be put into the cache on Oracle BI Server node 1, it may not be on Oracle BI Server node 2.
I would like to know
if the request (report on dashboard) calls an oracle user defined function,  can the cache be created and saved for this report?
thank you very much!

Hi stephen,
if the request (report on dashboard) calls an oracle user defined function, can the cache be created and saved for this report?Yes,it is cached.....function defined in database is called in OBIEE is cached and saved.
More information and example can be found here http://oraclebizint.wordpress.com/2007/09/10/oracle-bi-ee-10133-support-for-native-database-functions-and-aggregates/
Hope it helps you.Check all other questions you posted are answered?
By,
KK

Similar Messages

  • Error in User defined function

    I have created a user defined function to make a call to SAP using JCo.
    But I am getting an error "package com.sap.mw.jco does not exist"
    Do we need to install JCo on our server?
    Thanks in advance

    Hallo Vijaya Kumari,
    if you use XI3.0 then you should check csn note 753294: 
    Symptom                                                                         
    A message mapping contains a user-defined function that uses a class            
    from the "com.sap.mw.jco", "sapxmltoolkit" or "com.sap.tc.Logging"              
    library. An error stating that the source code contains syntax errors           
    occurs when you test or activate the message mapping. When you use a            
    class from "com.sap.mw.jco", the system reports, for example, "package          
    com.sap.mw.jco does not exist".                                                 
    This error only occurs in systems containing a Support Package lower            
    than 5.                                                                               
    Solution                                                                        
    Import Support Package 5 or higher.                                             
    You can use the following workaround as a short-term solution: Upload           
    the library that is referenced in the message mapping into the software         
    component of the message mapping as an "imported archive". Do not               
    activate the "imported archive" with the library since it is not needed         
    for the runtime. The only purpose of the archive is to allow the message        
    mapping to be compiled. To avoid version conflicts with newer libraries,        
    you should delete the archive again after you import Support Package 5          
    or higher.
    In your case you will find the relevant jar file in the path
    [sap_j2ee_engine_installaltion_path]\cluster\server0\bin\ext\com.sap.mw.jco\jrfc.jar
    Regards Franz

  • User Defined Function Error - Can't find function

    Hi All,
    Version: 11.1.1.4
    I created a user defined function and added it to one of my BPEL Processes. I can see the function in JDeveloper and can compile the project without issue. We placed the jar file out on the SOA Server following the oracle user defined function examples. After placing the file out on weblogic I was able to successfully deploy the project.
    Oracle Deployment Steps:
    To deploy user-defined functions to runtime:
    1. Copy the user-defined function JAR files to BEA_Home/user_projects/domains/domain_name/lib or a subdirectory of lib.  Where domain_name is the name of the Oracle WebLogic Server domain (for example, soainfra).
    2. Restart the Oracle WebLogic Server.However, when I try to run the composite application I get the below error. I am not really sure why it can't find the Function? The jar is out on the server and the jar was added to the project?
    Error:
    Non Recoverable System Fault :
    <bpelFault><faultType>0</faultType><subLanguageExecutionFault xmlns="http://schemas.oracle.com/bpel/extension"><part name="summary"><summary>XPath expression failed to execute. An error occurs while processing the XPath expression; the expression is pnl:GetManager(string(bpws:getVariableData('inputVariable','payload','/client:process/client:input'))). The XPath expression failed to execute; the reason was: Function 'GetManager' not found.. Check the detailed root cause described in the exception message text and verify that the XPath query is correct. </summary></part><part name="code"><code>XPathExecutionError</code></part></subLanguageExecutionFault></bpelFault>Any suggestions would be greatly appreciated!
    Thanks,
    S
    Edited by: Scarpacci on Apr 1, 2011 6:06 AM

    try putting the jar location explicitly in weblogic server's classpath i.e. add BEA_Home/user_projects/domains/domain_name/lib to wls classpath and restart server.

  • Accessing a Cache From an Oracle CQL User-Defined Function

    According to the docs ...
    I am to use the following element to set the cache property in my bean...
    <wlevs:property name="cache" ref="cache-id"/>
    However, when I set it, the assembly does not validate.
    If I use <property>, I get a NullPointerException on each request when my processor runs.
    Using the same CQL code..
    Without the <property> tag, the call to the user-defined function works (but I don't have the cache attribute set obviously).
    Here is the excerpt from my assembly...
    <bean id="cacheFunction" class="ou.cep.function.CacheFunction">
    <property name="cache" ref="myCache"/>
    </bean>
    <!-- The default processor for OCEP 11.0.0.0 is CQL -->
    <wlevs:processor id="myProcessor">
    <wlevs:listener ref="CacheChannel"/>
    <wlevs:function ref="cacheFunction" function-name="isValidID" exec-method="isValidID">
    </wlevs:function>
    </wlevs:processor>
    To repeat, with the same CQL with the user-defined function call, if I remove the property element from the bean definition, I can call the function successfully (it just doesn't do what I need it to do). In this case, I am still using the ref=cacheFunction for the wlevs:function within the processor.
    What am I doing wrong?
    Edited by: fl0at on Oct 5, 2010 12:22 PM
    Edited by: fl0at on Oct 5, 2010 12:28 PM

    The case is solved, not sure I could explain why, but...
    This implementation of the user-defined function was a migration from an implementation using the same cache in the join. So, when I removed the cache reference in the source stream (where I am now executing a function that accesses the cache), the problem went away and everything is working.
    I can explain further if there are questions.
    If anyone has thoughts on this, please advise.
    As always, thanks for the help.

  • Error while using user defined function in reports

    Hi,
    When I use the below user defined function in oracle reports I got the wrong number of arguments error
    select test_function(id,a_number,v_date-14,b_number) from dual;
    If I remove -14 from the argument it works. But iIneed to subtract 14 days from the date.
    Thanks for your help.

    select test_function(id,a_number,v_date-14,b_number) from dual;
    you have to give the command like this to_date(v_date,'dd-mon-yyyy')-14
    because the v_Date you choose in the parameter form is not having the corrent date format
    the format dd-mon-yyyy is the format in which v_date is passed by the user.

  • Accessing container element in the User Defined Function

    Hi All,
    I am accessing a container element in the user defined function.
    But it is not working. Actually i want to split a message(1800 records) into a batch of 200.
    But it goes in a infinite loop.
    Please can you tell me where i am wrong.
    Smita
    The code is :
    public void SplitMsg(String[] a,ResultList result,Container container){
    Object container1;
    String counter;
    int i,j=0;
    container1 = container.getParameter("value");
    if( container1 == null){
    counter  =  "0";
    else {     
         counter = container.toString();
         j = Integer.valueOf(counter).intValue();
    for ( i = j ; i <= j + 199 ; i++){
         if ( i  >= a.length){
              container.setParameter("value","9999999");
              break;
         result.addValue(a<i>);
         j += 200;
         counter = Integer.toString(j);
         container.setParameter("value", counter);

    Here is another way to accomplish what you wanted.
    For the target mapping, use this sequence for mapping
    Source element -> removeContext -> Your User-defined Function -> Target Element
    When defining User-Defined Function, select "Cache Queue" option.
    Since you are using removeContext before calling the UserDefined function, your input to the user defined function will be a String array without ResultList.CC.
    Now manipulate the array the way you want it, and build the ResultList result.
    After every 200 records, use method
    void addContextChange().
    This will insert the ResultList.CC at the appropriate places.
    Use Display Queue in the Mapping Editor to see the debug values.

  • Converting the iif function in MS Access97 to an user defined function in Oracle

    Hi ,
    I have a problem here we are working with Visual Basic 6.0(ADOs 2.5) with Oracle 8i release 2. we have some queries stored in the tables which contains the iif function of MS Access 97 do we have a similar built in function in Oracle which replaces this iif function of Ms Access 97.
    we cannot use decode (built in function) of oracle b'cos it cannot be used in a where clause and we cannot write a user defined function also because it cannot be generalized for use b'cos sometimes we use
    field names and sometimes values as expression in the iif functions
    If anybody could suggest me some idea
    please mail me at [email protected]
    with best regards
    Jai

    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Jai:
    Hi ,
    I have a problem here we are working with Visual Basic 6.0(ADOs 2.5) with
    Oracle 8i release 2. we have some queries stored in the tables which contains the iif function of MS Access 97 do we have a similar built in function in Oracle which replaces this iif function of Ms Access 97.we cannot use DECODE (built in function) of oracle b'cos it cannot be used in a where clause and we cannot write a user defined function also because it cannot be generalized for use b'cos sometimes we use field names and
    sometimes string values as expression in the iif functions. is there any other built in function ? can anybody suggest me some idea
    please mail me at [email protected]
    regards
    Jai<HR></BLOCKQUOTE>
    Hi,
    You still can use the seccond approach - with a udf IIF() that you place in a package and OVERLOAD it. See the documentation for limitations of Overloading
    Overloading permits you to declare several functions with the same name but havind different behaviours depending on the number and type of the parameters.
    George

  • Calling user defined function in Oracle BI Answers?

    Hi
    I am new in Oracle BI . I want to use the user defined function in Oracle BI Answers as a column,function written in Oracle database to calculate the Sales Revenue.
    I am using Oracle BI Standard Edition One and Oracle 10g database.
    Please suggest me.
    Thanks
    Nusrat

    Search for EVALUATE function you can call function and pass parameters
    Example:
    EVALUATE Function
    This function is intended for scalar and analytic
    calculations.
    Syntax: EVALUATE('DB_Function(%1)', {
    Comma separated Expression})
    Example: SELECT
    e.lastname,sales.revenue,EVALUATE('dense_rank()
    over(order by %1
    )',sales.revenue) FROM sales s, employee e;

  • Using a SQL user-defined function in Crystal Reports XI

    Post Author: JoannKarp
    CA Forum: Formula
    Is it possible to use a user defined function in SQL and use this in multiple Crystal reports?
    JoannKarp

    SELECT COALESCE(ufn_GetAddressByBusinessEntityIDandAddressTypeID(table1.BusinessEntityID,712),ufn_GetAddressByBusinessEntityIDandAddressTypeID(table1.BusinessEntityID,712)) AS Zipcode
      FROM table1
    Nope. This is two function calls. coalesce(a, b, c, ...) is just syntatic sugar for
       CASE WHEN a IS NOT NULL THEN a
            WHEN b IS NOT NULL THEN b
            WHEN c IS NOT NULL THEN c
       END
    But if you use isnull it's a different matter. (But isnull() permits two arguments.)
    Erland Sommarskog, SQL Server MVP, [email protected]

  • XI 7.0 Advnaced User Defined Function  how to check Cache Entire Queue ?

    Hi Friends ,
                       We are using XI 7.0 (PI)   . There is no Selection For Advanecd UserDefinedFunction .  I think in this version Both will perfom in the User DefinedFunction Itself .
               There is option for Context and Queue While we are creating Function . If we select Queue is it eqivalent to Check box of Cache Entire Queue ? Is My assuption is correct  ?
              I want to cache the Entire Queue  ? Can you please tell me about this.
              My environment is like
    Session Information
    Application:
    Design: Integration Builder
    User:
    Test
    Logon Language:
    English
    Server:
    xidev_XID
    Server Node:
    server0
    Runtime Environment
    Java version:
    1.4.2_13
    Java vendor:
    Sun Microsystems Inc.
    Version
    Service pack:
    10
    Release:
    645_VAL_REL
    Best Regards .,
    V.Rangarajan

    you advanced user defined functions are now known as 
    Enhanced Functions (Cache = Context or Cache = Queue)
    From Help -
    +Features
    Depending on which values are available in the cache for a user-defined function, different functions are available:
    ·        Simple Functions (Cache = Value)
    This function type can process individual input values of a field for each function call. Therefore, simple functions expect strings as input values and return a string.
    ·        Enhanced Functions (Cache = Context or Cache = Queue)
    This function type can process multiple input values of a field for each function call. Before you call the function, you can either import all the field values of a context or the whole queue for the field in an array.+
    Have this link as your reference - http://help.sap.com/saphelp_nw04s/helpdata/en/22/e127f28b572243b4324879c6bf05a0/content.htm

  • Calling ORACLE Store Procedure with parameters in user define function

    Hi everybody,
    We have a scenario connecting Oracle DB thru JDBC adapter.
    We have to call store procedure with input parameter and output parameter to retrieve data from DB. The implementation was made using JDBC adapter by building the correct XML message with EXECUTE action, and it works fine.
    Now we need to use DB lookup within mapping. I wrote users define function with SELECT statement (using the JDBC adapter) and it works fine but I need to call store procedure in ORACLE instead of SELECT statement.
    I found lot of examples concerning DB lookup but none of them explained how to write UDF calling store procedure in ORACLE with input and output parameters.
    I am looking for an example.
    Thanks in advance,
    Gigi

    I agree with you, but issue is we have lots of existing store procedure, which we need to call where damn required. I am sure those will be few but still i need to find out.
    If you think you are going to get existing MS Stored Procedures  or Oracle Packages that had nothing to do with the ORM previously to work that are not geared to do simple CRUD operations with the ORM and the database tables, you have a rude awakening
    coming that's for sure. You had better look into using ADO.NET and Oracle Command objects and call those Oracle Packages by those means and use a datareader.
    You could use the EF backdoor, call Oracle Command object and use the Packages,  if that's even possible, just like you can use MS SQL Server Stored Procedures or in-line T-SQL via the EF backdoor.
    That's about your best shot.
    http://blogs.msdn.com/b/alexj/archive/2009/11/07/tip-41-how-to-execute-t-sql-directly-against-the-database.aspx

  • InvocationTargetException in User Defined Function in Oracle CEP

    I was trying to use a UDF in my CQL query. But I got the following error:
    An InvocationTargetException was encountered while attempting to register the user defined function
    "mymod".  The message was: null
    My code snippet is bellow:
    Bean:
    package com.bea.wlevs.example.function;
    import com.bea.wlevs.oracle.ci.event.CiMessages;
    public class UpdateMessage  {
        public CiMessages addChannel(CiMessages cm, String channel){
            System.out.println("I am in function");
            cm.setChannel(channel);
            return cm;
    config.xml:
    <processor>
    <name>CiRuleEngine</name>
    <rules>
    <query id="filterRule"> <![CDATA[ select addChannel(*,"SMSData") from DCInputChannel[now] as dc ]]> </query>
    </rules>
        </processor>
    content.xml:
    <wlevs:processor id="CiRuleEngine">
    <wlevs:listener ref="IntermediateChannel" />
    <wlevs:function function-name="mymod" exec-method="addCHannel">
    <bean class="com.bea.wlevs.example.function.UpdateMessage"/>
    </wlevs:function>
        </wlevs:processor>
    Can any one help me to resolve this error?

    The asterisk * in invocation addChannel(*,"SMSData") does not mean the event object. This is the cause of the exception.
    For your case, it's much easier to implement a userbean to do the insertion of the channel.
    Thanks
    Junger

  • Converting db2 user defined functions to oracle .

    Hi gurus
    this is a user defined function for getting current timestamp for a null value how to do this in oracle .i am getting a problem at the input values.can anyone suggest me the changes to convert it into oracle udfs.
    drop function Get_DateId()
    CREATE FUNCTION Get_DateId()
    RETURNS BIGINT
    BEGIN ATOMIC
    DECLARE      R BIGINT;
    DECLARE      v_Day CHAR(2);
    DECLARE      v_Month CHAR(2);
    DECLARE      v_Year CHAR(4);
         SET V_Day     = SUBSTR( DIGITS (DAY(CURRENT DATE)),9);
         SET V_Month     = SUBSTR( DIGITS (MONTH(CURRENT DATE)),9);
         SET V_Year     = RTRIM(CHAR(YEAR(CURRENT DATE)));
         SET R= BIGINT(v_Year||V_Month||V_Day|| '00000000' );
    RETURN R ;
    END
    @

    You'll need to get the syntax for PL/SQL function calls right. You will need something like
    create or replace function whatever( arg datatype, arg datatype...) return varchar2 is
      --define any local variables here
    begin
       return to_number(to_char(systimestamp,'the edit mask you want to use'));
    end;
    /You might do the conversion inline and dispense with the function compeletly if you're just generating a value.

  • Writing user defined function the same way as the oracle functions

    Hi Guys,
    In one of the interviews , I have attended the guy asked me to write a user defined function which will take the column name and list all the values .
    For example
    Table Name:Employees
    Column Name: Employee_Name
    Employee_name
    Scott
    Ivgun
    Jack
    Shane
    The query should be in this fromat
    SELECT col_agg(Employee_name) emp_name from Employees;
    The output shoulld be
    Emp_names
    scott,ivgun,jack,shane
    Please let me know if this is possible
    Any suggestions will be highly appreciated.
    Thanks,
    Ranjan

    You could certainly write a user defined aggregate function if you like...
    e.g. this function will aggregate strings into a CLOB...
    create or replace type clobagg_type as object
      text clob,
      static function ODCIAggregateInitialize(sctx in out clobagg_type) return number,
      member function ODCIAggregateIterate(self in out clobagg_type, value in clob) return number,
      member function ODCIAggregateTerminate(self in clobagg_type, returnvalue out clob, flags in number) return number,
      member function ODCIAggregateMerge(self in out clobagg_type, ctx2 in clobagg_type) return number
    create or replace type body clobagg_type is
      static function ODCIAggregateInitialize(sctx in out clobagg_type) return number is
      begin
        sctx := clobagg_type(null) ;
        return ODCIConst.Success ;
      end;
      member function ODCIAggregateIterate(self in out clobagg_type, value in clob) return number is
      begin
        self.text := self.text || value ;
        return ODCIConst.Success;
      end;
      member function ODCIAggregateTerminate(self in clobagg_type, returnvalue out clob, flags in number) return number is
      begin
        returnValue := self.text;
        return ODCIConst.Success;
      end;
      member function ODCIAggregateMerge(self in out clobagg_type, ctx2 in clobagg_type) return number is
      begin
        self.text := self.text || ctx2.text;
        return ODCIConst.Success;
      end;
    end;
    create or replace function clobagg(input clob) return clob
      deterministic
      parallel_enable
      aggregate using clobagg_type;
    SQL> select trim(',' from clobagg(ename||',')) as enames from emp;
    ENAMES
    SMITH,ALLEN,WARD,JONES,MARTIN,BLAKE,CLARK,SCOTT,KING,TURNER,ADAMS,JAMES,FORD,MILLER
    SQL> ed
    Wrote file afiedt.buf
      1  with t as
      2    (select 'PFL' c1, 0 c2,110 c3 from dual union all
      3     select 'LHL', 0 ,111 from dual union all
      4     select 'PHL', 1, 111 from dual union all
      5     select 'CHL', 2, 111 from dual union all
      6     select 'DHL', 0, 112 from dual union all
      7     select 'VHL', 1, 112 from dual union all
      8     select 'CPHL', 0, 114 from dual union all
      9     select 'WDCL', 1, 114 from dual union all
    10     select 'AHL' ,2 ,114 from dual union all
    11     select 'NFDL', 3, 114 from dual)
    12  --
    13  -- end of test data
    14  --
    15  select trim(clobagg(c1||' ')) as c1, c3
    16  from (select * from t order by c3, c2)
    17  group by c3
    18* order by c3
    SQL> /
    C1                                     C3
    PFL                                   110
    LHL CHL PHL                           111
    DHL VHL                               112
    CPHL AHL NFDL WDCL                    114Ok, it's more than just a function as it uses an object type linking into the internals of the ODCI... but it does what you ask. :)

  • How can I find user defined functions in oracle

    Hello All,
    I need to find out what are the user defined functions available in my schema?
    Please let me know on what system tables shall I query and find out the user defined functions?
    Thanks,
    Milind.

    Thanks Satish,
    One more query. Can I find what are the parameters that needs to be passed?
    Here is what I have to do..
    I have to find all the accessible user defined functions. If I select one of them in my UI, I need to show the parameters used in the respective function.
    Please let me know if these parameters are stored anywhere..
    Thanks again,
    Milind

Maybe you are looking for

  • How do I get all TIF files to automatically open into Photoshop?

    When I use Internet Explorer, I can set my computer so that all TIF files on a manuscript-editing website automatically open into Photoshop. This doesn't work with Mozilla, and I am always asked to select a program to open the file. Can I use Firefox

  • How to view videos in PDF on iPad.

    I have 2 tutorials that include embedded videos.  I put these PDFs on my iPad but can't get them to play.  Is this something that won't work?...only on computer?

  • Error provsioning OS

    I was attempting my first provisioning a host and recieved the following error: <p> <br>Gathering network information.. <br>     Client: 10.0.2.52 (10.0.2.0/255.255.255.0) <br>     Server: 10.0.2.3 (10.0.2.0/255.255.255.0, SunOS) <br>Adding myportal

  • Conversion of raw signal(e.g Temperature) into voltage.

    In case of conversion of analog signals, i.e. scaled signals into electrical signals, When I set the max-min range of the signal as default one, my application runs properly. But when I change it to some other value, it doesn't work for gain other th

  • Hi good evening this is sreenivas

    1. what is using of   "WBS" element i am sending this question. plz; reply me