-1

I am using ibm_db module to connect to IBM Database using nodejs. I was referring DB2NodeJs. I simply followed this post and used the sample code given in this post. Following were my steps.

1. Installed nodejs
2. Installed ibm_db
3. Downloaded the nodedb2test.js file
4. Changed the database details as per my DB2 database
5. Ran this file.

I am getting following error

error:  [IBM][CLI Driver] SQL1042C  An unexpected system error occurred.  SQLSTATE=58004

I am new to DB2 using Nodejs. Also I think i provided all details correctly except the db2 driver value DRIVER={DB2}. What should be the value for driver? I never installed any database related driver before. Please help.

joy
  • 3,669
  • 7
  • 38
  • 73

2 Answers2

1

I had the same issue. I solved it by adding AUTHENTICATION=SERVER to the connection string.

For example:

DATABASE=XXXX;HOSTNAME=XXXX;PORT=XXXX;PROTOCOL=TCPIP;AUTHENTICATION=SERVER...

MitchD
  • 33
  • 1
  • 5
0

Are you using OSX ? there's an overall problem with db2 when installing the latest 10.10.3 . see here OS X 10.10.3 - SQL1042C An unexpected system error occurred

Inder Kumar Rathore
  • 39,458
  • 17
  • 135
  • 184
Guy
  • 1
  • 1
  • I am not trying to install db2. I am using nodejs to connect to my existing database. – joy Apr 25 '15 at 08:20
  • I think my main problem is what to set for DRIVER={DB2}? I don't know how to install Driver for DB2 and never installed any database related driver before. Please help. – joy Apr 25 '15 at 18:11
  • Anyone has idea on how to install DB2 driver on Mac and use it using ibm_db nodejs module? – joy Apr 27 '15 at 20:14