Skip to content
| Marketplace
Sign in
Visual Studio>Tools>Ssms AI Buddy 21Plus
Ssms AI Buddy 21Plus

Ssms AI Buddy 21Plus

Bert O'Neill

|
2 installs
| (0) | Free
SSMS AI Buddy extension (SSMS 21 and 22, 64-bit). This SSMS AI Extension is an intelligent assistant built directly into SQL Server Management Studio, designed to enhance the productivity of database
Download

Introduction

This document provides details on how your company can integrate AI into your instance of SSMS, allowing developers to send queries to an AI hoster (like NVidia or a local installation of Ollama). And being able to use LLM from DeepSeek but knowing that your prompts will not end up in China!

Purpose

This Document provides a comprehensive overview on how you or your company can integrate AI into Microsoft’s SSMS (21+).

Scope

The scope of this document is to convey the steps involved in connecting to and using (NVidia\Ollama) AI prompts from within SSMS to your hoster.

Prerequisites

  • Knowledge of a LLM Hoster (like Nvidia\Ollama)
  • Know your Hoster’s URL
  • Know your Hoster’s API key (Nvidia only)
  • Know the (Nvidia\Ollama) LLM model you wish to use (for e.g. deepseek-coder-v2 or openai/gpt-oss-120b)

What is SSMS AI Buddy

The SSMS AI Extension is an intelligent assistant built directly into SQL Server Management Studio, designed to enhance the productivity of database developers, architects, and DBAs. By leveraging advanced AI models, it enables users to interact with their databases using natural language, generate SQL queries and database objects, explain existing code, and receive recommendations for performance tuning and optimization. The extension provides context-aware assistance based on the active database, schema, and selected SQL, helping users understand complex systems and accelerate development tasks. With support for configurable AI models, memory, prompt templates, and conversational interactions, the SSMS AI Extension transforms SSMS into a powerful AI-driven development environment, reducing repetitive work and enabling faster, smarter database solutions.

Installing SSMS AI Buddy

Once you have downloaded the SSMS extension double click the SSMS AI Buddy VSIX file, to initiate the installation process (first, close SSMS if it is open):

You will be prompted to select the SSMS version you wish to install the extension to:

The installation process will begin:

When completed:

Once installed, restart SSMS and you should see the notification below, in the status-bar:

Generate Nvidia API Key

To use Nvidia’s LLM (which I recommend), you must first generate a free API token. Go to Nvidia’s web site and then click on the Get API Key button:

Enter your email address to register:

Click on the Generate API button:

Copy the key and keep it safe, as you will need it when you start to use the extension:

Configure SSMS AI Properties

You can use the more powerful LLM’s hosted by Nvidia (which I recommend) on their servers over the alternative of hosting Ollama yourself locally.

Properties Explained

AI Hoster indicates if you will be prompting Ollama or Nvidia, this is a dropdown from which you can select:

API Key (Nvidia Only) – This property will hold the Nvidia API key that you will have generated, this is only applicable to Nvidia. If you are using Ollama locally, no key is required (but since Nvidia is free, it is more powerful)

LLM Name – The name of your Large Language Model, for e.g. from Nvidia’s site you paste in (see section 7 to browse and select a Nvidia LLM):

  • qwen/qwen3-coder-480b-a35b-instruct
  • minimaxai/minimax-m2.7
  • openai/gpt-oss-120b

Or if you are using Ollama you could use:

  • deepseek-r1:1.5b
  • qwen2-math:1.5b
  • qwen2.5-coder:1.5b

Max Tokens – This indicates the size (words) of the response, 1000 tokens roughly means 750 words.

When prompting through the dialog, keep the important information to the top, because there is a hard cut-off when the token size is reached.

Prompt API URL – This is the API URL to your AI hoster:

Nvidia → https://integrate.api.nvidia.com/v1/chat/completions

Ollama → http://localhost:11434/api/generate

Randomness – Limits the response candidate pool, the higher the value the broader exploration of the response.

