Access db2 via .Net

G

Guest

Hi,
I need to access a db2 database that sits on the Z/OS.
I have no clue as to how it is done.

Do I directly use Ole Db and use it just we did it for SQL 7.0 or are there
any pre-requisites before accessing dB2?

I read some where that the .Net ole db provider calls the IBM Ole Db
provider. Not sure what that means.

I would also be helpful if some one could tell me what softwares do I need
on the calling machine.
For ex: I will already be having .Net framework 1.1 installed on a QWindows
2003 Server. Other than that not sure what else is required.

TIA,
 
F

Frans Bouma [C# MVP]

Alok said:
Hi,
I need to access a db2 database that sits on the Z/OS.
I have no clue as to how it is done.

Do I directly use Ole Db and use it just we did it for SQL 7.0 or are there
any pre-requisites before accessing dB2?

I read some where that the .Net ole db provider calls the IBM Ole Db
provider. Not sure what that means.

I would also be helpful if some one could tell me what softwares do I need
on the calling machine.
For ex: I will already be having .Net framework 1.1 installed on a QWindows
2003 Server. Other than that not sure what else is required.

When you download the personal edition of DB2, you'll get the .NET provider
with it, in the client tools. I haven't seen the separate download of the
driver though, but the client access version shipped with the 8.1.x download
of the personal edition of db2 does have the .net provider, complete with
examples and docs, and no beta.

Frans.
 
D

Dino Chiesa [Microsoft]

There are a number of ways to get to DB2 from .NET.

1.
IBM provides an OLEDB provider for DB2, since DB2 UDB v6 (ish?). There is
also an ODBC provider since v5 (ish?). Since version 8.1.2, IBM also
delivers a .NET managed provider, which gives better performance and
function. [but get the latest fixpack (v8.1 fp7, released last month).
Note: there are different fixpacks depending on which DB2 product you have
installed. Eg, DB2 UDB WSE, DB2 UDB ESE, DB2Connect, or the DB2 AppDev
Client. So be sure to get the proper one. The location I have for them is
ftp://service.boulder.ibm.com/ps/products/db2/fixes/ ]

All of these options work from within .NET apps.

There is a feature / version matrix which describes which client access
layers (ODBC, OLEDB, .NET Managed provider) can access which target DB2
servers (400, zOS, Windows, Unix) and which features are available (CLOB,
server-side cursors, etc). So you may want to check this out before
choosing a technology.

To get to zOS, you may also need to have in your network somewhere, a
DB2Connect gateway.

As somebody pointed out, the eval of DB2 ships the Managed Provider, which
is not beta. But I think you need to have an additional license in order to
be entitled to use that stuff to actually connect to a zOS DB2.

2.
Microsoft recently shipped HIS2004, which includes a .NET managed provider
for DB2, as well as an OLEDB provider for DB2. Either works from .NET apps.
Like IBM's DB2Connect, HIS includes a gateway capability, and can connect
..NET apps to DB2 on any platform. As with IBM's technology, there is a
matrix describing supported features and versions.

3.
DataDirect makes a DB2 managed provider. I don't know much about it.

4.
I think the mono project is currently attempting to build an open-source
..NET managed provider for DB2. Not sure of status.

-Dino
 
B

Bill Fahey

Alok,

DataDirect provides a 100% managed data provider for DB2, this means
that no client libraries are necessary to connect to the database.
Nothing other than the framework you already have installed will be
necessary to connect to the database. You download the Connect for
..NET provider for DB2 at:
http://www.datadirect.com/products/dotnet/index.ssp

This provider also connects to UDB and iSeries as well.

Hope this helps!
Bill Fahey
bill(dot)fahey(at)datadirect(dot)com
 
E

Emmon Simbo

Alok

There are two ways of accessing the DB2 database on your server.
Either by installing the DB2 client on your .NET client and
communicating that way or by installing a generic client which
communicates with DB2 Server components. At OpenLink Software,
provided you have the DB2 client which is readily available, you can
install the ST client and communicate directly through .NET to your
server.

Regards
Emmon Simbo
 
F

Frans Bouma [C# MVP]

Dino said:
There are a number of ways to get to DB2 from .NET.
2.
Microsoft recently shipped HIS2004, which includes a .NET managed provider
for DB2, as well as an OLEDB provider for DB2. Either works from .NET
apps. Like IBM's DB2Connect, HIS includes a gateway capability, and can
connect .NET apps to DB2 on any platform. As with IBM's technology, there
is a matrix describing supported features and versions.

What I wonder is: why doesn't Microsoft release this provider for ALL .NET
developers out there? Now I have to install HIS2004 to write code which can
access DB2. Isn't that a little weird? After all, DB2 is the database with
the largest marketshare (by far) so it would be more than logical to be able
to access DB2 from .NET without the hassle of installing HIS2004 (if you're
not an MSDN subscriber, you're even out of luck) while you can access Oracle
from .NET without a problem, a database with a less marketshare.

Frans.
 
S

Scott Emick

I cannot download the .net data provider, the link is broken. Can anyone
send me a copy? Or is there mirror somewhere else besides IBM?

Thanks,

Scott Emick
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top