AI SQL Tuner Recommendations

Tuning Goal: Server Health
Server NameRockyPC
Database Contextmaster (server-wide)
SQL Server Version2022 RTM (16.0.1175.1)
EditionDeveloper Edition (64-bit)
CPU / Memory16 vCPU / 32.5 GB RAM
Uptime< 1 day (recently restarted)

Executive Summary

GoodI/O Health
GoodWait Stats
CriticalBackups
CriticalDB Integrity
GoodSecurity
Needs WorkConfiguration

This server is a SQL Server 2022 Developer Edition instance running on Windows 10 with 16 logical CPUs and ~32 GB RAM. The server was recently restarted (uptime < 1 day), so wait statistics and I/O data reflect a limited observation window.

Top Priorities

  1. CriticalEstablish Backup Strategy Immediately — Multiple databases (master, model, msdb, DigitsSolver, tpcc, CRM, tpch10) have no backup history. WideWorldImporters' last full backup is over 3.5 years old. This is the highest-risk finding.
  2. CriticalRun DBCC CHECKDB on All Databases — Six of seven user databases have never had CHECKDB run (reported as Jan 1, 1900). Without integrity checks, silent corruption could result in unrecoverable data loss.
  3. CriticalImplement Transaction Log Backups — Five databases (model, DigitsSolver, tpcc, tpch, CRM, tpch10) are in FULL recovery model but have no log backups, causing transaction logs to grow unbounded.
  4. HighEnable "Optimize for Ad Hoc Workloads" — This setting is disabled, leading to plan cache bloat from single-use ad hoc queries.
  5. HighUpgrade WideWorldImporters Compatibility Level — Currently at 130 (SQL Server 2016), missing significant SQL Server 2022 IQP features.

1. Backup & Recovery Strategy

Critical Confidence: 99%

Establish a Comprehensive Backup Plan

The current backup state represents the single greatest risk to this server. Multiple databases have zero backup history, meaning any storage failure results in complete, permanent data loss.

DatabaseRecovery ModelLast Full BackupStatus
masterSIMPLENever⛔ No backup
modelFULLNever⛔ No backup
msdbSIMPLENever⛔ No backup
DigitsSolverFULLNever⛔ No backup
tpccFULLNever⛔ No backup
CRMFULLNever⛔ No backup
tpch10FULLNever⛔ No backup
tpchFULLNov 2025 (147 days ago)⚠️ Stale
WideWorldImportersSIMPLEOct 2022 (1,289 days ago)⛔ 3.5+ years old
SQLStormSIMPLEOct 2025 (175 days ago)⚠️ Stale

Recommended Actions:

Immediate Backup Script (run all full backups now):

-- Enable backup checksum as a server default
EXEC sp_configure 'show advanced options', 1;
RECONFIGURE;
EXEC sp_configure 'backup checksum default', 1;
RECONFIGURE;
EXEC sp_configure 'show advanced options', 0;
RECONFIGURE;

-- Full backups for all databases (adjust paths as needed)
BACKUP DATABASE [master] TO DISK = N'C:\Backups\master_full.bak'
  WITH INIT, CHECKSUM, COMPRESSION, STATS = 10;

BACKUP DATABASE [msdb] TO DISK = N'C:\Backups\msdb_full.bak'
  WITH INIT, CHECKSUM, COMPRESSION, STATS = 10;

BACKUP DATABASE [model] TO DISK = N'C:\Backups\model_full.bak'
  WITH INIT, CHECKSUM, COMPRESSION, STATS = 10;

BACKUP DATABASE [WideWorldImporters] TO DISK = N'C:\Backups\WideWorldImporters_full.bak'
  WITH INIT, CHECKSUM, COMPRESSION, STATS = 10;

BACKUP DATABASE [SQLStorm] TO DISK = N'C:\Backups\SQLStorm_full.bak'
  WITH INIT, CHECKSUM, COMPRESSION, STATS = 10;

BACKUP DATABASE [DigitsSolver] TO DISK = N'C:\Backups\DigitsSolver_full.bak'
  WITH INIT, CHECKSUM, COMPRESSION, STATS = 10;

BACKUP DATABASE [tpcc] TO DISK = N'C:\Backups\tpcc_full.bak'
  WITH INIT, CHECKSUM, COMPRESSION, STATS = 10;

BACKUP DATABASE [tpch] TO DISK = N'C:\Backups\tpch_full.bak'
  WITH INIT, CHECKSUM, COMPRESSION, STATS = 10;

