zowe / zowe-cli-db2-plugin

DB2 Plugin for the Zowe CLI
Eclipse Public License 2.0
8 stars 14 forks source link

Create VSC extension for Db2 SQL #77

Open trode05 opened 3 years ago

trode05 commented 3 years ago

With Db2 plugin functionality, it seems to be straightforward to build a Visual Studio Code extension for basic Db2 SQL actions like: execute SQL and return SQL results. Such an extension could support highlighting - and this can be just ANSI SQL highlighting as Db2 SQL is very close to ANSI format.

FALLAI-Denis commented 3 years ago

Do you look at IBM Db2 for z/OS Developer Extension on VS Code MarketPlace ?

trode05 commented 3 years ago

Is that open sourced? Can it get included into Zowe? I don't think so.

FALLAI-Denis commented 3 years ago

@trode05 It's a VS Code extension as you describe it in your first post. It's not "open source", it's free of charge.

It does'nt require a license file or an "Db2ConnectActivated" db2 system. It use the Db2 JDBC driver, (you must download Db2 JDBC from USS where Db2 is installed).

trode05 commented 3 years ago

Free and open are not equal. Open source would allow community to extend and customize functionality. Basic functions like executing SQLs and retrieving results are simple things that can be coded quickly using CLI plugin's JS APIs. As to the licensing, according to the documentation, IBM extension does require Db2 Connect licence in order to use JDBC. From this perspective, it is the same as CLI plugin that uses ODBC driver and requires the very same license.

FALLAI-Denis commented 3 years ago

You don’t need (to aquire) a Db2Connect license to use Db2 JDBC driver.

For us, using Zowe CLI Db2 was a problem : our Db2 systems are not « Db2ConnectActivated » and the license file for ODBC / Db2Connect was not accessible.

Your requirement is to have a VS Code extension for Db2 Z : https://marketplace.visualstudio.com/items?itemName=ibm.db2forzosdeveloperextension is a (the) solution.

this is not what you look for ?

trode05 commented 3 years ago

Where do you see that license is not needed? Here is what I see in both extension and github description:

Prerequisites for installing Db2 Developer Extension Installing Db2 Developer Extension requires the following software:

One of the following IBM Data Server Driver JDBC license files:

The Db2 Connect Unlimited Edition for System z® server license This license must be activated on the Db2 for z/OS subsystems that you want to connect to. For more information, see the following topic: https://www.ibm.com/support/knowledgecenter/SSEPGG_11.5.0/com.ibm.db2.luw.licensing.doc/doc/t0057375.html

The IBM Data Server Driver for JDBC client license file For information about locating and and enabling the client license file, see the following topic: https://www.ibm.com/support/pages/db2-jdbc-driver-not-licensed-connectivity-file-db2jcclicensecisuzjar-errorcode-4472-sqlstate42968

When you specify the location of the db2jcc_license_cisuz.jar license file in your VS Code settings (db2forzosdeveloperextension.db2sqlservice.dependencies), you must provide the full path.

FALLAI-Denis commented 3 years ago

For JDBC driver, you only need to download "db2jcc_license_cisuz.jar" file from Db2 z installation path in z/OS-USS and declare local location in settings of the extension. Nothing else. This file is shipped with Db2 z and is not part of Db2Connect. JDBC has no dependency with Db2Connect.

Do you try it ?

trode05 commented 3 years ago

It does work for me, no question about it. What I am saying - this still requires you to own the license for Db2Connect. JDBC and ODBC drivers for Db2z always require a license for non-mainframe communications. A license can be activated on z/OS side or on a client side (via license file). So physically you don't need to install /configure Db2 Connect, but you must pay for the license.

solsu01 commented 3 years ago

Your requirement is to have a VS Code extension for Db2 Z : https://marketplace.visualstudio.com/items?itemName=ibm.db2forzosdeveloperextension is a (the) solution.

I think this is a fair representation of what @trode05 is asking for but it's not open source. I view this issue as asking for an open source Db2 extension to be built in Zowe on top of the existing Zowe CLI plugin code, which is different from a=the IBM proprietary one that was linked to on the marketplace.

FALLAI-Denis commented 3 years ago

@trode05: "you must pay for the license" --> no, JDBC license file db2jcc_license_cisuz.jar is shipped with Db2 Z, no more charge, (DB2Connect is a standalone product, with its own license and its own charges).

@solsu01: the demand for an open source solution was not initially expressed. Is it really a problem if the extension is not open source, but only free of charge? Db2 Z also is not open source, (and is chargeable). IBM is evolving on its strategy, and is making efforts through various projects to provide access interfaces to its solutions, (see the WAZI solution: https://www.ibm.com/products/wazi-developer).