Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit be713ff

Browse files
authored
SSMS 22.2.1 release notes and doc updates (#742) (#743)
1 parent fa10c5a commit be713ff

10 files changed

Lines changed: 221 additions & 22 deletions

ssms/TOC.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,12 @@ items:
113113
href: github-copilot/overview.md
114114
- name: Get started with GitHub Copilot in SSMS (Preview)
115115
href: github-copilot/get-started.md
116+
- name: Code suggestions
117+
items:
118+
- name: Code completions
119+
href: github-copilot/code-completions.md
120+
- name: Next Edit Suggestions
121+
href: github-copilot/next-edit-suggestions.md
116122
- name: Chat
117123
items:
118124
- name: Ask mode

ssms/github-copilot/ai-models.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ description: Learn how to select different models in the GitHub Copilot Chat exp
55
author: erinstellato-ms
66
ms.author: erinstellato
77
ms.reviewer: randolphwest
8-
ms.date: 12/09/2025
8+
ms.date: 01/21/2026
99
ms.service: sql-server-management-studio
1010
ms.topic: how-to
1111
ms.collection:
@@ -28,11 +28,12 @@ Choose from a curated set of models in the model picker, such as:
2828
- GPT-5.1
2929
- GPT-5.1 Codex
3030
- GPT-5.1 Codex mini
31+
- GPT-5.1 Codex max
3132
- GPT-4.1
3233
- GPT-4o
33-
- Claude Sonnet 3.5
3434
- Claude Sonnet 4
3535
- Claude Sonnet 4.5
36+
- Claude opus 4.5
3637
- Claude Haiku 4.5
3738
- Gemini 2.5 Pro
3839

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
---
2+
title: Code Completions
3+
titleSuffix: GitHub Copilot in SQL Server Management Studio (Preview)
4+
description: Learn how to use code completions from GitHub Copilot in SQL Server Management Studio (SSMS).
5+
author: erinstellato-ms
6+
ms.author: erinstellato
7+
ms.reviewer: randolphwest
8+
ms.date: 01/21/2026
9+
ms.service: sql-server-management-studio
10+
ms.topic: how-to
11+
ms.collection:
12+
- ce-skilling-ai-copilot
13+
ms.update-cycle: 180-days
14+
# CustomerIntent: As a database administrator or database developer, I want to understand how to use GitHub Copilot Completions in SQL Server Management Studio.
15+
---
16+
17+
# Use Code Completions in SQL Server Management Studio (Preview)
18+
19+
Use GitHub Copilot in SQL Server Management Studio (SSMS) to enhance your Transact-SQL (T-SQL) development with AI assistance. GitHub Copilot helps you be more productive and efficient when writing T-SQL.
20+
21+
In this article, you learn how to use GitHub Copilot Completions, which provide you with context-aware code completions, suggestions, and even entire code snippets. This feature helps reduce the time spent on repetitive tasks and minimizes errors.
22+
23+
For related information about GitHub Copilot Chat, see [Use the GitHub Copilot Chat experience in SQL Server Management Studio (Preview)](chat.md).
24+
25+
## How Code Completions work
26+
27+
Code Completions for GitHub Copilot in SSMS use advanced machine learning models trained on a vast dataset of publicly available code from GitHub repositories. As you type code, the AI analyzes the context and provides relevant suggestions in real time. You can also receive suggestions by writing a comment in natural language that describes what you want the code to do.
28+
29+
## Prerequisites
30+
31+
Code Completions for GitHub Copilot in SSMS supports the T-SQL language.
32+
33+
1. Install SSMS 22.2 or later with the [AI Assistance workload](installation-state.md#install-github-copilot-in-ssms-using-the-visual-studio-installer).
34+
35+
1. Sign in to your GitHub account with Copilot access.
36+
37+
[Use GitHub Copilot for free](free-plan.md). Sign up and use AI to code faster and more efficiently.
38+
39+
## Use GitHub Copilot for code completions and suggestions
40+
41+
As you type comments or T-SQL in the editor, GitHub Copilot provides context-aware code completions and suggestions.
42+
43+
1. Open SSMS and connect to your database in query editor.
44+
1. In the editor, enter a comment to see inline code suggestions from GitHub Copilot:
45+
46+
```sql
47+
--list all tables in this database
48+
```
49+
50+
1. Select enter to see the suggestion.
51+
1. To accept the suggestion, select <kbd>Tab</kbd>. To reject the suggestion, select <kbd>Esc</kbd> or continue typing.
52+
53+
## Shortcuts and settings
54+
55+
Several keyboard shortcuts are available for completions:
56+
57+
- To manually trigger a completion, use <kbd>Alt</kbd>+<kbd>.</kbd> or <kbd>Alt</kbd>+<kbd>,</kbd>.
58+
- To cycle through available completions, use <kbd>Alt</kbd>+<kbd>.</kbd> to move to the next suggestion and <kbd>Alt</kbd>+<kbd>,</kbd> to move to the previous suggestion.
59+
- To partially accept a completion word by word, use <kbd>Ctrl</kbd>+<kbd>Right arrow</kbd>.
60+
- To partially accept a completion line by line, use <kbd>Ctrl</kbd>+<kbd>Down arrow</kbd>.
61+
62+
You can customize your completion experience by changing selected settings.
63+
64+
If completions appear too quickly and interrupt your typing, you can adjust the display timing in **Tools** > **Options** > **All Settings** > **Text Editor** > **Code Completions** > **Preferences**. Select **Show code completions only after a pause in typing** to stop displaying completions while you're typing. This setting adds a debounce delay, so completions don't flash and disappear while you're typing.
65+
66+
By default, each keystroke automatically triggers completions. You can disable automatic completions in **Tools** > **Options** > **All Settings** > **Text Editor** > **Code Completions** > **General** when you set **Code Completion Invocation** to **Manual**. After you make this change, you can manually trigger completions using the <kbd>Alt</kbd>+<kbd>,</kbd> keyboard shortcut.
67+
68+
## Completions model
69+
70+
The GPT-4.1 Copilot model for code completions is currently the only available model for GitHub Copilot in SSMS. You can find the setting in **Tools** > **Options** > **All Settings** > **Text Editor** > **Code Completions** > **General** > **Copilot Completions Model**.
71+
72+
If you're a Copilot Business or Enterprise user, your administrator needs to enable this model for your organization. Your administrator can opt in to editor preview features in the Copilot policy settings on GitHub.com. If you're a Copilot Free user, using this model counts toward your 2,000 free monthly completions.
73+
74+
## Related content
75+
76+
- [Use Next Edit Suggestions in SQL Server Management Studio (Preview)](next-edit-suggestions.md)
77+
- [Get started with GitHub Copilot in SQL Server Management Studio (Preview)](get-started.md)
78+
- [Troubleshoot GitHub Copilot in SQL Server Management Studio (Preview)](troubleshoot.md)

ssms/github-copilot/get-started.md

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ description: Learn how to get started using GitHub Copilot in SQL Server Managem
55
author: erinstellato-ms
66
ms.author: erinstellato
77
ms.reviewer: randolphwest
8-
ms.date: 12/04/2025
8+
ms.date: 01/21/2026
99
ms.service: sql-server-management-studio
1010
ms.topic: how-to
1111
ms.collection:
@@ -23,7 +23,7 @@ In this article, you learn how to use GitHub Copilot and make the most of its fe
2323

2424
## Open GitHub Copilot
2525

26-
Use of GitHub Copilot requires [!INCLUDE [ssms-22-md](../includes/ssms-22-md.md)] or a later version. You should update to the latest version of SSMS to access the latest updates and features.
26+
GitHub Copilot requires [!INCLUDE [ssms-22-md](../includes/ssms-22-md.md)] or a later version. Update to the latest version of SSMS to access the latest updates and features.
2727

2828
1. Open SSMS and connect to a server or database in the query editor window.
2929

@@ -39,11 +39,24 @@ Use of GitHub Copilot requires [!INCLUDE [ssms-22-md](../includes/ssms-22-md.md)
3939

4040
## Use GitHub Copilot
4141

42-
Once you're signed in, use the Chat window to interact with your database using natural language. You can ask general questions about SQL, questions specific to a database, or get assistance writing or editing T-SQL.
42+
After you sign in, use the Chat window to interact with your database using natural language. You can ask general questions about SQL, questions specific to a database, or get assistance writing or editing T-SQL.
4343

44-
If you're not connected to a database in a query editor window, the context in the Chat window is the general Copilot. It can answer general SQL questions, but without a query editor connection it can't answer database specific questions.
44+
> [!NOTE]
45+
> [Code Completions for GitHub Copilot](code-completions.md) are available in SSMS 22.2 and later versions.
4546
46-
Open a query editor window and connect to a database. Within the Chat window, the database connection in the active editor window provides context for the prompt. GitHub Copilot in SSMS has knowledge of both the context (SQL version) and database (schema aware) from the database connection, so responses are tailored to your environment. As you navigate between open query editors, the context in the Chat window changes appropriately.
47+
- Use the Chat window to interact with your database using natural language. You can ask general questions about SQL, questions specific to a database, or get assistance writing or editing T-SQL.
48+
- If you're not connected to a database in a query editor window, the context in the Chat window is the general Copilot. It can answer general SQL questions, but without a query editor connection it can't answer database specific questions.
49+
- Open a query editor window and connect to a database. Within the Chat window, the database connection in the active editor window provides context for the prompt. GitHub Copilot in SSMS has knowledge of both the context (SQL version) and database (schema aware) from the database connection, so responses are tailored to your environment. As you navigate between open query editors, the context in the Chat window changes appropriately.
50+
- Use Completions in the query editor. As you write T-SQL, Copilot provides suggestions directly in the editor. Copilot suggests both new code (shown as gray text) and edits to existing code.
51+
52+
## Customize Copilot Chat
53+
54+
You can customize Copilot for your workflow and requirements in SSMS.
55+
56+
- Manage context with references: Use the + button to attach additional context, such as `.sql` files or `.sqlplan` files.
57+
- Access different [models](ai-models.md): Use the model picker in the prompt window to select AI models, or bring your own model to Copilot. Explore different models for different scenarios, whether it's answering quick questions, writing documentation, or generating code edits.
58+
59+
To review Copilot features at any time, select **GitHub Copilot Walkthrough** from the GitHub Copilot badge in the upper right corner of SSMS.
4760

4861
## Support
4962

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
---
2+
title: Next Edit Suggestions
3+
titleSuffix: GitHub Copilot in SQL Server Management Studio (Preview)
4+
description: Learn how to use next edit suggestions for GitHub Copilot in SQL Server Management Studio (SSMS).
5+
author: erinstellato-ms
6+
ms.author: erinstellato
7+
ms.reviewer: randolphwest
8+
ms.date: 01/21/2026
9+
ms.service: sql-server-management-studio
10+
ms.topic: how-to
11+
ms.collection:
12+
- ce-skilling-ai-copilot
13+
ms.update-cycle: 180-days
14+
# CustomerIntent: As a database administrator or database developer, I want to understand how to use GitHub Copilot Completions in SQL Server Management Studio.
15+
---
16+
17+
# Use Next Edit Suggestions in SQL Server Management Studio (Preview)
18+
19+
The Next Edit Suggestions (NES) feature of GitHub Copilot uses your recent edits to anticipate the next edit that you might want to make, and the location of that edit. With this capability, Copilot suggests revisions to your code and comments.
20+
21+
Inline completions are great at autocompleting a section of code. NES helps you stay in the logical edit flow by suggesting changes that are relevant to your current work. You can use the <kbd>Tab</kbd> key to quickly move through and accept suggestions. Suggestions might span one or more lines, depending on the scope of the potential change.
22+
23+
## Prerequisites
24+
25+
Next Edit Suggestions for GitHub Copilot in SSMS supports the Transact-SQL (T-SQL) language.
26+
27+
1. Install SSMS 22.2 or later with the [AI Assistance workload](installation-state.md#install-github-copilot-in-ssms-using-the-visual-studio-installer).
28+
29+
1. Sign in to your GitHub account with Copilot access.
30+
31+
[Use GitHub Copilot for free](free-plan.md). Sign up and use AI to code faster and more efficiently.
32+
33+
## Enable Next Edit Suggestions
34+
35+
To get started with GitHub Copilot NES, enable the feature in **Tools** > **Options** > **All Settings** > **Text Editor** > **Code Completions** > **General**. Select **Copilot Next Edit Suggestions (Next-edit predictions from Copilot)** in the **Code Completions Providers** section.
36+
37+
## Start using Next Edit Suggestions
38+
39+
With **Copilot Next Edit Suggestions (Next-edit predictions from Copilot)** enabled, start writing T-SQL to see suggestions from NES. When the feature suggests a code edit, you can move to it by using the <kbd>Tab</kbd> key, and then accept it by using the <kbd>Tab</kbd> key again. You save time by quickly jumping to the next relevant edit, without needing to manually search through files or references yourself. An arrow in the gutter indicates whether an edit suggestion is available.
40+
41+
## Understand use cases
42+
43+
NES is helpful in various scenarios by suggesting not only obvious repetitive changes, but also logical changes.
44+
45+
### Catch and correct mistakes
46+
47+
NES helps with mistakes like typos. For example, it catches errors if you write `SELCT` instead of `SELECT`.
48+
49+
### Match a change in intent
50+
51+
NES suggests changes to the rest of your code that match a change in intent. For example, if you update a query and add an alias for a table, NES shows suggestions that use the new alias.
52+
53+
## Refactor
54+
55+
If you rename an object or variable once in a file, NES suggests updating it throughout the file. If you introduce a new name or naming pattern, the feature suggests updates to subsequent code to match.
56+
57+
## Hide NES
58+
59+
You can hide suggestions from NES in SSMS and review them only when you choose.
60+
61+
In **Tools** > **Options** > **All Settings** > **Text Editor** > **Code Completions** > **General** > **Copilot Completions Model**, select **Collapse Next Edit Suggestions**. Your edits still trigger NES, but when a suggestion is available, only the margin indicator appears in the gutter. This indicator points to the relevant line. The suggestion itself remains hidden until you choose to view it.
62+
63+
To view a hidden suggestion, select the margin indicator or the <kbd>Tab</kbd> key and the suggestion appears. You can select the <kbd>Tab</kbd> key again to accept the suggestion or select the <kbd>Esc</kbd> key to dismiss it. After you accept a suggestion, any related suggestions appear automatically. Unrelated new suggestions remain hidden until you choose to view them.
64+
65+
## Related content
66+
67+
- [Use Code Completions in SQL Server Management Studio (Preview)](code-completions.md)
68+
- [Get started with GitHub Copilot in SQL Server Management Studio (Preview)](get-started.md)
69+
- [Troubleshoot GitHub Copilot in SQL Server Management Studio (Preview)](troubleshoot.md)

ssms/github-copilot/overview.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ description: Overview of GitHub Copilot in SQL Server Management Studio (SSMS).
55
author: erinstellato-ms
66
ms.author: erinstellato
77
ms.reviewer: randolphwest
8-
ms.date: 11/11/2025
8+
ms.date: 01/21/2026
99
ms.service: sql-server-management-studio
1010
ms.topic: how-to
1111
ms.collection:
@@ -29,7 +29,9 @@ GitHub Copilot in SSMS uses your GitHub account with [Copilot access](https://do
2929

3030
GitHub Copilot in SSMS includes [chat capabilities](chat.md) in the chat window and through the inline chat view. From either location you can use natural language to ask questions about your database, or get help writing T-SQL. Copilot in SSMS also includes code assistance, available using [slash commands](chat-context.md#use-slash-commands-for-code-assistance) such as `/doc`, to provide assistance documenting, explaining, fixing, or optimizing your T-SQL queries. To enable GitHub Copilot in SSMS, see [Install GitHub Copilot in SQL Server Management Studio (Preview)](installation-state.md).
3131

32-
## Best practices for using GitHub Copilot in SSMS
32+
GitHub Copilot in SSMS also includes [autocompletions](code-completions.md) in the query editor, starting with SSMS 22.2.
33+
34+
## Best practices for using GitHub Copilot chat in SSMS
3335

3436
To maximize your productivity with GitHub Copilot in SSMS, open a query editor that is connected to your database, and then open the chat window. By default, the chat window has context about the database to which you're connected based on the active query editor. When writing prompts, be specific in your request as vague questions lead to vague responses. For more best practices, see [Best practices for GitHub Copilot in SQL Server Management Studio (Preview)](best-practices.md).
3537

@@ -53,7 +55,6 @@ Microsoft is committed to ensuring that our AI systems are guided by our [AI pri
5355

5456
Here are the current limitations of GitHub Copilot in SSMS:
5557

56-
- GitHub Copilot in SSMS doesn't currently support code completions in the query editor.
5758
- GitHub Copilot might produce inaccurate results when the intent is to evaluate data.
5859
- GitHub Copilot responses can include inaccurate or low-quality content, so review outputs before using them in your work.
5960
- People who can meaningfully evaluate the content's accuracy and appropriateness should review the outputs.

ssms/github-copilot/troubleshoot.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ description: Learn how to troubleshoot GitHub Copilot in SQL Server Management S
55
author: erinstellato-ms
66
ms.author: erinstellato
77
ms.reviewer: randolphwest
8-
ms.date: 10/14/2025
8+
ms.date: 01/21/2026
99
ms.service: sql-server-management-studio
1010
ms.topic: how-to
1111
ms.collection:
@@ -63,13 +63,19 @@ Your administrator can [disable GitHub Copilot](/visualstudio/ide/visual-studio-
6363

6464
**Action:** Contact your IT department to confirm whether your administrator disabled Copilot.
6565

66+
### Log files
67+
68+
Log files for GitHub Copilot in SSMS, which can assist with troubleshooting, can be found in %TEMP%/VSGitHubCopilotLogs.
69+
6670
## Send feedback
6771

6872
- Report a problem to us from SSMS (**Help** > **Send Feedback** > **Report a Problem...**) or the Visual Studio Installer. The built-in feedback tool from both applications allows you to easily add diagnostic information that helps the SSMS team troubleshoot and fix issues.
6973

70-
- Suggest a feature, track product issues, and find answers in the [SSMS Developer Community](https://aka.ms/ssms-feedback).
74+
- Suggest a feature, track product issues, and find answers on the [SSMS feedback site](https://aka.ms/ssms-feedback).
7175

7276
## Related content
7377

78+
- [Troubleshooting network errors for GitHub Copilot](https://docs.github.com/copilot/how-tos/troubleshoot-copilot/troubleshoot-network-errors)
79+
- [Troubleshooting firewall settings for GitHub Copilot](https://docs.github.com/copilot/how-tos/troubleshoot-copilot/troubleshoot-firewall-settings)
7480
- [Install GitHub Copilot in SQL Server Management Studio (Preview)](installation-state.md)
7581
- [Use GitHub Copilot for free in SQL Server Management Studio (Preview)](free-plan.md)

0 commit comments

Comments
 (0)