Getting started


This topic guides you through the initial setup, configuration, and basic usage of IBM Db2 Developer Extension.

Prerequisites


Before you begin, ensure that the following software is installed:

  • Visual Studio Code version 1.103.0 or later
  • Java Runtime Environment (JRE) version 17 or later

Installing the Extension


  1. Open Visual Studio Code.
  2. Click Extensions.
  3. Search for IBM Db2 Developer Extension.
  4. Select the extension and click Install.

The IBM Db2 Developer Extension icon (Db2 developer icon) appears in the Activity Bar.

Configuring IBM Db2 Developer Extension


  1. Open Visual Studio Code and click the gear icon (gear icon) and then Settings.
  2. Go to Extensions in the left sidebar and select IBM Db2 Developer Extension Settings.
  3. Configure the following settings as required:

    Db2 developer settings

    • Db2service: Max Rows Set the maximum number of rows to fetch in query results (default is 1000).
    • Db2service: Service Port Enter the port number for the Db2 service (default is 9000).
  4. Click Backup and Sync Settings to save your settings.

Using the IBM Db2 Developer Extension


When you open the Db2 Developer Extension, you can see the DB2 CONNECTIONS pane.

If you already have a Db2 instance:

Click Add Connection button or Add Connection icon (Adding a database connection) in the DB2 CONNECTIONS pane and follow the steps here to create a database connection.

If you do not have a Db2 instance:

Click Create Db2 instance button or Create Db2 Instance icon (Creating new Db2 instance) in the DB2 CONNECTIONS pane and follow the steps here to create one.

Creating Db2 instance

DB2 CONNECTIONS pane


You can see the following icons on the DB2 CONNECTIONS pane.

Icon Icon name Description
Adding a database connection Add Connection Add a database connection.
Opening a new SQL editor Open SQL Editor Open a new SQL Editor to write and run queries.
Refresh schema Refresh Explorer Reload schemas and objects to reflect the latest changes.
Creating new SQL file Create New SQL File Open a new editor tab where you can write and run SQL queries.
Creating new Db2 instance Create Db2 Instance Create a new Db2 instance by using the Community Edition license. After you create a new Db2 instance, the icon label automatically changes from Create Db2 Instance to Update Db2 Instance.
Collapse Collapse All Collapse all objects to return to a compact view.

You can see the following icons on each database connection:

connection toolbar

Icon Icon name Description
Connecting to database Connect Connect to a database.
Editing connection Edit Connection Edit a database connection.
Delete connection Delete Connection Delete a database connection.
Disconnect connection Disconnect Disconnect a database connection. This icon will be visible only after connecting to the database.