-
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. ...