0

Is it possible to keep your h2 database in file instead of memory? Now my JDBC URL is: jdbc:h2:mem:testdb. I would like to keep the h2 database in file. I want my JDBC URL to be something like that: jdbc:h2:file:./data/sample. How to do that?

sztukers
  • 103
  • 1
  • 12

1 Answers1

3

Yes it is possible, just do jdbc:h2:/file/path.

More information here: http://www.h2database.com/html/cheatSheet.html

Michal Fudala
  • 340
  • 2
  • 10