Using the <ph conref="gsconrefs.dita#prod/productshortname"></ph> tools and startup utilities There are several tools and utilities that you might want to use as you begin to work with . Derbyscripts, using Derbytools, usingtoolsin Derbyscriptsin Derby

The tools that are included with are dblook, ij, and sysinfo. You can use the scripts located in the /bin directory to start the tools. These scripts also help you set up your classpath.

The scripts are set up to run in embedded mode. To run these tools with the Network Server, use the following commands:

To show how to use the scripts to launch the tools, the examples in assume that you are using the embedded mode of the database engine.

In addition, there are Derby utilities that are system procedures that you can call by using the ij tool. For example, there are system procedures that you can use to import and export external files. Instructions on how to use these system procedures are included in the and the .

Ways to run the tools

There are several ways to run the tools:

  • Follow the instructions in , then run the tools as standalone commands, as described in this section. You may prefer this method if you will run the tools often, because it saves typing.
  • Do not set your path, but run the tools using the jar file where the tools reside. For example: Operating System Command Windows java -jar %DERBY_HOME%\lib\derbyrun.jar ij UNIX (Korn Shell) java -jar $DERBY_HOME/lib/derbyrun.jar ij

    You may prefer this method if you you already have a Java executable in your path and you do not want to change your path in order to run the tools. This may be the case if you do not run the tools often or if you want to start running the tools as quickly as possible.

    The syntax for using derbyrun.jar for each of the tools is as follows. To see this syntax reminder, run the command java -jar derbyrun.jar with no arguments.

    Operating System Command Windows java -jar %DERBY_HOME%\lib\derbyrun.jar ij [-p propertiesfile] [sql_script] java -jar %DERBY_HOME%\lib\derbyrun.jar sysinfo [-cp ...] [-cp help] java -jar %DERBY_HOME%\lib\derbyrun.jar dblook [arg]* (or no arguments for usage) java -jar %DERBY_HOME%\lib\derbyrun.jar server [arg]* (or no arguments for usage) UNIX (Korn Shell) java -jar $DERBY_HOME/lib/derbyrun.jar ij [-p propertiesfile] [sql_script] java -jar $DERBY_HOME/lib/derbyrun.jar sysinfo [-cp ...] [-cp help] java -jar $DERBY_HOME/lib/derbyrun.jar dblook [arg]* (or no arguments for usage) java -jar $DERBY_HOME/lib/derbyrun.jar server [arg]* (or no arguments for usage)

    The server argument is a shortcut for running the NetworkServerControl tool. For details on using this tool, see the .

    For more information on using derbyrun.jar to run the ij, sysinfo, and dblook tools, see the .

  • Set your classpath to include the $DERBY_HOME/lib/derbyrun.jar file and then use the java command to run the tools, specifying the class name. For example: java org.apache.derby.tools.ij

    You may prefer this method if you need to run the tools on a number of different systems and if you use scripts to set your environment for each one. For details on setting the classpath, see .