Questions tagged [h2db]

H2 is an open source SQL database engine written in Java. It can be embedded in Java applications or run in the client-server mode. H2 supports regular disk-based as well as in-memory databases. The disk footprint (size of the jar file) is about 1 MB.

H2 is an open source SQL database engine written in Java. It can be embedded in Java applications or run in the client-server mode. H2 supports regular disk-based as well as in-memory databases. The disk footprint (size of the jar file) is about 1 MB.

The main author of H2 is Thomas Mueller, who also developed the Java database engine Hypersonic SQL. The name H2 stands for Hypersonic 2, however H2 does not share code with Hypersonic SQL or HSQLDB.

This tag is synonym for H2 tag

Wiki

Issues

93 questions
0
votes
1 answer

Is creating a new statement from a connection commit everything even if auto commit is false?

I have the following code: import java.sql.*; class App { public static void main(String[] args) { HelloJdbc hj = new HelloJdbc(); hj.insertPerson(); hj.printPersons(); hj.close(); } } class HelloJdbc { …
Koray Tugay
  • 22,894
  • 45
  • 188
  • 319
0
votes
1 answer

Slick with H2: tables are missing

I'm writing an app using slick and h2 in-memory db. I'd like to check how my data is written to db by creating database config in IntelliJ idea, but all the tables are missing. Here is my code: application.conf h2mem = { url =…
Naya
  • 850
  • 6
  • 19
0
votes
1 answer

Sum column values by group by date

I have these two tables: First (System): ID GROUP --------- 1 1 2 1 3 4 1 Second (Values): SYS_ID DATE VALUE ------------------ 1 23 3 1 21 5 3 20 7 4 19 9 3 19 11 2 23 13 I…
Prabal Kajla
  • 125
  • 12
0
votes
1 answer

h2db connection to pentaho report designer is giving error

h2db is connecting thorugh the console in Server mode as you can see the picture by clicking on this line. But the issue is coming here in the pentaho report designer while giving host name or port number as you can see the picture by clicking on…
Thanos
  • 3
  • 3
0
votes
1 answer

Spring Boot 2.0.0.RELEASE - does not run H2 data.sql

Simple Spring Boot application with h2, which has 1 DB table populated via data.sql. Works 100% with spring-boot-starter-parent 1.5.9.RELEASE if I switch to 2.0.0.RELEASE the data.sql is no longer run on startup. In my pom.xml I have
Melissa
  • 812
  • 2
  • 10
  • 24
0
votes
0 answers

How to set column as IGNORE CASE for H2 in the schema

Is there a way to set the column in the state schema to ignore case ? I understand there's an option to set H2 as "IGNORECASE=TRUE" but I don't see how I can specific only one column to be ignoreCase?
Adrian
  • 434
  • 4
  • 13
0
votes
0 answers

Check SSL version of JDBC connection url

I am using H2 DB. Following is JDBC url jdbc:h2:ssl://10.11.198.12:28001/opt/data/h2-Test/config-h2;DATABASE_TO_UPPER=FALSE How can I check which version of TLS/SSL is being used by this connection?
0
votes
1 answer

Insert list of records using mybatis

I am trying to insert records into a table from a list using Mybatis. I use mybatis velocity as scripting language. Looks like the problem is in the parameter symbol #. I tried to replace that with @ since I'm using mybatis velocity but nothing…
Krish
  • 63
  • 1
  • 7
0
votes
0 answers

SQL Auto Increment column based on composite primary key

Is it possible to increment a seperate column (not PK) when the composite PK changes? Example: colA|| colB || counter ---------------------- 1 || 2 || 1 ---------------------- 4 || 3 || 1 ---------------------- 1 || 3 || 2 Here the…
TestNInja
  • 177
  • 2
  • 15
0
votes
0 answers

Handling jdbc lock exception

For different database technologies, MS-SQL and H2 recently, and even with different applications, I get exceptions from statements that could not acquire a table lock. This happens in particular when accessing the same table from many parallel…
Harald
  • 4,575
  • 5
  • 33
  • 72
0
votes
1 answer

Buffer overflow issue when rows in vault is more than 200

We have developed an app, which creates obligations in vault in a table. If the row size of the table is less than 200, the application works fine. However, if the rows are more than 200 then during the execution it gives the following error -…
vikash singh
  • 1,479
  • 1
  • 19
  • 29
0
votes
1 answer

Liquibase DB specific scripts for single project

I have spring boot project with postgresql as main DB and H2 as in-memory DB for testing. I've added a PL/pgSQL procedure to execute some custom logic and now my tests stop working. how liquibase users usually resolve such cases? my procedure is…
Alex
  • 1,940
  • 2
  • 18
  • 36
0
votes
0 answers

How to create STUFF function in H2 in memory database?

How to create STUFF function in H2 in memory database? This is required to write Junit for a DAO function which uses query having "STUFF" function to query MS SQL database. I tried extending H2Dialect but not sure how to register this function in…
scorpy
  • 21
  • 7
0
votes
2 answers

Return only duplicate values from table

I am new to sql and I am facing a problem. I have a table of call records which contains two columns Anumber and Bnumber. If any number calls, a new row is added to the table with Anumber as Source and Bnumber as Destination. I have given two…
Noob Player
  • 279
  • 6
  • 25
0
votes
0 answers

two sub query in sql

I am working on an application in which I have to retrieve min and max date from DATETIME Column and then set min and max value to JSlider. My Date format present in database : 2017-06-22T03:16:26Z But I only want date in two formats 20170622031626…
Noob Player
  • 279
  • 6
  • 25