Teradata offers many ways to connect and query our database with our Tools and Utilities(TTU) package - BTEQ, BTEQWin, SQLA and the TD Eclipse plug-in.
These are great tools and we're here to promote them and help you get the most from them. But we're techies too and we understand that there are times when you want to use your own tool of choice. We get it and we're here to help you with this option as well.

Let's take SQuirrel as an example. This is a great, popular SQL client tool and yes, it plays well with Teradata. Here's a quick start-up guide to get you running your Teradata queries with it in no time.

What do we need?

  • If you haven't installed SQuirrel yet, you can get it from their website: http://squirrel-sql.sourceforge.net.
  • If you need a Teradata database for your development, install our Teradata Express edition: http://developer.teradata.com/tools/articles/teradata-express-edition-12-0, otherwise we just need your account and connection information.
  • And finally, download the latest Teradata JDBC driver here: http://developer.teradata.com/download/connectivity/teradata-jdbc-driver-13-0-0-6

Installing Teradata's JDBC driver.

The Teradata JDBC package can be downloaded as either a ZIP file or a TAR file. Basically it's 2 jar files that you need to put into your classpath:

  • terajdbc4.jar
  • tdgssconfig.jar

In this example, I created a new folder, "c:\Program Files\Java\myjars", extracted the files to this folder and finally updated my classpath environment to include both jar files explicitly.
Be sure to update your classpath before starting up SQuirrel to ensure that the new path environment is being used.

Configuring SQuirrel for Teradata

Start up SQuirrel and click on the Drivers tab along the left edge.
 

This lists all the database connectivity options currently configured and available. What we want to do is add our Teradata JDBC driver, so go ahead and click the green PLUS icon.
Scrolling to the bottom of the list of drivers should display our Teradata jar files in our Java classpath. I've added some default values here as well that can be used for a local TD Express installation.

Click OK and you should see a green success message at the bottom of the window.

Now click on the Aliases tab on the left edge. Creating an Alias is where we'll add your username/password parameters in order to connect to the database. Once again, click the green PLUS icon.

I've named this Alias "Teradata local", used the same JDBC url as my connection string and also the TD Express default user, tduser (and tduser as the password - shhh!).

Connect


You should now be able to click the Connect icon to establish a session with Teradata and start browsing your database objects. Here's a screen shot with the TD Express sample objects:

Here's the output from everyone's favorite query:

SELECT Name, Salary 
FROM  retail.Employee 
WHERE Salary > 100000
ORDER BY Salary DESC

 

 


 

That's it. SQuirrel is now configured to connect to Teradata and we have a nice tool for browsing the database objects and running queries.

Have fun and go nuts!

 

 

 

 

Discussion
turgs 1 comment Joined 08/10
14 Aug 2010

Brilliant.

xwang2 2 comments Joined 10/10
27 Oct 2010

how to create a stored procedure here

lynxstormcat 3 comments Joined 01/11
22 Jan 2011

This is great! Now i can use code completion to easily type in table/column names :-)

thanks!

red ronkonkoma 2 comments Joined 09/09
25 May 2011

I downloaded the jdbc drivers and installed them but can't connect. The url I entered is jdbc:teradata:
I also tried the IP address. Do I need a port number or something?
I've been running Squirrell using their JBCB to ODBC Bridge and it works ok. Does the jdbc driver give me any advantages?

red ronkonkoma 2 comments Joined 09/09
26 May 2011

I figured out my mistake, the proper URL is:
jdbc:teradata://hostname
Replace hostname with the name of the network host. You need the two slashes. I also downloaded the sample code and found there are some options, for example:
jdbc:teradata://hostname/TMODE=ANSI,CHARSET=UTF8

davebutler 1 comment Joined 06/11
17 Jun 2011

Great instructions Mike!

Red - Thanks your example helped me figure out LDAP usage:
jdbc:teradata:/hostname/LOGMECH=LDAP

I don't see Macros listed in the object hierarchy ... is there a Teradata plugin for Squirrel that adds that?

Teradata Mike 30 comments Joined 04/09
17 Jun 2011

We don't have any specific plug-ins for Squirrel. If you need support for Teradata specific features, try either our SQL Assistant tools (Windows and Java editions) or our Eclipse plug-in. These can be found on our download page:
http://downloads.teradata.com/download

pablo_sbar 1 comment Joined 01/12
12 Jul 2012

Do you know any tool that can be used as a Teradata client that doesnt require installation ?

Venkatesan1 1 comment Joined 08/14
2 months ago

Hi.. I installed Teradata JDBC driver in squirrel and i am trying connect DB.
 
I am getting below error when i connect to user tables.
"Error: [NCR] [Teradata JDBC Driver] [TeraJDBC 03.01.00.103] Unrecognized data type: 601"
There is no error reported while querying System tables.
Please help.
Thanks,
Venkat
 

tomnolan 12 comments Joined 01/08
2 months ago

That is a very old version of the Teradata JDBC Driver. You need to upgrade to a newer version.
http://downloads.teradata.com/download/connectivity/jdbc-driver

You must sign in to leave a comment.