public class Script extends Tool
Constructor and Description |
---|
Script() |
Modifier and Type | Method and Description |
---|---|
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, throwUnsupportedOption
public 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 argumentsSQLException
public void runTool(String... args) throws SQLException
Tool
runTool
in class Tool
args
- the argument listSQLException
public 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)SQLException
public 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 nameSQLException
Copyright © 2020 JBoss by Red Hat. All rights reserved.