I have a .NET web app on a windows 2003 server that connects to several different databases, including DB2 and MSSQL. The DB2 connection is using IBM's ODBC driver for windows and the MSSQL uses ADO.NET. The problem is that the MSSQL connection is supposed to use a service account, which is accomplished by having the line
<identity impersonate="true" userName="domain\id" password="password"/>
in the web.config file, and when I use this security configuration I get an error when trying to connect to the DB2 database.
ERROR [IM004] [Microsoft][ODBC Driver Manager] Driver's SQLAllocHandle on SQL_HANDLE_ENV failed
Not using the specific domain account (just using <identity impersonate="true"/>) allows me to access DB2 just fine, but then I don't have the security permissions to access MSSQL.
I haven't been able to dig up a lot on this error for DB2, though it cropps up plenty for Oracle when I search - I've seen some indicaitons that it's something to do with local permissions and that could be related to what I'm seeing, but I haven't found any specifics. What level of local access does the driver require? Or is this caused by something else?