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, 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 execute(String url, String user, String password, String fileName) throws SQLException
url
- the database URLuser
- the user namepassword
- the passwordfileName
- the script fileSQLException
public static void execute(String url, String user, String password, OutputStream out) throws SQLException
url
- the database URLuser
- the user namepassword
- the passwordout
- the output streamSQLException
Copyright © 2012 JBoss by Red Hat. All Rights Reserved.