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)