Tuesday, March 27, 2012

DB2 ODBC Connection Problems

Hello,

I've recently run across a couple of problems trying to connect to DB2 using the .NET ODBC Provider.

1) I can create a DataSource using the DataSource designer, and when I edit the connection, the User Name and Password text boxes are empty. If I fill in the correct information and hit "Test Connection", I am able to connect. However, this information is not saved in the DataSource the next time I open it or try to run a Data Flow task that uses it! Is there some property I can set to fix this?

2) When I open up a solution, the DataSource appears to be trying to connect to the DB2 server, and perhaps there is no valid User Name and Password, the connection is refused and I eventually get locked out of my account. This could be related to the issue above.

Does anyone have any experience connecting to DB2 using either an ODBC driver or the perhaps the IBM DB2 UDB iSeries OLE DB providers?

Thanks in advance,

Mark

Mark,

The same problem occurs with Progress Database using .NET ODBC Provider and a didn′t find a solution. Problably is a .NET ODBC Provider problem but I don′t know how to fix. If you find a solution, please post here.

Question: Do you receive this error message ?

“Error at Data Flow Task [DataReader Soucer [135]]: Cannot acquire a managed connection from the run-time connection manager”

Thanks.

Rodrigo Chagas

|||

I found this post:

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=93045&SiteID=1

Maybe will be useful for you. It seems ODBC connections are having a lot of problems in SQL 2005.

My hope is getting smaller...

|||This is not a problem with .Net, but rather the way in which the ODBC driver builds the connection string or handles security. Some drivers including the CA ODBC driver do not append the password property to the connection string. So when you attempt to connect it will prompt for a password. Depending on how you invoke the program, you may not even see the prompt.
One way to resolve the issue is to append the password to your connection string in the form of "Password=MyPass;"
I've used the OLEDB provider for DB2 before, but there are some limitations to it. Per IBM, OLEDB does not provide the same level of functionality as their ODBC drivers. One thing that OLEDB does not provide is scrollable cursors.
I haven't used DB2 in almost a year, so IBM may have some updated drivers. Also MS just released their version of an OLEDB provider for DB2, so you could try it. You can get it at the following url.
http://www.microsoft.com/downloads/details.aspx?familyid=D09C1D60-A13C-4479-9B91-9E8B9D835CDC&displaylang=en
Larry

No comments:

Post a Comment