ALTER DBA ADD AGENT: Practical AI for Database Professionals
If you’re a SQL Server DBA who’s heard the buzz about AI but isn’t sure what it means for your daily work, this series is for you. No marketing fluff, no hand-waving – just a working DBA showing what happens when you point an AI coding agent at real database problems.
Each post covers a specific task area with real prompts, real output, and real tradeoffs. Start anywhere that matches what’s on your plate today.
The Series
Getting Oriented
- The DBA’s Blind Spot: Why AI Coding Agents Are Coming for Your Workflow – Code completion vs. coding agents, and why the difference matters more than you think.
- What Can an AI Coding Agent Actually Do for a DBA? – A tour of every task area where these tools add value, from T-SQL to security audits.
- Getting Started: Your First Hour with GitHub Copilot CLI – Installation, first prompts, and what to expect when you fire it up.
Daily Work
- Writing T-SQL with an AI Partner – Generating, reviewing, and refactoring T-SQL with an agent that reads your schema.
- AI-Assisted Implicit Join Conversion – Converting legacy implicit joins to ANSI syntax
- AI-Assisted Window Function Development – Building and debugging window functions
- AI-Assisted Cursor-to-Set-Based Conversion – Replacing cursors with set-based operations
- AI-Assisted Parameter Sniffing Diagnosis – Diagnosing and fixing parameter sniffing issues
- Automating Server Health Checks and Inventory Scripts – Building the scripts that keep your fleet healthy, faster than you’d write them alone.
- AI-Assisted Backup Status Audit – Auditing backup status across your fleet
- AI-Assisted Version and Patch Inventory – Building version inventories
- AI-Assisted AG Topology Mapping – Documenting AG configurations
- AI-Assisted Compatibility Level Audit – Finding compat level mismatches
- PowerShell Automation: Backups, Maintenance, and AG Management – AG failover scripts, backup validation, and maintenance automation with AI assistance.
- AI-Assisted Backup Automation with PowerShell – Building robust backup scripts
- AI-Assisted AG Failover Runbook – AG failover procedures
- AI-Assisted DBCC CHECKDB Scheduling – Scheduling integrity checks
- AI-Assisted Patching Pre/Post Checks – Patch readiness automation
- Understanding Unfamiliar Code: Reverse-Engineering Legacy Procedures – That 2,000-line stored procedure nobody wants to touch? The agent will read it.
- AI-Assisted Dynamic SQL Dissection – Understanding complex dynamic SQL
- AI-Assisted Dependency Mapping – Mapping object dependencies
- AI-Assisted Cursor Elimination – Step-by-step cursor replacement
Troubleshooting
- Wait Stats, Deadlocks, and Blocking Chains: AI-Assisted Diagnosis – Turning raw wait stats and deadlock graphs into actionable explanations.
- AI-Assisted CXPACKET Diagnosis – Diagnosing parallelism waits
- AI-Assisted Deadlock Analysis – Reading deadlock graphs
- AI-Assisted Blocking Chain Triage – Resolving blocking chains
- AI-Assisted Memory Grant Analysis – Diagnosing memory grant issues
- Incident Response: Root Cause Analysis with an AI Partner – When the pager goes off at 2 AM, having a tireless partner changes the equation.
Security and Compliance
- Security Audits: Finding What You Missed – Orphaned users, permission sprawl, and the gaps that accumulate over years.
- AI-Assisted Orphaned User Cleanup – Finding and fixing orphaned users
- AI-Assisted Permission Sprawl Analysis – Auditing permission creep
- AI-Assisted SQL Injection Scanning – Finding injection vulnerabilities
- AI-Assisted Compliance Checklists – SOX/PCI/HIPAA audit automation
Migration and Modernization
- Migration Planning: Compatibility Checks and Deprecated Features – Scanning for deprecated syntax, compatibility issues, and migration blockers.
- AI-Assisted Deprecated Feature Scanning – Finding deprecated features
- AI-Assisted Azure SQL Feasibility Assessment – Evaluating Azure migration readiness
- AI-Assisted Post-Migration Validation – Verifying migration success
Monitoring
-
AI-Native Monitoring: PerformanceMonitor, PerformanceStudio, and the MCP Revolution – Tools built from the ground up to work with AI agents, featuring Erik Darling’s PerformanceMonitor and PerformanceStudio.
-
Building Custom Monitoring Queries and Alerts – When off-the-shelf monitoring doesn’t fit, build exactly what you need.
- AI-Assisted Long-Running Transaction Alerts – Monitoring open transactions
- AI-Assisted Blocking Alerts – Building blocking chain alerts
- AI-Assisted AG Health Monitoring – Availability Group health checks
- AI-Assisted Backup Failure Alerts – Backup monitoring automation
Infrastructure and Process
- Version Control and CI/CD: Unlocking What the Agent Can Actually Do – AI agents get dramatically more useful when your database code is in a repo.
-
Teaching AI Your Environment: Custom Instructions and Context – Making the agent deeply effective by teaching it your standards, naming conventions, and environment.
-
AI-Assisted Pull Request Reviews for Database Code – Schema changes, deployment scripts, and permission audits – reviewed before the senior DBA even looks.
The Bigger Picture
-
The AI-Augmented DBA Team: Mentoring and Knowledge Transfer – What changes when the whole team has AI partners, not just one person.
-
How This Series Was Written: A DBA and an AI Walk Into a Terminal – The meta post. Every word in this series was co-authored with the tools it describes. Here’s how.

For Junior DBAs
- A Junior DBA’s Field Guide to This Series – New to the profession? This companion guide maps the vocabulary walls, production safety gaps, and confidence calibration challenges you’ll hit. Senior DBAs: share this with your juniors before pointing them at the series.
Source Materials
The complete working directory for this series – every draft, editorial decision, and iteration – is available on GitHub: