Db2 for z/OS & Db2ZAI

 View Only
Expand all | Collapse all

JDBC - DB2 z/OS

  • 1.  JDBC - DB2 z/OS

    Posted Wed March 13, 2024 09:16 PM
    Edited by Renato Almeida de Brito Wed March 13, 2024 09:17 PM

    Hi. Can I execute queries via JDBC on DB2 12 z/OS without having to purchase DB2 Connect? For example using the "DBeaver" software.

    Thanks.

    #Db2 for z/OS

    ------------------------------
    Renato Almeida de Brito
    ------------------------------



  • 2.  RE: JDBC - DB2 z/OS

    Posted Thu March 14, 2024 02:38 AM
    Edited by Diego Cardalliaguet Thu March 14, 2024 02:39 AM

    You need two files to use JDBC that you can find in your z/OS installation under the Db2 installation path in the Unix System Services. 

    The files are: 

    db2jcc4.jar and db2jcc_license_cisuz.jar. You need to put them in the classpath of the SW used to connect via JDBC. 

    I use the Db2 for z/OS extension in VSCode this way and it works. 



    ------------------------------
    Diego Cardalliaguet
    Europe, Middle East and Africa GEO Technical Sales
    IBM
    ------------------------------



  • 3.  RE: JDBC - DB2 z/OS

    Posted Fri March 15, 2024 09:07 AM

    Hi 

    If the client machine OS is z/OS (including USS as well) no license is needed for any connectivity.

    Db2Connect license or the db2jcc_license_cisuz.jar needed if it is a T4 connectivity running in a non z/OS(LUW) machine connecting to Db2 z/OS.



    ------------------------------
    Kollol Misra
    ------------------------------



  • 4.  RE: JDBC - DB2 z/OS

    Posted Thu March 14, 2024 04:23 AM
    Hi, 

    You need the JDBC Db2 connect license file for connecting to Db2 z/OS unless you have the Db2 connect license applied on the Db2 z/OS level. If there is no license, on the server side or client side, you will not be able to connect.

    Met vriendelijke groet/kind regards.

    Guido Verbraak
    Managing Consultant IBM Expert Labs
    +31 6 21 11 20 24
    Unless otherwise stated above:

    IBM Nederland B.V.
    Gevestigd te Amsterdam
    Inschrijving Handelsregister Amsterdam Nr. 33054214





  • 5.  RE: JDBC - DB2 z/OS

    Posted Fri March 15, 2024 09:20 AM

    Looks like others have already responded about the License process on z/OS - not sure why z/OS had to be different.

    The files required in Java classpath or otherwise defined to the software tooling are: db2jcc4.jar and db2jcc_license_cisuz.jar.  

    What is nice about Db2 JDBC is the same jar file (db2jcc4.jar) can be used across the entire Db2 Server family - z/OS - LUW - AS/400.   

    There are a lot of great Open Source and chargeable software for JDBC processing.

    But highly recommend using IBM Data Studio.

    https://www.ibm.com/docs/en/data-studio/4.1.1?topic=learn-get-started-data-studio

    It is free and once you understand how to define new JDBC Drivers to the Tooling you will have...

    One Stop Shopping for all the JDBC Servers you must deal with.

    Do yourself a favor and try IBM Data Studio. 

    Chjeers!
     







    ------------------------------
    Steve Able
    Director of Strategy and Architecture
    Adaptigent formally GT Software, Inc.

    ------------------------------



  • 6.  RE: JDBC - DB2 z/OS

    IBM Champion
    Posted Mon March 18, 2024 03:31 AM

    Hi!

     Sadly Data Studio is deprecated and about to completely killed off! i would not start using it now at all.. Better is to downlaod and install the Visual Studio Code and the install the IBM Db2 for z/OS Developer Extension.

    Cheers!



    ------------------------------
    Roy Boxwell
    Senior Software Architect
    Software Engineering GmbH
    Duesseldorf
    +4921196149675
    ------------------------------



  • 7.  RE: JDBC - DB2 z/OS

    Posted Tue March 19, 2024 08:34 AM

    Sad about IBM Data Studio for sure - Great Tool (Eclipse is heavy for sure) - JDBC and ODBC are Legacy technology - Like a Cash Cow now!

    Visual Studio Code is getting better - albeit - the code base is an almost daily moving target - LOL!

    Another Open Source JDBS Driver tool that has some interesting features is SQuirreL SQL http://www.squirrelsql.org/ - use it because it has a nice easy access feature to show all the driver settings and like IBM Data Studio can load all the popular JDBC Database drivers.

    Besides - I like the name of the Product -  SQuirreL SQL...



    ------------------------------
    Steve Able
    Director of Strategy and Architecture
    Adaptigent formally GT Software, Inc.

    ------------------------------



  • 8.  RE: JDBC - DB2 z/OS

    Posted Mon March 25, 2024 01:44 PM

    Hi Roy,

    One of the things I use Data Studio is to manage IDAA Accelerators. I don't see this functionality in the VS Code IBM Db2 for z/OS Developer Extension to do this. Did I miss something?

    Regards,

    Paul Kenney



    ------------------------------
    Paul Kenney
    ------------------------------



  • 9.  RE: JDBC - DB2 z/OS

    User Group Leader
    Posted Mon March 25, 2024 01:49 PM

    Hi Paul,

    The Accelerator management features have been ported to the Db2 Admin Foundation tool - also free of charge. We essentially split Data Studio functionality across Admin Foundation for all "administrative" features and the Db2 Developer Extension for VSCode for all "developer" type features. 



    ------------------------------
    Karen Wilkins
    Client Technical Professional
    IBM UK Ltd
    Bristol
    ------------------------------



  • 10.  RE: JDBC - DB2 z/OS

    Posted Fri March 15, 2024 12:14 PM

    Hi Renato - If any user wants to access Db2 for z/OS from a distributed environment (meaning from outside the mainframe), they need a Db2 Connect License. This requirement applies regardless of the driver or tool used to access Db2 z/OS. Depending on the size and needs of the establishment, IBM provides different types of Db2 Connect licenses. This article by Shilu provides licensing information: Everything About Db2 Connect Licensing (ibm.com).

    The bottom line is that you need some sort of entitlement if you want to access Db2 on z/OS from LUW. 



    ------------------------------
    Baha Majid
    Executive IT Sepcailist
    IBM
    Bethesda MD
    4433065039
    ------------------------------



  • 11.  RE: JDBC - DB2 z/OS

    Posted Mon March 18, 2024 03:41 AM

    Does a user *really* need a Db2 Connect License to access (using any method) Db2 for z/OS from a distributed environment?  Or merely require a license to use IBM's  JDBC drivers for a generic application?

    Is a Db2 Connect license required to use, for example, Data Studio (does this use the same JDBC drivers?), DbVisualizer, or Fusion Middleware Type 4 JDBC Drivers for Oracle WebLogic Server?

    Curious wants to know.



    ------------------------------
    James Campbell
    ------------------------------



  • 12.  RE: JDBC - DB2 z/OS

    Posted Mon March 18, 2024 04:21 AM
    Edited by Diego Cardalliaguet Mon March 18, 2024 04:24 AM

    Given that there's so much controversy...

    Environment variables for the z/OS Application Connectivity to Db2 for z/OS feature

    Ibm remove preview
    Environment variables for the z/OS Application Connectivity to Db2 for z/OS feature
    You need to set environment variables so that the operating system can locate the z/OS Application Connectivity to Db2 for z/OS feature.
    View this on Ibm >

    It is available to use JDBC T4 driver. 


    ------------------------------
    Diego Cardalliaguet
    IBM Data&AI zStack Leader for EMEA
    IBM
    ------------------------------



  • 13.  RE: JDBC - DB2 z/OS

    Posted Mon March 18, 2024 11:09 PM

    Really does not answer the question.

    There are two situations:

    1) user uses the various jar and zip files provided in the IBM Data Server Driver for JDBC and SQLJ or with Db2.  Yes, license needs to be purchased.  If for no other reason than the Connect won't really happen if there isn't a license and sqlcode -4472 results.  But (my understanding is) the -4472 is generated on the client side - not out of Db2 for z/OS. 

    2) user uses another JDBC / ODBC driver.  Perhaps they wrote their own - after all DRDA is supposed to be an open standard available to anyone.  Perhaps they used Data Studio , which did not (for the versions that supported use with Db2 for z/OS) require a separate license.  To the original question - does DBeaver come into this category?

    So the question is - is a Db2 Connect license required if IBM Data Server Driver for JDBC and SQLJ is not being used?



    ------------------------------
    James Campbell
    ------------------------------



  • 14.  RE: JDBC - DB2 z/OS

    IBM Champion
    Posted Tue March 19, 2024 01:45 AM

    Hi James,

    The license requirement is tied to the use of IBM Data Server Driver, but you will have a hard time finding another JDBC driver that supports Db2 for z/OS. 

    It is less of a problem than it appears from this thread: a majority of customers are licensed for the Db2 Connect Unlimited Edition. You just need to convince your DBA to apply the license for the Db2 for z/OS server side or give you the appropriate client side license. 

    IBM Data Studio does use the IBM Data Server Driver and it does require a license file, but IBM included a restricted license for use with Data Studio only so you did not have to buy a separate license. 

    If you copy the license file  provided with Db2 for z/OS or other IBM products such as Data Studio and use it with, say DbBeaver, you are violating the licensing terms, so don't do that.



    ------------------------------
    Jørn Thyssen
    Principal Solutions Advisor
    Rocket Software
    ------------------------------



  • 15.  RE: JDBC - DB2 z/OS

    Posted Tue March 19, 2024 08:50 AM

    There are a few other JDBC Drivers that support DRDA protocol that is used by IBM Db2 Servers.

    Derby DB is one - you can do some interesting things with Derby if willing to do some ROLL-UR-OWN...
     
    https://db.apache.org/derby/docs/10.0/publishedapi/org/apache/derby/drda/NetworkServerControl.html

    There was a product from a German Company - but cannot find any information on tcEXPRESS - they must have dropped support. 

      



    ------------------------------
    Steve Able
    Director of Strategy and Architecture
    Adaptigent formally GT Software, Inc.

    ------------------------------



  • 16.  RE: JDBC - DB2 z/OS

    IBM Champion
    Posted Tue March 19, 2024 04:01 AM

    Hi James, tools such as DBeaver or DBVisualizer ship the IBM JDBC T4 driver (db2jcc4.jar) within their products. When you configure a connection to a Db2 database you can take the existing driver (from the product) or configure your own classpath with a db2jcc4.jar your downloaded separately. These tools do not implement their "own" T4 driver. Whenever the target is a Db2 for z/OS you either need a Db2 Connect license file on your client workstation and put it in the classpath. Or, in case you have a Db2 Connect Unlimited Edition license, your Db2 for z/OS administrators can activate a server-side license. No additional activities on the client side needed in that case.

    Data Studio is a bit different because it ships a db2jcc4.jar AND a license file for restricted use inside the product. As Roy pointed out, it is deprecated. You should look for alternatives. MS Visual Studio with IBM Db2 Developer Extension is such an alternative though you need a Db2 Connect license file (as for DBeaver etc.).

    BTW Invoking Db2 for z/OS Native REST services from a REST client such as Postman or cURL or your own Java application does NOT require a Db2 Client or Data Server Driver nor does it require a Db2 Connect license file. It's just HTTP(S) connectivity from the REST client to the DDF address space. 



    ------------------------------
    Christoph Theisen
    Rocket Software
    ------------------------------