title | description | author | ms.author | ms.date | ms.service | ms.subservice | ms.topic | helpviewer_keywords | ||
---|---|---|---|---|---|---|---|---|---|---|
Server configuration: clr enabled |
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. |
rwestMSFT |
randolphwest |
08/02/2024 |
sql |
configuration |
conceptual |
|
[!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.
EXEC sp_configure 'clr enabled';
EXEC sp_configure 'clr enabled' , '1';
RECONFIGURE;