BACKUP DATABASE [tpch10] TO DISK = N'C:\Backups\tpch10_full.bak'
  WITH INIT, CHECKSUM, COMPRESSION, STATS = 10;

BACKUP DATABASE [CRM] TO DISK = N'C:\Backups\CRM_full.bak'
  WITH INIT, CHECKSUM, COMPRESSION, STATS = 10;

Enable backup compression as the server default:

EXEC sp_configure 'show advanced options', 1;
RECONFIGURE;
EXEC sp_configure 'backup compression default', 1;
RECONFIGURE;
EXEC sp_configure 'show advanced options', 0;
RECONFIGURE;

2. Database Integrity Maintenance (CHECKDB)

Critical Confidence: 99%

DBCC CHECKDB Has Never Been Run on 6 of 7 User Databases

The "Jan 1 1900" date indicates DBCC CHECKDB has never been executed on these databases since they were created or attached to this instance. Without regular integrity checks, corruption can go undetected until it's too late to recover.

DatabaseLast CHECKDBStatus
WideWorldImportersNever (1900-01-01)⛔ Never checked
SQLStormNever (1900-01-01)⛔ Never checked
tpccNever (1900-01-01)⛔ Never checked
tpchNever (1900-01-01)⛔ Never checked
CRMNever (1900-01-01)⛔ Never checked
tpch10Never (1900-01-01)⛔ Never checked
DigitsSolverApr 12, 2026 (6 days ago)✅ OK

Recommended Schedule:

-- Run immediately on all databases with no history
DBCC CHECKDB (N'WideWorldImporters') WITH NO_INFOMSGS, ALL_ERRORMSGS, DATA_PURITY;
DBCC CHECKDB (N'SQLStorm') WITH NO_INFOMSGS, ALL_ERRORMSGS, DATA_PURITY;
DBCC CHECKDB (N'tpcc') WITH NO_INFOMSGS, ALL_ERRORMSGS, DATA_PURITY;
DBCC CHECKDB (N'tpch') WITH NO_INFOMSGS, ALL_ERRORMSGS, DATA_PURITY;
DBCC CHECKDB (N'CRM') WITH NO_INFOMSGS, ALL_ERRORMSGS, DATA_PURITY;
DBCC CHECKDB (N'tpch10') WITH NO_INFOMSGS, ALL_ERRORMSGS, DATA_PURITY;
DBCC CHECKDB (N'DigitsSolver') WITH NO_INFOMSGS, ALL_ERRORMSGS, DATA_PURITY;

Consider implementing Ola Hallengren's Maintenance Solution for automated CHECKDB, backups, and index maintenance.

3. Transaction Log Management

Critical Confidence: 98%

Databases in FULL Recovery Without Log Backups

Five user databases and the model system database are in FULL recovery model but have no transaction log backups. This means:

DatabaseRecovery ModelLog Backups
modelFULLNone
DigitsSolverFULLNone
tpccFULLNone
tpchFULLNone
CRMFULLNone
tpch10FULLNone

Recommended Actions (choose one per database):

Option A: If point-in-time recovery is NOT required, switch to SIMPLE recovery:

-- Switch to SIMPLE if point-in-time recovery is not needed
-- (appropriate for dev/test workloads like tpcc, tpch, tpch10)
ALTER DATABASE [tpcc] SET RECOVERY SIMPLE;
ALTER DATABASE [tpch] SET RECOVERY SIMPLE;
ALTER DATABASE [tpch10] SET RECOVERY SIMPLE;
ALTER DATABASE [DigitsSolver] SET RECOVERY SIMPLE;
ALTER DATABASE [CRM] SET RECOVERY SIMPLE;

Option B: If point-in-time recovery IS required, implement regular log backups:

-- Example: Log backup every 30 minutes (adjust as needed)
-- Create a SQL Agent job for each database in FULL recovery
BACKUP LOG [CRM] TO DISK = N'C:\Backups\CRM_log.trn'
  WITH INIT, CHECKSUM, COMPRESSION, STATS = 10;

Note: Since this appears to be a development workstation (Windows 10 Home, Developer Edition), SIMPLE recovery is likely the best choice for most of these databases. The model database's recovery model serves as the template for new databases, so consider setting it to SIMPLE as well to avoid this issue recurring.

4. Configuration Optimizations

High Confidence: 95%

Enable "Optimize for Ad Hoc Workloads"

Currently disabled (value: 0). When disabled, every unique ad hoc query statement stores a full compiled plan in the plan cache. Enabling this setting causes SQL Server to store only a small "plan stub" on first execution, promoting to a full plan only upon reuse. This significantly reduces plan cache memory consumption.

