Copilot’s New Agent Mode Lets SSMS Talk Back to Your Database

Microsoft just dropped a public preview that turns GitHub Copilot inside SQL Server Management Studio from a passive autocomplete helper into something that can actually do things. Instead of suggesting a single query, Agent Mode lets Copilot run multi-step diagnostics, tune performance, review security, and even alter schema — all while asking for your approval before touching anything.

Source

What’s Actually New

Up until now, Copilot in SSMS worked like Copilot everywhere else: you type a comment, it guesses the next line. Useful, but limited. Agent Mode changes the model entirely. You give it a high-level goal like “find the slowest queries in AdventureWorks and suggest index changes,” and Copilot iterates through the problem itself. It runs diagnostics, parses execution plans, generates CREATE INDEX statements, and presents them for your review before executing anything.

According to Microsoft’s documentation, the agent can investigate performance problems, tune queries, review maintenance and configuration, identify security concerns, troubleshoot errors, and assist with operations. It runs steps until the goal is met, pausing for explicit approval before any query execution or schema change.

Why This Matters

DBAs and SQL developers spend a disproportionate amount of time on the same diagnostic loop: spot a slow query, check the execution plan, guess at an index, test it, repeat. Agent Mode automates that loop. It doesn’t remove the human from the decision — it removes the grunt work. You still approve every change, but you’re no longer the one manually running SET SHOWPLAN_XML ON and parsing the output.

This is also a signal about where Microsoft is taking Copilot broadly. Agent mode started in VS Code, hit Visual Studio proper, and now it’s landing in SQL tooling. The pattern is clear: Copilot is graduating from code completion to autonomous problem-solving, and database administration is a natural fit because the feedback loop (run query, check result, iterate) is well-defined and low-risk when gated by human approval.

Getting Started

  1. Update SSMS. You need SSMS 22.7 or newer. Install or update via the SSMS installer.
  2. Sign in to Copilot. Click the GitHub Copilot icon in SSMS and authenticate with your GitHub account. A GitHub Copilot subscription is required.
  3. Switch to Agent Mode. In the Copilot chat pane, pick Agent from the mode dropdown. Make sure the sql-tools extension collection is enabled.
  4. Give it a real task. Instead of “write a query,” try “analyze the execution plan for usp_GetSalesReport and recommend index changes.” Copilot will work through the problem step by step.

Source

Concrete Examples

Bottom Line

Agent Mode in SSMS is in public preview, so expect rough edges and missing features. But the direction is right. For teams running large OLTP workloads, the ability to offload the diagnostic loop to an AI — while keeping human approval on every change — could meaningfully reduce incident response time and query optimization cycles. Sign in, switch to Agent, and see if it earns a spot in your workflow.

Leave a Reply

Your email address will not be published. Required fields are marked *