NodeJS and DB2 for zOS

William Caneira

NodeJS and DB2 for zOS

I'm doing a little POC with NodeJS and the ibm_db NPM package, which I believe uses ODBC.  Locally, I'm able to query DB2 zOS tables via dynamic SQL and call stored procedures.  I believe (not sure) I have a client license file under IBM\DB2\DB2COPY1\license\ on my machine (normally I write a lot of DB2 applications in .NET and for that purpose have DB2 client installed locally).

When I push my NodeJS app out to our PCF Cloud installation, I get a license error:

[IBM][CLI Driver] SQL1598N An attempt to connect to the database server failed because of a licensing problem.  SQLSTATE=42968

There is a note about licensing for zOS within the ibm_db package documentation here, and I am working with my DBA to understand how this works for Node applications in the cloud.  Can I obtain a license file and deploy it along with my app in order to be "cloud-friendlier"?  Does it need to be in the directory mentioned in the ibm_db doc?

Any help is appreciated.

Jørn Thyssen

RE: NodeJS and DB2 for zOS
(in response to William Caneira)

Hi,

if you have the DB2 Connect Enterprise Unlimited edition you can install the license on the z/OS side so you don't have to bundle the license with your app.

 

For other licensing forms you have to include the license file in the right directory

 

Best regards,

Jørn Thyssen

Rocket Software
77 Fourth Avenue • Waltham, MA • 02451 • USA
E: [login to unmask email] • W: www.rocketsoftware.com 

Views are personal. 

William Caneira

RE: NodeJS and DB2 for zOS
(in response to Jørn Thyssen)

Thank you, I'll check into what edition we have.

When you say "include the license file in the right directory" the ibm_db package documentation I linked to above says this "If you have client side license file, just copy it under .../ibm_db/installer/clidriver/license folder to be effective".  Do you know if DB2 client expects that in some centralized directory, or can it be relative to my application?

Jane Man

RE: NodeJS and DB2 for zOS
(in response to William Caneira)

More on what Jorn has mentioned above: run the activation utility on the server side: 

The db2connectactivate utility activates the DB2 Connect™ Unlimited Edition license on the DB2® for z/OS® or DB2 for i server to avoid applying the DB2 Connect license on each database client that directly connects to the server. 

https://www.ibm.com/support/knowledgecenter/SSEPGG_11.1.0/com.ibm.db2.luw.licensing.doc/doc/r0057377.html

https://www.ibm.com/developerworks/community/blogs/e429a8a2-b27f-48f3-aa73-ca13d5b69759/entry/Use_Node_js_Application_to_access_JSON_data_in_DB2_for_z_OS?lang=en

https://www.ibm.com/support/knowledgecenter/SSEPGG_9.5.0/com.ibm.db2.luw.apdv.cli.doc/doc/r0024162.html

 

Hope this help.

Edited By:
Jane Man[Organization Members] @ May 22, 2017 - 10:55 AM (America/Pacific)
Jane Man[Organization Members] @ May 22, 2017 - 10:56 AM (America/Pacific)

William Caneira

RE: NodeJS and DB2 for zOS
(in response to Jane Man)

Thank you for the links, I reviewed them.  My DBA has not yet offered to run db2connectactivate on the z/OS side, so at this point I am trying to get my POC to work by deploying a license file along with my application.  I have a db2consv_zs.lic file successfully copied/deployed to node_modules\ibm_db\installer\clidriver\license, but I continue to receive the same error ([IBM][CLI Driver] SQL1598N  An attempt to connect to the database server failed because of a licensing problem.  SQLSTATE=42968).

I found this IBM link that indicates the version of the Data Server driver and the license file must match.  Running db2level, I noticed that the Data Server driver for ODBC (installed via the ibm_db package) is version 10.5.500.109, and the version in my license file (ProductVersion property) is 11.1.  I am wondering if this could be the root cause of the error, given that the actual file seems to be in the right directory.

Any thoughts on whether I am using the right directory, the license version mismatch, or any thoughts in general are welcome.

Edited By:
William Caneira[Organization Members] @ May 31, 2017 - 10:01 PM (America/Eastern)
William Caneira[Organization Members] @ May 31, 2017 - 10:03 PM (America/Eastern)

Jørn Thyssen

RE: NodeJS and DB2 for zOS
(in response to William Caneira)

Hi William,

To my knowledge a locally installed license file must match Version.Release, so 11.1 won't work with 10.5 drivers (or vice versa). However, If your DBA installs the license at the host using db2connectactiviate the V11.1 license file will actually work with V10.5 drivers (but not vice versa).

Try  upgrading to V11.1 drivers (http://www-01.ibm.com/support/docview.wss?uid=swg27016878) or get the V10.5 license file (can be downloaded from IBM Passport Advantage). The license file does not change with fixpack levels.

Best regards,

Jørn Thyssen

Rocket Software
77 Fourth Avenue • Waltham, MA • 02451 • USA
E: [login to unmask email] • W: www.rocketsoftware.com 

Views are personal.