SSIS can't connect to DB2 running in SQL Server: ERROR [IM004] [Microsoft] [ODBC Driver Manager] Driver's SQLAllocHandle on SQL_HANDLE_ENV failed

9cbw7uwe  于 12个月前  发布在  DB2
关注(0)|答案(1)|浏览(187)

I have an SSIS package created in Visual Studio 2019 using an ADO.NET connection manager with provider .Net Providers\Odbc Data Provider. When running on my development machine, everything works fine.

However, after deploying the package to the target SQL Server, this error occurs:
Data Flow Task: Error: ADO NET Source has failed to acquire the connection with the following error message: "ERROR [IM004] [Microsoft] [ODBC Driver Manager] Driver's SQLAllocHandle on SQL_HANDLE_ENV failed".

  • The driver being used is IBM DB2 ODBC DRIVER, version 11.01.00.1527.
  • The correct SQL version is targeted
  • The package is running in 32 bit mode
  • The username and password to the database are passed into the package via project parameters
  • The default connection string is Dsn=Dsn-name;uid=Username

I would greatly appreciate any assistance with this issue.

8wtpewkr

8wtpewkr1#

As I was logged into the SQL server via SSMS and running the SSIS package, we had to add my user ID to the group DB2ADMNS on the SQL server. I did see numerous posts across the web suggesting this.

相关问题