Uncataloged Connections

Occasionally, you might want to write an application that enables users to create connections to databases without going through the hassle of cataloging the node and database from the command line. It is possible to create a data source name (DSN) for use within CLI, ODBC, Perl, PHP, and Python applications to connect to an Apache Derby database through the DB2 client without requiring a cataloged connection. The syntax for the uncataloged connection DSN is a single string; substitute the real host name, database name, and port number on which the Apache Derby Network Server is listening in the following example:

DRIVER={IBM DB2 ODBC DRIVER};HOSTNAME=pook.apache.org;
DATABASE=YMLD;PROTOCOL=TCPIP;PORT=1527;

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.