简体   繁体   中英

db2 connection failing after migrating from iis7.5 to iis8.5

I have a classic ASP web application which connects to a DB2 database to read some data. i migrated the application from windows server 2008r2(IIS7.5) to 2012r2(IIS8.5) and the application is not able to establish a connection to the database. i get below error
ERROR [HY000] [IBM][CLI Driver] SQL1042C An unexpected system error occurred. SQLSTATE=58004 ERROR [HY000] [IBM][CLI Driver] SQL1042C An unexpected system error occurred. SQLSTATE=58004

my web.config
<add key="DB2TDSNName" value="Driver={{IBM DB2 ODBC DRIVER}};DBALIAS=DB2T;Uid={0};Pwd={1};" />

i use the above ODBC connection to connect to the database. It is working fine in IIS7.5 but not IIS8.5. should i be doing anything different in 8.5?

Note: i added a system DSN in ODBC data source and the connection was successful, somehow the application hosted from IIS is not able to establish a connection.

i found out what the issue is. the environment variable for DB2 driver was not properly declared in System environment variables. i added it to the Path environment variables and it is working.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM