![]() |
VOOZH | about |
DataGrip is a database IDE that allows SQL developers to query, create, and manage databases. When paired with the CData JDBC Driver for IBM DB2, DataGrip can work with live DB2 data. This article shows how to establish a connection to DB2 data in DataGrip and use the table editor to load DB2 data.
The steps below describe how to create a new Data Source in DataGrip for DB2.
For assistance in constructing the JDBC URL, use the connection string designer built into the DB2 JDBC Driver. Either double-click the JAR file or execute the jar file from the command-line.
java -jar cdata.jdbc.db2.jar
Fill in the connection properties and copy the connection string to the clipboard.
Set the following properties to connect to DB2:
You will also need to install the corresponding DB2 driver:
On Windows, installing the IBM Data Server Provider is sufficient, as the installation registers it in the machine.config.
In the Java version, place the IBM Data Server Driver JAR in the www\WEB-INF\lib\ folder for this application.
jdbc:db2:Server=10.0.1.2;Port=50000;User=admin;Password=admin;Database=test;
At this point, you will see the data source in the Data Explorer.
To browse through the DB2 entities (available as tables) accessible through the JDBC Driver, expand the Data Source.
π Exploring the data (Salesforce is shown.)To execute queries, right click on any table and select "New" -> "Query Console."
π Opening a new Query Console.In the Console, write the SQL query you wish to execute. For example:
SELECT Orders.Freight, Customers.ContactName FROM Customers INNER JOIN Orders ON Customers.CustomerId=Orders.CustomerIdπ Querying with SQL (Salesforce is shown.)
Download a free, 30-day trial of the CData JDBC Driver for IBM DB2 and start working with your live DB2 data in DataGrip. Reach out to our Support Team if you have any questions.
Download a free trial of the IBM DB2 Driver to get started:
Download NowLearn more:
π IBM DB2 IconRapidly create and deploy powerful Java applications that integrate with IBM DB2.