| java.lang.Object org.h2.tools.RunScript
RunScript | public class RunScript (Code) | | Executes the contents of a SQL script file against a database.
|
Method Summary | |
public static ResultSet | execute(Connection conn, Reader reader) Executes the SQL commands in a script file against a database. | public static void | execute(String url, String user, String password, String fileName, String charsetName, boolean continueOnError) Executes the SQL commands in a script file against a database. | public static void | main(String[] args) The command line interface for this tool. |
execute | public static ResultSet execute(Connection conn, Reader reader) throws SQLException(Code) | | Executes the SQL commands in a script file against a database.
Parameters: conn - the connection to a database Parameters: reader - the reader the last result set |
execute | public static void execute(String url, String user, String password, String fileName, String charsetName, boolean continueOnError) throws SQLException(Code) | | Executes the SQL commands in a script file against a database.
Parameters: url - the database URL Parameters: user - the user name Parameters: password - the password Parameters: fileName - the script file Parameters: charsetName - the character set name or null for UTF-8 Parameters: continueOnError - if execution should be continued if an error occurs throws: SQLException - |
main | public static void main(String[] args) throws SQLException(Code) | | The command line interface for this tool. The options must be split into
strings like this: "-user", "sa",... Options are case sensitive. The
following options are supported:
- -help or -? (print the list of options)
- -url jdbc:h2:... (database URL)
- -user username
- -password password
- -script filename (default file name is backup.sql)
- -driver driver the JDBC driver class name (not required for H2)
- -options to specify a list of options (only for H2 and only when
using the embedded mode)
To include local files when using remote databases, use the special
syntax:
@INCLUDE fileName
This syntax is only supported by this tool. Embedded RUNSCRIPT SQL
statements will be executed by the database.
Parameters: args - the command line arguments throws: SQLException - |
|
|