25 March 2011

Error on enabling CLR in SQL2005

It happens when i simulate with my new production server. after i move my source web application to the new server, this error show up. the cause of this error that i read is this:
The CLR integration is not enabled by default when we create a stored procedure project in VS 2005,and you deployed in SQL 2005
To enable execution of .Net Code in SQL 2005, this is the script you need, run it in the running instance of SQL 2005; it will enable .net CLR code.

EXEC sp_configure 'clr enabled', 1;

RECONFIGURE WITH OVERRIDE;

GO

To disable execution of .Net Code in SQL 2005, this is the script you need, run it in the running instance of SQL 2005; it will enable .net CLR code.

EXEC sp_configure 'clr enabled', 0;

RECONFIGURE WITH OVERRIDE;

GO

The second way to enable .Net code in SQL 2005 stored procedures, is to use SQL Server Surface Area Configuration.

From Start-> programs -> SQL 2005->Configuration tools ->SQL Surface Area Configuration.

Click with Surface area configuration for features.
Just click on Enable CLR integration and click apply and ok.

taken from http://www.c-sharpcorner.com/UploadFile/dsdaf/CLRSQL20507292006084224AM/CLRSQL205.aspx

No comments:

Post a Comment

Twiit.. Twiit... Gulp