Sunday 31 May 2015

Steps to Generate SQL scripts & Backup the H2 database (Using h2 jar)

  1. Extract h2.jar  into the folder (say c:\h2-jar-extract)
  2. Run the following script from the command prompt (example: c:\h2-jar-extract>java  org.h2.tools.Script -url  jdbc:h2:<path>\<your .mv file> -user <username usually sa> -script h2-dump.zip -options compression zip)java  org.h2.tools.Script -url  jdbc:h2:<path>\<your .mv file> -user <username usually sa> -script h2-dump.zip -options compression zip
  3. Extract h2-dump.zip  , hurray  you can find the scripts in it.

No comments:

Post a Comment