Running dblook

The Derby??dblook utility is a Data Definition Language (DDL) generation utility.

The dblook utility is a simple utility that dumps all or parts of the DDL of a user-specified database to either a console or a file. The generated DDL can then be used for such things as recreating all or parts of a database, viewing a subset of the objects in a database (for example, those objects that pertain to specific tables and schemas), or documenting the schema of a database.

Choose the method that you can use to run the dblook script:

Method When to Use Command
Run dblook as a standalone command. Use this method if you are relatively new to the Java programming language and new to Derby. You must set your environment variables before you can run the dblook utility using this method.

To run the dblook script from the command line use:

dblook -d databaseURL [options]

The dblook script sets the appropriate environment variables, including the CLASSPATH, and runs the dblook utility.

Run dblook using the jar file that is located in the directory where dblook resides. Use this method if you are new to Derby, but are familiar with the Java programming language. You must set the DERBY_HOME environment variable before you can run the dblook utility using this method.

On UNIX, the command is:

java [options] -jar $DERBY_HOME/lib/derbyrun.jar dblook -d databaseURL [options]

On Windows, the command is:

java [options] -jar %DERBY_HOME%\lib\derbyrun.jar dblook -d databaseURL [options]
Run dblook using the java command. Use this method if you are familiar with both the Java programming language and Derby, and you have already set the java.exe file in your command execution PATH. You must set your CLASSPATH. Use the steps specified in Manually setting the CLASSPATH environment variable. Then specify the class name in the java command. For example:
java org.apache.derby.tools.dblook -d databaseURL [options]
See "Using dblook" in the Derby Tools and Utilities Guide for more information about using the dblook utility.