AI for Database Administrators
The AI + Database Landscape
Part 1: AI Already Built Into Azure SQL
These features work automatically — no AI expertise needed.
Automatic Tuning (Already in Your Wiki)
Azure SQL automatically:
- FORCE_LAST_GOOD_PLAN: Detects query plan regression → reverts to previous good plan
- CREATE_INDEX: Identifies missing indexes → creates them automatically
- DROP_INDEX: Finds unused indexes → removes them to save write overhead
Intelligent Insights
ML engine analyzes Query Store + metrics and detects:
- Queries timing out more often
- Wait times increasing
- Plan regressions
- TempDB contention patterns
Output: JSON diagnostics log → viewable in Azure Portal, Log Analytics, or Power BI.
Intelligent Query Processing (IQP)
The optimizer learns and adapts at runtime:
| Feature | What AI Does |
|---|---|
| Memory Grant Feedback | Learns optimal memory for each query over multiple executions |
| Adaptive Joins | Decides hash vs nested loop at runtime based on actual row counts |
| DOP Feedback | Auto-adjusts parallelism degree based on past performance |
| CE Feedback | Corrects cardinality estimates using execution feedback |
| Parameter Sensitive Plan | Creates multiple plan variants for different parameter ranges |
These features are the exam's way of testing "AI in databases" without calling it AI. IQP = machine learning applied to query optimization. It learns from execution history and adapts plans accordingly.
Part 2: AI Copilot Tools for DBAs
Copilot in Azure SQL Database (Preview)
Natural language interface for database administration.
What it can do:
- Generate T-SQL from natural language descriptions
- Explain existing queries in plain English
- Suggest performance improvements
- Help build monitoring queries
- Generate index recommendations with context
Copilot in Azure Data Studio
| Capability | Example |
|---|---|
| Generate queries | "Write a query to find all customers who ordered in the last 30 days but not in the last 7" |
| Explain plans | "Why is this execution plan doing a table scan?" |
| Fix errors | "This query fails with error 8152 — what's wrong?" |
| Optimize | "How can I make this query faster?" |
GitHub Copilot for SQL Development
Your everyday coding assistant — already in VS Code:
- Autocomplete SQL queries as you type
- Generate stored procedures from comments
- Convert between dialects (Oracle PL/SQL → T-SQL)
- Write migration scripts
- Generate test data
Your competitive advantage: As a DCSA who builds with Copilot (your MCP dashboard has 16 tools!) AND understands database internals, you can show customers how AI + databases work together. Most DBAs are either pure infra OR pure AI — you bridge both.
Part 3: Building AI Applications WITH Azure SQL
Vector Search in Azure SQL
Azure SQL can store and search vector embeddings — the foundation of modern AI applications.
Key T-SQL for vector search:
-- Create a table with a vector column
CREATE TABLE KnowledgeBase (
Id INT PRIMARY KEY,
Content NVARCHAR(MAX),
ContentVector VECTOR(1536) -- 1536 dimensions for text-embedding-3-small
);
-- Find similar content using cosine distance
SELECT TOP 5 Id, Content,
VECTOR_DISTANCE('cosine', ContentVector, @queryVector) AS distance
FROM KnowledgeBase
ORDER BY VECTOR_DISTANCE('cosine', ContentVector, @queryVector);
Vector search in Azure SQL is a new capability (2024+). While not heavily tested on DP-300 yet, it's the future of AI + databases. Understanding it positions you for both the exam and real-world AI projects.
Azure OpenAI + Azure SQL Integration
| Pattern | Architecture | Use Case |
|---|---|---|
| RAG (Retrieval-Augmented Gen) | SQL stores documents + embeddings → search → feed to LLM | Knowledge base Q&A, chatbots |
| Text-to-SQL | User asks question → LLM generates SQL → executes on DB | Natural language reporting |
| Summarization | SQL query results → LLM summarizes | Executive dashboards |
| Classification | SQL data → LLM classifies/tags | Auto-categorize support tickets |
| Anomaly narration | Intelligent Insights detects anomaly → LLM explains in plain English | Alert enrichment |
T-SQL + PREDICT (In-Database ML)
Run machine learning models inside Azure SQL — no data movement needed.
Benefits of in-database ML:
- No data movement — data stays in SQL (security + performance)
- Real-time scoring — PREDICT() runs as part of a T-SQL query
- ONNX format — train in Python/R, export to ONNX, deploy to SQL
Azure AI Search + Azure SQL
For full-text and semantic search beyond what SQL's built-in FTS offers:
Use case: Your wiki content, customer data, or product catalog stored in Azure SQL → Azure AI Search provides intelligent search with semantic understanding, synonym support, and vector similarity.
Your AzureDigest project already uses Azure OpenAI. Imagine extending it: store article summaries in Azure SQL with vector embeddings → search for relevant past articles semantically → generate context-aware daily digests. That's RAG in action.
Part 4: AI-Powered Database Monitoring
The Future DBA Workflow
What's Available Now
| AI Capability | Available In | Status |
|---|---|---|
| Automatic plan forcing | Azure SQL DB, MI | GA |
| Automatic index creation | Azure SQL DB | GA (opt-in) |
| Intelligent Insights | Azure SQL DB, MI | GA |
| IQP (all features) | SQL 2022 / Azure SQL | GA |
| Copilot in Azure SQL | Azure SQL DB | Preview |
| Vector search | Azure SQL DB | Preview |
| PREDICT (ONNX models) | Azure SQL DB, MI, VM | GA |
| Copilot in Azure Data Studio | Azure Data Studio | Preview |