Microsoft pulled both SQL Server 2025 CU1 and SQL Server 2022 CU23 last week. The reason: Database Mail is completely broken after installing either update.
Could not load file or assembly 'Microsoft.SqlServer.DatabaseMail.XEvents, Version=17.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91' or one of its dependencies. The system cannot find the file specified.
If you've already installed one of these updates, your alert emails aren't going out. Your job failure notifications are silent. That monitoring you set up years ago? Dead.
Which Updates Are Affected?
| Version | Broken Update | Status |
|---|---|---|
| SQL Server 2025 | CU1 (KB5074901) | Pulled from download |
| SQL Server 2022 | CU23 (KB5074819) | Pulled from download |
The RTM builds of both versions are fine. If you're on SQL Server 2025 RTM or SQL Server 2022 CU22 or earlier, you're not affected — as long as you don't update.
How to Check If You're Affected
Run this to check your current build:
SELECT @@VERSION;
Or just run this to test your Database Mail:
EXEC msdb.dbo.sp_send_dbmail
@profile_name = 'YourMailProfile',
@recipients = 'youraddress@example.com',
@subject = 'Database Mail Test',
@body = 'Testing after CU install';
If it fails with the assembly error above, you've been hit.
The Fix: Uninstall the CU
Microsoft's official guidance is blunt: "If you already installed this update, uninstall it to restore Database Mail functionality."
To uninstall a Cumulative Update:
Windows Server
Go to Control Panel → Programs and Features → View installed updates. Find the SQL Server CU, right-click, and uninstall. You'll need to restart the SQL Server service (and possibly the server).
Microsoft has detailed uninstall instructions here: Uninstall a Cumulative Update from SQL Server
Emergency Workaround (If You Can't Uninstall Yet)
If you're stuck on the broken CU and can't perform an immediate uninstall, there's a community workaround floating around. Some DBAs have reported success copying three DLL files from a working (pre-CU) instance:
From a working SQL Server 2022 instance (pre-CU23), copy these files from C:\Program Files\Microsoft SQL Server\MSSQL16.MSSQLSERVER\MSSQL\Binn:
- DatabaseMail.exe
- DatabaseMailengine.dll
- DatabaseMailprotocols.dll
Replace the same files on the broken instance. Restart the SQL Server Agent service.
I haven't personally tested this workaround, and it's not officially supported. Use at your own risk. The proper fix is to uninstall the CU.
Check Your Unsent Mail Queue
If Database Mail was broken for any length of time, you may have queued messages that never went out. Check with:
SELECT
mailitem_id,
profile_id,
recipients,
subject,
send_request_date,
sent_status,
sent_date
FROM msdb.dbo.sysmail_allitems
WHERE sent_status <> 'sent'
ORDER BY send_request_date DESC;
After you restore Database Mail functionality, these queued messages should attempt to send. If they don't, you may need to manually resend critical notifications.
The Bigger Picture
This is CU1 for SQL Server 2025. The product went GA in November. Two months later, the first cumulative update breaks a core feature that's been in the product for over 20 years.
As one commenter on Brent Ozar's blog put it: "I started skeptical yet secretly hopeful MS would get its act together for this version, but my days of being unimpressed with Nadella's Microsoft quality standards are coming to a middle."
The lesson here isn't new, but it bears repeating: test your CUs before deploying to production. Even CU1. Especially CU1.
Microsoft will presumably release a fix soon. Until then, hold off on both SQL Server 2025 CU1 and SQL Server 2022 CU23 if you use Database Mail. Which is, I think, pretty much most of us.
More to Read:
Microsoft: SQL Server 2025 CU1 (KB5074901) — includes Database Mail warning
Microsoft: SQL Server 2022 CU23 (KB5074819)
Brent Ozar: SQL Server 2025 CU1 is Off to a Rough Start
Microsoft Q&A: DatabaseMail.exe fails after SQL Server 2022 CU22 to CU23
Microsoft: How to Uninstall a Cumulative Update
No comments:
Post a Comment