EXEC sp_configure 'show advanced options', 1;
RECONFIGURE;
EXEC sp_configure 'optimize for ad hoc workloads', 1;
RECONFIGURE;
EXEC sp_configure 'show advanced options', 0;
RECONFIGURE;
High Confidence: 90%

Enable Remote DAC (Dedicated Admin Connection)

Currently disabled (remote admin connections = 0). While only local DAC is needed most of the time, enabling remote DAC provides a critical emergency lifeline if the server becomes unresponsive and you cannot access it locally.

EXEC sp_configure 'show advanced options', 1;
RECONFIGURE;
EXEC sp_configure 'remote admin connections', 1;
RECONFIGURE;
EXEC sp_configure 'show advanced options', 0;
RECONFIGURE;
Medium Confidence: 85%

Review Max Server Memory Setting

Max server memory is set to 23,168 MB out of 32,527 MB total. This leaves ~9.4 GB for the OS and other processes, which is reasonable for a workstation running Windows 10 with desktop applications. The current setting is acceptable.

However, the min server memory is effectively 16 MB (running value), which means SQL Server can release nearly all buffer pool memory under OS memory pressure. Consider setting a reasonable minimum:

-- Optional: Set minimum memory to prevent excessive memory release
EXEC sp_configure 'show advanced options', 1;
RECONFIGURE;
EXEC sp_configure 'min server memory (MB)', 4096;
RECONFIGURE;
EXEC sp_configure 'show advanced options', 0;
RECONFIGURE;
Medium Confidence: 85%

Review Max Degree of Parallelism and Cost Threshold

Current settings:

These settings are well-tuned. No changes recommended.

5. Compatibility Level

High Confidence: 92%

Upgrade WideWorldImporters Compatibility Level from 130 to 160

The WideWorldImporters database is running at compatibility level 130 (SQL Server 2016). On SQL Server 2022, this misses significant query processing improvements:

Recommendation: Test the application with compat level 160, then upgrade. Query Store (already enabled) will help identify any plan regressions.

-- Step 1: Ensure Query Store is capturing baselines (already active)
-- Step 2: Upgrade compatibility level
ALTER DATABASE [WideWorldImporters] SET COMPATIBILITY_LEVEL = 160;

-- Step 3: Monitor Query Store for regressions over the next few days
-- If regressions occur, use Query Store plan forcing to fix them

6. Query Store Optimization

Medium Confidence: 88%

Query Store Is Well Configured — Minor Tuning Recommended

All user databases have Query Store enabled in READ_WRITE mode with AUTO capture and cleanup — this is excellent. Minor optimizations:

SettingMost DatabasesWideWorldImportersRecommended
Flush Interval15 min50 min15 min ✅
Stats Interval60 min15 min15-60 min ✅
Max Plans/Query2001000200
Max Size1,000 MB500 MB1,000 MB

Recommended: Normalize WideWorldImporters Query Store settings and reduce max plans per query from 1000 to 200:

ALTER DATABASE [WideWorldImporters] SET QUERY_STORE (
    FLUSH_INTERVAL_SECONDS = 900,
    MAX_PLANS_PER_QUERY = 200,
    MAX_STORAGE_SIZE_MB = 1000
);

Since this is SQL Server 2022 with compat level 160 databases, consider enabling Query Store hints and Query Store for secondary replicas if you add HADR in the future.

7. TempDB Optimization

Medium Confidence: 85%

Enable TempDB Metadata Memory-Optimized

Currently disabled (tempdb metadata memory-optimized = 0). SQL Server 2022 supports memory-optimized tempdb metadata, which eliminates latch contention on tempdb system pages — a common bottleneck under heavy tempdb usage.

The server has 8 tempdb data files (matching 8 of the 16 cores), which is a good configuration.

-- Enable memory-optimized tempdb metadata (requires restart)
EXEC sp_configure 'show advanced options', 1;
RECONFIGURE;
EXEC sp_configure 'tempdb metadata memory-optimized', 1;
RECONFIGURE;
EXEC sp_configure 'show advanced options', 0;
RECONFIGURE;
-- Note: Requires SQL Server restart to take effect

Note: This is most impactful under heavy tempdb workloads (e.g., lots of temp tables, table variables). For a development workstation with light usage, this is a proactive optimization.

8. Security Enhancements

Low Risk Confidence: 95%

Security Posture Assessment

The overall security posture is acceptable for a development workstation:

Minor recommendations:

