This is how I do it: cat script.sql | tail +6 | java -cp ~/Downloads/h2/bin/h2-1.4.200.jar org.h2.tools.RunScript -url "jdbc:h2:~/dev/app/db/h2tmp;MAX_MEMORY_UNDO=0;MAX_OPERATION_MEMORY=0;WRITE_DELAY=0;LOG=0;LOCK_MODE=0;UNDO_LOG=0;REFERENTIAL_INTEGRITY=FALSE" -user sa -script '/dev/stdin'
(I need to skip a few top lines from the backup for some reason) On Wednesday, March 28, 2018 at 5:50:08 PM UTC+3, Martin Lichtin wrote: > > Is there a way using either Shell or RunScript to execute SQL commands > coming from standard input? > -- You received this message because you are subscribed to the Google Groups "H2 Database" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/h2-database/c4cc1ba2-8da6-4c54-ba6f-b0f5fa986e28%40googlegroups.com.
