Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SQL1159 Initialization error with DB2 .NET Data Provider, reason code 2

Tags:

c#

.net

db2

I am trying to connect to DB2 from .NET 2.0 application in my development machine running windows 7 64 bit.

I am getting this error in open method. Could not find a solution.

ExceptionType: InvalidOperationException ExceptionMessage: SQL1159 Initialization error with DB2 .NET Data Provider, reason code 2, tokens D:.......................\bin\db2app.dll, StackTrace: at IBM.Data.DB2.DB2ConnPool.Open(DB2Connection connection, String& szConnectionString, DB2ConnSettings& ppSettings, Object& ppConn) at IBM.Data.DB2.DB2Connection.Open()

like image 614
Shetty Avatar asked Sep 20 '11 11:09

Shetty


1 Answers

Learnt this from a colleauge of mine. Issue was because db2app.dll was missing in bin directory of application folder.

Copied db2app.dll and db2app64.dll from C:\Program Files\IBM\SQLLIB\BIN to bib folder of application and it worked fine.

like image 66
Shetty Avatar answered Sep 17 '22 10:09

Shetty