-- Disable legacy remote access (if not using linked servers with RPC)
EXEC sp_configure 'show advanced options', 1;
RECONFIGURE;
EXEC sp_configure 'remote access', 0;
RECONFIGURE;
EXEC sp_configure 'show advanced options', 0;
RECONFIGURE;
-- Note: Requires SQL Server restart to take effect

9. Performance Assessment

Good Confidence: 90%

Wait Statistics — No Significant Issues

The top wait types are all benign/background waits with very low accumulated times (total ~2.4 minutes combined, server recently restarted):

Wait TypeTimeAssessment
PWAIT_DIRECTLOGCONSUMER_GETNEXT1.25 min (51%)Benign — related to log consumer threads
QDS_PERSIST_TASK_MAIN_LOOP_SLEEP1.00 min (41%)Benign — Query Store background sleep
SLEEP_DBSTARTUP0.04 minBenign — startup related
WAIT_XTP_RECOVERY0.04 minBenign — In-Memory OLTP recovery
PWAIT_ALL_COMPONENTS_INITIALIZED0.03 minBenign — startup related

No concerning wait types (CXPACKET, PAGEIOLATCH, LCK_*, WRITELOG, etc.) are present. This is expected for a lightly loaded development workstation shortly after restart.

Good Confidence: 92%

I/O Performance — Excellent Latencies

All database files show sub-millisecond or 1ms average latencies. No I/O bottlenecks detected:

Note: System database files (master, model, msdb, tempdb) are on C:\Data\MSSQL16... while user databases are on C:\Data. Consider verifying these are separate physical volumes for optimal performance.

Good Confidence: 88%

Plan Cache — No Concerning Queries

The top resource-consuming queries in the plan cache are all system/monitoring queries (DMV queries, system catalog queries, filetable update queries). No user workload queries appear to be consuming excessive resources. This is consistent with a recently restarted server with minimal activity.

10. Proactive Maintenance Suggestions

Medium Confidence: 90%

Implement a Maintenance Framework

This server lacks a structured maintenance approach. Recommended framework:

TaskFrequencyNotes
Full Backup (all DBs)Daily or WeeklyInclude CHECKSUM, COMPRESSION
Log Backup (FULL recovery DBs)Every 15-30 minOr switch to SIMPLE recovery
DBCC CHECKDBWeeklyBefore full backups ideally
Index MaintenanceWeeklyRebuild >30% fragmented, reorganize 10-30%
Statistics UpdateWeekly or after large data changesUPDATE STATISTICS with FULLSCAN for key tables
Cycle Error LogsWeeklysp_cycle_errorlog
Query Store Cleanup ReviewMonthlyReview captured data, force plans if needed

Recommended: Install Ola Hallengren's SQL Server Maintenance Solution which provides comprehensive, community-proven maintenance jobs.

Info Confidence: 85%

Apply SQL Server Updates

The server is running SQL Server 2022 RTM-GDR (16.0.1175.1) from March 2026. While this is a recent GDR (security update), consider checking for the latest Cumulative Update (CU) which includes performance improvements and bug fixes in addition to security patches.

Check the latest CU at: Microsoft SQL Server Latest Updates

11. Concurrency Assessment

Good Confidence: 95%

No Concurrency Issues Detected

-- Enable blocked process reporting (alerts for blocks lasting > 10 seconds)
EXEC sp_configure 'show advanced options', 1;
RECONFIGURE;
EXEC sp_configure 'blocked process threshold (s)', 10;
RECONFIGURE;
EXEC sp_configure 'show advanced options', 0;
RECONFIGURE;

-- Then set up an Extended Events session or Alert to capture blocked process reports

12. Index Assessment

Good Confidence: 90%

No High-Impact Missing Indexes Detected

No high-impact missing indexes were found across all databases. This is expected given the minimal workload observed since the recent server restart. As the workload increases, missing index DMVs will accumulate recommendations.

Recommendation: Re-evaluate missing indexes after the server has been running under typical workload for at least 1-2 weeks. Use the Index Tuning goal in AI SQL Tuner for comprehensive analysis of individual databases when the time comes.

Configuration Summary — Changes Recommended

SettingCurrent ValueRecommended ValuePriorityRestart Required
optimize for ad hoc workloads01HighNo
backup compression default01HighNo
backup checksum default01HighNo
remote admin connections01HighNo
tempdb metadata memory-optimized01MediumYes
blocked process threshold010MediumNo
min server memory (MB)164096MediumNo
remote access10LowYes
cost threshold for parallelism3030✅ OK
max degree of parallelism88✅ OK
max server memory (MB)2316823168✅ OK