Description
Occurs during CLR code execution. When SQL Server is waiting for CLR to acquire a writer lock. This is an expected wait and minimal values are acceptable. If values are excessive see suggested solutions below
Resolved by
DBAs and Developers
Suggested solutions
- Ensure CLR code is written as per best practices (link below)
- Run an Extended Event collecting wait statistics. Find which requests are accumulating the wait type and rectify
Additional research
The Database Administrator’s Guide to the SQL Server Database Engine .NET Common Language Runtime Environment
Common Language Runtime from the DBA Point of View
SQLCLR: A DBA’s friend or foe?