Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Examples of JDBC URLs, slight restructuring

...

This section refers to the command-line tool. For information on the uses of the java library, please refer to our java documentation.

...

Commands

JDBC2XML registers under several aliases on the command line, to cover the most common usecases. They are presented here with minimal options, see provides several commands, triggering different operations.

The following command overview only shows the absolut minimal number of options.

Usually more options are needed, especially --user--password, and (Linux only) --jdbc-drivers.

See far below for a full list of options below, as well as examples for JDBC URLs.

Dumping a DB to XML

...

No Format
jdbc2xml --url <jdbc-url> --file <path-to-file>

See below for details and example for JDBC URLs.

Restoring a DB from XML

...

No Format
xml2jdbc --file <path-to-file> --url <jdbc-url>

...

No Format
jdbcextr --url <jdbc-url> --file <path-to-file>

Full list of options

Database access

...

JDBC URLs

JDBC URLs basically look like jdbc:servertype://host[:port]/db[?options]):?options., but some Databases and/or JDBC Drivers like other variants.

Typical examples are:

No Format
# MySQL
jdbc:mysql://localhost:3306/MYDATABASE
 
# MSSQL
jdbc:sqlserver://localhost:1433;databaseName=MYDATABASE;

Full list of options

Database access

JDBC URL to access the DB.

No Format
--from-url "jdbcurl"
--to-url "jdbcurl"
--url "jdbcurl"

...

No Format
--from-driver drivername
--to-driver drivername
--driver drivername

linux Linux only: add given drivers to the classpath

No Format
--jdbc-drivers jarfilename[;jarfilename...]

Options for

...

jdbc behaviour

Change the batch size for inserts (def.: 1000)

...

Fetch the contents of the database using a read-only transaction

No Format
--transactional

Options for

...

xml reading

Enable schema checking on the xml file

...

No Format
--create-fk-indices

Options for

...

xml creation

Force or supress pretty printing of xml data

...