I have an ASP.NET application running on Windows 2003 that must communicate with a DB2 database that is on a mainframe. We installed the DB2 Client v9.5 driver on our server so that the application can connect and work with the database. The connection string for connecting to the database contains a username and password, this is not a reliable connection.
To be clear, we use the DB2.NET provider, not OLE DB, ODBC, etc.
What we notice is that when an ASP.NET application tries to make this first connection to DB2, it takes a very long time, about 20 seconds. After talking with one of our resident database administrators, they said that it could be because the DB2 driver is trying to authenticate the user account that is used to connect to the database against Active Directory.
Their solution was to create a local user account on the Win2003 server with the same name as the user account used to connect. The local user account does not have to be a member of any acl groups, and you can disable it.
I tried this solution, and to my surprise, it really worked. The connection was completed within milliseconds. I am concerned that this βfeatureβ seems to be a bug in the DB2 driver, and any new versions of this driver may actually prevent it from working again.
Does anyone know if there is an actual setting in the DB2 driver that we can set so that it does not try to authenticate with Active Directory? I would feel more comfortable using this setting than relying on what seems to me to be a flaw in their authentication algorithm.
thanks
By the way, the same question was asked on Server Fault, but no one could answer there.
https://serverfault.com/questions/53971/db2-client-v9-5-on-win-2003-taking-long-time-to-establish-connection