Skip to content

Latest commit

 

History

History
47 lines (36 loc) · 3.27 KB

clr-integration-enabling.md

File metadata and controls

47 lines (36 loc) · 3.27 KB
title description author ms.author ms.date ms.service ms.subservice ms.topic helpviewer_keywords
Enabling CLR Integration
Microsoft SQL Server hosting CLR is called CLR integration, which is disabled by default. Use the sp_configure stored procedure to enable CLR integration.
rwestMSFT
randolphwest
01/14/2022
sql
clr
reference
clr enabled option
common language runtime [SQL Server], enabling

CLR Integration - Enabling

[!INCLUDE SQL Server SQL MI] The common language runtime (CLR) integration feature is off by default, and must be enabled in order to use objects that are implemented using CLR integration. To enable CLR integration, use the clr enabled option of the sp_configure stored procedure in [!INCLUDEssManStudioFull]:

EXEC sp_configure 'clr enabled', 1;  
RECONFIGURE;  
GO  

You can disable CLR integration by setting the clr enabled option to 0. When you disable CLR integration, [!INCLUDEssNoVersion] stops executing all user-defined CLR routines and unloads all application domains. Features that rely upon the CLR, such as the hierarchyid data type, the FORMAT function, replication, and Policy-Based Management, are not affected by this setting and will continue to function.

Note

Though the clr enabled configuration option is enabled in [!INCLUDE ssazure-sqldb], developing CLR user functions are not supported in [!INCLUDE ssazure-sqldb].

Permissions

To enable CLR integration, you must have ALTER SETTINGS server level permission, which is implicitly held by members of the sysadmin and serveradmin fixed server roles.

Remarks

Computers configured with large amounts of memory and a large number of processors may fail to load the CLR integration feature of SQL Server when starting the server. To address this issue, start the server by using the -gmemory_to_reserve[!INCLUDEssNoVersion] service startup option, and specify a memory value large enough. For more information, see Database Engine Service Startup Options.

Note

Common language runtime (CLR) execution is not supported under lightweight pooling. Before enabling CLR integration, you must disable lightweight pooling. For more information, see lightweight pooling Server Configuration Option.

See Also