Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

enable clr on database level Expand / Collapse
Author
Message
Posted Monday, April 16, 2012 6:54 AM
Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: Thursday, November 20, 2014 7:15 AM
Points: 56, Visits: 240
Is there a way to enable clr on database level instead of the code below or a a gui to do that.

sp_configure 'clr enabled', 1
GO
RECONFIGURE
GO
Post #1284070
Posted Monday, April 16, 2012 7:08 AM


SSC-Forever

SSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-Forever

Group: General Forum Members
Last Login: Today @ 1:14 PM
Points: 40,615, Visits: 37,081
No, that's how you enable CLR.




Gail Shaw
Microsoft Certified Master: SQL Server 2008, MVP
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

We walk in the dark places no others will enter
We stand on the bridge and no one may pass

Post #1284083
Posted Monday, April 16, 2012 12:57 PM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: 2 days ago @ 8:51 PM
Points: 7,140, Visits: 12,763
As mentioned you have to enable the CLR at the instance-level but you can enable it on the instance and add a DDL trigger FOR the DDL_ASSEMBLY_EVENTS event group in all databases where you want to prevent the creation of assemblies.

Something simple like this could do the trick:

CREATE TRIGGER [db_no_assembly] ON DATABASE
FOR DDL_ASSEMBLY_EVENTS
AS
BEGIN
RAISERROR('No CLR DDL activities allowed in this database.',11,1);
ROLLBACK;
END
GO



__________________________________________________________________________________________________
There are no special teachers of virtue, because virtue is taught by the whole community. --Plato
Post #1284420
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse