| title | Server Configuration: clr enabled | ||
|---|---|---|---|
| description | Learn how to use the clr enabled option to specify whether SQL Server can run user assemblies. See when common language runtime execution isn't supported. | ||
| author | rwestMSFT | ||
| ms.author | randolphwest | ||
| ms.date | 08/26/2025 | ||
| ms.service | sql | ||
| ms.subservice | configuration | ||
| ms.topic | conceptual | ||
| helpviewer_keywords |
|
[!INCLUDE SQL Server]
Use the clr enabled option to specify whether [!INCLUDE ssNoVersion] can run user assemblies. The clr enabled option provides the following values:
| Value | Description |
|---|---|
0 |
Assembly execution not allowed on [!INCLUDE ssNoVersion]. |
1 |
Assembly execution allowed on [!INCLUDE ssNoVersion]. |
For WOW64 only: restart WOW64 servers to apply these changes. No restart is required for other server types.
When you run RECONFIGURE, and the run value of the clr enabled option is changed from 1 to 0, all application domains containing user assemblies are immediately unloaded.
Disable one of two options: clr enabled or lightweight pooling. Features that rely upon CLR and that don't work properly in fiber mode include the hierarchyid data type, the FORMAT function, replication, and Policy-Based Management. For more information, see Server configuration: lightweight pooling.
Though the clr enabled configuration option is enabled in [!INCLUDE ssazure-sqldb], developing CLR user functions aren't supported in [!INCLUDE ssazure-sqldb].
[!INCLUDE code-access-security]
The following example first displays the current setting of the clr enabled option and then enables the option by setting the option value to 1. To disable the option, set the value to 0.
EXECUTE sp_configure 'clr enabled';
EXECUTE sp_configure 'clr enabled', '1';
RECONFIGURE;