Is “CLR Integration” enabled at a database level o

2019-07-09 17:55发布

问题:

I am trying to understand whether enabling CLR enables it at a database-level or server-level / instance-level. The Online books are not clear at all, what happens if I enable CLR using this command, would it be enabled across all of the servers??

sp_configure 'clr enabled', 1
GO
RECONFIGURE
GO

回答1:

CLR Integration is enabled at the server level (by the sp_configure 'clr enabled', 1 code you posted).

Assemblies are loaded at the database level. CLR Stored Procedures and Functions are created from methods in those loaded assemblies at a database level.