public class Script extends Tool
| Constructor and Description |
|---|
Script() |
| Modifier and Type | Method and Description |
|---|---|
static void |
main(java.lang.String... args)
Options are case sensitive.
|
static void |
process(java.sql.Connection conn,
java.lang.String fileName,
java.lang.String options1,
java.lang.String options2)
Backs up a database to a stream.
|
static void |
process(java.lang.String url,
java.lang.String user,
java.lang.String password,
java.lang.String fileName,
java.lang.String options1,
java.lang.String options2)
Backs up a database to a stream.
|
void |
runTool(java.lang.String... args)
Run the tool with the given output stream and arguments.
|
isOption, printNoDatabaseFilesFound, setOut, showUsage, showUsageAndThrowUnsupportedOption, throwUnsupportedOptionpublic static void main(java.lang.String... args)
throws java.sql.SQLException
| [-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 |
args - the command line argumentsjava.sql.SQLExceptionpublic void runTool(java.lang.String... args)
throws java.sql.SQLException
Toolpublic static void process(java.lang.String url,
java.lang.String user,
java.lang.String password,
java.lang.String fileName,
java.lang.String options1,
java.lang.String options2)
throws java.sql.SQLException
url - the database URLuser - the user namepassword - the passwordfileName - the target file nameoptions1 - the options before the file name (may be an empty string)options2 - the options after the file name (may be an empty string)java.sql.SQLExceptionpublic static void process(java.sql.Connection conn,
java.lang.String fileName,
java.lang.String options1,
java.lang.String options2)
throws java.sql.SQLException
conn - the connectionfileName - the target file nameoptions1 - the options before the file nameoptions2 - the options after the file namejava.sql.SQLException