Chapter 12. Batch Mode

This chapter describes command line options available for running JRaceman in batch mode.

Command line options are case-insensitive; the command -initDB can be entered as -initdb, -INITDB, or -InitDb with equal effect.

Some commands are action commands, which cause JRaceman to take the specified action. If no action command is specified, JRaceman will take its default action, which is to open the main JRaceman editing window. The following commands are action commands for which JRaceman will not open its main window: -checkUpgrade, -createDB, -exportDB, -initDB, -repair, -runserver, -sql, -sqlFile, -sqli, -upgrade.

The following command line options can be specified:

Command Line Options

-checkUpgrade

Check to see if the database needs to be upgraded in order to use this version of JRaceman.

-createDB

Create an empty database at the specified location.

-Dname=value

Set the specified Java system property to the specified value.

-database databasepath

Specify the location of the database to use. The shorter command -db is equivalent to -database.

-dbhost hostname

Specify the hostname of the database server to use. Use this command line option instead of the -database option when you want to run in client/server mode rather than in standalone mode. See the -runserver option.

-debug

Turn on the debug flag.

-exportDB exportpath

Export the contents of the standard tables and columns to a file at the specified location.

-help

List these command line options.

-initDB

Create a database at the specified location and upgrade it to be compatible with this version of JRaceman. This command is equivalent to -createDB -upgrade.

-password password

Specify a database password.

-repair

Attempt to repair a corrupted database. Make sure no other JRaceman program is accessing the database when this option is used. This runs the Mckoi database repair tool. Depending on the amount of corruption, this may or may not be able to fix the problem. If the corruption can not be repaired, you will have to go back to a recent backup.

-runserver

Run a database server. The server listens on port 9157. After the server has started, run clients by using the -dbhost option. Shut down the server using the -sql option with the SHUTDOWN command.

-setDefaultDB databasepath

Set the default database path to use when JRaceman is run without the -db command line option. This option is only available on Windows.

-sql sqlcode

Execute the specified SQL command.

-sqlFile filename

Read and execute SQL commands from the specified file.

-sqli

Enter SQL-interactive line mode. In this mode, you can type in arbitrary SQL commands.

-testDbRootDialog path

A debugging option to test the DB Root dialog.

-textSnapShot outdir

Export a text snapshot of the database to a dated file in the specified directory.

-trace

Turn on trace mode for debugging.

-tuneProgress

A debugging option to tune the progress bar in the startup dialog.

-upgrade

Upgrade the database to be compatible with this version of JRaceman.

-user username

Specify a database username.