Derby ODBC Driver Getting Started Tutorial
This guide shows you how to download, install and license the Derby ODBC driver.
At the end, you will be able to access your Derby database using isql, an interactive SQL tool included in the ODBC driver distribution.
Step 1: What You Need To Know
Before you begin, contact your database administrator for the following information:
- The host name or IP address of the machine on which the Derby Network Server is running.
- The name of the Derby database that you want to connect to.
- A valid user name and password for this database, if required.
Step 2: Download the Derby ODBC Driver Distribution
Log in at http://www.easysoft.com.
If you have not yet done so, you need to register first. On the registration form, an asterisk (*) indicates that a field is mandatory.
- Download the Easysoft ODBC-Derby Driver distribution for your platform.
- Save the distribution file to a temporary directory on the machine where you want to install the Derby ODBC driver.
Step 3: Install the Derby ODBC Driver
Note You need
root access on the machine where you want to install the Derby ODBC driver.
- Log in to your client system and
cdinto the directory where you downloaded the Derby ODBC driver distribution. For example:
- Unpack the distribution file:
tar -xvf odbc-derby-version-platform.tar
Replace version and platform with the version number and platform contained in the distribution file name.
cdinto the directory created by unpacking the distribution file.
- To start the installation, as
- Accept the default choices throughout the installation by pressing RETURN. To accept the terms of the Easysoft End User License Agreement, type
Yes. At certain points in the installation, the installation script pauses to report its progress. To continue to the next stage, press RETURN.
- When prompted to choose a product to license, choose the Derby ODBC driver by typing its option number.
Next, you need to supply:
- Your full name
- Your company name
- An email contact address. This must be the email address you registered on the Easysoft web site.
- Your telephone number (you need to specify this if you telephone the license request to us).
- Your fax number (you need to specify this if you fax the license request to us).
- A reference number. When applying for a trial license just press ENTER. This field is used to enter a reference number we will supply you for full (paid) licenses.
The License Client asks you to choose a method for obtaining the license. To obtain a license automatically, you need to be connected to the Internet and allow outgoing connections to
license.easysoft.comon port 8884. If you are not connected to the Internet or do not allow outgoing connections through port 8884, the License Client can create a license request file which you can:
- Enter at http://www.easysoft.com/support/licensing/trial_license.html to obtain your license.
- Supply to Easysoft by mail, fax or telephone.
If you choose option , the license request is written to a file named license_request.txt and you should exit the License Client (option ) and complete the installation. Once you have mailed, faxed or telephoned the license request to us, we will return a license key. Add this to the end of the file
At the end of the installation, you will have installed and licensed the Derby ODBC driver, installed the unixODBC Driver Manager and created an ODBC data source.
- Set and export the LD_LIBRARY_PATH environment variable:
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/easysoft/lib:/usr/local/easysoft/unixODBC/lib export LD_LIBRARY_PATH
Note On AIX, replace LD_LIBRARY_PATH with LIBPATH.
The Derby ODBC driver installation creates a sample data source named
DERBY_SAMPLE that you can use as a starting point.
- As root, open
/etc/odbc.iniin a text editor.
- To locate the sample data source, search for
- Change these attribute values:
Attribute Value Server The host name (or IP address) of the machine where your Derby Network Server is running. For example:
Server = myhost
Server = localhost
Database The database to connect to. Unless the database is located in the Derby system directory, include the path. The path can be either absolute or relative to the system directory. User If a user name is required to access your Derby database, supply it with the
Password The password for the user name specified by
cd /usr/local/easysoft/unixODBC/bin ./isql.sh -v DERBY_SAMPLE
- At the prompt, type a select statement or type
helpto display a list of tables. To exit, press RETURN in an empty prompt line.