1209551
📖 Tutorial

How to Seamlessly Transition from Azure Data Studio to the MSSQL Extension for Visual Studio Code

Last updated: 2026-05-14 20:25:53 Intermediate
Complete guide
Follow along with this comprehensive guide

Introduction

With Microsoft ending support for Azure Data Studio, developers who relied on this lightweight tool for building and testing SQL Server and Azure SQL queries need a new solution. The recommended alternative is the MSSQL extension for Visual Studio Code. This modern approach centralizes database development within a widely used, cross-platform editor, aligning with Microsoft's strategy of embedding tools where developers already work. This guide will walk you through the migration process, from initial setup to advanced usage, ensuring you can seamlessly continue your SQL work with enhanced flexibility and integration.

How to Seamlessly Transition from Azure Data Studio to the MSSQL Extension for Visual Studio Code
Source: www.infoworld.com

What You Need

  • A computer running Windows, macOS, or Linux with internet access
  • Visual Studio Code installed (latest stable version)
  • Access to a SQL Server instance (on-premises, Azure SQL Database, Azure SQL Managed Instance, or SQL Server on Linux)
  • SQL Server credentials or Azure Active Directory authentication details
  • Basic familiarity with SQL query syntax

Step-by-Step Guide

Step 1: Install Visual Studio Code (if not already present)

Download the latest version of Visual Studio Code from the official website (code.visualstudio.com). Choose the installer appropriate for your operating system. During installation, you can accept default settings, but consider adding the "Open with Code" context menu option for convenience. After installation, launch VS Code and ensure it updates to the latest version via Help > Check for Updates.

Step 2: Install the MSSQL Extension

Open VS Code and click the Extensions icon in the Activity Bar on the left (or press Ctrl+Shift+X on Windows/Linux, Cmd+Shift+X on macOS). In the search box, type MSSQL. Look for the official Microsoft extension titled MSSQL for Visual Studio Code. Click Install. Once installed, you may be prompted to reload VS Code – click Reload if requested.

Step 3: Connect to Your SQL Server Instance

After installation, a new SQL Server icon appears in the Activity Bar. Click it to open the SQL Server explorer panel. Click Add Connection (the + icon). A field appears at the top of the VS Code window – enter your server name (e.g., localhost\SQLEXPRESS or myserver.database.windows.net). Press Enter. Choose authentication type: SQL Login or Azure Active Directory. Provide your username and password when prompted. You can optionally save the password. After successful connection, you’ll see your server and its databases listed in the explorer.

Step 4: Write and Execute Queries

Right-click a database in the explorer and select New Query. A new editor tab opens with .sql language mode. Write your SQL query, for example: SELECT TOP 10 * FROM sys.tables. To execute, press F5 or click the Run Query button that appears in the editor toolbar. Results appear in a dedicated results panel below the editor. You can also highlight a portion of the query to execute only that part.

Step 5: Explore Advanced Features

The MSSQL extension provides more than basic querying. Use the Command Palette (Ctrl+Shift+P) and type MS SQL to see available actions, such as Connect to Server, Disconnect, or Manage Connection Profiles. You can also access a terminal (via View > Terminal) to run command-line utilities like sqlcmd if installed separately. Additionally, the extension integrates with GitHub Copilot – when writing queries, Copilot can suggest completions based on your schema. Enable this via the Copilot extension (also free for personal use).

How to Seamlessly Transition from Azure Data Studio to the MSSQL Extension for Visual Studio Code
Source: www.infoworld.com

Step 6: Customize Your Environment with Complementary Extensions

Extend VS Code further by installing other Microsoft extensions for database work, such as PostgreSQL or Cosmos DB (if you use Azure data services beyond SQL Server). For better SQL formatting, install SQL Formatter or Prettier with SQL support. To manage version control of your SQL scripts, use the built-in Git integration or install the GitLens extension. These additions transform VS Code into a tailored development environment that includes everything you previously had in Azure Data Studio, plus more.

Tips for Success

  • Keep SQL Server Management Studio (SSMS) for administration. While the MSSQL extension excels at query development, it does not replace SSMS for tasks like server configuration, backups, or security management. Use SSMS alongside VS Code for complete coverage.
  • Leverage the command palette. Many actions in the MSSQL extension are faster via keyboard shortcuts. Learn common commands like MS SQL: Execute Query and MS SQL: New Query to boost productivity.
  • Test connections before relying on them. If you switch between networks or VPNs, the stored connection may fail. Always verify connectivity in the explorer panel.
  • Back up your query history. The extension saves recent queries, but you can also export them as .sql files for version control. Consider storing all query scripts in a dedicated Git repository.
  • Update regularly. The MSSQL extension is actively developed. Check for updates every few weeks via the Extensions panel to get new features and bug fixes.
  • Use keyboard shortcuts for efficiency. For example, Ctrl+E (or Cmd+E) can be set to execute queries. Customize shortcuts in File > Preferences > Keyboard Shortcuts.
  • Explore the integrated terminal. If you need to run sqlcmd or bcp commands, open a terminal inside VS Code rather than switching to a separate application.

Transitioning from Azure Data Studio to the MSSQL Extension for Visual Studio Code is straightforward and brings you into a more unified development ecosystem. By following these steps, you’ll be writing and testing SQL queries faster, with the added benefit of a customizable editor that supports countless other languages and tools. Embrace the change – your workflow will become more efficient and future-proof.