niedziela, 13 grudnia 2015

How to run sql script against H2 file database with single command

There are cases when the quickest way to fix database is by running some sql script. Assuming you have used h2 in the past you're most likly have h2 driver in your m2 repo. Once you found it try the following:
 java -cp h2*.jar org.h2.tools.RunScript -url <URL> -script init.sql
where URL is default jdbc string and can be jdbc:h2:~/test

Brak komentarzy:

Prześlij komentarz