public class Script extends Tool
| 构造器和说明 |
|---|
Script() |
| 限定符和类型 | 方法和说明 |
|---|---|
static void |
main(String... args)
Options are case sensitive.
|
static void |
process(Connection conn,
String fileName,
String options1,
String options2)
Backs up a database to a stream.
|
static void |
process(String url,
String user,
String password,
String fileName,
String options1,
String options2)
Backs up a database to a stream.
|
void |
runTool(String... args)
Run the tool with the given output stream and arguments.
|
isOption, printNoDatabaseFilesFound, setOut, showUsage, showUsageAndThrowUnsupportedOption, 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 在类中 Toolargs - the argument listSQLExceptionpublic static void process(String url, String user, String password, String fileName, String options1, String options2) throws 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)SQLExceptionpublic static void process(Connection conn, String fileName, String options1, String options2) throws SQLException
conn - the connectionfileName - the target file nameoptions1 - the options before the file nameoptions2 - the options after the file nameSQLExceptionCopyright © 2017. All rights reserved.