sqldump /

Filename Size Date modified Message
769 B
95 B
383 B
5.8 KB
874 B
414 B
7.9 KB
5.0 KB
934 B
1.1 KB
364 B
347 B
18.7 KB
3.5 KB


Utility to dump schema and data from a RDBMS. Features:

  • Does schema-dumping, using (mainly) standard java API, by way of java.sql.DatabaseMetaData
  • Does data-dumping (formats: csv, xml, html, json, sql 'insert into', sql 'update by PK', fixed column size, blob)
  • Can be used with any JDBC-compliant databases
  • Generates Entity-Relationship diagrams based on Tables and FKs (graphML output - yEd recommended)
  • Flexible schema output patterns (based on schema name, object type and object name)
  • Translation of metadata (column types) between different RDBMS dialects/implementations (partial)

SQLDump also has two subprojects:

Author: Telmo Brugnara <>

License: AGPLv3

SQLDump - Basic Process

SQLDump processing consists of:

  1. 1 Grabber (implementation of SchemaModelGrabber, grabs a SchemaModel)
  2. 'n' Processors (implementation of AbstractSQLProc, usually uses a Connection)
  3. 'n' Dumpers (implementation of SchemaModelDumper, dumps a SchemaModel)

Grabber can be:

  • JDBCSchemaGrabber - Grabs schema metadata from a JDBC connection
  • JAXBSchemaXMLSerializer - Grabs schema metadata from a XML file

Processors can be:

  • DataDump - Dumps data based on grabbed schema (can partition data from 1 table in different files, can dump in different formats)
  • SQLQueries - Dumps data based on SQL-queries (same as DataDump - for each query)
  • graph.ResultSet2GraphML - Dumps a graphML diagram based on a SQL-query
  • SQLDialectTransformer - Transforms schema models between different sql-dialects

Dumpers can be:

  • SchemaModelScriptDumper - Dumps schema model in SQL-script format (DDL)
  • JAXBSchemaXMLSerializer - Dumps a XML representation of the schema model
  • graph.Schema2GraphML - Generates a Entity-Relationship diagram based on schema model
  • mondrianschema.MondrianSchemaDumper - Generates a Star/Snowflake Mondrian Schema based on schema model
  • xtradumpers.AlterSchemaSuggester - Generates suggestions of SQL-scripts for altering the schema model (beta)

All processing is controlled by a properties file. See for more info.

Usage examples can be found at doc/examples.


Usage (with sources & ant)

  • Run (with ivy) ant resolve-ivy or (without ivy) ant resolve-get
  • Run ant compile
  • Copy to
  • Edit
  • Copy to
  • Edit
  • Run ant run

Usage (with sources, without ant)

  • Download dependencies to /lib
  • Copy to
  • Edit
  • Compile sources into bin
  • Run tbrugz.sqldump.SQLDump, e.g., java -cp bin;lib/kmlutils.jar;lib/commons-logging-1.1.1.jar;lib/log4j-1.2.15.jar;<jdbc-driver-path> tbrugz.sqldump.SQLDump <options>

Usage (without sources)

  • Download sqldump.jar jar from sqldump/downloads (may be outdated)
  • Download jar dependencies, especially apache-commons-logging, to lib (may be downloaded from sqldump/downloads)
  • (windows) Download sqldump.bat.template as sqldump.bat or (unix-like) download as
  • Download latest version of as
  • Download jdbc jars for your database of choice
  • Edit and (windows) sqldump.bat or (unix-like) (you may include command-line options at end)
  • (windows) Run sqldump.bat
  • (unix-like) Run or run tbrugz.sqldump.SQLDump, e.g., java -cp sqldump.jar:lib/kmlutils.jar:lib/commons-logging-1.1.1.jar:lib/log4j-1.2.15.jar:<jdbc-driver-path> tbrugz.sqldump.SQLDump <options>

Command-line options

  • -propfile=<path-to-prop-file>: loads a different config properties file
  • -usesysprop: loads system properties besides the config file properties