Derby in a Pinch

Quick guide to using the Derby database server.

Download Derby from

Unzip the downloaded file in a folder. We will call the folder <DERBY>.

From the <DERBY>/bin folder, start the network server:

./startNetworkServer -h IP_ADDRESS

Where IP_ADDRESS is the address of the machine where Derby is running. This option will let a remote client connect to Derby. For example:

./startNetworkServer -h

Verify that the server is running:

./NetworkServerControl sysinfo -h

Connect to Derby using ij and do some work.


Enter this command to connect to a database:

connect ‘jdbc:derby://;create=true’;

This will create a folder called MyDB under <DERBY>/bin and create a database there.

Create a table:

create table DUMMY (ID integer PRIMARY KEY, NAME char(128));

View the schema of the new table:

describe DUMMY;

Finish up work.


Shutdown the server:

./stopNetworkServer -h

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s