Squelch—JDBC Console SQL Client

This is a basic SQL client that will let you connect to a database so long as you have:

In particular, Squelch does not need a graphical display; it's intended for cases where you don't have access to one. If you do have a graphical UI, then you'll probably be much happier using a fancier tool; personally, I like Squirrel SQL a lot.

To use it,

  1. Download this JAR file, which contains both the Squelch code and its dependencies.
  2. If you are using Oracle, MS SQL Server, or MySQL, you'll need to download an appropriate JDBC JAR separately. (The PostgreSQL JDBC driver is already included inside Squelch's JAR.)
  3. (Optional) Create a configuration text file in this format:
    db.user=username-goes-here
    db.password=password-goes-here
    db.url=jdbc:postgresql:dbname
    (You can also pass these settings as parameters on the command-line but you may not want to do that, because anyone else on the server can then spot your db password in the process listing.)
  4. If you are using PostgreSQL, start Squelch either like this:
    java -jar squelch-0.1-jar-with-dependencies.jar -c /path/to/config/text/file
    or like this:
    java -jar squelch-0.1-jar-with-dependencies.jar -r jdbc:postgresql:dbname -u username-goes-here -p password-goes-here
  5. If you are using MS SQL Server, MySQL or Oracle, you'll need to add your JDBC driver JAR file to your CLASSPATH like this:
    $ CLASSPATH=/path/to/jdbc/driver.jar:`pwd`/squelch-0.1.jar-with-dependencies.jar:${CLASSPATH}
    and then invoke Squelch like this:
    $ java net.jaekl.squelch.Squelch -c /path/to/config/text/file
    or like this:
    java -jar squelch-0.1-jar-with-dependencies.jar -r jdbc:oracle:thin:@//hostname:1521/dbname -u username-goes-here -p password-goes-here
    Note: As of this writing, I have tested Squelch with PostgreSQL and Oracle. If you have trouble with MySQL or SQL Server, please let me know.

Commands are currently limited to:

[Picture of feet squelching through sand on a wet beach]

To build Squelch from source, fetch the code from my GIT repository. I try to keep the head-of-stream in a good state, but you may want to double-check by visiting my Jenkins server, and the code coverage report first.

Provided that you have

installed in your path, building should be a simple matter of
$ mvn package

This page was last updated on Fri Jun 24 19:57:06 JST 2016