Transitioning from Azure Data Studio to Visual Studio Code for SQL Server Development

By

Introduction

With Microsoft ending support for Azure Data Studio, developers who relied on this lightweight tool for SQL Server and Azure SQL query building need a new home. The recommended replacement is the MSSQL extension for Visual Studio Code. This guide walks you through the migration process step by step, ensuring you can continue crafting and testing database queries efficiently within a modern, cross-platform editor that integrates seamlessly with your existing toolchain.

Transitioning from Azure Data Studio to Visual Studio Code for SQL Server Development
Source: www.infoworld.com

What You Need

  • A computer running Windows, macOS, or Linux
  • An active internet connection for downloading software and extensions
  • Access to a SQL Server (on‑premises, Azure SQL Database, or Azure SQL Managed Instance)
  • Appropriate database credentials (username and password, or integrated authentication)
  • Visual Studio Code installed (latest stable version recommended)
  • Basic familiarity with the command line (optional but helpful)

Step-by-Step Guide

Step 1: Install Visual Studio Code

If you don’t already have Visual Studio Code (VS Code) on your machine, download the installer from the official website. Choose the version for your operating system. Run the installer and follow the on‑screen instructions. After installation, launch VS Code. You’ll see a welcome screen with options to customize your editor.

Tip: Keep VS Code updated to benefit from the latest features and security fixes. You can enable automatic updates in the settings.

Step 2: Install the MSSQL Extension

Open VS Code and click on the Extensions icon in the Activity Bar on the left (or press Ctrl+Shift+X). In the search bar, type “MSSQL” and locate the official Microsoft MSSQL extension. Click the green Install button. Once installed, you’ll see a new SQL Server icon appear in the Activity Bar. This extension provides all the core functionality you previously used in Azure Data Studio: connecting to databases, writing queries, and viewing results.

Step 3: Connect to Your SQL Server Instance

Click the SQL Server icon in the Activity Bar to open the SQL Server explorer. Click the Add Connection button (or the “+” icon). In the connection dialog, enter your server details:

  • Server name: e.g., localhost, myserver.database.windows.net
  • Authentication type: SQL Login, Windows Integrated, or Azure Active Directory
  • Database name (optional): Leave blank to see all databases
  • Credentials: User name and password, if using SQL Login

Click Connect. Your server will appear in the explorer with a list of databases. You can expand each database to see tables, views, stored procedures, and more.

Step 4: Explore Database Objects

In the SQL Server explorer, right‑click any object (e.g., a table) to see context actions like Select Top 1000, Script as Create, or Refresh. This is your main navigation area, replacing the object browser you used in Azure Data Studio. You can drag and drop object names into the query editor to save typing.

To view the schema of a table, click the arrow next to its name. Columns, indexes, and keys will appear. Double‑click on any column to copy its name to the clipboard.

Step 5: Write and Execute Queries

Open a new query editor by clicking the New Query button in the SQL Server explorer toolbar, or by pressing Ctrl+N and selecting “SQL” as the language. Type your SQL code, for example:

SELECT * FROM Sales.Customers WHERE City = 'Seattle'

To execute, press F5 or click the Run button. Results appear in a panel below the editor, just like in Azure Data Studio. You can export results to CSV, JSON, or Excel using the toolbar icons.

Note: The MSSQL extension supports multiple result sets, saved queries, and query execution plans. Enable query plans from the toolbar to analyse performance.

Transitioning from Azure Data Studio to Visual Studio Code for SQL Server Development
Source: www.infoworld.com

Step 6: Use the Integrated Terminal for Administrative Tasks

One advantage of VS Code is its built‑in terminal. Open it with Ctrl+`. You can run command‑line tools like sqlcmd, bcp, or Azure CLI commands directly. For example, to run a T‑SQL script file:

sqlcmd -S myserver -d mydb -U myuser -P mypass -i script.sql

This replaces the command‑line pane you may have used in Azure Data Studio. Because VS Code’s terminal supports multiple profiles (PowerShell, bash, etc.), you can choose the environment that fits your workflow.

Step 7 (Optional): Integrate with GitHub Copilot for AI‑Assisted Queries

If you already use GitHub Copilot in VS Code, you can use it to speed up query writing. After installing the Copilot extension (separate subscription required), start typing a comment or a few characters of SQL, and Copilot will suggest completions. For instance, type -- Find all customers who ordered in 2024 and press Tab to accept a generated query. This integration brings modern AI assistance to your SQL development, building on the heritage of Azure Data Studio’s simplicity while adding intelligence.

Tips for a Smooth Transition

  • Export your saved connections: Before uninstalling Azure Data Studio, export your connection settings (File → Export Settings). In VS Code, you can import them via the MSSQL extension’s settings (search for “MSSQL: Connections” in the VS Code settings JSON).
  • Learn keyboard shortcuts: Many Azure Data Studio shortcuts (e.g., F5 to run, Ctrl+Shift+E to expand) work similarly in VS Code. Press Ctrl+K Ctrl+S to view and customise all shortcuts.
  • Use multiple query tabs: VS Code supports tabs and split editors. Drag a query tab to the side to view two files simultaneously – useful for comparing scripts.
  • Install additional SQL‑related extensions: Consider SQLTools for an alternative editor, Pretty SQL for formatting, or Markdown Preview to document your queries. They complement MSSQL and enrich your environment.
  • Take advantage of source control: VS Code has built‑in Git support. You can version your SQL scripts directly in the editor, committing changes and collaborating with team members without leaving your development environment.
  • Stay informed: Microsoft continues to update the MSSQL extension. Check the VS Code marketplace for new features like improved query history, data export options, and Azure integration enhancements.

By following these steps, you’ll not only replace Azure Data Studio but also gain a more versatile, extensible platform for all your SQL Server development tasks. Welcome to the future of query building in Visual Studio Code.

Related Articles

Recommended

Discover More

Exploring CSS Color Palettes Beyond Tailwind: Resources and GeneratorsAI vs Human Prediction: Who Will Win the 2026 FIFA World Cup?Building with AI Agents: A Guide to Agentic Coding in Xcode 26.38 Critical Insights Into the Axios NPM Supply Chain Attack by a North Korea-Linked ActorGo 1.26's Source-Level Inliner: Simplifying API Migrations