Edit

Share via


Install Copilot in SQL Server Management Studio

Copilot in SQL Server Management Studio (SSMS) is your AI assistant that can answer questions about your database and environment, and help with writing and fixing Transact-SQL (T-SQL).

Prerequisites

To use Copilot in SSMS, you need:

SQL Server Management Studio 21 is the GA version of SQL Server Management Studio (SSMS). For information related to SSMS 21 installation, see Install SQL Server Management Studio.

Install Copilot in SSMS using the Visual Studio Installer

  1. Launch the Visual Studio Installer.
  2. Select the installation of SSMS you want to modify, then select Modify.
  3. Select AI Assistance on the Workloads tab. Copilot in SSMS appears as a selected component beneath Installation details.
  4. Select Modify to install the extension.

Configure Copilot

To set up Copilot in SSMS, you must configure the Azure OpenAI resource. This resource can be configured with or without an API key. If an API key isn't used, then authentication to Azure occurs with the user's Microsoft Entra ID. Use of Azure authentication is recommended as the more secure option. For more information related to configuring Azure OpenAI resources, see Use Azure OpenAI with Copilot in SSMS.

  1. Open SQL Server Management Studio.

  2. Select the Copilot button on the SQL Editor toolbar, go to View > Copilot, or type Ctrl + Alt + C to open the dialog to initially configure Copilot in SSMS.

  3. Within the Welcome to Copilot in SQL Server Management Studio dialog, enter the values for Azure OpenAI Endpoint, Azure OpenAI Deployment, and Azure OpenAI API Key that were configured during setup of the Azure OpenAI resources. It might be necessary to obtain these values from an individual who can configure Azure OpenAI resources within your Azure subscription.

    Screenshot of initial dialog for Copilot in SSMS configuration.

    Note

    Depending on the configuration of the Azure OpenAI resource you're using, Azure OpenAI API Key might not be required.

  4. When complete, select Launch Copilot.

  5. If Copilot doesn't use an API key, you're prompted to authenticate to Azure. If Copilot appears to be waiting for a response, check your browser to confirm it isn't waiting for Azure authentication to complete.

If you need to update any Copilot settings for your installation, go to Tools > Options > Copilot and apply the changes.

Uninstall Copilot in SSMS using the Visual Studio Installer

You can remove Copilot in SSMS from your SSMS installation using the Visual Studio Installer.

  1. Launch the Visual Studio Installer.
  2. Select the installation of SSMS from you want to remove Copilot in SSMS, then select Modify.
  3. Uncheck AI Assistance on the Workloads tab.
  4. Select Modify to uninstall the extension.
  5. Restart SSMS.