SourceForge Logo Squirrel SQL Client Logo

SQL Client Quick Start

Contents
Introduction
The Driver
The Alias
Connecting

Introduction

There are two pieces of information you need to supply to connect to a database; the driver and the alias. The driver specifies the JDBC driver to use and the alias specifies the connection parameters.

The Driver

A number of default driver definitions ship with Squirrel SQL Client. These can be seen in the Drivers Tool Window (View Drivers option on the Windows menu) when you first start up Squirrel SQL Client. You can create new ones using the New Driver option on the Drivers menu.

 Drivers Tool Window The drivers tool window.

All of the default driver definitions assume that the JDBC driver classes are in the current class path. If this is not the case you will need to modify the driver definition to point to the jar file that contains these classes.

This is an example of a driver definition. This dialog can be displayed by selecting a driver definition in the Drivers Tool Window and then selecting the Modify Driver option from the Drivers menu.

 Change Driver dialog

The Name text field specifies an easy to remember name for the database driver definition.

When checked the Load Driver from CLASSPATH checkbox specifies that the classes for the JDBC driver can be found in the current class path. If unchecked then the jar file containing the classes must be specified in the Jar File text field.

For JDBC drivers that are not loaded from the current class path the Jar File text field specifies the jar file that contains the JDBC driver class files. This file can be browsed for via the browse button next to this field.

The Driver Class Name specifies the class name of the JDBC driver. For drivers located by an entry in the Jar File text field all the names of driver classes in the jar file will be displayed in this dropdown. For drivers loaded from the class path you will have to enter the class name manually (it can normally be found in the documentation that comes with the driver). A future enhancement will allow drivers loaded from the class path to be auto-detected as well.

The Example URL shows an example URL for this driver. This can be found in the documentation that comes with the driver.

Press the OK button to save the driver definition.

The Alias

Now you need to create an alias to your database.

Display the Aliases tool window (View Aliases option on the Windows menu). When you run Squirrel SQL Client for the first time this window will be empty.

 Aliases Tool Window The aliases tool window.

Take the New Alias option from the Aliases menu and the following dialog will be displayed.

 Add Alias dialog

Enter a easy to remember name in the Name field for this database URL.

Select the driver for this alias from the Driver dropdown or click on the New button to create a new driver definition.

Change the URL to point to your database.

Optionally enter a user name if you want the alias to default to a specific user.

Press the OK button to save the alias definition.

Connecting

The new alias should now appear in the Connect To dropdown. Select it in the dropdown and enter your user name and password in the connection dialog, press OK and you should be connected.