Executing Procedure

hi
Edited by: 786304 on May 25, 2011 12:13 PM

Try this code
BEGIN
   gen_sender_receiver_info_main (TO_DATE ('01-01-2010 00:00:00',
                                           'MM-DD-YYYY HH24:MI:SS'
                                  TO_DATE ('04-01-2010 00:00:00',
                                           'MM-DD-YYYY HH24:MI:SS'
                                  'FLORIDA'
END;

Similar Messages

  • How to execute procedure in toad software

    hiii guy's i run my procedure on sql prompt and it run properly
    but when i tried this on toad i got an problem
    after compiling my procedure on toad
    when i write
    execute procedure_name(parameter1,parameter2);
    then i get an error i.e
    ORA-00900: invalid SQL statement
    can someone tell me how to execute procedure on toad
    thanks in adv...........

    how to execute procedure in toad softwareIn TOAD's schema browser you can go to the procedures tab - right click on the procedure in question and choose execute procedure - a window should pop up, where you can give optional parameters - the rest should be almost self explanatory ;)

  • How to execute procedure in SQL Worksheet ?

    Hi, anybody know, how I can execute procedure here?
    I try EXEC sec_roles, EXEC security_admin.sec_roles, EXECUTE - there is a SQL statement error. When I use CALL - there is no such procedure (I have execute previleges).
    Although in SQLPlus EXEC works, but there are problems with standard SQL commands (all of them returns "2" no matter what content is).
    Any ideas?
    Regards
    Krzysztof

    exec procedure(parameters) is a sql plus (and a few others) shortcut for
    BEGIN
       procedure(parameters);
    END;So try that then pressing/clicking whatever it is in sql worksheet that makes a statement run.
    Note that if your procedure has parameters defined as OUT or IN OUT, you will need to supply a variable to accept the returned value(s).
    John

  • Execute procedure error (Native SQL)

    Hi experts,
    I create a procedure
      EXEC SQL.
        create or replace procedure update_zsmadiprinc
        is begin
                              ( p_codigo         in  number(5),
                                p_ano            in  varchar2(4),
                                p_doc_vlr_princ in  varchar2(10)
                                p_subrc       out number ) is begin
          update T_INTERF_RESSARC_FORNEC_R3
          set   ano_doc              = p_ano,
                NUM_DOC_VALOR_PRINC  = p_doc_vlr_princ,
          where cod_interf_ressarc_fornec_r3 = p_codigo;
          if sql%found then
            p_subrc := 0;
          else
            p_subrc := 4;
          end if;
        end;
      ENDEXEC.
    and execute it
      EXEC SQL.
        execute procedure update_zsmadiprinc
                         (in  :wa-cod_interf,
                          in  :wa-ano_doc,
                          in  :wa-num_doc_valor_princ,
                          out :vg_subrc)
      ENDEXEC.
    But when i execute the procedure, shows dump error:
    Database error text........: "ORA-06550: line 1, column 7:#PLS-00905: object
    UPDATE_ZSMADIPRINC is invalid#ORA-06550: line 1, column 7:#PL/SQL:   
    Statement ignored#"                                                        
    Triggering SQL statement...: "CLOSE "                                       
    Internal call code.........: "[DBDS/NEW DSQL]"                              
    Please check the entries in the system log (Transaction SM21).              
    I comment all source, and the error is the same.
    When i create the procedure, no erros are show.
    I changed the name of the procedure, the type of parameters, and now i comment all and the error always is the same!!!! Can you help me!!! I need to finish this urgently!
    Thanks in advance
    Message was edited by:
            RP

    It is not possible to create a procedure, then, i just execute sql direct.
    thanks

  • Execute PROCEDURE in ORACLE

    I try to execute procedure on ORACLE(8i) but get err SQLException ..
    but for SELECT UPDATE INSERT statements all is OK!!
    for SELECT, UPDATE, INSERT I wrote such code:
    Statement stmt = conn.createStatement();
    String strExec="SELECT ...."
    stmt.executeQuery(strExec); (OR stmt.executeUpdate(strExec);)for proceure I wrote
    strExec = " my_proc() ";
    stmt.execute(strExec);what is wrong here??

    Try like this,
    CallableStatement cstm = con.prepareCall("{ call my_proc }");
    cstm.executeUpdate();
    Sudha

  • While executing procedure it is giving Error in the TT IMD

    Hi Chris,
    Main User Cacheuser (Cache Admin User)
    Other User Interchange (TimesTen User - Same name as Oracle 11g Database User)
    Normally we are connecting through cacheuser to create any objects in the Interchange user.
    I have created procedure in the Interchange user from cacheuser cache admin user.
    Procedure is created in the Interchange user. but when i am executing that same procedure in the cacheuser user
    -- Pl/Sql block executing from cacheuser
    declare
    sOutPut varchar2(4000);
    begin
    interchange.#procedurename# ('123456', sOutPut);
    end;
    After executing we are getting error:
    failed,[TimesTen][TimesTen 11.2.1.3.0 ODBC Driver][TimesTen]TT5227: Insufficient privileges error occurred while performing an Oracle operation in OCIStmtExecute(): ORA-01031: insufficient privileges rc = -1. -- file "bdbStmt.c", lineno 3868, procedure "ttBDbStmtExecute()"
    then we have issued following command for privilege, but still it is coming same error.
    grant execute on interchange."procedurename" to cacheuser;

    Hi Chris,
    Previously PassThrough=1 (we have kept this parameter to access oracle objects from TT IMD) it was there in our sys_odbc.ini file, but after that we have created procedure in the TimesTen and also created all objects related to that procedure in the TimesTen database. and due to that we have removed passthrough entry from sys_odbc.ini file because all object we created in the TimesTen database.
    Purpose of creating all objects related to that procedure in the TimesTen database was we tried to compiled procedure in the TimesTen IMD and the some obejcts inside procedure refered from Oracle 11G database that time it was shown error "table does not exist".
    Note : That time PassThrough parameter set was "1".+
    Currently we are executing procedure through TimesTen Database only. we have not yet checked through application.
    Can i have list of passthrough and the purpose of the same.

  • Error while executing procedure for excel upload

    Hi Friends
    Pl. find below error while executing procedure for loading excel data. pl. verify and suggest for any changes in the format of data.
    Rgds
    SriG

    If reading Excel as a database you would use "Access LSLINK"
    Access external means you are reading a file. I don't think it is possible to treat Excel as a file because the internal structure is complex.
    In the past I have saved the Excel as a CSV or as a Tab delimeted file. Then I use something like
    ACCESS External
      USE &filename
      BEGIN
        DESCRIPTION free ,
        Variables text 20
        Organisation text 20
        'July 2008' numeric 20
        'August 2008' numeric 20
        'September 2008' numeric 20
        'October 2008' numeric 20
        'November 2008' numeric 20
        'December 2008' numeric 20
        'January 2009' numeric 20
        'February 2009' numeric 20
        'March 2009' numeric 20
        'April 2009' numeric 20
        'May 2009' numeric 20
        'June 2009' numeric 20
      END
      peek
      read
    ... quit the access sub system
    END

  • Error in Executing Procedure through DBLink

    Hi,
    I am facing some problems in executing a procedure through DBLink.
    I have two schema A and B in two different database.
    In schema A I am having one procedure X in package Y and my requirement is that I want to execute this procedure in schema B. So in schema B i have created one DBLink ABC and trying to execute procedure X using this DB link.
    begin
    A.Y.X@ABC;
    end;
    But I am getting below error:
    ORA-06550: line 2, column 1:
    PLS-00201: identifier 'A.Y.X@ABC' must be declared
    ORA-06550: line 2, column 1:
    PL/SQL: Statement ignored
    Any help would be greatly appreciated!
    Thanks In Advance..
    Regards,
    Sachin Bansal

    Hi,
    Yes, I am connecting to user A of DB1 and in this user I am having procedure X in Package Y. My DBLink in Schema B of DB2 is pointing to user A of DB1.
    I have created DBLINK using below script:
    create public database link abc
    connect to A
    identified by A
    using '(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=XXX)(PORT=1521)))(CONNECT_DATA=(service_name=XXX)))';
    Above DBLInk is working fine..I am able to access all the table of schema A in schema B using this DBLink. But when I trying to execute any procedre of schema A in schema B then i am getting error.
    Regards,
    Sachin

  • Execute procedure in data base out of sap by dbcon

    Hi all
    I wish to execute procedure in outside oracle database
    And get as a result a cursor/list/table.
    The syntax in the abap help is:
    EXEC SQL.
    EXECUTE PROCEDURE PROC2 ( IN :Y, OUT :Z )
    ENDEXEC.
    This syntax treat only one filed OUT
    I am looking for the correct syntax for:
    Call procedure without IN data and get and be able to treat OUT data a cursor.
    Thanks

    Hi,
    Passing more than one input,just try this.
    EXEC SQL.
    CREATE OR REPLACE PROCEDURE proc_name ( X IN  number
    Z in number,
                                Y OUT number  )
    Y :=  X + Z;
    END proc_name;
    I don't think you can get more than one output.

  • How to use 'Execute Procedure' to retrieve table data from an ext. MS SQL ?

    Hi,
    We have to call a stored procedure from an external MS SQL database . We are able to connect to the database and are able to successfully do a SQL (Select ) on the SQL tables. However to maintain data integrity and other security issues, we have to call a stored procedure on that database  from SAP. The stored rocedure will return a table which will contain multiple records .
    We have tried using the EXECUTE PROCEDURE command. However it returns SQL errors?
    Our SAP instance is on MS SQL.
    Please note we have gone through all SAP notes and SDN already. The query is not about connecting to the database. It is solely to find out the correct way for calling the stored procedure. The example in the SAP help documentation is for single IN and OUT parameters. We are able to do that successfully. Our requirement is to get a table back from the stored procedure.
    Please help with the correct syntax and code example if you have one.
    I would be glad to provide any other information that may be helpful.
    Thanks in advance.

    Hi,
    I too have a similar issue, I have a stored procedure written in MS SQL and it executes but I need the result in an internal table; How do I get it into an internal table?
    Following code is being used. Now the output of the query that is being executed, I need it in my internal table
    EXEC SQL.
      EXECUTE PROCEDURE d01.Z_PRICINGREPORT ( IN :i_mandt,
                                              IN :i_kschl,
                                              IN :i_vkorg,
                                              IN :i_vtweg,
                                              IN :i_matkll,
                                              IN :i_matklh,
                                              IN :i_matnrl,
                                              IN :i_matnrh,
                                              IN :i_inco1,
                                              IN :i_inco2,
                                              IN :i_zsalel,
                                              IN :i_zsaleh,
                                              IN :i_kunnrl,
                                              IN :i_kunnrh,
                                              IN :i_chargl,
                                              IN :i_chargh,
                                              IN :i_vkburl,
                                              IN :i_vkburh,
                                              IN :i_vkgrpl,
                                              IN :i_vkgrph,
                                              IN :i_wrkstl,
                                              IN :i_wrksth,
                                              IN :i_mtf,
                                              IN :i_mtt,
                                              IN :i_datbi,
                                              IN :i_werks,
                                              IN :i_stock
    ENDEXEC.
    CATCH cx_sy_native_sql_error.
        MESSAGE `Error in procedure handling` TYPE 'I'.
    endtry.
    Warm Regards,
    Abdullah

  • Dbma_scheduler job executing procedure that loops through all client schemas in the database rolls back transaction incase of exception

    Hi,
    Needed your inputs on approach to implement a job using dbms_scheduler.
    We have around 2000 schemas. Each schema has a package with 2 procedures.
    The requirement is to create a single job in SYS that would loop through each schema and run the procedures at a specific time ( once a day) and send email notification on success or failure.
    Job script:
    BEGIN
        dbms_scheduler.create_job( job_name=> 'LOAD_EACH_SCHEMA_AUDIT_DATA',
                                   job_type=>'PLSQL_BLOCK',
                                   job_action=>'BEGIN  sys.p_loadaudit;     
                                    END;',
                                   start_date=>systimestamp,
                                   repeat_interval=>'FREQ=MINUTELY;INTERVAL=1',
                                   number_of_arguments=>0,
                                   enabled=> true,
                                   comments=>'Job repeat interval is every 5 mins' );
                                   END;
    Note: for testing purpose i have set repeat interval to minutely.
    Procedure job will be executing:
    Procedure sys.p_loadaudit:
    CREATE OR REPLACE
    PROCEDURE p_loadaudit
    AS
        v_count          NUMBER:= 0;
        lv_error_message VARCHAR2(4000);
        vstmt            VARCHAR2(4000);
    BEGIN
        FOR i IN
        ( SELECT username FROM dba_users WHERE username LIKE 'ABCFIRM%'
        LOOP
            vstmt:= 'begin ' || i.username || '.pkg_audit_info.p_load_coa; end;';
            EXECUTE immediate vstmt;
            vstmt:= 'begin ' || i.username || '.pkg_audit_info.p_load_am; end;';
            EXECUTE immediate vstmt;
        END LOOP;
    EXCEPTION
    WHEN OTHERS THEN
        lv_error_message := 'Error in procedure p_loadaudit: ' || SQLCODE || ' -ERROR- ' || SUBSTR(
        sqlerrm,1,300) || '*' || dbms_utility.format_error_backtrace;
        raise_application_error(-20002,lv_error_message);
    END p_loadaudit;
    Example of one schema: SCHEMA_01
    create or replace
    PACKAGE pkg_audit_info
    AS
    type cursortype
    IS
        ref
        CURSOR;
            PROCEDURE p_load_COA;
            PROCEDURE p_load_AM;
       END pkg_audit_info;
    create or replace
    PACKAGE body pkg_audit_info
    AS
    PROCEDURE p_load_COA
    AS
    BEGIN
    INSERT INTO TABLE1();
    EXCEPTION
    WHEN OTHERS THEN
        lv_error_message := 'Error in procedure pkg_audit_info.p_load_COA: ' || SQLCODE
        || ' -ERROR- ' || SUBSTR(SQLERRM,1,300) || '*' || dbms_utility.format_error_backtrace;
        RAISE_application_error(-20002,lv_error_message);
    END p_load_COA;
    PROCEDURE p_load_AM
    AS
    BEGIN
    INSERT INTO TABLE2();
    EXCEPTION
    WHEN OTHERS THEN
        lv_error_message := 'Error in procedure pkg_audit_info.p_load_AM: ' || SQLCODE ||
        ' -ERROR- ' || SUBSTR(SQLERRM,1,300) || '*' || dbms_utility.format_error_backtrace;
        RAISE_application_error(-20002,lv_error_message);
    END p_load_AM;
    END pkg_audit_info;
    Table1 and table1 exist in schema_01.
    All 2000 schemas have same package.procedures.
    Due to security reasons i have removed the actual code.
    I was able to execute the job successfully. However, when a schema procedure (SCHEMA_01.pkg_audit_info.p_load_COA) throws an exception, the job fails and all transaction is rolled back.
    Is there a way to loop through each schema and execute the related procedures. Even if exception happens, it should rollback only for that schema and continue the other schemas in the loop?
    Please let me know if there is a better way to achieve this. Is the way i am handling exceptions in the job/procedure correct?
    Thanks

    Hi,
    RAISE_APPLICATION_ERROR will cause the program to exit back to the caller, even if you place it in a block within the loop, so the RAISE or RAISE_APPLICATION_ERROR instruction should be placed in your "pkg_audit_info.p_load_AM" and "pkg_audit_info.p_load_coa" procedures. This way, you can use a block inside the loop and log the error.
    FOR i IN
        ( SELECT username FROM dba_users WHERE username LIKE 'ABCFIRM%'
        LOOP
           BEGIN
            vstmt:= 'begin ' || i.username || '.pkg_audit_info.p_load_coa; end;';
            EXECUTE immediate vstmt;
            vstmt:= 'begin ' || i.username || '.pkg_audit_info.p_load_am; end;';
            EXECUTE immediate vstmt;
    EXCEPTION
    WHEN OTHERS THEN  
        --> Log the error in a custom log table otherwise you will not know what happened for that schema: don't forget the username
    END;
    END LOOP;

  • EXEC SQL / EXECUTE PROCEDURE

    Hi,
    I´ve been asked to develop a program that should be run in background as a job.
    The aim of this program is to select certain data from SAP an then pass it to a DB (sql) outside SAP so that this DB always gets the most updated data.
    I´ve already set up an entry in table
    DBCON.
    My problem is that when I change the DB name in table DBCON the program does not work because it always “remembers” the former entry, that is, it re-uses the stored procedure already used in the former execution of the program. 
    Here goes the code:
      EXEC SQL.
        SET CONNECTION DEFAULT
      ENDEXEC.
      EXEC SQL.
        CONNECT TO 'TOMAS3' AS 'con'
      ENDEXEC.
      EXEC SQL.
        SET CONNECTION 'con'
      ENDEXEC.
      LOOP AT ti_vbap INTO wa_vbap.
        CLEAR: wa_itab, g_input.
        wa_itab-sapOrdID  = wa_vbap-vbeln.
        …………… etc
        CONCATENATE
                    wa_itab-sapOrdID
                    wa_itab-CopPos
                    wa_itab-isbn
                    wa_itab-isbnOLD
                    wa_itab-sta
                    wa_itab-dat
                    wa_itab-pte
                    wa_itab-snu INTO g_input.
    call to the stored procedure that updates the external DB
            EXEC SQL.
              EXECUTE PROCEDURE RefrescaCOPdeSAP_JOBSAP2 ( IN :g_input )
            ENDEXEC.
      ENDLOOP.
    *Close connection to external DB
      EXEC SQL.
        DISCONNECT 'con'
      ENDEXEC.
    Is there an statement like BEGIN TRANS… / COMMIT that is missing?
    Have you got an example so that I may have an idea of how to deal with this situation?.
    Best regards.

    Hi,
    i think i´ve found out where the problem is.
    In table
    DBCON i´ve got the following entry:
    MSSQL_SERVER=1XX.X0.X.X2 MSSQL_DBNAME=ESPAÑA
    it seems as if the character 'Ñ' causes the connection to fail.
    i´ve tried to connect to another DB where MSSQL_DBNAME=ESPANA (coy of the former one) and there was no problem.
    could it be that the character 'Ñ' is the cause of the problem?.Best regards.

  • Executing procedure for period

    Hi all,
    My need is to execute procedure with parameter date for period from 01.03.2011 till 31.03.2011.
    One way is to type dates one per line:
    EXEC schemename.pkg_name.procedure_name date '2011-03-01';
    EXEC schemename.pkg_name.procedure_name date '2011-03-02';
    EXEC schemename.pkg_name.procedure_name date '2011-03-30';
    EXEC schemename.pkg_name.procedure_name date '2011-03-31';But how do I execute it using more simple code?

    Hello
    It kind of depends what you mean by simpler. If you want to avoid having 31 separate calls to the procedure listed on 31 lines, you can use a loop like so...
    SQL> DECLARE
      2
      3      ldt_StartDate       DATE := TO_DATE('01/03/2011','dd/mm/yyyy');
      4      ldt_EndDate         DATE := TO_DATE('31/03/2011','dd/mm/yyyy');
      5
      6  BEGIN
      7
      8      FOR lc_Dates IN (   SELECT
      9                              ldt_StartDate + (rownum -1) dt
    10                          FROM
    11                              dual
    12                          CONNECT BY
    13                              LEVEL <= CEIL(ldt_EndDate - ldt_StartDate) + 1
    14                      )
    15      LOOP
    16          dbms_output.put_line(lc_Dates.dt);
    17      END LOOP;
    18
    19  END;
    20  /
    01-MAR-11
    02-MAR-11
    03-MAR-11
    04-MAR-11
    05-MAR-11
    06-MAR-11
    07-MAR-11
    08-MAR-11
    09-MAR-11
    10-MAR-11
    11-MAR-11
    12-MAR-11
    13-MAR-11
    14-MAR-11
    15-MAR-11
    16-MAR-11
    17-MAR-11
    18-MAR-11
    19-MAR-11
    20-MAR-11
    21-MAR-11
    22-MAR-11
    23-MAR-11
    24-MAR-11
    25-MAR-11
    26-MAR-11
    27-MAR-11
    28-MAR-11
    29-MAR-11
    30-MAR-11
    31-MAR-11
    PL/SQL procedure successfully completed.HTH
    David

  • Executing procedure at regular interval from java program

    hi,
    I want to write java program that will execute procedure at regular interval,
    please give me hint how it will happen??????

    Use THREAD and Thread.sleep

  • Java.sql.SQLRecoverableException when execute procedure

    Hi all,
    Exception is as follows when i execute procedure, it's running on Studio Edition Version 11.1.2.0.0 and Oracle Database 10g Enterprise Edition Release 10.2.0.3.0
    java.sql.SQLRecoverableException:java.sql.SQLRecoverableException: 无法从套接字读取更多的数据
         at org.apache.myfaces.trinidad.component.MethodExpressionMethodBinding.invoke(MethodExpressionMethodBinding.java:51)
         at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:102)
         at org.apache.myfaces.trinidad.component.UIXCommand.broadcast(UIXCommand.java:190)
         at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:787)
         at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:1252)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._invokeApplication(LifecycleImpl.java:965)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:346)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:204)
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:312)
         at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
         at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
         at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:173)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:121)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:468)
         at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:468)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:293)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:199)
         at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:111)
         at java.security.AccessController.doPrivileged(Native Method)
         at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:313)
         at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:413)
         at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:94)
         at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:161)
         at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:136)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3715)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
         at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277)
         at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)
         at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
    Caused by: com.faw_qm.dms.lmp.core.exception.QMLMPException
    faw qm-tds nestedException is:java.sql.SQLRecoverableException:java.sql.SQLRecoverableException: 无法从套接字读取更多的数据
         at com.faw_qm.dms.lmp.core.util.QMDBUtils.invokeProcWithReturn(QMDBUtils.java:932)
         at com.faw_qm.dms.lmp.view.wh.md.Wh04MB.doBatchSave(Wh04MB.java:314)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at com.sun.el.parser.AstValue.invoke(Unknown Source)
         at com.sun.el.MethodExpressionImpl.invoke(Unknown Source)
         at org.apache.myfaces.trinidad.component.MethodExpressionMethodBinding.invoke(MethodExpressionMethodBinding.java:46)
         ... 44 more
    java code is as follows:
    CallableStatement proc1 = dbt.createCallableStatement(procString, -1);
    try {
    for(int i = 0;i<inParamObjs.length;i++){
    proc1.setObject(i+1, inParamObjs);
    for(int i = 0;i<returnTypes.length;i++){
    proc1.registerOutParameter(i+1+paramLength, returnTypes[i]);
    proc1.execute();
    thanks in advance.

    Hi frank,
    at com.faw_qm.dms.lmp.core.util.QMDBUtils.invokeProcWithReturn(QMDBUtils.java:932)
    CallableStatement proc1 = dbt.createCallableStatement(procString, -1);
    try {
    for(int i = 0;i<inParamObjs.length;i++){
    proc1.setObject(i+1, inParamObjs);
    for(int i = 0;i<returnTypes.length;i++){
    proc1.registerOutParameter(i+1+paramLength, returnTypes);
    proc1.execute(); ( QMDBUtils.java:932,error in this )

  • Executing procedures on a mounted instance

    Hello,
    Can I execute procedures on an instance that's only mounted, not opened?
    To be more specific, I'm interested in changing the state of some user scheduler jobs before opening the instance - for that I need to use sys.dbms_scheduler.* (enable or disable), and it looks I can't do that while the instance is only mounted.
    Thank you for your help,
    Adrian

    No, I haven't, though I think it might work. I actually want to disable the jobs before opening the instance, restricted session or not.
    The case is a bit more complex: my DB is used by some application processes. I'm taking online backups, so that means the jobs will be marked as enabled in the backupset. In the case of a restore, I'm shutting down first the application processes, then I'm performing the restore. When I'm opening the instance after the restore, the scheduled jobs will be enabled, and will try to run, but without the application processes running (those are started a few minutes after), I will have some failed runs of those jobs. I'm trying to find a way to avoid this, but it seems there isn't one - I can disable the jobs after the "alter database open", and they will be enabled during the start of the application, but that doesn't guarantee me that in the seconds between the "open" and the execution of the PL/SQL procedure, no scheduled jobs will be run.
    Thank you for the suggestion.

Maybe you are looking for