How to set up SQuirreL SQL Client for Netezza

This article describes how to set up SQuirreL SQL Client for Netezza. There is not much free SQL query tools available for MacOS and Linux, but SQuirreL is an exception. It uses JDBC for connecting to Netezza, so first thing you need is Netezza JDBC driver. Netezza JDBC driver you can find  for example from latest Netezza Linux client, for example (it is inside npsclient.7.2.1.X-PX.tar.gz  as lib/nzjdbc3.jar).

Download and install SQuirreL SQL Client

  1. Download SQuirreL jar installer package from: http://www.squirrelsql.org/
  2. You need to have Java JDK installed to run and install SQuirreL. As of writing this HOWTO latest JDK can be downloaded from: http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
  3. Once the jar installer is downloaded, run it with: java -jar squirrel-sql-3.7.1-MACOSX-install.jar
  4. Accept the defaults and choose which plugins you need. In my example I have chosen plugins “Multi source”, “Data import”, “MySQL”, “Netezza”, “Oracle”, “PostgreSQL”, “Session Scripts”. “Smart Tools”, “SQL Parametrisation”, “SQL Replace” and “SQL Validator” .
  5. Click Next and Done and you have SQuirreL SQL Client installed on you system.

Configure SQuirreL SQL Client for Netezza

Before beginning configuring the driver, you need to have Netezza JDBC driver nzjdbc3.jar stored on you computer. Netezza JDBC driver can be found for example from Netezza Linux Client under the 32bit Linux tar archive.

Configure the Netezza driver

Once SQuirreL SQL Client is started, first thing to do, is to add Netezza JDBC driver to available drivers on SQuirrelL SQL CLient. In Netezza’s case, there is no Netezza driver on list of drivers, so we will add one.

  1. I stored Netezza JDBC driver under $HOME/Java, but you can choose a different location.
  2. Click Drivers tab and and then click  sign to add new driver.
  3. Highlight “Extra Class Path” tab and click “Add” to add the Netezza JDBC driver you have earlier stored to you computer.
  4. Set “Name” to “Netezza”, “Example URL” to “jdbc:netezza://<host>:5480/<dbname>”, “Websitete URL” to “http://ibm.com” and most importantly set “Class Name” to “org.netezza.Driver”. Once done, click “OK”.

Setup connection to Netezza database

Since SQuirreL SQL Client uses JDBC for connecting to database, it can in theory have only one connection per database. So you need to create one connection per database you are working on because of the JDBC limitation. There is commercial tools like RazorSQL which you can have only one database connection and still connect and query all databases with that same connection, but with SQuirreL SQL Client this is not the case.

  1. To set up your first Netezza database connection on SQuirreL SQL Client, select the “Aliases” tab and click  icon, to add new database connection.
  2. From “Driver pull down list select “Netezza”.
  3. Choose “Name” for you connection ie. the database name you are connecting to.
  4. URL is the form you set up when creating the driver: “jdbc:netezza://<host>:5480/<dbname>”. Set “host” and “dbname” accordingly.
  5. Now you can test the connection. Click “Test” and then “Connect”. If connection is unsuccesful, check the trace to find out the reason.
  6. Once alias is created, you can connect to database. Either double click the alaias or right click it and select connect.

Questions?

If you have any questions or feedback, please connect with me.

2 thoughts on “How to set up SQuirreL SQL Client for Netezza

  1. Hello,

    I am trying to connect to Netezza from a Mac using Squirrel, but it is giving me the error “database connection refused”. Do you have any idea of what could be the reason for this error?

    Thanks & Regards,
    Daniel.

    1. I would start checking that you have port open to the database, so it’s not blocked by firewall. This you can do from mac terminal: telnet ip_address_of_netezza 5480

      If it times out, then it’s firewall. You my need to install telnet first.

      When you test the connection you an also check stack trace to get more details.

      Thanks,

      -Tapio

Leave a Reply to Daniel Cancel reply