-
SQL Server + AI: Copilot Drafts the Query, MCP Serves the Report, One Row Catches the Bug — Hey folks, here's a question I get on almost every night shift: which cold rooms ran too warm overnight? Sounds like a one-liner. Then you start asking what "overnight" means, in which time zone, whether exactly 5 °C counts, and what happens to the reading that lands right at 06:00. That's the kind of question where AI can save you time, and also the kind where it can quietly give you the wrong room. So I used it to try two things in a small SQL Server lab. First, GitHub Copilot in SSMS to draft the T-SQL, which I then review. Second, Microsoft's SQL MCP Server (Data API builder), so an agent can read the finished report but nothing else. At the end there's a short bit on vectors, because "have we seen this alarm before?" is a very different question. The code is on GitHub: dba-ai-lab / experiments/sqlserver-copilot-mcp , with the lab SQL, the reader login, the MCP config for VS Code, a tiny stdio test client and a one-command run script. ...
-
Vector Indexes Are GA in Azure SQL, Still Preview in SQL Server 2025 — ] Here's a split worth knowing if you run SQL Server on your own hardware. At the end of September 2026 Microsoft announced vector search and vector indexes as generally available in Azure SQL Database. The Microsoft Learn FAQ now lists the vector type, vector indexes and the vector functions as GA in Azure SQL Database and SQL database in Fabric. In SQL Server 2025, the vector type and functions are GA, but vector indexes and vector search are still preview and need the PREVIEW_FEATURES database scoped configuration. So the cloud got there first, again. For on-prem DBAs that means the approximate index everybody demos is a preview feature on the box you actually support. My take: it's fine to learn it and test it now, the syntax is the same. But I wouldn't let an app team put a preview feature in a production design without writing down who supports it and what happens when it changes. Exact search with VECTOR_DISTANCE on a filtered set is often fast enough for smaller...
-
Copilot Agent Mode in SSMS Is GA, and It Runs As You — Hi DBAs. SSMS 22.10.2 came out on 28 September 2026, and the headline in the release notes is short: Agent Mode for GitHub Copilot in SSMS is now generally available. The same release updated the bundled SQL Tools MCP server and made query execution follow the permissions of the SQL account you're connected with. Agent Mode is the step from "Copilot suggests a query" to "Copilot works through a multi-step task and runs things". It asks before it runs queries, but after you say yes, it runs them as you. And that's the part to think about. Most of us open SSMS with a sysadmin login out of habit. Hand that session to an agent and the agent is sysadmin too. My suggestion is simple: keep a second, smaller login for agent work, read-only on the databases you want to discuss, and switch to your real login only when you've decided to make a change yourself. Read the original: Release Notes for SQL Server Management Studio (SSMS) 22 (Microsoft Learn) This is...
-
SQL Server 2025 Is GA: Vectors and AI Models in T-SQL — Hi DBAs. SQL Server 2025 went generally available on 18 November 2025 at Ignite. Microsoft pitches it as an AI-ready database: a native vector type, vector search, AI model definitions you manage from T-SQL (with Azure OpenAI and Microsoft Foundry among the options), plus native JSON, REST calls, RegEx and fuzzy string matching for developers. Two things I'd check before anyone gets excited in a meeting. First, read the What's New page for what's still marked preview. The approximate vector index, for example, shows up there as a preview feature. Second, an engine that can call REST endpoints and AI models means your SQL Server can now talk to the outside world from inside T-SQL. That's a firewall, credential and permissions conversation, and the DBA should be in the room for it. I've been testing SQL Server with AI in a Docker lab on my laptop, and my advice is the same as always: try it on a copy first, read the plan, then decide. Read the original: SQL Server...
-
Seven AI Models, One Broken SQL Server. One Fix Quietly Lost 30 Units of Stock. — Okay friends, this week's question: does it actually matter which AI model you ask? I built one hard SQL Server case with three real problems, gave the exact same case file to seven models, and then did the part none of them can do: I ran every fix they suggested in my lab and measured it. Six models fixed the deadlock properly. The seventh fixed it too. No errors anymore. And 30 units of stock quietly disappeared. That one result is the reason I'll never deploy an AI fix I haven't run myself. Here's the setup, the test, the expected vs. measured numbers, and the scorecard. 1. The test environment, command by command Piece What I used Database SQL Server 2022 Developer in Docker, on a 15 GB laptop Cloud models Claude Opus 5.5, Fable 5.2, Sonnet 5.5, Haiku 5.5 (Claude Code sub-agents); GPT-6.2-sol and GPT-5.6-luna (Codex CLI) Local model gemma3:4b in Ollama, CPU only (qwen3:4b and deepseek-r1:8b were stopped, see below) Rule for every model Same case fi...
-
You Already Speak AI: The SQL Server DBA's Translation Guide — If you run SQL Server for a living, you already speak AI. You just use different words. A prompt is a query. A context window is a memory grant. A tool call is a stored procedure call. And an agent? That's a junior DBA with a runbook. I made the Oracle version of this video first. This is the SQL Server one, written down. Same idea: no product tour, just a map from what you already know to what's new, and where it can hurt you. 2:15 at night, and the log won't clear The running example is one we've all had. SalesDB's transaction log is at 97% and it just won't clear. The old way: you open your script folder, your notes, a couple of old blog posts and a search engine. You write the query against sys.databases yourself, run it in SSMS or sqlcmd, and read the result. Every step is yours. Now you can type the question in plain English. The model drafts the T-SQL, explains the wait or the plan, and an agent can even run read-only queries through a too...
-
GitHub Copilot in SSMS 22 Is Generally Available — Copilot has been creeping into SSMS for a while: preview in SSMS 22 builds in late 2025, code completions in early 2026, and in March 2026 Microsoft announced GitHub Copilot in SSMS 22 as generally available. You need a GitHub Copilot subscription to use it. For a lot of SQL Server DBAs this is the moment AI shows up in the tool they already have open all day, no new IDE needed. That's good for adoption and a little risky for the same reason. In my own tests with different AI models on a broken SQL Server lab, the pattern was clear: the answers sound sure of themselves whether they're right or not. So my rule stays simple. Let it write the first draft of the query or explain a plan, then check the actual execution plan and the numbers yourself before anything goes near production. And find out what your company's Copilot policy says about sharing schema and query text. Read the original: SSMS 22.4.1 and GitHub Copilot in SSMS (Generally Available) GitHub Copilot in SSMS...
-
SQL MCP Server: Microsoft's Way to Let Agents Touch SQL Data — Hey folks. Microsoft's SQL MCP Server is built on Data API builder (DAB), the open-source engine that already gives you REST and GraphQL over a database. The April 2026 intro post describes DAB 2.0 as one surface for REST, GraphQL and MCP. It's role-aware: an agent only sees the entities and operations its role is allowed to use, and it can sit in front of SQL Server, Azure SQL, PostgreSQL, Cosmos DB and MySQL. I built this in my SQL Server lab (DAB 2.1.7 in Docker). The moment I liked most was a boring one: I asked the agent to delete data, and it simply couldn't, because the role didn't allow delete. No clever prompt needed, the config said no. That's the right direction for DBAs. The access rules live in a config file you can review, version and diff, not in a prompt that says "please be careful". The flip side is that someone has to own that config like they own grants today. Read the original: Introducing SQL MCP Server (Azure SQL Dev Blog) SQL MC...
-
I Built a SQL Server Lab for AI Tests. AI Agent Read My Passwords! — I built a small SQL Server lab on my laptop so I could test AI tools against a real database. Then I asked Copilot three questions in plain English. Two answers were right. The third question was "delete the retired bikes", and that's where it got interesting: the MCP server said no, so the AI went looking for another way in. And it had already read my password file without asking. Okay friends, so this one is the foundation for a lot of later tests. Below is how I built the lab, every download and every command (even if you've never touched Docker or MCP, you can follow it top to bottom), then the three questions, what I expected vs. what I actually got, where things went wrong, and what I'd take from it. The code is on GitHub: dba-ai-lab / labs/sqlserver , with the compose file, the sample database, the DAB config and the MCP smoke test. 1. The test environment, command by command Four pieces, and how they talk to each other: VS Code + Copilot ...
-
Why Microsoft's Data API builder Says No to NL2SQL — This one is more of a design debate than a product launch, and I think it's one of the most useful AI and database discussions of the year. In a March 2026 post, Jerry Nixon from the Data API builder team explains a deliberate choice: DAB does not let the model write SQL. The agent sends a structured request (filters, aggregates, grouping, ordering), and DAB builds deterministic, parameterized SQL from it, with role rules and policies applied. The post previews an aggregates tool for questions like "top customer by revenue" or "average quarterly revenue by region". From a DBA seat I'm mostly on their side. Model-written SQL is hard to predict, hard to tune and hard to audit, and a parameterized query from a known builder behaves the same way every time. The trade-off is real though: you lose the "ask anything" magic, and someone has to decide which shapes of question the agent may ask. My guess is we end up with both: free NL2SQL on a read-only ...
-
AI is Coming to the DBA World. Here's What I'm Going to Test. — For most of my career, this job looked about the same. Keep the database up. Keep it fast. Make sure last night's backup really worked. And when something breaks at three in the morning, find out why before the business wakes up. Then AI moved into town. I've been using it in my daily work for a while, and I wanted a place to test it properly, on real databases, with the mistakes left in. That's what DBA AI Lab is. The video below is the big picture. In this post I'll show you the actual lab test behind it: how I set it up, what I asked, what came back, and where it went wrong. How I built the lab Nothing fancy. It all runs on my laptop: Piece What I used Database Oracle AI Database 26ai Free (23.26.3), pluggable database FREEPDB1 Where it runs Docker Desktop on WSL2, image gvenzl/oracle-free:23.26.3 , 3 GB memory, 2 CPUs Network Port 1521 on 127.0.0.1 only, so nothing outside my laptop can reach it The AI's way in SQLcl MCP server 26.3.1 The AI...
-
sp_BlitzCache Can Now Ask ChatGPT or Gemini About Your Plans — Hi everybody. A lot of us have sp_BlitzCache in our toolbox already, so this one hits close to home. The February 2026 First Responder Kit added an @AI parameter to it. There are two modes. @AI = 2 builds a prompt for you that you copy into whatever AI tool you like, and that works on any SQL Server, Azure SQL DB or Amazon RDS. @AI = 1 calls ChatGPT or Google Gemini directly and brings the advice back, and that one needs SQL Server 2025 or Azure SQL DB. I love the copy-paste mode because you see exactly what you're about to share. The direct mode is more convenient, but stop for a minute before you run it on production. Query text and plans can carry literal values, customer names, sometimes worse, and they'd be leaving your server for an outside API. Check that with your security people first, and read the advice the way you'd read a junior's suggestion: probably useful, never applied blind. Read the original: Updated First Responder Kit and Consultant Toolkit for ...