Command line

To launch DbMaintain from the command line, you have to create a properties file that configures the location of your scripts and the target database, for example:


# Comma-separated list of all database schemas used.

Make sure you've correctly set JAVA_HOME to your JRE or J2SDK home directory, and set DBMAINTAIN_HOME to the installation directory of dbmaintain. Set DBMAINTAIN_JDBC_DRIVER to the jar file that contains the necessary JDBC driver for your DBMS, or edit the file bin/ (or .bat) to set JDBC_DRIVER to the correct value. Then execute following command (Replace .sh by .bat if you're using windows)

/path/to/dbmaintain/ updateDatabase path/to/scriptFolderOrArchive

To use a different config file than, add the parameter -f followed by the config file name. System properties can also be used to configure the command line.

See the ant tasks page for more info on the available operations. The full list of configuration properties can be found on the configuration page.