# Using dblook

The syntax for the command to launch the `dblook` utility is:

    java org.apache.derby.tools.dblook -d <databaseURL> [OPTIONS]

The value for databaseUrl is the complete URL for the database. Where appropriate, the URL includes any connection attributes or properties that might be required to access the database.

For example, to connect to the database 'myDB', the URL would simply be `'jdbc:derby:myDB';` to connect using the Network Server to a database 'C:\private\tmp\myDB' on a remote server (port 1527), the URL would be:

    'jdbc:derby://localhost:1527/"C:\private\tmp\myDB"
    ;user=someusr;password=somepwd'

As with other Derby utilities, you must ensure that no other JVMs are started against the database when you call the `dblook` utility, or an exception will occur and will print to the `dblook.log`. If this exception is thrown, the `dblook` utility will quit. To recover, you must ensure that no other Derby applications running in a separate JVM are connected to the source database. These connections need to be shutdown. Once all existing JVMs running against the database have been shutdown, the `dblook` utility will execute successfully. You can also start the Derby Network server and run the `dblook` utility as a client application while other clients are connected to the server.

Parent topic: dblook
Related concepts
Generating the DDL for a database
Related reference
dblook options
dblook examples