This AI SQL Tuner Studio user guide covers everything you need to get started with AI-powered SQL Server performance tuning. AI SQL Tuner Studio is a Windows desktop application that uses Azure OpenAI to analyze your SQL Server instances and provide intelligent performance recommendations — from index tuning and code review to deadlock analysis and server health checks.
Table of Contents
Getting Started
System Requirements
- Windows 10 version 1809 or later / Windows 11
- .NET 10.0 Runtime (included with the app)
- Internet connection (for Azure OpenAI calls)
- SQL Server 2016 or later (on-premises, Azure SQL Database, Azure SQL Managed Instance, or Microsoft Fabric SQL Database)
First Launch
- Launch AI SQL Tuner Studio from the Start menu or desktop shortcut.
- The main window displays:
- Left panel: Configuration options (Connections, Tuning, Edition & Licensing, AI Configuration)
- Right panel: Console output and HTML report preview
Connections
Before running an analysis, configure at least one SQL Server connection.
Adding a New Connection
- In the Connections section, click New.
- Fill in the connection details:
- Connection Name: A friendly name for this connection (e.g., “Production Server”)
- Server Name: The SQL Server hostname or IP address
- Database Name: Target database name (optional; defaults to
master)
- Choose an authentication method:
- Windows Authentication: Uses your current Windows credentials
- SQL Server Authentication: Enter username and password
- Microsoft Entra Interactive: For Azure SQL with multi-factor authentication
- Optionally enable Trust Server Certificate for development environments.
- Click Add to save the connection. The connection will be tested before saving.
Managing Connections
- Select a connection from the list before running an analysis.
- Click Edit to modify an existing connection.
- Connections are stored locally in
%LOCALAPPDATA%AISQLTunerAISQLTunerStudioconnections.json.
Tuning Goals
Select a tuning goal to determine what type of SQL Server performance analysis to perform.
Reasoning Effort
In the Tuning section, you can adjust the Reasoning effort level to control the depth of AI analysis:
- Low: Balanced speed and detail (default)
- Medium: More thorough analysis
- High: Most comprehensive, slower (best for complex issues)
This setting applies to all tuning goals and is saved automatically.
Server Health Check
Comprehensive analysis of your SQL Server instance including:
- Wait statistics (excluding benign wait types, showing waits > 1% of total)
- I/O latency by database file
- System configuration review
- sp_configure settings audit
- Plan cache analysis (top resource-consuming queries)
- High-impact missing indexes across all user databases
- Query Store status for all databases
- DBCC CHECKDB history for all databases
- Connection encryption status
- Sysadmin role membership audit
- Recent deadlock detection (past 7 days)
- Backup & recovery status (last full/diff/log backup times, recovery model, and risk flags for missing or delayed backups)
Database requirement: Optional (defaults to master)
Note: Scans all online user databases for comprehensive health assessment.
Fix Deadlocks
Analyzes recent deadlocks from the system_health extended events session and provides recommendations to prevent them.
Options: Deadlocks to analyze: Number of recent deadlocks to examine (1–20, default 5)
Database requirement: Optional (defaults to master)
Important: Not supported on Azure SQL Database or Microsoft Fabric SQL Database (system_health file target not accessible on these platforms).
Code Review
AI-powered review of your T-SQL stored procedures, functions, and triggers for performance issues, anti-patterns, and best practice violations.
Includes: Stored procedures, functions, triggers, and views (based on your object type selection); top tables by row count (>1,000 rows); largest index usage summary (key/included columns, seeks/scans/lookups/updates, size).
Options: Order (Newest or Oldest by modification date); Objects: number to review (1–100, default 100); Object types: stored procedures, functions, triggers, views (select at least one).
Database requirement: Required — must specify a user database (cannot run against master, tempdb, model, msdb).
Index Tuning
Analyzes missing index recommendations, index usage statistics, query patterns from the plan cache, and constraints to provide specific index optimization recommendations.
Includes: Missing index analysis with impact scores; index usage statistics (seeks, scans, lookups, updates, key/included columns, size, compression); plan cache query analysis; foreign key and constraint relationships (top 200); column cardinality estimates; large table identification (>1M rows, top 50); database statistics configuration review.
Database requirement: Required — must specify a user database (cannot run against master, tempdb, model, msdb).
License Configuration
| Edition | Features |
|---|---|
| Free | Supports SQL Server Developer Edition |
| Standard | Adds support for SQL Server Standard Edition, Managed Instance General Purpose, Azure SQL and Fabric Database, limited to 2 instances |
| Pro | Adds support for all editions of SQL, limited to 2 instances |
| Corporate | Adds support for unlimited instances |
- Select your edition from the dropdown.
- Enter your license key (not required for Free edition).
- Check Activate license to enable validation. This should only be checked the first time to activate the license. After the first run it should be unchecked.
- Click Save license.
AI Configuration
Setting Up Azure OpenAI
- Endpoint: Your Azure OpenAI resource endpoint (e.g.,
https://your-resource.cognitiveservices.azure.com/) - API Key: Your Azure OpenAI API key
- Primary model: Deployment name for the main model (e.g.,
gpt-5.2,model-router) - Secondary model: Optional fallback deployment for rate limiting or large-request scenarios
The app selects deployments based on request size: requests within the primary model’s character limit use the primary deployment; larger requests automatically switch to the secondary deployment (if configured); requests above the maximum supported size are blocked with a prompt to reduce the request size.
Tip: The app automatically detects the actual model used when deployments route to different model versions.
Check Save key to store your key locally, then click Save AI settings to persist your configuration. For detailed Azure OpenAI setup instructions, see the Bring Your Own AI Endpoint guide.
Running an Analysis
- Select a connection from the Connections list.
- Choose a tuning goal and configure options if applicable.
- Verify database selection: For Code Review or Index Tuning, ensure a user database is specified (not master, tempdb, model, or msdb). For Server Health Check or Fix Deadlocks, database is optional (defaults to master).
- Click the Run button.
If the request exceeds the maximum supported size, the app will display a dialog asking you to reduce the request size before retrying. Progress and status messages are displayed in the Console panel. The AI model being used will be shown during execution.
Viewing Results
Console Output
The Console panel shows: connection status and database information; data collection progress; AI model in use (shows actual model if routing occurs); reasoning effort level; truncation warnings if the AI response was cut short due to output token limits; and any warnings or errors.
HTML Report
Interactive, professionally formatted report with: executive summary with top priorities; detailed findings organized by severity; actionable recommendations with T-SQL scripts; table of contents for easy navigation; platform-specific guidance based on your SQL Server edition and version.
Report features: Color-coded severity indicators; code blocks with proper formatting; responsive design (adapts to light/dark mode); includes server name, version, and database information; truncation warning banner if the AI response was incomplete.
Use the horizontal splitter to resize the Console and HTML Report panels.
Saving and Exporting
Save HTML Report
- Click Save HTML button or use File > Save Output menu (Ctrl+S).
- Choose a destination folder.
- Enter or confirm the filename (defaults to
aisqltuner-[goal]-YYYYMMDD.html). - Click Save.
The report can be opened in any web browser and shared with your team.
Open in Browser
Click Open in Browser to view the current report in your default web browser. The file is temporarily saved to %TEMP%AISQLTunerpreviewaisqltuner-preview.html.
Tip: Opening in a browser allows you to use browser features like print, zoom, and search.
Troubleshooting
Connection Failed
- Verify server name and port (default SQL Server port is 1433).
- Check firewall rules on both client and server.
- For Azure SQL, ensure your client IP address is allowed in the firewall rules.
- For Azure SQL with Microsoft Entra Interactive, verify you have access permissions.
- Try enabling Trust Server Certificate for development/test environments.
System Database Validation Error
If you see an error about system databases when running Code Review or Index Tuning: edit your connection and specify a user database instead of master, tempdb, model, or msdb. These goals require a user database to provide meaningful recommendations.
Azure SQL Database Limitations
The Fix Deadlocks goal is not available on Azure SQL Database or Microsoft Fabric SQL Database. Use Code Review or Index Tuning goals instead, or enable Query Store for deadlock analysis.
Rate Limit Errors
The app automatically switches to the secondary deployment if configured. If you continue to experience rate limits: consider using a lower reasoning effort level; configure a secondary model deployment in your Azure OpenAI resource; check your Azure OpenAI quota and consider requesting an increase.
Request Too Large
If the app shows a Request too large dialog, reduce the request size and try again: lower the number of objects in Code Review; reduce the scope by selecting a smaller database; try a lower reasoning effort level.
Truncated Report
If the console shows a truncation warning or the status shows “Completed (truncated)”, the AI response was cut short due to output token limits. To resolve: lower the Reasoning effort level; reduce the number of objects or scope of the analysis.
WebView2 Errors
If the HTML report pane fails to load, install Microsoft Edge WebView2 Runtime from https://developer.microsoft.com/en-us/microsoft-edge/webview2/ and restart the application.
Documentation Window
The documentation opens in a separate, resizable window. If you don’t see it: check if it opened behind the main window; look for it in the taskbar; close and reopen from Help > Documentation.
Windows Server 2022: Windows App Runtime Missing
If you install the app by double-clicking AI SQL Tuner Studio_*.msixbundle on Windows Server 2022, you may see: Microsoft.WindowsAppRuntime.1_8 framework cannot be found. This means the Windows App Runtime 1.8 framework is not installed on the server.
Option A (recommended): Install Windows App Runtime 1.8 using Microsoft’s installer
- Open Microsoft’s official Windows App SDK downloads page.
- In the Windows App Runtime section, download the Windows App Runtime 1.8 installer for x64.
- Run the installer.
- Retry installing the app by double-clicking the
.msixbundleagain.
Option B (offline / locked-down servers): Install the Windows App Runtime 1.8 MSIX packages
- Download the Windows App Runtime 1.8 MSIX packages (x64) from the Windows App SDK downloads page.
- Copy these files onto the server:
Microsoft.WindowsAppRuntime.Main.1.8.msix,Microsoft.WindowsAppRuntime.Singleton.1.8.msix,Microsoft.WindowsAppRuntime.DDLM.1.8.msix,Microsoft.WindowsAppRuntime.1.8.msix - Open PowerShell as Administrator,
cdto the folder, then install in order:Add-AppxPackage -Path .Microsoft.WindowsAppRuntime.Main.1.8.msixAdd-AppxPackage -Path .Microsoft.WindowsAppRuntime.Singleton.1.8.msixAdd-AppxPackage -Path .Microsoft.WindowsAppRuntime.DDLM.1.8.msixAdd-AppxPackage -Path .Microsoft.WindowsAppRuntime.1.8.msix - Retry installing the app by double-clicking the
.msixbundle.
Note: Your server may require enabling MSIX sideloading/trusted app installation per organization policy.
Keyboard Shortcuts
| Shortcut | Action |
|---|---|
| Ctrl+S | Save HTML output |
| Ctrl+Q | Exit application |
| Alt+R | Run analysis |
Data Privacy
- Connection credentials: Stored locally in
%LOCALAPPDATA%AISQLTunerAISQLTunerStudioconnections.json(optional, encrypted for passwords). - API keys: Stored locally only if “Save key” checkbox is enabled.
- SQL metadata: Query metadata and performance statistics are sent to Azure OpenAI for analysis.
- No external storage: No data is stored on AI SQL Tuner servers.
- Azure OpenAI: Subject to Microsoft’s data privacy policies. Data is not used for model training.
What is sent to Azure OpenAI
- Database schema information (table/column names, indexes)
- Query text from plan cache or stored procedures
- Performance statistics (waits, I/O, execution counts)
- Configuration settings
What is NOT sent
- Actual table data or query results
- Passwords or credentials
- Personal identifying information (unless present in object names)
For support: visit aisqltuner.com/support or email support@aisqltuner.com.
AI SQL Tuner Studio User Guide: Frequently Asked Questions
What SQL Server versions does AI SQL Tuner Studio support?
This AI SQL Tuner Studio user guide covers all supported versions. AI SQL Tuner Studio supports SQL Server 2016 and later, including on-premises installations, Azure SQL Database, Azure SQL Managed Instance, and Microsoft Fabric SQL Database. The Free edition supports Developer Edition; paid editions extend support to Standard, Enterprise, and cloud variants.
Do I need an Azure OpenAI account to use AI SQL Tuner Studio?
No — bringing your own Azure OpenAI account is optional. By default, requests are sent to an endpoint managed by AI SQL Tuner LLC, so you can get started immediately without any Azure setup. If you prefer to use your own Azure OpenAI resource (for data residency, billing control, or to choose a specific model deployment such as GPT-4o or GPT-5.4), you can configure that in the AI Configuration section. See the Bring Your Own AI Endpoint guide for setup instructions.
Is my SQL Server data sent to any third-party servers?
No data is stored on AI SQL Tuner servers. The app sends only SQL metadata (schema, query text, performance statistics) directly to your own Azure OpenAI resource. Actual table data, passwords, and credentials are never transmitted. See the Data Privacy section for full details.
What is the difference between the tuning goals?
AI SQL Tuner Studio offers four tuning goals: Server Health Check gives a broad overview of your entire SQL Server instance; Fix Deadlocks analyzes recent deadlock events and recommends prevention strategies; Code Review examines T-SQL code for performance issues and anti-patterns; and Index Tuning provides specific index recommendations based on usage patterns and missing index data.
How do I choose the right Reasoning effort level?
Start with Low for fast results on routine checks — it typically completes in 2–4 minutes. Use Medium when you want deeper analysis on a specific issue. Use High for complex, multi-faceted problems where thoroughness matters more than speed (may take up to 7 minutes). If you get a truncated report, try lowering the reasoning effort level.
Can I run AI SQL Tuner Studio on Windows Server 2022?
Yes, but Windows Server 2022 may require installing the Windows App Runtime 1.8 framework separately before the app will launch. See the Windows Server 2022 install error section in Troubleshooting for step-by-step instructions.