If you are searching for SSMS Copilot today, there are two different experiences to understand. SSMS 21 used an earlier Azure OpenAI-based Copilot experience, while the current SSMS 22 release uses GitHub Copilot in SSMS. This guide explains the SSMS 21 workflow shown in the original screenshots and then compares it with the current SSMS 22 experience.

Current status: Microsoft currently lists SSMS 22.10.1 as the latest SSMS release. GitHub Copilot in SSMS requires SSMS 22 or later. If you are installing SSMS today, use the current GitHub Copilot documentation rather than following the SSMS 21 Azure OpenAI setup as a new installation.

SSMS 21 Copilot is mainly relevant to the earlier Azure OpenAI-based experience. For current SSMS installations, Microsoft provides GitHub Copilot in SSMS 22+, with chat, code completions, next-edit suggestions, and—starting with SSMS 22.7—Agent mode in preview.

SSMS 21 Copilot vs current SSMS 22 Copilot

AreaSSMS 21 CopilotSSMS 22+ GitHub Copilot
AI serviceAzure OpenAI-based Copilot experienceGitHub Copilot integrated into SSMS
ChatNatural-language SQL assistanceGitHub Copilot Chat and inline chat
Code assistanceGenerate, explain, fix, and improve SQLGenerate, explain, fix, optimize, plus inline code completions
Code completionsNot the current SSMS experienceAvailable starting with SSMS 22.2
Next Edit SuggestionsNot the current SSMS experienceAvailable in current GitHub Copilot in SSMS
Agent modeNot availableAvailable in preview starting with SSMS 22.7
SetupAzure OpenAI endpoint/deployment and authenticationSSMS 22 AI Assistance workload and GitHub Copilot sign-in

Microsoft’s current documentation should be treated as the source of truth for SSMS 22+ features and requirements. The SSMS 21 sections below are retained because the Azure OpenAI workflow and screenshots are useful for readers maintaining or documenting that older environment.

What can SSMS 21 Copilot do?

  • Generate T-SQL from natural-language requests.
  • Explain, document, fix, or refactor selected SQL code.
  • Answer questions using context from the connected SQL environment.
  • Help troubleshoot SQL queries and suggest performance improvements.
  • Support SQL-related scenarios rather than SSIS, SSAS, or SSRS workloads.
  • Generate SQL that should be reviewed before execution.

How to install Copilot in SSMS 21

The SSMS 21 Copilot experience was provided through the AI Assistance workload/component. The original setup flow shown below is retained for readers working with SSMS 21.

SSMS 21 installation with Copilot enabled

Configure Azure OpenAI for SSMS 21 Copilot

For the SSMS 21 experience covered in this article, the setup uses an Azure OpenAI endpoint and deployment. The original configuration flow asks for the endpoint, deployment, and the required authentication details.

SSMS 21 Copilot Azure OpenAI configuration
  • Azure OpenAI service endpoint
  • Azure OpenAI deployment
  • Azure OpenAI API key when using key-based authentication
Azure OpenAI endpoint, deployment, and key used for SSMS 21 Copilot

Which connections does SSMS Copilot support?

For the current GitHub Copilot experience, Microsoft documents support for SQL Server, Azure SQL Database, Azure SQL Managed Instance, SQL Server on Azure Virtual Machines, and SQL database in Microsoft Fabric, with database-engine support depending on the feature. SSMS 22+ is the relevant documentation for current support.

The SSMS 21 article is not an SSIS, SSAS, or SSRS assistant. If you are working with those workloads, use the product-specific tooling and documentation.

  • SQL Server Integration Services (SSIS)
  • SQL Server Analysis Services (SSAS)
  • SQL Server Reporting Services (SSRS)

Does current SSMS Copilot execute SQL automatically?

The answer depends on the Copilot mode. In current SSMS 22, Ask mode is designed around a single response and read-only query execution, while Agent mode (preview, available starting with SSMS 22.7) can execute queries and make database changes with your approval. These actions still run under the relevant SQL Server permissions.

