XE Trace Forensics
Captures real execution data using Extended Events — actual durations, CPU, logical reads, and query plans from your production workload. No synthetic benchmarks.
An AI agent that works like your best DBA — it finds your slowest stored procedures, rewrites them with Claude, proves the results match exactly, and promotes them. On‑prem, measured, and always on.
Each capability below is a tool in the agent's harness — together they capture real workload data, use Claude AI to find improvements, and validate every change before it touches production.
Captures real execution data using Extended Events — actual durations, CPU, logical reads, and query plans from your production workload. No synthetic benchmarks.
Sends collected evidence (DDL, indexes, stats, plans) to Claude for deep analysis. Gets actionable recommendations: parameter sniffing fixes, index changes, query rewrites.
AI verifies the optimized sproc produces identical results. No silent data changes. Every rewrite is checked for functional correctness before testing begins.
Runs your actual parameter sets against both original and optimized versions. Compares row counts, checksums, and execution time with deterministic test scripts.
Query the plan cache to find your slowest, most CPU-hungry, or most-executed sprocs. Then batch-optimize them overnight. Wake up to a faster database.
Auto-promote when thresholds are met, or require manual approval with a full SQL preview. Backups are always kept. Full audit trail in the SprocOptimizer database.
Choose your workflow: a WinForms desktop app for DBA workstations, or a web dashboard with real-time SignalR streaming for team-wide access from any browser.
Use Claude directly or through AWS Bedrock. Configure multiple engines for different tasks — heavy analysis with Opus, quick validation with Haiku. Your choice.
Every optimization run produces a complete audit folder: original DDL, analysis report, optimized SQL, test results, performance comparison, and pipeline log.
SprocOptimizer is an agent harness for SQL Server — the same pattern behind AI coding agents like Claude Code, but focused entirely on stored-procedure optimization. The 14 steps below are the agent's tools:
Start an XE trace on your target database and capture real execution metrics: duration, CPU, reads, and query plans.
Gather DDL, indexes, statistics, and execution plans. Send the full evidence package to Claude for expert-level analysis.
Generate an optimized sproc, verify logical equivalence, deploy to a test name, and run deterministic test scripts to validate correctness.
Trace the optimized version, build a before/after performance report, and promote to production — automatically or with your approval.
SprocOptimizer doesn't just suggest changes. It deploys them, traces them, and gives you a concrete before-and-after comparison using both XE trace data and a controlled test harness.
Unlike general, cloud-based AI database agents, SprocOptimizer is a focused agent that runs on your own infrastructure. Only schema metadata and anonymized execution statistics are sent to the AI — never row-level data.
Installed on your servers, inside your firewall. No cloud dependency for the core product. Runs on any Windows Server with .NET Framework 4.7.2+.
AI only sees DDL, index definitions, statistics histograms, and execution plans. Your actual business data stays in your database, always.
Route AI calls through AWS Bedrock to keep API traffic within your AWS VPC. Combined with on-prem installation, your data never traverses the public internet.
One-time perpetual license per SQL Server instance. No subscriptions, no per-query fees. Annual maintenance & support is optional after year one.
Annual maintenance & support renewal: 20% of license fee/year. Includes all updates, new features, and continued support.
AI API costs (Anthropic or AWS Bedrock) are billed separately by your provider — typically $0.50–$3.00 per optimization run.
Yes. SprocOptimizer is a purpose-built AI agent — an agent harness that wraps Claude with the tools to optimize SQL Server stored procedures: it captures a real workload with Extended Events, analyzes the evidence, rewrites the procedure, verifies logical equivalence, runs a deterministic test harness, and measures the before/after. Unlike a general chatbot or cloud database agent, it is focused only on stored-procedure optimization and runs on-premises, with no row-level data leaving your network.
No. SprocOptimizer is installed on-premises on your servers. Only schema metadata (DDL, index definitions, execution plans, and statistics histograms) is sent to the AI for analysis. No row-level business data ever leaves your network. You can also route AI traffic through AWS Bedrock for VPC-level isolation.
Every optimization goes through a 14-step pipeline: AI-powered logical equivalence checking verifies identical output, a deterministic test harness compares row counts and checksums with your real parameters, and before/after XE traces measure actual performance. Only sprocs that pass all checks are eligible for promotion. The original is always backed up.
SprocOptimizer uses Anthropic's Claude models. You can connect directly via the Anthropic API or route through AWS Bedrock. Multiple engines can be configured — for example, Claude Opus for deep analysis and Claude Haiku for quick validation passes. You bring your own API key.
Windows Server 2016+ or Windows 10/11 with .NET Framework 4.7.2 or later. SQL Server 2016 or later with Extended Events support. IIS 10+ for the web dashboard (optional). An Anthropic API key or AWS Bedrock access for AI analysis. The SprocOptimizer control database requires approximately 500MB.
Yes. SprocOptimizer supports both read-only and DML stored procedures. DML sprocs go through additional safety checks including transaction-wrapped testing with automatic rollback to ensure no data is modified during the validation phase.
AI API costs are billed directly by Anthropic or AWS. A typical optimization run uses 3–5 AI calls (analysis, generation, equivalence check, validation) totaling roughly $0.50–$3.00 depending on the model and sproc complexity. Batch runs processing 20+ sprocs overnight typically cost under $30 total.
Have a question, or want to see it in action? Ask us anything — or request a live optimization on one of your own stored procedures. No commitment required.
sales@sprocoptimizer.com
We respond to all inquiries within one business day.
Demos available across US, EMEA, and APAC time zones.
We've received your message and will be in touch within one business day.