dbeaver / dbeaver

Free universal database tool and SQL client
https://dbeaver.io
Apache License 2.0
40.48k stars 3.49k forks source link

Support H2 with database format v3 — v 2.2.220 #20676

Open metzing opened 1 year ago

metzing commented 1 year ago

Is your feature request related to a problem? Please describe. Starting with version 2.2.220 H2 database writes the files with version v3. This version is currently not supported by DBeaver, resulting in an error message when trying to open the file.

Describe the solution you'd like I would like to be able to open H2 database files that are written in format v3.

Describe alternatives you've considered We have reverted to H2 v2.1.214 to retain the compatibility with DBeaver, though it has a security vulnerabilty.

Additional context

E1izabeth commented 1 year ago

Thank you for request.

metzing commented 1 year ago

Hey,

I can see this was removed from the 23.1.5 milestone. Is there any blockers, anything I can assist with? When can we expect the feature?

Thanks, Marton

Destrolaric commented 1 year ago

@metzing, Hi, The breaking changes in the minor version raised some questions, so we had some delays. We are planning to look at this issue again in this release.

metzing commented 1 year ago

Thanks for the update

metzing commented 1 year ago

Hello again, now I see it was put into the won't do bucket - may I ask why?

This feature would be very nice for our team as we find your tool very versatile, working with S4/HANA Cloud and local DB files as well.

I can also see the open PR for it, seems to be just including another driver into your config. I don't see the reason why that would be a breaking change or too large effort. Let me know if I can assist in any way.

Thanks, Marton

travnja3 commented 1 year ago

I had the same issue and used Driver Manager to add the new driver, and now I'm able to open version 3 files without any issue.

metzing commented 9 months ago

Thanks for the idea @travnja3, I was also able to configure a custom driver using the Driver Manager.

Instructions:

  1. Open the Driver Manager under Database > Driver Manager
  2. Create a new configuration using the New button
  3. Fill the info in the Settings tab like so (based on the configuration in #20835): image
  4. On the Libraries tab, press Add Artifact
  5. In the Edit Maven Artifact popup, fill the info of the H2 maven artifact: image
  6. Select the new item in the list, and press the Download/Update button, then Download in the new popup
  7. Press the Find Class button, the Driver class should be selected automatically: image
  8. Again based on #20835 I've also set the following parameters in the Advanced parameters tab:
    • Parameters > Omit catalog = [v]
    • Queries > Get active database = SELECT SCHEMA()
    • Queries > Set active database = SET SCHEMA = ?
    • Queries > Shutdown database = shutdown
  9. Save the new driver configuration
  10. When creating a new connection, select the new custom driver in the first step, and configure as usual.
metzing commented 9 months ago

@E1izabeth @Destrolaric @arhayka any news on this please? Why is it in the won't do bucket?

metzing commented 3 months ago

Just wanted to wish this issue a happy birthday 🍰

@E1izabeth @Destrolaric @arhayka any plans to include this feature in one of your next releases?

E1izabeth commented 3 months ago

Hi, @metzing Thank you for pushing this issue up. We will discuss it in August and I'll return back to you with the answer. It's a vacation time now, so everything is a bit slower, than usual :)

coderkun commented 3 months ago

H2 version 2.3.230 is out by now.

E1izabeth commented 3 months ago

We discussed and decided to remove H2 v1 version, call H2 v2 as H2 Embedded (Legacy) and add H2 v3 and call it H2 Embedded. Thanks everyone for keeping an eye on this issue.

arhayka commented 2 months ago

We want to investigate if this tool could be used: https://github.com/manticore-projects/H2MigrationTool If this is not possible, see the previous comment ;)