How to fix Error 2320 on Windows Server 2025 / Windows 11

Troubleshooting Guide: SQL Server Error 2320 — Duplicate Facet Found

Why This Error Happens

Error 2320 occurs when the Policy-Based Management (PBM) engine encounters two or more facet definitions sharing the same name at the same XML location within the msdb system database’s facet metadata tables. This typically results from a corrupted or incompletely applied Cumulative Update/Service Pack that re-registers facets without first clearing stale entries, or from a botched manual import of policy management XML definitions. It can also surface after an in-place upgrade to SQL Server 2025 where legacy facet metadata from a previous version was not properly migrated or deduplicated.

Step-by-Step Resolution Guide

Step 1: Identify the Conflicting Facet Entries

  • Open SQL Server Management Studio (SSMS) and connect to the affected instance.
  • Run the following query against msdb to locate duplicates:
SELECT facet_name, COUNT(*) AS occurrences
FROM msdb.dbo.syspolicy_management_facets
GROUP BY facet_name
HAVING COUNT(*) > 1;
  • Note the exact facet_name and location values returned, as these pinpoint the conflict described in the error message.

Step 2: Rebuild the Policy-Based Management Metadata

  • Stop the SQL Server Agent service temporarily via services.msc or net stop SQLSERVERAGENT to prevent policy evaluation jobs from running during cleanup.
  • Back up msdb first:
BACKUP DATABASE msdb TO DISK = 'C:\Backup\msdb_pre2320.bak';
  • Remove the duplicate facet row(s) identified in Step 1 using the sp_syspolicy_delete_policy_management_facet stored procedure (or direct DELETE only if Microsoft Support has confirmed it’s safe for your build).
  • Restart SQL Server and SQL Server Agent services.

Step 3: Reapply the Latest Cumulative Update

  • Download the latest Cumulative Update (CU) for SQL Server 2025 from the Microsoft Update Catalog.
  • Run the installer with repair logging enabled:
Setup.exe /ACTION=Install /QUIET /INSTANCENAME=MSSQLSERVER /IACCEPTSQLSERVERLICENSETERMS /UpdateSource=C:\SQLCU\
  • Verify the installation path C:\Program Files\Microsoft SQL Server\160\Setup Bootstrap\Log\ for any setup errors related to syspolicy objects.

Step 4: Validate Windows Server Environment Integrity

  • Ensure Windows Server 2025 / Windows 11 has no pending reboots from Windows Update, as this can leave SQL Server service files in a partially updated state (Get-WURebootStatus via PowerShell module PSWindowsUpdate).
  • Confirm the SQL Server service account has full read/write permissions on C:\Program Files\Microsoft SQL Server\MSSQL16.MSSQLSERVER\MSSQL\Binn\ to rule out metadata file corruption from permission failures.

Alternative or Verification Steps

  • Re-run the duplicate-check query from Step 1 — a clean result set (no rows returned) confirms the fix.
  • Open SSMS → Management → Policy Management → Facets and manually scroll through the list to confirm no duplicate facet names appear; if the error persists, restore the msdb backup taken in Step 2 and engage Microsoft Support with the CU installation logs attached.