Direct procedure call cached?

Hi,
running Listener 2.0.2.133.14.47 under WLS.
I have asked a similar question before but was not given a good answer, https://forums.oracle.com/thread/2292910
I have a packaged procedure that prints a web page using htp.p().
Sometimes (I cannot reproduce at will) the procedure's result is not updated when I refresh the page in the browser.
That is, pressing F5 (or Ctrl+F5) gives an old result.
I wrote and granted to apex_public_user this package:
CREATE OR REPLACE PACKAGE BODY callpack AS
PROCEDURE calltest (param varchar2 default null) IS
BEGIN
  htp.p('<div>You gave me "'||nvl(param,'&lt;null&gt;')||'". The time is '||to_char(sysdate,'HH24:MI:SS')||'</div>');
  for i in 1..1000 loop
    htp.p('<div>1000 rows of meaningless content</div>');
  end loop;
END calltest;
END callpack;
I called this from my browser like this: http://server/apex/my_schema.callpack.calltest
Initially I got a new time with every update (F5). After leaving it for a few minutes and trying again it got "stuck". Every refresh now gives me the same response.
The response header for this apparently cached page looks like this
Accept-Ranges    bytes
Age    1250
Connection    Keep-Alive
Content-Encoding    gzip
Content-Length    423
Content-Type    text/html; charset=UTF-8
Date    Thu, 07 Nov 2013 10:20:22 GMT
Vary    Accept-Encoding
X-ORACLE-DMS-ECID    632c140cd74ad62b:281ea775:1410befd01e:-8000-0000000000d03396
X-Powered-By    Servlet/2.5 JSP/2.1
I have also compiled and granted the above packaged procedure as standalone. This has (yet) not been cached. The response headers there:
Connection    Keep-Alive
Content-Length    49
Content-Type    text/html; charset=UTF-8
Date    Thu, 07 Nov 2013 10:20:08 GMT
X-ORACLE-DMS-ECID    632c140cd74ad62b:281ea775:1410befd01e:-8000-0000000000d04f52
X-Powered-By    Servlet/2.5 JSP/2.1
Besides from restarting the server, the only way I know of to make the listener actually call the procedure when caching is to change case in the url.
So if http://server/apex/my_schema.callpack.calltest is cached, I can get a new page using http://server/apex/My_schema.callpack.calltest
Or I can add a parameter (?param=X) that I change when I want new content.
Has anyone noticed this?
Is there some caching mechanism in the listener (when doing direct pl/sql-calls)? Or is it WebLogic doing something... sometimes...
Kind regards
Tomas Albinsson

TomasAlbinsson wrote:
Hi,
running Listener 2.0.2.133.14.47 under WLS.
The response header for this apparently cached page looks like this
Accept-Ranges    bytes 
Age    1250 
Connection    Keep-Alive 
Content-Encoding    gzip 
Content-Length    423 
Content-Type    text/html; charset=UTF-8 
Date    Thu, 07 Nov 2013 10:20:22 GMT 
Vary    Accept-Encoding 
X-ORACLE-DMS-ECID    632c140cd74ad62b:281ea775:1410befd01e:-8000-0000000000d03396 
X-Powered-By    Servlet/2.5 JSP/2.1 
I have also compiled and granted the above packaged procedure as standalone. This has (yet) not been cached. The response headers there:
Connection    Keep-Alive 
Content-Length    49 
Content-Type    text/html; charset=UTF-8 
Date    Thu, 07 Nov 2013 10:20:08 GMT 
X-ORACLE-DMS-ECID    632c140cd74ad62b:281ea775:1410befd01e:-8000-0000000000d04f52 
X-Powered-By    Servlet/2.5 JSP/2.1 
The first set of headers seem to indicate that part of your network flow recognizes that the content that it is returning to you was originally generated 1250 seconds ago - so something is caching.
Doing the same test on my Glassfish/Listener combination produces the following response heading:
X-Powered-By: Servlet/3.0 JSP/2.2 (Oracle GlassFish Server 3.1.2.2 Java/Oracle Corporation/1.7)
Server: Oracle GlassFish Server 3.1.2.2
Content-Type: text/html;charset=UTF-8
Content-Length: 63
Date: Wed, 20 Nov 2013 12:33:45 GMT
200 OK
This might indicate that the caching is occurring within your Weblogic setup or some other cache in the network?

