Home Forums Programming General Call DB2 stored procedure using Linked Server? RE: Call DB2 stored procedure using Linked Server?

  • I am newbie to linked server concept, I am looking for help to resolve my issue. Please suggest.

    My requirement:

    In DB2 data base I have a stored procedure and from SQL 2008 R2 using Linked server I need to be able to execute stored procedure. I am getting the error while I am trying to execute.

    Created SP as below with db2admin user:

    CREATE OR REPLACE PROCEDURE SP_MyStoredProcedure

    LANGUAGE SQL

    SPECIFIC SP_MyStoredProcedure

    -- EXTERNAL ACTION

    BEGIN

    .......

    END

    select * from [MyDb2LinkedServer].[db2DB].[db2admin].TLS_MyDb2Table and I get the results, which means my linked server DB2 connectivity is fine.

    Then while executing as below SP got the error

    exec [MyDb2LinkedServer].[db2DB].[db2admin].SP_MyStoredProcedure

    Error:

    OLE DB provider "DB2OLEDB" for linked server "MyDb2LinkedServer" returned message "Routine "*rocedure"?SQL150518145704050?...erver"."SP_MyStoredProcedure"?*?4" (specific name "") is implemented with code in library or path "", function "" which cannot be accessed. Reason code: "". SQLSTATE: 42724, SQLCODE: -444".

    Msg 7212, Level 17, State 1, Line 1

    Could not execute procedure 'SP_MyStoredProcedure' on remote server 'MyDb2LinkedServer'.

    Here in the error

    specific name ""

    library or path ""

    function ""

    Reason code: ""

    all are empty, no much information is available.

    Need help on this and how this can be resolved? Any help is appreciated.

    Note:

    "rpc", "rpc out" both options are true.