Thursday, 10 December 2015

Using SQL developer for connecting to DB2 database


To execute queries on IBM DB2 we can use IBM data studio . But if you are already user of SQL developer (using oracle DB) then you can use the same for connecting and executing to DB2 queries. In this post we will see how can we do that.

Using SQL developer for connecting to DB2 database

1. Download the JDBC driver for DB2 (click here). It will be something like db2cc4-4.18.60.jar.

2. Next go to your SQL developer. Go to Tools -> Preferences -> Databases -> Third party JDBC drivers and click on "Add Entry". Next select the driver jar you downloaded in step 1.

3. Next go to New (Ctrl + N) and select database connection. Provide details about your connection. Don't forget to select database type as DB2 rather than oracle (see screenshot) and provide your db details.

4. You can test your connection and save or connect to it. After this you should be good to execute queries on your DB2 database from SQL developer.

NOTE :  Your database connection are stored by SQL developer in location - C:\Users\athakur\AppData\Roaming\SQL Developer\system3.0.04.34\o.jdeveloper.db.connection.\connections.xml
Instead of athakur on the path it will be your username.
t> UA-39527780-1 back to top