Similar Messages

  • Securing Procedure Called from URL

    Hello all,
    I've read-up on creating procedures that can be called directly via a URL (ie. http://localhost:8080/apex/myschema.helloworld) by granting execute to anonymous and adding "MYSCHEMA.HELLOWORLD" to wwv_flow_epg_include_mod_local. I have a test procedure running.
    My question is, does anyone have any suggestions on how one might do this securely? Specifically I'm thinking I'd like to use one of these procedures to generate an XML stream of location information into a Google Map on one of my pages. As long as a user is in the app, I'm good because I know the user logged-in to get there. My concern is that some smart guy would get hold of the URL, pop it in the address bar and now has all the location data which may be sensitive.
    Couple things I tried:
    - granting execute to just apex_public_user incorrectly thinking that's what an ApEx application runs as (I forgot it runs as anonymous which is the same as someone who isn't logged in at all)
    - checking the value of v('APP_SESSION') inside the procedure, thinking if there's a session then the user must have logged-in - but it comes back null whether called from inside or outside the application. I suspect that when calling the procedure via a URL even from inside the app (like thru an iframe in an HTML region), it must kick off a new session.
    Any thoughts or suggestions, even something other than using a direct procedure call at all? My main priority is doing this securely.

    Hi,
    I have had similar requirements. I'm not sure I've solved it properly yet, but here's the sort of thing I did:
    1 - I updated the procedure to receive a parameter - this will be the ID of the user
    2 - In my database, I created a table that holds nothing but the IDs and a datetime value.
    3 - When the page loads that the user uses to get to this procedure, I update datetime value for the record for that user to, say, now + 1 minute
    4 - When called, the procedure then checks the ID in that table to see if the datetime value is &gt; now - if it is, then the download proceeds, otherwise, nothing
    You could probably also do something with a random number created when the page loads. Pass this as another parameter and check it in the process.
    Andy

  • Initial error in call to procedure is cached

    Hi,
    I'm running Apex 4.1.0.00.32, with Apex Listener 1.1.3.243.11.40 in WebLogic 10.3.3.0.
    I've noticed that if I run a procedure (/apex/schema.procedure) and the first call is unsuccessful (because of an error in the procedure or lack of privilege), all later calls will also fail.
    Example, create this procedure:
    create or replace procedure bug as
    begin
    htp.p('Hello bug');
    end;
    Try to run it using the url http://<server>/apex/<schema>.bug
    The web page will show just "Not Found". The listener error log will show
    HTTP Status Code: 404 Requested url http://<server>/apex/<schema>.bug is not found.
    The problem now is lack of grant. So, do a "grant execute on bug to apex_public_user;".
    Refresh the web page but "Not Found" persists.
    There are now two options:
    - change the url to (for instance) http://<server>/apex/<schema>.Bug (ie change case)
    - restart the whole weblogic server (stopping the Apex deployment is not possible)
    As changing the case of the url is not practical if the application is generating links, a restart is the option left.
    Is this "caching" of initial failure the expected behaviour or have I missed some configuration?
    I have no caching enabled in the listener.
    Kind regards
    Tomas Albinsson
    Stockholm, Sweden

    why would the listener look up metadata for the procedure to call?
    Either the user has the correct procedure name and parameter names - the call succeeds.
    Or the name or some parameter is wrong - the call fails and is reported to the user.Hi Tomas,
    Let me just repeat again that I don't know exactly how the Apex Listener implements its database calls.
    My comments are based on my own experiences from writing the Thoth Gateway, which essentially does the same thing as mod_plsql and the Apex Listener, except it is written in .NET and runs on Microsoft IIS. See http://code.google.com/p/thoth-gateway/ for more details.
    One reason for caching the procedure metadata is this:
    Let's say you have a procedure with a parameter which is a "table of varchar2" (such as the f01, f02, etc. parameters in the "wwv_flow.accept" procedure in Apex). These can accept zero, one or more values, depending on how many times you have repeated that input element name on the HTML page.
    So the Listener receives a call for the "wwv_flow.accept" procedure with a single value for the "f01" parameter. Without looking in the data dictionary (see DBA_ARGUMENTS), there is no way the Listener can know that the f01 parameter is actually a "table of varchar2" (and needs to be bound as that datatype when invoking the stored procedure). If the value is bound as a string (plain varchar2) parameter, the procedure call fails.
    Now, there are at least two ways to handle this: You can either catch the error, assume it was really a "table of varchar2" parameter, and try again with that; or you can look it up in the data dictionary beforehand to avoid the error. In either case, it's not good for performance to do this for every procedure call.
    The Thoth Gateway actually works this way: It first checks whether it has cached metadata for the procedure. If not, it tries to call the procedure based on just the names and values. If this fails, it silently catches the error and then looks up the procedure metadata from the data dictionary to make sure the parameter types are correct. It then calls the procedure again (and hopefully that should be successful). Then the metadata is cached. Which means that any subsequent invocations of the same procedure don't need to go through the same work again.
    Looking up (and caching) the metadata also has another benefit: If there are input elements on the HTML page that do not correspond to parameter names in the procedure (perhaps some client-side JS framework added some input fields dynamically), then the procedure call would fail. You can see this in action using mod_plsql and DBMS_EPG (you get an error along the lines of "arguments in form not in procedure..."). However, the Thoth Gateway (and I believe also the Apex Listener) checks the incoming parameter names against the metadata, and just discards any parameter names/values that are not in the procedure.
    - Morten
    http://ora-00001.blogspot.com
    Edited by: mobra on Oct 20, 2011 10:52 AM

  • The Remote Procedure call failed error in Microsoft Direct Access configuration

    Hi,
    I have setup the Microsoft Base lab using Microsoft TLG, I have generated the IPHTTPS and NLS server certificate using the Microsoft PKI. After that I have installed the Microsoft Direct Access role but at the time of configuring the Remote Access Server
    it fails with the remote procedure call failed error.
    Could anybody help me to resolve this issue. I have searched a lot but no any solution found. It will be very helpful, if some one can point me where I did mistake.
    Thanks,
    Arif

    sql server services give error the remote procedure call failed [0x800706be] in sql server 2008.
    To resolve this issue, I executed the following mofcomp command in command prompt to re-register the *.mof files:
    mofcomp.exe "C:\Program Files (x86)\Microsoft SQL Server\100\Shared\sqlmgmproviderxpsp2up.mof".
    but it does not work.
    Plz give the exact soln to solve this error.
    So when you tried starting SQL server service it gave the error right  ?  or when you click on SQL server services in SQL server configuration manager(SSCM) you get this error. Can you be more clear.  As far as I read your question it has something
    to do with permission. Close SSCM window and this time  right click on SQL server configuration manager and select run as administrator and check if you can see SQL server services
    Please mark this reply as answer if it solved your issue or vote as helpful if it helped so that other forum members can benefit from it
    My Technet Articles

  • How to give ref cursor in VB procedure call

    This is my Oracle Sp
    CREATE OR REPLACE PROCEDURE CRD_DMAN.infy_usp_trades_by_broker_bkr
    ** Procedure name: CRD_DMAN.USP_TRADES_BY_BROKER
    ** Author's name: Infosys
    ** Date written: 04/11/07
    ** Description: Compliance Trade by Borker
    ** Maintenance history:
    ** Date Chg req# Name Remarks
    ** 04/11/07 Infosys Created
    p_ordercursor IN OUT infy_pkg_compliance_transact.cur_compliancetrade,
    p_startdate IN VARCHAR,
    p_enddate IN VARCHAR,
    p_fundcode IN cs_fund_config.parent_acct_cd%TYPE,
    p_clientcode IN ts_order_alloc.acct_cd%TYPE,
    p_brokercode IN ts_order_alloc.exec_broker%TYPE,
    p_reportname IN report_log.report_name%TYPE,
    p_callingapplication IN report_log.calling_application%TYPE,
    p_callinguser IN report_log.calling_user%TYPE
    IS
    --Declaring Local Variables
    v_owner VARCHAR2 (30);
    v_startdate VARCHAR2 (10);
    v_enddate VARCHAR2 (10);
    v_rowcount NUMBER:=0;
    v_logrec base_util_pkg.crd_log_record;
    exp_error EXCEPTION;
    v_fundcodevalue NUMBER;
    BEGIN
    BEGIN
    /*checking if the start date and end date are null and
    assigning the sysdate accordingly*/
    IF (TRIM(p_startdate) IS NULL )
    THEN
    v_startdate := TO_CHAR (SYSDATE, 'mm/dd/yy');
    ELSE
    v_startdate := p_startdate;
    END IF;
    IF (TRIM(p_enddate) IS NULL )
    THEN
    v_enddate := TO_CHAR (SYSDATE, 'mm/dd/yy');
    ELSE
    v_enddate := p_enddate;
    END IF;
    /*checking if fund code is null and assigning value accordingly*/
    IF TRIM (p_fundcode) IS NULL
    THEN
    v_fundcodevalue := 0;
    ELSE
    v_fundcodevalue := 1;
    END IF;
    /*checking if the reportname or calling user or calling
    application name*/
    IF (p_reportname IS NULL OR p_callinguser IS NULL
    OR p_callingapplication IS NULL)
    THEN
    RAISE exp_error;
    END IF;
    END;
    --opening and fetching the data into cursor
    v_logrec.start_time := SYSDATE;
    BEGIN
    OPEN p_ordercursor
    FOR
    SELECT
    oa.exec_broker EXEC_BROKER_CODE,
    b.bkr_name          EXEC_BROKER_NAME,
    oa.acct_cd CLIENT_CODE,
    f.acct_name               CLIENT_NAME,
    CASE WHEN (Exists (SELECT 1
                                       FROM cs_fund_broker fb
    WHERE rel_typ_cd IN('P','M')
    AND oa.exec_broker=fb.BKR_CD
                                       AND oa.acct_cd =fb.acct_cd))
                   THEN 'Y'
    ELSE 'N' END          DIRECTED_BROKER,
    COUNT ( distinct o.order_id) COUNT_TICKNUM,
    MAX (o.trade_date) TRADE_DATE,
    SUM (oa.exec_amt)               BASE_COST,
    SUM (oa.commision_amt)          TOTAL_COMMISSION,
         (SELECT ab.bkr_typ_cd FROM au_broker ab
         WHERE ab.au_change_date =(SELECT TO_TIMESTAMP(MAX(ab.au_change_date))
         FROM au_broker ab WHERE b.bkr_typ_cd != ab.bkr_typ_cd AND b.bkr_cd = ab.bkr_cd))
                                  BROKER_HISTORY
    FROM
    ts_order o
    JOIN ts_order_alloc oa ON (o.order_id = oa.order_id)
    JOIN cs_broker b ON(oa.exec_broker = b.bkr_cd)
    JOIN cs_fund f ON(oa.acct_cd = f.acct_cd)
    WHERE
    o.status = 'ACCT'
    AND oa.exec_broker = CASE WHEN TRIM (p_brokercode) IS NULL
              THEN oa.exec_broker
              ELSE TRIM(p_brokercode) END
    AND oa.acct_cd = CASE WHEN TRIM(p_clientcode) IS NULL
    THEN oa.acct_cd
    ELSE TRIM(p_clientcode) END
         AND ((0 = v_fundcodevalue) OR EXISTS (SELECT 1 FROM crd.cs_fund_config cf
              WHERE cf.parent_acct_cd =TRIM (p_fundcode)
         AND oa.acct_cd = cf.child_acct_cd))
         AND o.trade_date BETWEEN TO_DATE (v_startdate, 'mm/dd/yy')
    AND TO_DATE (v_enddate, 'mm/dd/yy')
    GROUP BY oa.exec_broker, b.bkr_name ,oa.acct_cd ,f.acct_name,oa.directed_broker,b.bkr_typ_cd,b.bkr_cd;
    END;
    BEGIN
    SELECT
    owner
    INTO
    v_owner
    FROM
    all_objects
    WHERE
    object_name = 'INFY_USP_TRADES_BY_BROKER_BKR';
    v_logrec.end_time := SYSDATE;
    v_logrec.user_code := v_owner;
    v_logrec.input_param_values := 'INFY_USP_TRADES_BY_BROKER_BKR,'
    || v_startdate
    || ','
    || v_enddate
    || ','
    || p_fundcode
    || ','
    || p_clientcode
    || ','
    || p_brokercode;
    v_logrec.report_name := p_reportname;
    v_logrec.object_name := 'INFY_USP_TRADES_BY_BROKER_BKR';
    v_logrec.rows_returned := v_rowcount;
    v_logrec.calling_application := p_callingapplication;
    v_logrec.calling_user := p_callinguser;
    END;
    BEGIN
    --calling the procedure to insert values into the report_log table
    COMMIT;
    SET TRANSACTION READ WRITE;
    base_util_pkg.crd_base_util_proc (v_logrec);
    SET TRANSACTION READ ONLY;
    END;
    EXCEPTION
    WHEN exp_error
    THEN
    DBMS_OUTPUT.put_line ('ERROR');
    WHEN OTHERS
    THEN
    DBMS_OUTPUT.put_line ('ERROR OCCURED' || SQLCODE);
    DBMS_OUTPUT.put_line (SQLERRM);
    END infy_usp_trades_by_broker_bkr;
    END OF CRD_DMAN.USP_TRADES_BY_BROKER
    This is my Pakage from where i am using ref cursor
    CREATE OR REPLACE PACKAGE CRD_DMAN.infy_pkg_compliance_transact
    AS
    ** Package name : CRD.INFY_PKG_COMPLIANCE_TRANSACTIONS
    ** Author's name : Infosys
    ** Date written : 06/11/07
    ** Project/System : CRD
    ** Description : Compliance Trades By Borker Package
    ** Maintenance history:
    ** Date Chg req# Name Remarks
    ** 06/11/07 CRD Infosys Created
    --Defining The ComplianceTrade Record DataType
    TYPE rec_compliancetrade IS RECORD (
    exec_broker_code crd.ts_order_alloc.exec_broker%TYPE,
    exec_broker_name crd.cs_broker.bkr_name%TYPE,
    client_code crd.ts_order_alloc.acct_cd%TYPE,
    client_name crd.cs_fund.acct_name%TYPE,
    directed_broker crd.ts_order_alloc.directed_broker%TYPE,
    count_ticknum crd.ts_order.order_id%TYPE,
    trade_date crd.ts_order.trade_date%TYPE,
    base_cost crd.ts_order_alloc.cur_base_mkt_val%TYPE,
    total_commission crd.ts_order_alloc.commision_amt%TYPE,
    broker_history     crd.au_broker.bkr_typ_cd%TYPE
    --Declaring a variable of rec_auditdata data type
    TYPE cur_compliancetrade IS REF CURSOR
    RETURN rec_compliancetrade;
    END infy_pkg_compliance_transact;
    END OF CRD.INFY_PKG_COMPLIANCE_TRANSACTIONS
    How to call this SP from VB code with ref cursor parameter?

    I'm fairly sure that's not possible, since there's nothing in the ODBC spec to allow for ref cursors. The driver has built in support to check for ref cursors that are returned via a stored procedure call, but there's nothing built into the driver to pass one IN. Since a ref cursor can't be constructed on the client side, you'd have to have some sort of structure that allowed you to reference the ref cursor directly in order to be able to pass one back to the database.
    Since you're using VB.NET anyway, the better solution is probably just to use ODP.NET instead, which DOES allow you to reference a ref cursor directly, and there are samples that install with ODP.NET that show you how to do that.
    Greg

  • Error 'ORA-01403 no data found', if a procedure called through $Universe

    Hello,
    we use at our customer the scheduling software $Universe. The problem follows is happend at calling PL/SQL-procedures within SQL*Plus:
    Within the calling procedur another subprogram will be called. This program crashed on select of currval with the error 'ORA-01403 no data found'. This error happens only, if the procedure called through $Universe. If the procedure called directly from SQL*Plus or about a unix shell-script, no error happens.
    About the command "select saddr,sid,serial# from sys.V_$SESSION where
    username ='xxx';" we select the Session_ID's. These are identically before and after call of the procedure!
    Do you have an idea, how the problem can be?
    Next information about OS, releases, settings of Oracle-Session-Parameters, and the crashing procedure:
    SQL*Plus: Release 8.1.6.0.0 - Production on Fri Mar 15 13:25:05 2002
    (c) Copyright 1999 Oracle Corporation. All rights reserved.
    Connected to:
    Oracle8i Enterprise Edition Release 8.1.6.0.0 - Production
    With the Partitioning option
    JServer Release 8.1.6.0.0 - Production
    OS: HP-UX11
    ORACLE-Server NLS-parameters on HP-UX:
    NLS_LANGUAGE               AMERICAN
    NLS_TERRITORY               AMERICA
    NLS_CURRENCY               $
    NLS_ISO_CURRENCY          AMERICA
    NLS_NUMERIC_CHARACTERS          .,
    NLS_CALENDAR               GREGORIAN
    NLS_DATE_FORMAT               DD-MON-RR
    NLS_DATE_LANGUAGE          AMERICAN
    NLS_CHARACTERSET          WE8DEC
    NLS_SORT               BINARY
    NLS_TIME_FORMAT               HH.MI.SSXFF AM
    NLS_TIMESTAMP_FORMAT          DD-MON-RR HH.MI.SSXFF AM
    NLS_TIME_TZ_FORMAT          HH.MI.SSXFF AM TZH:TZM
    NLS_TIMESTAMP_TZ_FORMAT          DD-MON-RR HH.MI.SSXFF AM TZH:T
    NLS_DUAL_CURRENCY          $
    NLS_NCHAR_CHARACTERSET          WE8DEC
    NLS_COMP               BINARY
    Windows-desktop NLS-parameters:
    ALTER SESSION set NLS_LANGUAGE = 'GERMAN';
    ALTER SESSION set NLS_TERRITORY = 'GERMANY';
    ALTER SESSION set NLS_ISO_CURRENCY = 'GERMANY';
    ALTER SESSION set NLS_NUMERIC_CHARACTERS = ',.';
    ALTER SESSION set NLS_CALENDAR = 'GREGORIAN';
    ALTER SESSION set NLS_DATE_FORMAT = 'DD/MM/YY';
    ALTER SESSION set NLS_DATE_LANGUAGE = 'GERMAN';
    ALTER SESSION set NLS_SORT = 'GERMAN';
    ALTER SESSION set NLS_TIME_FORMAT = 'HH24:MI:SSXFF';
    ALTER SESSION set NLS_TIMESTAMP_FORMAT = 'DD.MM.RR HH24:MI:SSXFF';
    ALTER SESSION set NLS_TIME_TZ_FORMAT = 'HH24:MI:SSXFF TZH:TZM';
    ALTER SESSION set NLS_TIMESTAMP_TZ_FORMAT = 'DD.MM.RR HH24:MI:SSXFF
    TZH:TZM';
    ALTER SESSION set NLS_DUAL_CURRENCY = '?';
    ALTER SESSION set NLS_COMP = 'BINARY';
    PROCEDURE PROC_NEW_ID (p_value IN NUMBER,
    p_field IN VARCHAR2,
    p_table IN VARCHAR2,
    p_currval OUT NUMBER)
    IS
    v_stmt VARCHAR2(200);
    v_currval NUMBER;
    BEGIN
    -- Bildung des SQL-Statements.
    v_stmt := 'INSERT INTO '||p_table|| '('|| p_field || ') VALUES
    ('||p_value||')';
    -- Ausfuehren des SQL-Statements.
    EXECUTE IMMEDIATE v_stmt;
    COMMIT;
    -- Bildung des SQL-Statements.
    v_stmt := 'SELECT SEQ_'|| p_table || '.CURRVAL FROM DUAL';
    -- Ausfuehren des SQL-Statements.
    EXECUTE IMMEDIATE v_stmt INTO v_currval;
    -- Wertrueckgabe
    p_currval := NVL(v_currval,0);
    EXCEPTION
    WHEN OTHERS THEN
    pkg_mira_protokoll.proc_write_error_fwd
    (pkg_mira_consts.act_error,
    SQLCODE,
    SQLERRM(SQLCODE),
    'PROC_NEW_ID');
    p_currval := 0;
    RAISE;
    END;
    Thanks for your request!
    Best regards
    Esser Office Consulting KG
    J|rgen Esser

    This forum is for posting feedback about the OTN site.
    The best place for your question is probably a Portal forum.
    There is a list of Portal forums here:
    http://forums.oracle.com/forums/index.jsp?cat=13

  • Remote Stored Procedure Call Dispatcher WEB WERVICE

    Hello all,
    Environment: Windows OS, Oracle 10g, mod_plsql
    I am looking for solutions to the following problem:
    A way to dispatch calls to stored procedures from client to server with a minimal impact on performance.
    We are looking at two possible solutions:
    1) Making a call to a Remote Stored Procedure Call Dispatcher (RSPCDispatcher) stored procedure through mod_plsql.
    2) Making a call to a Remote Stored Procedure Call Dispatcher (RSPCDispatcher) stored procedure through a web service.
    Solution 1) is not the preferred one as you may already know that mod_plsql will not be supported starting 12g.
    Solution 2) is the one we prefer as we believe that web services will be ever more supported in the future. When we move to 11g we may turn this web service into a native one (avoiding overhead in the OC4J for hosting the web service etc.).
    We are looking for code examples and information pointers of how we could implement this dispatcher as a stored procedure in a DB package. We know that the implementation should be similar to the one done for mod_plsql in the OWA schema but the code there is obfuscated, so we could not borrow ideas from there.
    We are not sure how to deal with the generalization of the above stated problem. We need to be able to pass to this dispatcher the stored procedure package and name we are invoking, ordered list of parameters (or parameters map), and the transport strategy (XML, JSON, etc.).
    Basically, we are notsure how to deal with the USING clause of the EXECUTE IMMEDIATE statement. We can dynamically generate the SQL statement corresponding to the stored procedure we want to call, but we are not sure how to bind the parameters we are passing?
    Also, we know that EXECUTE IMMEDIATE may be slow sometimes. So if could avoid it, this could further improve performance.
    Perhaps the run-time generalized stored procedure execution may not be what we are looking for?! Perhaps we should include several design-time steps?! What about a script that given a package name (or just a single stored procedure) would generate a wrapper package which stored procudures' names would correspond to their respective counterparts in the given package which would take two parameters - the list of parameters in some sort of format, and the transport (content delivery strategy) and would return the result in the given content delivery strategy?! This script may also define the XSD of the XML message a stored procedure is called with (the parameter map) as well as the XSD of the XML result the stored procedure returns. Also the script could generate client code with the given language strategy (Java, .NET, etc.) for calling the RSPCDispatcher web service.
    We request the following from the Oracle community folks:
    a) Please, give us any relevant information that could be helpful to resolve this problem.
    b) Any resource of how to inspect stored procedures in a package, its parameters, parameter types and direction (IN, OUT, or INOUT), etc.
    Thank you very much in advance.
    Regards,
    Georgi

    Hello all,
    Environment: Windows OS, Oracle 10g, mod_plsql
    I am looking for solutions to the following problem:
    A way to dispatch calls to stored procedures from client to server with a minimal impact on performance.
    We are looking at two possible solutions:
    1) Making a call to a Remote Stored Procedure Call Dispatcher (RSPCDispatcher) stored procedure through mod_plsql.
    2) Making a call to a Remote Stored Procedure Call Dispatcher (RSPCDispatcher) stored procedure through a web service.
    Solution 1) is not the preferred one as you may already know that mod_plsql will not be supported starting 12g.
    Solution 2) is the one we prefer as we believe that web services will be ever more supported in the future. When we move to 11g we may turn this web service into a native one (avoiding overhead in the OC4J for hosting the web service etc.).
    We are looking for code examples and information pointers of how we could implement this dispatcher as a stored procedure in a DB package. We know that the implementation should be similar to the one done for mod_plsql in the OWA schema but the code there is obfuscated, so we could not borrow ideas from there.
    We are not sure how to deal with the generalization of the above stated problem. We need to be able to pass to this dispatcher the stored procedure package and name we are invoking, ordered list of parameters (or parameters map), and the transport strategy (XML, JSON, etc.).
    Basically, we are notsure how to deal with the USING clause of the EXECUTE IMMEDIATE statement. We can dynamically generate the SQL statement corresponding to the stored procedure we want to call, but we are not sure how to bind the parameters we are passing?
    Also, we know that EXECUTE IMMEDIATE may be slow sometimes. So if could avoid it, this could further improve performance.
    Perhaps the run-time generalized stored procedure execution may not be what we are looking for?! Perhaps we should include several design-time steps?! What about a script that given a package name (or just a single stored procedure) would generate a wrapper package which stored procudures' names would correspond to their respective counterparts in the given package which would take two parameters - the list of parameters in some sort of format, and the transport (content delivery strategy) and would return the result in the given content delivery strategy?! This script may also define the XSD of the XML message a stored procedure is called with (the parameter map) as well as the XSD of the XML result the stored procedure returns. Also the script could generate client code with the given language strategy (Java, .NET, etc.) for calling the RSPCDispatcher web service.
    We request the following from the Oracle community folks:
    a) Please, give us any relevant information that could be helpful to resolve this problem.
    b) Any resource of how to inspect stored procedures in a package, its parameters, parameter types and direction (IN, OUT, or INOUT), etc.
    Thank you very much in advance.
    Regards,
    Georgi

  • Exchange 2010 SP3 Failing to Install "The remote procedure call failed"

    I am getting an error while trying to upgrade the first Mailbox server in the organization to SP3. The CAS and HUB servers already upgraded without any issues. Any help is greatly appreciated.
    Here is the exchange setup logs output:
    [11/15/2014 09:10:52.0512] [2] Creating Server Object with DN = /dc=xxx/dc=xxx/cn=Configuration/cn=Services/cn=Microsoft Exchange/cn=xxx/cn=Administrative Groups/cn=Exchange Administrative Group (xxxx)/cn=Servers/cn=xxxxxx
    [11/15/2014 09:10:52.0512] [2]  Status code check (f:\14.03.0123\sources\dev\admin\src\libs\ds\x_dob.cxx:3370)
               Error code 0X8000500D (20493): This property can't be found in the cache.
    [11/15/2014 09:10:52.0528] [2] Leaving ScCreateServerObject
    [11/15/2014 09:10:52.0528] [2] Entering ScSetServerNetworkAddresses
    [11/15/2014 09:10:52.0528] [2] Entering ScGetServerDNSNameFromDS
    [11/15/2014 09:11:11.0482] [2]  ScUserDNFromLoginName (f:\14.03.0123\sources\dev\admin\src\libs\exsetup\exmisc.cxx:1441)
               Error code 0XC00706BE (1726): The remote procedure call failed.
    [11/15/2014 09:11:11.0482] [2]  ScGetServerDNSNameFromDS (f:\14.03.0123\sources\dev\admin\src\libs\exsetup\dsmisc.cxx:3481)
               Error code 0XC00706BE (1726): The remote procedure call failed.
    [11/15/2014 09:11:11.0482] [2] Leaving ScGetServerDNSNameFromDS
    [11/15/2014 09:11:11.0482] [2]  ScSetServerNetworkAddresses (f:\14.03.0123\sources\dev\admin\src\udog\excommon\ptudutil.cxx:1028)
               Error code 0XC00706BE (1726): The remote procedure call failed.
    [11/15/2014 09:11:11.0482] [2] Leaving ScSetServerNetworkAddresses
    [11/15/2014 09:11:11.0482] [2]  CAtomServer::ScAddOrRefreshDSObjects (f:\14.03.0123\sources\dev\admin\src\udog\exsetdata\components\server\a_server.cxx:288)
               Error code 0XC00706BE (1726): The remote procedure call failed.
    [11/15/2014 09:11:11.0482] [2]  CAtomServer::ScAddDSObjects (f:\14.03.0123\sources\dev\admin\src\udog\exsetdata\components\server\a_server.cxx:354)
               Error code 0XC00706BE (1726): The remote procedure call failed.
    [11/15/2014 09:11:11.0482] [2]  CBaseAtom::ScReinstall (f:\14.03.0123\sources\dev\admin\src\udog\setupbase\basecomp\baseatom.cxx:815)
               Error code 0XC00706BE (1726): The remote procedure call failed.
    [11/15/2014 09:11:11.0482] [2] Leaving CBaseAtom(Microsoft Exchange Server-Level Objects)::ScReinstall
    [11/15/2014 09:11:11.0482] [2] Service = '' CBaseServiceAtom::ScReinstall (f:\14.03.0123\sources\dev\admin\src\udog\setupbase\basecomp\basesvcatom.cxx:242)
               Error code 0XC00706BE (1726): The remote procedure call failed.
    [11/15/2014 09:11:11.0482] [2] Leaving CBaseServiceAtom(Microsoft Exchange Server-Level Objects)::ScReinstall
    [11/15/2014 09:11:11.0482] [2] mode = 'Reinstall' (61955) CBaseAtom::ScSetup (f:\14.03.0123\sources\dev\admin\src\udog\setupbase\basecomp\baseatom.cxx:537)
               Error code 0XC00706BE (1726): The remote procedure call failed.
    [11/15/2014 09:11:11.0482] [2]  ScSetupAtom (f:\14.03.0123\sources\dev\admin\src\udog\exsetdata\exsetds.cxx:882)
               Error code 0XC00706BE (1726): The remote procedure call failed.
    [11/15/2014 09:11:11.0482] [2] Leaving ScSetupAtom
    [11/15/2014 09:11:11.0482] [2] [ERROR] An error occurred with error code '3221685950' and message 'The remote procedure call failed.'.
    [11/15/2014 09:11:11.0482] [1] The following 1 error(s) occurred during task execution:
    [11/15/2014 09:11:11.0482] [1] 0.  ErrorRecord: An error occurred with error code '3221685950' and message 'The remote procedure call failed.'.
    [11/15/2014 09:11:11.0482] [1] 0.  ErrorRecord: Microsoft.Exchange.Management.Deployment.ExsetdataException: An error occurred with error code '3221685950' and message 'The remote procedure call failed.'.
    [11/15/2014 09:11:11.0482] [1] [ERROR] The following error was generated when "$error.Clear();
        buildToBuildUpgrade-ExsetdataAtom -AtomName Server -DomainController $RoleDomainController
    " was run: "An error occurred with error code '3221685950' and message 'The remote procedure call failed.'.".
    [11/15/2014 09:11:11.0482] [1] [ERROR] An error occurred with error code '3221685950' and message 'The remote procedure call failed.'.
    [11/15/2014 09:11:11.0482] [1] [ERROR-REFERENCE] Id=AllADRolesCommon__ExsetdataServer Component=EXCHANGE14:\Current\Release\Shared\Datacenter\Setup
    [11/15/2014 09:11:11.0482] [1] Setup is stopping now because of one or more critical errors.
    [11/15/2014 09:11:11.0482] [1] Finished executing component tasks.
    [11/15/2014 09:11:11.0529] [1] Ending processing Install-MailboxRole
    [11/15/2014 09:14:12.0977] [0] End of Setup
    [11/15/2014 09:14:12.0977] [0] **********************************************
    Additionally here is the 2 errors that are showing up in the event viewer for MSExachange Management:
    Exchange Management Console-Local
    2652
    45
    00:00:18.9698426
    View Entire Forest: 'True', Configuration Domain Controller: 'domaincontroller.xxx.xxx', Preferred Global Catalog: 'domaincontroller.xxx.xxx', Preferred Domain Controllers: '{ domaincontroller.xxx.xxx }'
    Microsoft.Exchange.Management.Deployment.ExsetdataException: An error occurred with error code '3221685950' and message 'The remote procedure call failed.'.
    0
    Exchange Management Console-Local
    2652
    9
    00:00:37.7834262
    View Entire Forest: 'True', Configuration Domain Controller: 'domaincontroller.xxx.xxx', Preferred Global Catalog: 'domaincontroller.xxx.xxx', Preferred Domain Controllers: '{ domaincontroller.xxx.xxx }'
    Microsoft.Exchange.Management.Deployment.ScriptExecutionException: The following error was generated when "$error.Clear(); buildToBuildUpgrade-ExsetdataAtom -AtomName Server -DomainController $RoleDomainController
    " was run: "An error occurred with error code '3221685950' and message 'The remote procedure call failed.'.". ---> Microsoft.Exchange.Management.Deployment.ExsetdataException: An error occurred with error code '3221685950' and message 'The
    remote procedure call failed.'. --- End of inner exception stack trace ---
    0
    Microsoft.Exchange.Management.Deployment.ExsetdataException: An error occurred with error code '3221685950' and message 'The remote procedure call failed.'.

    Hi,
    Please try to remove the Water mark and Action keys under
    HKLM\SOFTWARE\Microsoft\Exchangeserver\V14\MailboxRole
    After that, reboot the server and rerun the set up.
    This issue due to Exchange failed set up was trying to resume the previously failed setup rather than starting completely over.
    Best Regards.

  • Stored Procedure call from JDBC sender for Oracle Database

    Hi,
    I have a requirement to call stored procedure using JDBC sender adapter for retriving data from an Oracle database.
    I need to execute first stored procedure call from Querry SQL statement and then trigger second stored procedure call for confirming the succesful retrival of those records from the update SQL statement.
    Querries:
    1. Can we trigger stored procedure from Update statement of JDBC sender.
    2. Can we call stored procedure from Querry statement, since I have read on other sdn threads that stored procedure calls on Oracle database are not allowed. If not possible to have "Execute stored procedure" would the function call (select * from table(function name)) work same as stored procedure.
    3. In a JDBC sender the Querry statement and Update statement are executed in same session call and same database connection. What happens if the querry statement was not succesful, would the update be still triggered.
    Please note PI does not have direct access to main table and hence the need to have separate stored procedure calls.
    The PI version is PI 7.11 sp4.
    Appreciate your inputs.
    Thanks.
    Siddhesh S.Tawate

    >1. Can we trigger stored procedure from Update statement of JDBC sender.
    I think not possible using update statement.
    > Can we call stored procedure from Querry statement, since I have read on other sdn threads that stored procedure calls on Oracle database are not allowed. If not possible to have "Execute stored procedure" would the function call (select * from table(function name)) work same as stored procedure.
    Yes using select query you can call stored procedure.
    >. In a JDBC sender the Querry statement and Update statement are executed in same session call and same database connection. What happens if the querry statement was not succesful, would the update be still triggered.
    No select and update handles in the same session using the same thread so if one transaction fails update should not proceed.

  • Function and procedure call overhead in PL/SQL

    ( I come from a programming background - java/c++ etc and not much PL/SQL )
    Im trying to get a feel of how much extra cycles are spent if something is wrapped inside a function or procedure. I mean will it become considerably inefficient if the logic is within a function as opposed to be directly inline ?

    I did some timings a few years ago and found procedure calls to be slightly more efficient than function calls, presumably due to the fact that functions must pass values back through the function invocation and procedures don't. This may have changed in more recent releases but you can check it yourself.
    Set up a function and a procedure and use dbms_utility to get a starting and ending time marker (this will be the number of seconds from an arbitrary start point as microseconds; you will have to convert). Get a start time, loop through the calls a lot of times, get and end time, and subtract the end time from the start time.
    The prevailing though is that use functions to return values and procedures to perform actions. You can use functions in SQL if written correctly but not procedures.

  • Can a SQL Server stored procedure call an SAP function module?

    Can a SQL Server stored procedure call an SAP function module.? The stored procedure will be called via a trigger when data records are added to a Z table.

    You have two options:
    - the other software can use the RFC SDK and call directly in the system
    - the other software can use a database connect
    Markus

  • Diff char in variable and procedure call

    I understand the difference between Char en Varchar. What I don't understand is the different behaviour of Char when assigning a plain variable and when assigning a procedure call variable. I've created this sample code:
    declare
      v char;
      procedure t (i char) as
      begin
        if i = ' ' then
          dbms_output.put_line('ok');
        else
          dbms_output.put_line('else');
        end if;
      end;
    begin
      v := '';
      t('');
      t(' ');
      t(null);
      t(v);
    end;
    else
    ok
    else
    ok
    PL/SQL-procedure is geslaagd.The first (t('')) call and last (t(v)) call I think should result in the same answer, but apearantly, when v is assigned, a space is passed into the variable (sounds correct according to documentation), but when i is directly assigned, a null is assigned, rather than a space.
    Does anyone know what the explanation is for this behaviour?
    Thanx,
    Lennert
    ps, I'm not looking for a solution or a work around, I'm just interested in the background.
    pps, I'm running O8174 on HPUX

    x CHAR;
    It's default length is one but if you don't assign a value, it's value is null and its length is null. The empty string ('') is not null, so the assignment x := '' will assign a value of space, since PL/SQL pads with spaces to fill the length.
    PROCEDURE test is
    x char;
    BEGIN
    dbms_output.put_line('x = >' || x || '< , the length of x is: ' || to_char(length(x)));
    x := null;
    dbms_output.put_line('x = >' || x || '< , the length of x is: ' || to_char(length(x)));
    x := '';
    dbms_output.put_line('x = >' || x || '< , the length of x is: ' || to_char(length(x)));
    dbms_output.put_line(to_char(ascii(x)));
    x := ' ';
    dbms_output.put_line('x = >' || x || '< , the length of x is: ' || to_char(length(x)));
    END test;
    SQL> execute test.proc1
    x = >< , the length of x is:
    x = >< , the length of x is:
    x = > < , the length of x is: 1
    32
    x = > < , the length of x is: 1

  • 1. The procedure called by CUSTOM.pll causes the problem when we use f60gen

    When CUSTOM.pll contains a call to a package that in turn calls a remote package, the CUSTOM.pll compile hangs forever.
    1. The procedure called by CUSTOM.pll causes the problem when we use f60gen. Though same procedure compiles successfully using "alter procedure compile" command.
    2. We have observed the problem happens due to synonym present on the remote database(db link).
    It doesn’t work if you are calling SYNONYM on remote database. It works, for calls to tables or procedures or packages in remote database if that object is OWNED DIRECTLY by the account to which dblink is connecting to.
    select object_name, object_type from user_objects@NH_SCM_ICE.DB.ATT.COM ;
    OBJECT_NAME OBJECT_TYPE
    FA_LOCATIONS SYNONYM
    FND_FLEX_VALUES SYNONYM

    The database link is created under the APPS user in the local database but connects to a different user (SWCS_ICE_SUPCHAIN) in the remote database.
    The user in the remote database does not own any objects. It only has synonyms to objects owned by apps and others.
    Incidentally, the hang also happens when trying to describe the remote package from the application tier (8.0.6.3 sqlplus) but the describe works fine from the DB tier (10gR2 sqlplus).

  • Error #5 - XMLExporter - Invalid procedure call or argument c:

    MS Access version installed on machine
    * Version of MDB file - 2002
    * Operating System - Windows Server 2003
    * Service Pack version - Service Pack 2
    * Is it a linked MDB file? Tables already linked to Oracle Backend
    * Version of Exporter tool used - 10.2.0.2.0
    * Have you carried out the steps to analyse your MDB file to remove erroneous/invalid objects? Yes
    Using the Exporter I keep gettin this Error message after about 3sec
    Error #5 - XMLExporter - Invalid procedure call or argument c:<Location of .mdb> Database Schema did not complete successfully
    Would somebody by any chance know what wrong. I ran the documenter and everything seems to be fine
    Thanks

    Hi Roger,
    Can you please confirm that you carried out the steps outlined in the Diagnosing Exporter Problems announcement - http://forums.oracle.com/forums/ann.jspa?annID=376 ?
    I have been unable to reproduce the reported error with the 2002 Exporter, so for the time being, I would recommend that you continue using the 2000 version. It would be very helpful if I could obtain a copy of your MDB file (a copy of the MDB file without the data would suffice). I could then use it in an attempt to replicate the issue, and resolve it for a future release of the Exporter tool. If possible, could you please update your profile with your email address so I can contact you directly.
    Regards,
    Hilary

  • With ext. monitor high system load by Deferred Procedure Calls (DPC)

    After booting my Thinkpad E540 with an external monitor connected, one core is 50% busy with Deferred Procedure Calls (DPC) and it runs constantly at 100% clock speed (2.2 GHz). See picture below.
    After unplugging / reconnecting the HDMI cable the system load goes down to almost 0% and the clock to about 40 %, as it should.
    It looks like a driver problem.
    How to reproduce it:
    (1) The Monitor is connected via HDMI, then power on the Thinkpad while shortly opening the Thinkpad.
    (2) After logging in, the Task Manager shows 50% load at one core, the Ressource Monitor shows that all the load is consumed by Deferred Procedure Calls and that the clock is constantly at 100 %.
    (3) Open the Thinkpad and disconnect the HDMI cable. The load goes down to almost zero and the clock below 50%, as it should be.
    (4) Reconnect the HDMI cable and the load stays at almost zero.
    Some Details:
    Thinkpad E540, i7-4702MQ, 8 GB, screen resolution 1920 x 1080
    Monitor HP LP2275w, resolution 1680 x 1050
    Win7 64bit SP1, up to date by Windows and ThinkVantage systemupdate
    The intel IGP is active (not Geforce 740M).
    It does _not_ matter if only the external screen is activated or the internal and externale are expanded or duplicated in the display settings of Windows.
    Has someone else the same problem?
    Any ideas what I can do?
    Here you see it:
    Link to picture
    Moderator note; picture(s) converted to link(s) About Posting Pictures In The Forums
    Solved!
    Go to Solution.

    Problem solved, with some help (here and here).
    Basically, the solution was the installation of a new intel HD 4600 Graphics driver directly from intel.

Maybe you are looking for