public class Script extends Tool
| Constructor and Description |
|---|
Script() |
| Modifier and Type | Method and Description |
|---|---|
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,
String fileName)
Backs up a database to a SQL script file.
|
static void |
main(String... args)
Options are case sensitive.
|
void |
runTool(String... args)
Run the tool with the given output stream and arguments.
|
isOption, printNoDatabaseFilesFound, setOut, showUsage, throwUnsupportedOptionpublic static void main(String... args) throws 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 argumentsSQLExceptionpublic void runTool(String... args) throws SQLException
ToolrunTool in class Toolargs - the argument listSQLExceptionpublic static void execute(String url, String user, String password, String fileName) throws SQLException
url - the database URLuser - the user namepassword - the passwordfileName - the script fileSQLExceptionpublic static void execute(String url, String user, String password, OutputStream out) throws SQLException
url - the database URLuser - the user namepassword - the passwordout - the output streamSQLExceptionCopyright © 2012 JBoss by Red Hat. All Rights Reserved.