question

LinkedServerNewbie avatar image
LinkedServerNewbie asked

Linked Server Db2 Stored procedure error

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.
linked server
3 comments
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

JohnM avatar image JohnM commented ·
Disclaimer: I know little about DB2 specifically. Is it possible the account you configured with the Linked Server doesn't have execute permissions on DB2? It might have read permissions but lacking enough to actually execute the procedure.
0 Likes 0 ·
LinkedServerNewbie avatar image LinkedServerNewbie commented ·
The linked server 'MyDb2LinkedServer' is using db2admin user to login to db2 db, so i guess it will have all access.
0 Likes 0 ·
JohnM avatar image JohnM commented ·
I wouldn't assume that; confirm it with an admin of the system. Furthermore I'd ask them to look at how the procedure is configured to ensure everything looks correct on the DB2 side. This appears to be a DB2 issue, not a SQL Server issue. Found this article: http://bytes.com/topic/db2/answers/449074-sql0444n-reason-code-4-sqlstate-42724-a. Slightly different but might be applicable.
0 Likes 0 ·

0 Answers

·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.