Connecting with DB2 JDBC Drivers

When connecting to an Apache Derby Network server, an application needs to load a connection URL that is specific to the network server. In addition, a remote connection requires a user name and a password. If authentication has not been set up in Apache Derby, any user name and password can be used, and they are ignored. Refer to Chapter 7, “Security,” for more information on security in Apache Derby.

The URL needed to access the network server is:

jdbc:derby:net://<server>[:<port>]/<databaseName>
   :user=<value>;password=<value>;
   [<Apache Derby URL attribute>=<value> [;...]] 
   [:<Universal Driver attribute>=<value>; [...;]] 

The syntax for connection to the network server differs slightly from the syntax used to ...

Get Apache Derby—Off to the Races: Includes Details of IBM® Cloudscape™ now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.