Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>IBM Db2 Developer ExtensionNew to Visual Studio Code? Get it now.
IBM Db2 Developer Extension

IBM Db2 Developer Extension

IBM

ibm.com
|
104 installs
| (1) | Free
For Db2 Linux, Unix and Windows
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

IBM Db2 Developer Extension

IBM® Db2® Developer Extension integrates Db2 database development directly into Visual Studio Code (VS Code), enabling developers to do a wide range of tasks without switching tools. Designed for developers, this extension delivers a unified, intuitive environment where you can manage database connections, explore schemas, and write and run SQL. Complete documentation is available in our documentation repository.

Licenses

Before downloading this extension, review the Db2 Developer Extension License Agreement and Third Party Notices.

Overview

This extension provides language support for the Structured Query Language (SQL) syntax used to define, manipulate, and control data in IBM Db2 for Linux, Unix, and Windows databases. It includes productivity features that make it easier to write SQL, such as:

  • Syntax checking and highlighting
  • Code completion and signature help
  • SQL formatting
  • Customizable code snippets
  • DDL generation

And it includes features that enable you to easily:

  • Manage Db2 database connections
  • Install and manage Db2 Community Edition instances locally
  • Execute SQL queries and view results
  • Explore database schemas, tables, views, procedures, and functions
  • View detailed information about database objects
  • Generate SQL queries and application code for database objects
  • Navigate the Db2 catalog
  • Work with secure password handling

For more information about the latest features, see our documentation.

Table of Contents

  • Privacy Notice for Feedback
  • Prerequisites
  • Configuring Java
  • Specifying Port Numbers
  • Extension Settings
  • Known Issues

Privacy Notice for Feedback

Db2 Developer Extension is provided free of charge, but we ask you to provide us feedback via the various means available, such as submitting an issue in our GitHub repository, submitting review comments in the VS Code Marketplace, and keeping the built-in telemetry and crash reports enabled.

This extension uses Microsoft VS Code's Telemetry solution, which collects telemetry data that is used to help understand how to improve the product. While we appreciate the insights this data provides, we also know that not everyone wants to send usage data. You can disable telemetry as described in Disable Telemetry Reporting. You can also read IBM's General Privacy Statement to learn more about our policies.

This current release of Db2 Developer Extension will collect anonymous data for the following events:

  • Activation of this VS Code extension
  • Connecting to Db2 and errors
  • Community edition local instance activation
  • SQL execution errors
  • Navigating the Db2 catalog
  • Deactivation of this VS Code extension

Each of these events is logged with the following information:

  • Event time
  • Operating system and version
  • Country or region
  • Anonymous user and session ID
  • Version numbers of Microsoft VS Code and Db2 Developer Extension

Prerequisites for Installing Db2 Developer Extension

Installing Db2 Developer Extension requires the following software:

Visual Studio Code

  • Db2 Developer Extension 1.1.0 and later: VS Code 1.103.0 or later is required

Db2 Developer Extension is delivered as an extension to VS Code instead of a stand-alone editor, so you must install and configure VS Code first. We recommend always using the latest version of VS Code available. For information about installing and configuring VS Code, see its documentation.

Java Runtime Environment

One of the following Java SDKs or JREs:

  • Oracle Java SDK 17, or 21
  • OpenJDK version 17, or 21
  • Any compatible Java Runtime Environment (JRE) version 17 or higher

Specifying Port Numbers

Db2 SQL Service

The Db2 SQL Service provides support for parsing Db2 SQL syntax and for communicating with Db2. Complete the following steps to specify the port number that the service will run on:

  1. Open VS Code settings and search for the db2-for-luw.servicePort setting.
  2. Specify the port number or numbers that you want to assign to the Db2 SQL Service.
  3. Restart VS Code for the changes to take effect.

Default port: 9000

Extension Settings

This extension provides the following settings:

  • db2-for-luw.servicePort: Port number for the Db2 service (default: 9000)
  • db2-for-luw.maxRows : Number of rows to fetch in table details data tab (default: 1000)

Db2 Community Edition Installation

The extension includes an automated installer for Db2 Community Edition that runs in a Docker container. This feature allows you to quickly set up a local Db2 instance for development and testing without manual configuration.

Prerequisites for Db2 Community Edition

  • Docker: The installer will automatically install Docker if not present
    • macOS: Requires Homebrew (will be installed automatically if needed) and Colima (Will be installed automatically)
    • Linux/WSL: Docker will be installed using the official convenience script
    • Windows: WSL2 is required (the installer will guide you if not installed)

What's Included

After installation, you'll have:

  • SAMPLE Database: IBM's official sample database with pre-populated tables (EMPLOYEE, DEPARTMENT, etc.)
  • Custom Database: Your specified database with sample EMPLOYEE_INFO and EMPLOYEE_SALARY tables
  • Automatic startup: The container is configured to restart automatically

Managing Your Db2 Instance

The extension provides commands to manage your local Db2 instance:

  • Start instance
  • Stop instance
  • Delete instance
  • View instance status

Access these commands through the instance status page.

Features

Connection Management

Create, edit, and manage Db2 database connections with the following capabilities:

  • Secure Password Handling: Option to save passwords securely or enter them only when needed
  • Connection Profiles: Save and manage multiple database connection profiles
  • Connection Status Monitoring: Real-time connection status indicators

Schema Browser

Explore database schemas, tables, views, procedures, and functions with an intuitive tree view:

  • Browse database objects hierarchically
  • Quick search and filtering capabilities
  • Refresh views to see latest database changes

Object Explorer

View detailed information about database objects:

  • Table structures with column details
  • View definitions
  • Stored procedure and function signatures
  • Foreign key relationships

SQL File and Editor

Execute SQL queries and view results with advanced features:

  • Syntax highlighting for Db2 SQL
  • IntelliSense code completion
  • Query execution with result visualization
  • Query history tracking
  • Multiple result set support

Code Generation

Generate SQL queries and application code for database objects:

  • DDL generation for tables, views, and other objects
  • INSERT, UPDATE, DELETE statement generation
  • SELECT statement generation with customizable options
  • Direct copy to SQL editor for immediate execution

SQL Formatting

Format SQL code with customizable options:

  • Automatic indentation
  • Keyword capitalization
  • Line breaking and alignment
  • Configurable formatting rules

Limitations

Db2 Community Edition

  • The Db2 Community Edition instance runs in a Docker container and is intended for development and testing purposes only
  • Initial setup may take 15-20 minutes depending on your system and network speed
  • Requires sufficient disk space for Docker images and database storage (minimum 10GB recommended)
  • On macOS, the first-time setup requires Homebrew installation which may prompt for your system password

General Limitations

  • Some advanced Db2 features available in enterprise editions may not be available in the Community Edition
  • Performance may vary based on Docker resource allocation
  • User privileges may impact installation process

Known Issues

Please report any issues you encounter in our GitHub repository.

Release Notes

For detailed release notes and version history, please visit our documentation.

Support

For support and questions:

  • Visit our documentation
  • Submit issues on GitHub

Enjoy using IBM Db2 Developer Extension!

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft