Skip to Content

Why SQuirreL

In the Integration world, we integrate with heterogeneous databases. Usually we have dependencies on DBA to know the test results and sometimes, it’s a struggle to get the right tool for Database.

SQuirreL is a solution for any platform since it’s written in Java and it supports almost every RDBMS in existence.

Scope

It will be useful for SAP PI consultants and also any other developers who are working on any JDBC based application.

Introduction

SQuirreL SQL Client is a graphical Java program that will allow you to view the structure of a JDBC compliant database, browse the data in tables, issue SQL commands etc. SQuirreL SQL Client is free as open source software that is distributed under the GNU Lesser General Public License

How to Install


You can download the SQL Squirrel client from following URL.

http://sourceforge.net/projects/squirrel-sql/files/1-stable/3.3.0/squirrel-sql-3.3.0-install.jar/download

How to Set Up


Below are the steps to setup SQL SQuirreL. I am using DB2 Database as an example.


  • Install the software for SQL SQuirreL from the link provided above.
  • Find the JDBC driver over the internet for your database. For this blog, I have used DB2 Driver
  • Launch SQL SQuirreL and you will get the following screen:

SQL Driver.jpg

  • Locate the driver you want to modify (click on pencil icon) or add a new driver (click on plus icon). Provide the following parameters to add a new driver:      
    1. Provide a name to the driver
    2. Change the Example URL to jdbc:db2://hostname:port/dbname to your JDBC connection string.
    3. Change the website URL to http://www-306.ibm.com/software/data/db2
    4. Select Extra Class Path and click on Add button to select the JDBC driver from your system.
    5. Provide the appropriate class name (JDBC driver) as shown below:

SQl2.jpg

  • Next step is to create Alias for your Database. Click on Aliases from left tab and click plus icon to add a new Alias.

Alias1.jpg

  • Choose the driver in the drop down list, which was added in the previous step (ex. DB2) and provide the connection URL and credentials

Alias2.jpg

  • New connection (TEST_DB2) is added under alias, Double click on the same.

/wp-content/uploads/2013/09/conn1_283689.jpg

  • Click on connect button to connect to the database.

/wp-content/uploads/2013/09/conn2_283690.jpg

  • We are now connected to database as below:

/wp-content/uploads/2013/09/conn3_283691.jpg

How to Use

Below are the steps to use SQL SQuirreL. I am using DB2 Database as an example.

  • Once you are connected to database, two tabs (SQL, and Objects will appear)

/wp-content/uploads/2013/09/test1_286316.jpg

  • Under the Objects tab, you can find the different Schemas, Tables, views and stored procedure

/wp-content/uploads/2013/09/test2_286317.jpg

  • Select any Table name and you can find the details (Row Count, Columns, Content, Primary key etc.) of that table

/wp-content/uploads/2013/09/test3_286318.png

  • Under the SQL Tab, you can build and execute your own query. E.g. Write a select/update query and click on run SQL

/wp-content/uploads/2013/09/test4_286320.jpg

  • Results will appear in the below pane as shown:

/wp-content/uploads/2013/09/test5_286321.png

Tip


By default the result rows is limited to 100, But you can change the same by changing the value in below box or uncheck the flag (Limit rows) in the right top corner of SQuirreL tool

/wp-content/uploads/2013/09/line1_286322.png.

To report this post you need to login first.

Be the first to leave a comment

You must be Logged on to comment or reply to a post.

Leave a Reply