Schemacrawler logo

SchemaCrawler

Free database schema discovery and comprehension tool

Database System Support

SchemaCrawler supports almost any database that has a JDBC driver. You can simply download a JDBC driver, and place it in the lib directory. SchemaCrawler will pick it up immediately.

SchemaCrawler is bundled with JDBC drivers for some commonly used relational database management systems (RDBMS) for convenience. The bundled distributions of SchemaCrawler are ready to use for a given database system. However, some JDBC drivers are proprietary, even if free. These JDBC drivers need to be downloaded separately.

The JDBC drivers for database systems commonly used with SchemaCrawler are included with the SchemaCrawler download:

For any other database that includes a compliant JDBC driver, place the JDBC in the SchemaCrawler lib directory. Amazon Aurora is supported in MySQL and PostgreSQL modes.

Additional SchemaCrawler Database Plugins

Some databases such as Oracle TimesTen and SAP IQ need an additional SchemaCrawler database plugins, which are available from the schemacrawler/SchemaCrawler-Database-Plugins project. Please note that these plugins are unsupported. If you would like support, please follow the instructions on the Consulting page.

How To

SchemaCrawler provides database support in two ways. If you are connecting to a database not mentioned above, you can simply provide the database connection URL, a username and password.

For the databases mentioned above, you can provide connection details by using the following command-line options:

For example, typical command-line options for SchemaCrawler for Microsoft SQL Server looks like:

--server=sqlserver \
--host=db.example.com \
--port=1433 \
--database=schemacrawler \
--schemas=schemacrawler.dbo \
--user=schemacrawler \
--password=schemacrawler

You should always use the --schemas command-line switch for databases that support it. The value for the --schemas switch is a regular expression that determines which schemas SchemaCrawler will work with. The “schema” is database-dependent - for example, on Microsoft SQL Server, typically schemas look like “database_name.user”, but for Oracle, typically, schemas look like “USER” (in uppercase).

If a system has environmental variables that contain a value, you can use the supported shell functionality to pass data to SchemaCrawler. For example, --host %DBHOST% on Windows will use the host value specified in the DBHOST environmental variable, and --host $DBHOST will do the same thing on Linux.

Making Connections to a Database

Microsoft SQL Server

You need to specify the host, port, database name, and the schemas you are interested in, for Microsoft SQL Server.

Typical command-line arguments will look like:

--server=sqlserver \
--host=db.example.com \
--port=1433 \
--database=schemacrawler \
--schemas=schemacrawler.dbo \
--user=xxxxx \
--password=xxxxx \
--info-level=standard \
-command=schema

You can also pass connection properties using the --urlx command-line switch.

If your Microsoft SQL Server instance is set up with instance names, named pipes, or Windows authentication, you will need to use a database connection URL. See the documentation for the Microsoft JDBC Driver for SQL Server for details. If you are using the URL version of the command-line, it may be a good idea to include the database name as one of the connection URL property (databaseName).

Typical command-line arguments for connecting to SQL Server with Windows authentication will look like:

--server=sqlserver \
--url=jdbc:sqlserver://db.example.com:1433;databaseName=master;encrypt=false \
--schemas=schemacrawler.dbo \
--user= \
--password= \
--info-level=standard \
--command=schema

or

--server=sqlserver \
--host=db.example.com \
--port=1433 \
--urlx=integratedSecurity=true \
--database=schemacrawler \
--schemas=schemacrawler.dbo \
--user=xxxxx \
--password=xxxxx \
--info-level=standard \
-command=schema

Please make sure that you use the --schemas option to reduce the number of schemas in the output. In the SchemaCrawler interactive shell, use the limit command with this option.

Oracle

You need to specify the host, port, Oracle Service Name, and the schemas you are interested in, for Oracle.

You can use a query similar to SELECT GLOBAL_NAME FROM GLOBAL_NAME to find the Oracle Service Name.

Typical command-line arguments will look like:

--server=oracle \
--host=db.example.com \
--port=1521 \
--database=ORCL \
--schemas=SCHEMACRAWLER \
--user=xxxxx \
--password=xxxxx \
--info-level=standard \
--command=schema

In the example above, “ORCL” is the Oracle Service Name.

MySQL

You need to specify the host, port, database name, and the schemas you are interested in, for MySQL.

Typical command-line arguments will look like:

--server=mysql \
--host=db.example.com \
--port=3306 \
--database=schemacrawler \
--schemas=schemacrawler \
--user=xxxxx \
--password=xxxxx \
--info-level=standard \
--command=schema

PostgreSQL

You need to specify the host, port, database name, and the schemas you are interested in, for PostgreSQL.

Typical command-line arguments will look like:

--server=postgresql \
--host=db.example.com \
--port=5432 \
--database=schemacrawler \
--schemas=public \
--user=xxxxx \
--password=xxxxx \
--info-level=standard \
--command=schema

MariaDB

You need to specify the database connection URL, and the schemas you are interested in, for MariaDB. First make sure that the MariaDB driver is in the lib/ folder.

Typical command-line arguments will look like:

--url=jdbc:mariadb://db.example.com:3306/schemacrawler \
--schemas=schemacrawler \
--user=schemacrawler \
--password=schemacrawler \
--table-types=UNKNOWN,VIEW \
--info-level=standard \
--command=schema

Unconventional Data Sources

Since SchemaCrawler simply uses a conformant JDBC database driver, it can access the schemas of unconventional data sources such as Airtable, Salesforce, or even say Google Calendar. Take a look at the rich variety of JDBC drivers from cdata.