Script

Creates a SQL script file by extracting the schema and data of a database.

Methods
static void execute(String url, String user, String password, String fileName)
Backs up a database to a SQL script file.
static void main(String[] args)
The command line interface for this tool.
void run(String[] args)

static void execute(String url, String user, String password, String fileName) throws SQLException

Backs up a database to a SQL script file.

Parameters:
url - the database URL
user - the user name
password - the password
fileName - the script file

static void main(String[] args) throws SQLException

The command line interface for this tool. The options must be split into strings like this: "-user", "sa",... Options are case sensitive. The following options are supported:
  • -help or -? (print the list of options)
  • -url jdbc:h2:... (database URL)
  • -user username
  • -password password
  • -script filename (default file name is backup.sql)
  • -options to specify a list of options (only for H2)


Parameters:
args - the command line arguments
Throws:
SQLException

void run(String[] args) throws SQLException