AI Skills

Azure SQL DTU Profiler Skill

Week 2 submission for Spring into AI. A agent skill for profiling recent DTU activity.

Updated
Azure SQL DTU Profiler Skill

Week 2 of Spring into AI challenged us to write an tool that AI can use. I decided to create a SQL Server DB Profiler skill that an agent can invoke.

I wanted to move metrics closer, within my IDE.

Usage: "DTUs comin in hot! Check last 3 hours. Show top 3 offenders." Output: A synopsis of top N offending queries over last N hours, invocation counts, cpu waits, and tuning recommendations.

I chatted with GPT about what kind of metrics are possible to query SQL Server for. Then I asked it to produce a small suite of sql scripts and a powershell script to map input sentiment to input params in the sql scripts, and aggregate the output into a synopsis that relays the real current state of things, so I can quickly take action. Great for when those monitoring alarms go off.. I mean, of course, they never do, but just in case ;)

Since creating this, myself and coworkers have used this to find production DB bottlenecks in real time and triage to our team or query owners. This tool is one of the largest contributors to our database resiliency.

Source Repository: https://github.com/seabass223/ai-skills

See it in use: https://www.youtube.com/watch?v=Yb3ykCeAfnU