# dblook

Use the `dblook` utility to view all or parts of the Data Definition Language (DDL) for a given database.

To use the `dblook` utility, do one of the following:

- If you are relatively new to the Java programming language, follow the instructions in "Setting up your environment" in Getting Started with Derby to set the `DERBY_HOME` and `JAVA_HOME` environment variables and to add `DERBY_HOME/bin` to your path. Then use the following command:

      dblook -d connectionURL [options]

- If you are a regular Java user but are new to Derby, set the `DERBY_HOME` environment variable, then use a `java` command to invoke the `derbyrun.jar` file (all on one line):

      (UNIX) java [options] -jar $DERBY_HOME/lib/derbyrun.jar dblook
                -d connectionURL [options]

      (Windows) java [options] -jar %DERBY_HOME%\lib\derbyrun.jar dblook
                -d connectionURL [options]

- If you are familiar with both the Java programming language and Derby, you have already set `DERBY_HOME`. Set your classpath to include the Derby jar files. Then use a `java` command to invoke the `dblook` class directly.

      java org.apache.derby.tools.dblook -d connectionURL [options]

- Using dblook
  The syntax for the command to launch the dblook utility is as follows.
- dblook options
  The dblook utility options include the following.
- Generating the DDL for a database
  The dblook utility generates all of the following objects when generating the DDL for a database.
- dblook examples
  The following examples demonstrate how the various dblook utility options can be specified from a command line. These examples use the sample database.