473,499 Members | 1,548 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Running DB2 Stored Procedures from Microsoft SQL Server 2000

I have looked the newsgroups up and down and can't seem to find any
information on this topic so I'm hoping this group can help me.

We are a DB2 and SQL Server shop. Most of the time we are using
ADO.NET to access DB2 stored procedures in the PC side, but we need to
be able to run a DB2 stored procedure within SQL Server. More
specifically we need to run them from within a DTS package and within a
SQL Server stored procedure. I have found how I can run SQL Server
stored procedures from within these things, but nothing on DB2 yet.

If anyone out there can help me with this I would be very grateful and
if you could be as detailed as possible I would really appreciate it.

Thanks,
Westwood

Nov 12 '05 #1
1 2896
Westwood wrote:
I have looked the newsgroups up and down and can't seem to find any
information on this topic so I'm hoping this group can help me.

We are a DB2 and SQL Server shop. Most of the time we are using
ADO.NET to access DB2 stored procedures in the PC side, but we need to
be able to run a DB2 stored procedure within SQL Server. More
specifically we need to run them from within a DTS package and within a
SQL Server stored procedure. I have found how I can run SQL Server
stored procedures from within these things, but nothing on DB2 yet.

If anyone out there can help me with this I would be very grateful and
if you could be as detailed as possible I would really appreciate it.

Thanks,
Westwood

Hmm, as long as you don't do COMMIT within the procs here is a rather
mean idea.
Prereq DB2 V8.2
CREATE FUNCTION wrapProc(in INT)
RETURNS TABLE(out INT)
MODIFIES SQL DATA
BEGIN ATOMIC
DECLARE out INT;
CALL Proc(in, out);
RETURN VALUES(out);
END

Now you can execute the proc via regular SQL presuming you have some
form of query connectivity from SQL Server to DB2.

Cheers
Serge
--
Serge Rielau
DB2 SQL Compiler Development
IBM Toronto Lab
Nov 12 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
4226
by: Ryan | last post by:
I have two similar stored procedures which I'm running. One runs and one doesn't. I can run both with no problems in SQL Enterprise (7.0 standard) and have checked the permissions and am happy with...
4
2021
by: Minh Tran | last post by:
In order to minimize the number of connection strings I have to use to access different databases on the same Sql Server, I was considering storing all stored procedures in just one database. I...
11
10704
by: jrefactors | last post by:
I want to know the differences between SQL Server 2000 stored procedures and oracle stored procedures? Do they have different syntax? The concept should be the same that the stored procedures...
2
3221
by: mike | last post by:
H There are two ways to execute a stored procedure using ADO.NE - call "exec sp_myproc val1,val2" statement over SqlCommand myCommand = new SqlCommand(SQLQuery, mySqlConnection) - use...
5
2228
by: Rob Wire | last post by:
For the code below, how could I add an item in the drop down lists for both company and location to be an "All" selection that would send to the stored proc. spRptAttachments a value of "%" so...
45
3358
by: John | last post by:
Hi When developing vb.bet winform apps bound to sql server datasource, is it preferable to use SELECTs or stored procedure to read and write data from/to SQL Server? Why? Thanks Regards
28
72320
by: mooreit | last post by:
The purpose for my questions is accessing these technologies from applications. I develop both applications and databases. Working with Microsoft C#.NET and Microsoft SQL Server 2000 Production and...
1
1517
by: sasachi sachi sachi | last post by:
Hi there, I have a data manipulation process written in a Nested Stored procedure that have four levels deeper. When I run these individual procedures individually they all seems to be fine....
1
3765
by: nickwilson.nick | last post by:
I have several stored procedures, created in a development environment, that I need to move to a 'QA' environment, and then in turn, to various production environments. When I move these stored...
0
7126
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7005
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
1
6891
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7381
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5465
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4916
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4595
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3096
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1424
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.