I've been doing contract work for several years. Different clients use different relational database systems (RDBMS). Some clients use Oracle, others use Sybase, while others use SQL server or DB2. I have also used MySQL and Postgresql for some personal projects. Most RDBMSs include an SQL client that makes it easy to work with them, however each of these SQL clients has their own idiosynchrasies. When you switch RDBMS systems as often as I do, it is hard to get used to using a different SQL client for each project.
Squirrel SQL is a very powerful universal database client. It is written in Java therefore it requires a Java Runtime Environment (JRE) or Java Development Kit (JDK). As long as the RDBMS system you are using has a JDBC driver, Squirrel SQL can connect to it. In this day an age, virtually all RDBMS systems have a JDBC driver, therefore Squirrel SQL can connect to virtually all RDBMS systems.
In this article we will illustrate how to set up and work with Squirrel SQL.
Squirrel SQL can be downloaded from their download page. The downloaded file should be named something like squirrel-sql-2.2final-install.jar (the exact file name depends on the version downloaded).
To install Squirrel SQL, change from a command line and type "java -jar squirrel-sql-2.2final-install.jar" (again, exact file name depends on the version). This will launch a user friendly graphical installer. Just follow the prompts to get Squirrel SQL installed.
To run Squirrel SQL, change directories to the directory where Squirrel SQL was installed and execute squirrel-sql.bat for Windows systems, or squirrel-sql.sh for Linux, Mac OS X or other unix-like systems.
Squirrel SQL should look something like this when it is executed for the first time.
The "Drivers" window shows all JDBC drivers Squirrel SQL comes preconfigured to use. As can be seen in the screenshot, most of the drivers have a red "X" next to them. This means that there is a problem with the driver. Since Squirrel SQL does not include JDBC drivers for most RDBMS, the reason we see a red "X" next to almost every driver is because the JDBC driver for these RDBMS systems is not in Squirrel SQLs CLASSPATH. In the next section we will explain how to add a JDBC driver to Squirrel SQL's classpath.
The "Aliases" window contains connection information for one or more databases. Since the screenshot is displaying Squirrel SQL after a fresh install, there are no aliases defined. Again, adding an alias will be discussed in the next section.