Temperature - Reshapes the probability distribution. The lower the value, the more dominant response is selected. A higher value allows less dominant candidates to be returned.

NB: Your properties settings file will be saved to your AppData folder (%AppData%\SsmsAIBuddy\)

Tip: You can edit the prompts in the file (as the properties dialog is not convenient to do this) and save the file. Also, if you find that you have made a mess of your settings, you can reset, by clicking the reset button in the Property dialog or just delete the file AI_Buddy_SSMS_Settings.json and save a new version.

Selecting the Appropriate (Free Endpoint) Nvidia LLM

Navigate to Nvidia’s (models) web site to view the available LLM’s. Enable the Free Endpoint option and click the Apply button.

This will list what you can use for free with your API key. You will find that there is a very good selection to choose from – I tended to aim at code generative LLM’s.

For e.g. qwen/qwen3-coder-480b-a35b-instruct

Click into qwen/qwen3-coder-480b-a35b-instruct to view the coding example provided, you just want to copy the full LLM name:

Then paste this LLM along with your API key into the property’s settings:

Click Save:

Hosting Ollama & LLM Locally - Setup

If you plan to use the SSMS AI extension with a local instance of Ollama (AI hoster), follow these steps if you have not already installed Ollama locally.

Download and install Ollama using the latest installer for your environment - https://ollama.com/download

Download LLM and Start Hoster

Select the appropriate LLM - https://ollama.com/search

Or (for e.g.) go directly to the DeepSeek model - https://ollama.com/library/deepseek-v2 and select the appropriate parameter related model. Then click on the copy button and paste this command into a Terminal\Command dialog.

When the model has been downloaded and running, you can verify that Ollama is running from the System Tray:

Or from a command prompt run the command ollama list – this will list the available models:

Using Editor Context Menu

Select your database, so that the extension can pick up the schema behind the scenes. Either select from the SMO dropdown:

Or by executing a SQL USE statement:

This allows the extension to build up a related schema to the SQL you will want AI to suggest JOINs or a WHERE clause etc.

Enter your SQL statements as normal in the editor, when you want to prompt AI, highlight the SQL statement and right click to bring up the editor context-menu. Then select the menu option SQL AI Buddy, this will allow you to then perform a specific AI prompt against your selected SQL.

Joins – non-AI

Because you have already selected the database, we can try and perform a non-AI JOIN suggestion – as this is very performant compared to using Ollama locally and even quicker than Nvidia’s remote server’s.

This will quickly result in a number of potential JOIN suggestions based on the table(s) in your query:

You can traverse the suggestions and double click to select or ESC to close the suggestion pane. The selected suggestion will be appended onto your select query:

Joins – AI

To prompt AI with your selection, simply highlight the SQL statement and right click the editor to bring up the AI Buddy context-menu, then select Suggest SQL JOINs – AI to send a prompt to Nvidia:

Depending on how busy the remote server is, the response from the prompt may take a few seconds, if the prompt is taking to long – the request will cancel:

If this happens, just try again, or check that your settings are valid\need to be tweaked for the AI prompt (like changing the LLM used or updating the Temperature or Randomness) – I often use the LLM openai/gpt-oss-120b

Where – AI

Group By\Having – AI

You may just need to tweak the Select statement to fit the Group By\Having suggestion, for e.g.

Prompt Dialog – AI

If I have a complex query, I can send that to AI along with my prompt – by selecting the Display Prompt menu option:

Below I want to ask AI to improve the performance of my complex SQL query:

After I click Submit, the prompt will be sent to Nvidia to analyse, and suggestions returned – I can highlight and SQL returned and select Copy to add to the Clipboard and then to my SQL editor:

Supplying the SQL statement again and asking a more direct prompt (suggest SQL code)

Highlighting the snippet of SQL to copy to the Clipboard:

Check List

  • Download the correct version of SSMS AI Buddy for your SSMS instance
  • Register with Nvidia
  • Generate an API key
  • Select the appropriate Nvidia LLM
  • Update Properties with your Key \ LLM
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft