-
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. ...
-
PostgreSQL + AI: I Tested pgvector Search and a Read-Only MCP Tool on Made-Up Tickets — Hi DBAs, this one started with a support ticket that said "my dashboard data is stale". Our runbook calls the same problem a "delayed refresh". Different words, same issue. A minute later someone asked me how many open tickets each queue has. Both sound like things you'd type into an AI assistant, but they're really two different jobs. The first one needs the right document. The second one needs a count from a table. So I built a small support lab in PostgreSQL 17 and tried both: pgvector for the runbook search, and Google's MCP Toolbox for Databases for the ticket count, with one fixed SQL statement behind it. Everything below is what I ran, what I expected, what came back, and the places where the demo is simpler than real life. The code is on GitHub: dba-ai-lab / experiments/postgresql-pgvector-mcp , with the lab SQL, the MCP Toolbox config, a tiny stdio test client and a one-command run script. 1. The lab, command by command Piece ...
-
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...
-
You Already Speak AI: The PostgreSQL DBA's Translation Guide — If you look after Postgres every day, you already speak AI. You just use different words. A prompt is a query. A context window is work_mem. A tool call is a function call. And an agent? That's a junior DBA with a runbook. This is the Postgres version of my Oracle video, written down. No product tour, just a map from what you already know to what's new, and where it can hurt you. 9:12 in the morning, too many connections The running example: new logins start failing with too_many_connections . The old way, you open your script folder, your notes, the mailing list archive and a search engine. You write the query against pg_stat_activity yourself, run it in psql, and read the result. Every step is yours. Now you can type the question in plain English. The model drafts the SQL, explains the plan or the lock, and an agent can even run read-only queries through a tool. What didn't change: the database is still the source of truth, and you're still the one acc...
-
I Let an AI Audit 3,000 Oracle Accounts. 41 Failed Logins, Still Open. — Hi again, this one is about the part of DBA work nobody enjoys: the user audit. Locked accounts, people who left years ago, passwords from 2017, service accounts on the wrong profile, failed logins nobody ever looked at. I gave an AI read-only access to an Oracle database with almost 3,000 accounts, asked it six plain questions, and turned the answers into one HTML report for the security team. The headline finding: 219 failed logins in the lab, and the account with the most of them (41 tries) never locked, because its profile allows unlimited attempts. Nobody got a ticket. Below is how I set it up, what I asked, what I expected, what I got, and where the AI (and I) slipped. 1. The test environment, command by command Piece What I used Database Oracle AI Database 26ai Free (23.26.3) in Docker, PDB FREEPDB1, port on 127.0.0.1 only AI client VS Code + Copilot Chat in agent mode Door into the database SQLcl MCP server ( sql -mcp ), read-only by instruction Report One Pyt...
-
I Built an AI Agent That Does My Oracle Morning Check. It Got Three Things Wrong. — Hi all, this week I tried to hand my Oracle morning check to an AI agent. The deal was simple: at 07:00, before my first coffee, the agent runs the checks I normally run by hand, a local model reads the results like a DBA would, and the report lands in my mailbox. No cloud, no API key, not one row leaving the laptop. It worked. The mail really did arrive at 07:10 this morning with nobody at the keyboard. But the AI also told me SYSTEM was full (it was at 0 %) and on the first run it completely ignored that the database had no backup. So this post is the honest version: how I built it, what I expected, what actually came back, and what I'd do better. 1. The test environment, command by command Everything runs on one Windows laptop (15 GB RAM, no GPU). If you already have an Oracle database you can skip the first line. Piece What I used How to get it Database Oracle AI Database 26ai Free (23.26.3) in Docker gvenzl/oracle-free image, port on 127.0.0.1 only Python 3....
-
You Already Speak AI: The Oracle DBA's Translation Guide — Okay friends, this one is a bit different. No benchmark, no lab scorecard today. Just a question I kept getting from other DBAs: "Where do I even start with all these AI words?" My answer: you already know most of them. You just call them something else. A prompt is a SQL statement. A context window is a memory area. A tool call is a stored procedure call. An agent is a junior DBA with a runbook. Once that clicks, the rest gets a lot less scary. On-prem Unix box or cloud, it's all the same. Here's the map, a small example, and the security part I care about most. 1. What you need to follow along Nothing new, really. Think of a slow database at 10:42. The old way: you open your own script folder, your notes, a few support notes, and you write the V$SESSION query yourself in SQL*Plus or SQLcl. Every step is yours. The new way: you type the question in plain English, a model drafts the SQL or explains the AWR section, and an agent can even run read-only que...
-
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 ...