Configuring & Checking CLR integration in SQL Server
Now we are going to configure the CLR, by enabling it.
sp_configure 'show advanced options', 1;GO
RECONFIGURE;GOsp_configure 'clr enabled', 1;GO
RECONFIGURE;GO
Disabling
sp_configure 'show advanced options', 1;GO
RECONFIGURE;GOsp_configure 'clr enabled', 0;GO
RECONFIGURE;GO
Check whether the CLR is enabled or not using the below query:
SELECT * FROM sys.configurations WHERE name = 'clr enabled'
Enable Set 1
Disable Set 0
sp_configure 'show advanced options', 1;GO
RECONFIGURE;GOsp_configure 'clr enabled', 1;GO
RECONFIGURE;GO
Disabling
sp_configure 'show advanced options', 1;GO
RECONFIGURE;GOsp_configure 'clr enabled', 0;GO
RECONFIGURE;GO
Check whether the CLR is enabled or not using the below query:
SELECT * FROM sys.configurations WHERE name = 'clr enabled'
Add your DLL in SQL Assembly:
CREATE ASSEMBLY cbtestassembly
FROM 'C:\cb\TestCb.dll'
WITH PERMISSION_SET = UNSAFE;
Comments
Post a Comment