For SSMS 21, the practical workflow documented here is to treat generated SQL as AI-generated output: review the query, confirm the target connection and permissions, and then execute it through your normal SSMS workflow.

How accurate is SSMS Copilot?

Microsoft warns that Copilot can produce inaccurate or low-quality content. Generated SQL should therefore be reviewed against your schema, requirements, execution plan, permissions, and expected results before you rely on it.

Example: Fix a broken SQL query with SSMS 21 Copilot

One practical SSMS 21 example is fixing a malformed query. A broken SELECT statement is supplied to Copilot, which suggests a corrected version and explains the issue.

Fix a SQL query in SSMS 21 using Copilot

Example prompts for SSMS Copilot

  • Fix this query and explain the error.
  • Explain what this query does.
  • Generate a query that returns the top-selling products by quantity.
  • Refactor this query for readability.
  • Suggest ways to improve the performance of this query.

Specific prompts generally provide more useful context than vague requests.

SSMS 21 Copilot generating a SQL query from a natural-language prompt

Available on Microsoft Store

SSRS Reports Migration Wizard

A simple Windows tool for migrating SSRS reports, data sources, and related configurations between report servers.

In another test, Copilot was asked to make a query more efficient. It suggested changes to the SQL, including an indexing-related suggestion. Any optimization suggestion should be reviewed against the actual workload, execution plan, indexes, and database behavior.

Copilot can also use context from an active database connection, which is useful when moving between SQL development tasks in SSMS.

SSMS 21 Copilot query assistance with a different database context

Current GitHub Copilot features in SSMS 22+

  • Chat: ask questions about SQL, your database, and T-SQL.
  • Code assistance: use Copilot to document, explain, fix, or optimize T-SQL.
  • Code completions: inline T-SQL suggestions are available starting with SSMS 22.2.
  • Next Edit Suggestions: Copilot can suggest likely edits based on your current work.
  • Results-pane context: newer SSMS 22 releases added interaction with execution plans, messages, client statistics, and the results grid.
  • Agent mode: starting with SSMS 22.7, Agent mode is available in preview for multi-step tasks and can execute queries or make database changes with approval.

What are the main limitations?

  • AI responses can be inaccurate or low quality.
  • Generated SQL and suggested changes require human review.
  • Feature availability depends on the SSMS version and the Copilot mode.
  • Agent mode can execute queries and make database changes, so approvals and SQL Server permissions remain important.
  • Current Microsoft documentation should be checked for the latest supported versions, models, and capabilities.

Privacy and control

Microsoft’s current documentation states that GitHub Copilot in SSMS doesn’t retain information such as prompts, responses, and system metadata, and doesn’t use your data to train or retrain models. Microsoft also notes that Copilot may send contextual information about the SQL version or database along with a prompt to help generate a response. Review the current Microsoft and GitHub Copilot privacy and security documentation for your organization’s requirements.

For database execution, SQL Server permissions remain the security boundary. In current Agent mode, Copilot asks for approval before running queries or commands, but Microsoft explicitly recommends enforcing access control with least-privilege SQL Server permissions.

Which SSMS Copilot documentation should you use?

Installing SSMS today: use Microsoft’s current Get started with GitHub Copilot in SSMS documentation. GitHub Copilot requires SSMS 22 or later.

Maintaining an older SSMS 21 environment: the Azure OpenAI setup and screenshots in this article document the earlier Copilot experience.

Pro tip: If your goal is to use Copilot with a new SSMS installation, start with SSMS 22 and Microsoft’s current GitHub Copilot documentation. Keep this SSMS 21 guide bookmarked when you need the older Azure OpenAI workflow or its screenshots for an existing environment. You can also learn how to build a data agent in Microsoft Fabric.

Related resources

Visual Studio Marketplace

SSIS Catalog Migration Wizard

Extend Visual Studio with an easy way to migrate SSIS Catalog projects.

Kunal Rathi

With over 15 years of experience in data engineering and analytics, I've assisted countless clients in gaining valuable insights from their data. As a dedicated supporter of Data, Cloud and DevOps, I'm excited to connect with individuals who share my passion for this field. If my work resonates with you, we can talk and collaborate.