public class Script
extends org.h2.util.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.
|
public 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.SQLException
- on failurepublic void runTool(java.lang.String... args) throws java.sql.SQLException
org.h2.util.Tool
runTool
in class org.h2.util.Tool
args
- the argument listjava.sql.SQLException
- on failurepublic 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.SQLException
- on failurepublic 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
- on failure