If you are reading this, it's probably because you too have this rare need to clear the SSMS cache for some kind of troubleshooting.
Since almost everything in the computer world uses some kind of cache, it's no surprise that SQL Server Management Studio (SSMS) also has its own cache. This cache makes our lives easier by remembering things like most recently used (MRU) connections and objects, and enabling features like IntelliSense, auto-completion, syntax highlighting, object names, our preferences, and even idiosyncrasies. To elaborate on how the cache aids the IntelliSense feature, it stores local copies of database schema metadata, such as tables, columns, and functions, which allows IntelliSense to quickly provide accurate auto-completion suggestions as you type. This enables context-aware recommendations, tracks object dependencies, and improves performance by avoiding repeated database queries. In large, active environments with many DBAs and developers, this can significantly enhance both performance and team productivity.
However, during active database design and development phases where schema changes occur frequently (such as adding new tables or columns), IntelliSense may not immediately recognize these changes until the cache is refreshed.
*SSMS does not currently update the IntelliSense cache aggressively, nor is it as instantaneous or automatic as one might expect. Therefore, after creating, altering, or dropping database objects, a manual refresh using the shortcut Ctrl+Shift+R is required. Otherwise, SSMS may display outdated schema information in the query window.
The file is created or saved (if it already exists) whenever you close SQL Server Management Studio (SSMS).
If you have customized your SSMS appearance and experience significantly, you should consider backing up this file. It is located at "%USERPROFILE%\AppData\Local\Microsoft\SQL Server Management Studio\%Version%\Settings\SQL Server Management Studio".
There are some other configuration files you may want to save, such as Ssms.exe.config, UserSettings.xml, and RegSrvr*.xml. Please scroll down to the end of this article for a brief description
- "%USERPROFILE%\AppData\Local\Microsoft\SQL Server Management Studio"
- %USERPROFILE%\AppData\Roaming\Microsoft\SQL Server Management Studio"
There is a Microsoft article on clearing everything from SSMS cache:
Clear SSMS Cache FilesThen when you relaunch the SSMS after clearing the cache, you will see the following warning, which you could ignore by clicking OK if you want to start SSMS with a blank slate, or as I just did a bit ago, save the settings files somewhere before deleting the cache files, then copy NewSettings.vssettings back to its original location.
Here is a PowerShell script I use to backup then clear the SSMS cache:
<# .SYNOPSIS Backs up AND CLEARS SQL Server Management Studio (SSMS) cache/configuration folders. .DESCRIPTION This script verifies SSMS (Ssms.exe) is not running, then MOVES SSMS cache and configuration folders from AppData to a timestamped backup directory under Documents. This effectively CLEARS the SSMS cache while preserving a backup. By default, runs in DryRun mode to preview actions. Use -NoDryRun to execute. .PARAMETER NoDryRun Execute the actual backup/clear operation (default is DryRun simulation). .NOTES Author: [Your Name] Updated: 2026-02-02 Version: 1.5 Effect: MOVES folders from AppData --> Backup (clears SSMS cache) .EXAMPLE .\Backup-SsmsCache.ps1 PREVIEWS the cache clearing operation (DryRun default). .EXAMPLE .\Backup-SsmsCache.ps1 -NoDryRun BACKS UP and CLEARS SSMS cache folders from AppData. #> param( [switch]$NoDryRun ) # Determine if DryRun is active (default: $true) $DryRun = -not $NoDryRun if ($DryRun) { Write-Output "[DRY-RUN MODE] Previewing SSMS cache backup + clear operation." } else { Write-Output "[LIVE MODE] Will backup AND CLEAR SSMS cache folders." } # --- Check if SSMS is running ------------------------------------------------- $ssmsProcess = Get-Process -Name "Ssms" -ErrorAction SilentlyContinue if ($ssmsProcess) { Write-Warning "SSMS is running. Close SSMS before clearing cache." Throw "SSMS is currently running. Please close SSMS before running this script." } # --- Setup backup paths ------------------------------------------------------- $ProfilePath = $env:USERPROFILE Write-Output "User Profile: $ProfilePath" $DateTimeSuffix = Get-Date -Format 'yyyyMMdd_HHmmss' $BackupRoot = Join-Path $ProfilePath 'Documents\SQL Server Management Studio - Backup' $BackupPath = Join-Path $BackupRoot $DateTimeSuffix Write-Output "Backup + Clear Target: $BackupPath" if ($DryRun) { Write-Output "[DryRun] Would create: $BackupPath" } else { New-Item -Path $BackupPath -ItemType Directory -Force | Out-Null } # --- Locate and process SSMS cache folders ------------------------------------ $SSMSRoamingPath = Join-Path $env:APPDATA 'Microsoft\SQL Server Management Studio' $SSMSLocalPath = Join-Path $env:LOCALAPPDATA 'Microsoft\SQL Server Management Studio' $SSMSPaths = @($SSMSRoamingPath, $SSMSLocalPath) | Where-Object { Test-Path $_ } if ($SSMSPaths.Count -eq 0) { Write-Warning "No SSMS cache folders found in AppData (nothing to clear)." } else { Write-Output "Found $($SSMSPaths.Count) SSMS cache folder(s) to process:" foreach ($Path in $SSMSPaths) { $RelativePath = $Path.Substring($ProfilePath.Length + 1) $DestPath = Join-Path $BackupPath $RelativePath Write-Output " → Source: $Path" Write-Output " → Backup Dest: $DestPath" Write-Output " → Result: SSMS cache CLEARED from AppData" if ($DryRun) { Write-Output " [DryRun] Would MOVE folder to backup (clearing cache)" } else { New-Item -Path (Split-Path $DestPath) -ItemType Directory -Force | Out-Null Move-Item -Path $Path -Destination $DestPath -Force Write-Output " Cache folder MOVED (cleared from AppData)" } Write-Output "" } } if ($DryRun) { Write-Output "`n[DRY-RUN COMPLETE] SSMS cache would be cleared. Use -NoDryRun to execute." } else { Write-Output "`nSSMS CACHE SUCCESSFULLY BACKED UP AND CLEARED to: $BackupPath" }
Finally, here is a brief description of some of the configuration files used file by SSMS:
- NewSettings.vssettings: Stores user environment and IDE settings such as fonts, colors, window layouts, and editor preferences.
- Ssms.exe.config: This is the main configuration file for SSMS and stores runtime settings, assembly bindings, and other .NET framework configuration directives needed for SSMS to run.
- UserSettings.xml*: Stores specific customization and preferences for SSMS UI behavior, including tool windows, recent files, and other user-level options.
- RegSrvr.xml*: Stores local registered SQL connection information, such as saved server names, authentication types, and connection properties for servers previously registered in SSMS.