Execute procedure problem

Hi,
I have this problem.
I have one procedure on first database (9.2.0.7) which is calling second procedure from it's body on second database (8.1.6.3.0) using dblink.
When I connect from my client node (10.2.0.4 Oracle client) on first database everything is OK, I execute procedure and I get some results, because I have four output values from procedure.
Problem is when I have tried to execute procedure from first database using it's client 9.2.0.7, I just don't get any output from it, but also I don't get any error.
It's look like that there is some communication problem between 9.2.0.7 and 8.1.6.
Example>
1) Good output:
execute vpku.pom_bscs_potr('190900641213696', '6275,07');
b_r 19-090-064-1213696
i_f 6275,07
out1 6275,07
out2 01/02/2009
out3 N
out4 1.1296014
PL/SQL procedure successfully completed.
2) Problematic output
execute vpku.pom_bscs_potr('190900641213696', '6275,07');
b_r
i_f
out1
out2
out3
out4
PL/SQL procedure successfully completed.
Any idea,
Thanks.

Hi,
What is the second parameter? Is this a number field? If so I think the problem will be setting of your environment, NLS_NUMERIC_CHARACTERS or THE NLS_LANGUAGE. This will define the decimal seperator, which I think is different on the two clients.
First thing to do, drop the above mentioned solution of an exception handling. This will hopefully yield the real error. Possibly ORA-01722, Invalid number.
Herald ten Dam
Superconsult.nl

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

  • 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 permissions problem

    user created a stored procedure in one database and got "unable to execute stored procedure from database name blah blah", copied the stored procedure to another database and user could then execute it. User has exactly the same mapping in
    both databases (i.e. db_datareader, db_datawriter, db_ddladmin) and is only in the server public role. why does he get the execute permissions problem on the firdt database? I have created a new user myself with the same mapping and get the same
    problem.  
    IGNORE THIS>> I can see what the problem is now, the EXECUTE effective permission is missing from the first database - anybody know how to create an effective permission?
    Update on the above following your much appreciated comments:-
    1. The full error message (with any sensitive detail masked out) is:-
    Msg 229, Level 14, State 5, Procedure xxxxxxxx, Line 1The EXECUTE permission was denied on the object 'xxxxxxxxx', database 'xxxxxxxxx', schema 'dbo'.
    2. The problem is one database automatically gives execute permission when a login is mapped to it (even with just the db_datareader role selected) but the other doesn't. To see the permissions I refer to, right click database select
    properties/permissions select the user and look at effective permissions, user has connect,execute and select (explicit permissions are connect only). The same login mapped to the other database has connect and select permissions only.
    I haven't given any explicit permissions to the login mapped to the first or second database so why does the first have the explicit execute permission granted atomatically and the second not?
    Even when I map the logins to the db_datawriter and db_ddladmin as well I still don't get effective execute permission on the second database. I know I can grant explicit permissions at schema or database level but do I don't have to do that
    on the first database. There are no specific permissions on the schemas (i.e. db_datareader/writer/ddladmin or dbo) to public role or users

    user created a stored procedure in one database and got "unable to execute stored procedure from database name blah blah",
    It might be your opinion that error messages are only blah blah, and it is not worth time reading them. However, there is often useful information in error messages, and next time you have a question, please include any error message in full. Even if the
    message is nonsense to you, it may not be to us.
    I can see what the problem is now, the EXECUTE effective permission is missing from the first database - anybody know how to create an effective permission?
    When you create a procedure in a schema, you don't become owner of the procedure, but the schema owner becomes owner of the procedure. And with no further rights, the creator can't execute. This can be resolved by granting the user EXECUTE permission
    on schema level or database level:
    GRANT EXECUTE ON SCHEMA::dbo TO developers  -- schema-level
    GRANT EXECUTE TO developers                 -- database-level
    As the example hints, you should grant to a role rather than an individual.
    Erland Sommarskog, SQL Server MVP, [email protected]

  • 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.

  • Cannot execute procedure

    there is a simple procedure in schema tk.
    I can execute procedure in user tk.
    But I cannot execute it by user sys.
    SQL> show user
    USER: "TK"
    SQL> exec TK.temp;
    PL/SQL succesfully completed
    SQL> show user
    USER: "SYS"
    SQL> exec tk.temp;
    BEGIN tk.temp; END;
    ORA-06550: line 1, column 7:
    PLS-00331: illegal reference to SYS.TK
    ORA-06550: line 1, column 7:
    PL/SQL: Statement ignored
    and here is the procedure
    CREATE OR REPLACE PROCEDURE TK.temp
    IS
    a VARCHAR2 (30);
    BEGIN
    SELECT SYSDATE
    INTO a
    FROM DUAL;
    END temp;
    /

    hi again the same problem
    SQL> conn tk/tk@orcl;
    connected.
    SQL> CREATE OR REPLACE PROCEDURE temp
    2 IS
    3 a VARCHAR2 (30);
    4 BEGIN
    5 SELECT SYSDATE
    6 INTO a
    7 FROM DUAL;
    8 END temp;
    9 /
    Procedeure succesffully...
    SQL> exec temp;
    PL/SQL successfully executed
    SQL> conn sys/****@orcl as sysdba
    Connected
    SQL> exec tk.temp;
    BEGIN tk.temp; END;
    ORA-06550: line 1, column 7:
    PLS-00331: illegal reference to SYS.TK
    ORA-06550: line 1, column 7:
    PL/SQL: Statement ignored

  • Error ORA-03113 when execute procedure via OEM

    Hi All,
    I got error messages
    ORA-03113: end-of-file on communication channel
    ERROR at line 1:
    ORA-03114: not connected to ORACLE
    when execute procedure via Oracle Enterprise Manager
    Who do you know what 's the problem and how can I resolves ?
    Thanks,
    Mcka

    Solution Description:
    =====================
    The ORA-3113 error is a general error reported by Oracle client tools,
    which signifies that they cannot communicate with the oracle shadow
    process. As it is such a general error more information must be collected
    to help determine what has happened.
    This short article describes what information to collect for an
    ORA-3113 error when the Oracle server is on a Unix platform.
    General Issues:
    ===============
    1) Is it only one tool that encounters the error or
    do you get an ORA-3113 from any tool doing a similar operation?
    If the problem reproduces in SQL*Plus, use this in all tests
    below.
    2) Check if the problem is just restricted to:
    [ ] One particular UNIX user,
    [ ] Any UNIX user
    or [ ] Any UNIX user EXCEPT as the Oracle user.
    3) Check if the problem is just restricted to:
    [ ] One particular ORACLE logon
    or [ ] Any ORACLE logon that has access to the
    relevant tables.
    4) If you have a client-server configuration does this occur from:
    [ ] Any client
    [ ] Just one particular client
    or [ ] Just one group of clients ?
    If so what do these clients have in common ?
    Eg: Software release .
    5) Do you have a second server or database version where the
    same operation works correctly?

  • 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

  • Re   Java Stored Procedure Problem

    Ben
    There appear to be some problem with the forum. It doesn't want to show my response to your post with the subject "Java Stored Procedure Problem". See the answer to this thread for an example of how to do this...
    Is there a SAX parser with PL/SQL??

    Ben
    There appear to be some problem with the forum. It doesn't want to show my response to your post with the subject "Java Stored Procedure Problem". See the answer to this thread for an example of how to do this...
    Is there a SAX parser with PL/SQL??

  • 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

Maybe you are looking for