Friday, 3 May 2013

SQL SERVER – Enable CLR using T-SQL script Error: linked server "(null)" / Enable advanced options:

Solutions : 
Before doing any .Net coding in SQL Server you must enable the CLR. In SQL Server 2005, the CLR is OFF by default.
This is done in an effort to limit security vulnerabilities. Following is the script which will enable CLR.
 EXECUTE
Solutions :
(You may need to execute the following SQL Statements to configure the Linked Server initially)
EXECUTE sp_CONFIGURE 'show advanced options', 1 RECONFIGURE with Override
EXECUTE sp_CONFIGURE 'Ad Hoc Distributed Queries', 1 RECONFIGURE with Override

or

EXEC sp_CONFIGURE 'show advanced options' , '1';
GORECONFIGURE;
GO
EXEC sp_CONFIGURE 'clr enabled' , '1'
GO
RECONFIGURE;
GO

No comments:

Post a Comment