Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create VSC extension for Db2 SQL #77

Open
trode05 opened this issue Feb 16, 2021 · 10 comments
Open

Create VSC extension for Db2 SQL #77

trode05 opened this issue Feb 16, 2021 · 10 comments
Labels
enhancement New feature or request priority-low

Comments

@trode05
Copy link

trode05 commented Feb 16, 2021

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
Copy link

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

@trode05
Copy link
Author

trode05 commented Feb 24, 2021

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

@FALLAI-Denis
Copy link

@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
Copy link
Author

trode05 commented Feb 26, 2021

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
Copy link

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.

  • syntax hilight (via Language Server)
  • run statement : dml (select, update...), ddl (create, alter...), full or partial, and in last version from any text file (tested from COBOL source)
  • use of host-variable in statement
  • save result in cvs file

this is not what you look for ?

@trode05
Copy link
Author

trode05 commented Feb 26, 2021

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
Copy link

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
Copy link
Author

trode05 commented Feb 26, 2021

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
Copy link

solsu01 commented Feb 26, 2021

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
Copy link

@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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request priority-low
Projects
Status: Low Priority
Development

No branches or pull requests

5 participants