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 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 execute(String url, String user, String password, OutputStream out)
Backs up a database to a stream.
static void execute(String url, String user, String password, OutputStream out) throws SQLException
Backs up a database to a stream. The stream is not closed.
Parameters:
url - the database URL
user - the user name
password - the password
out - the output stream
static void main(String... args)
Options are case sensitive.
static void main(String... args) throws SQLException
Options are case sensitive. Supported options are:
[-help] or [-?] Print the list of options
[-url "<url>"] The database URL (jdbc:...)
[-user <user>] The user name (default: sa)
[-password <pwd>] The password
[-script <file>] The target script file name (default: backup.sql)
[-options ...] A list of options (only for embedded H2, see SCRIPT)
[-quiet] Do not print progress information
Parameters:
args - the command line arguments
void runTool(String... args)
void runTool(String... args) throws SQLException