SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2008 Forums
 SQL Server Administration (2008)
 Risks in Enabling CLR?
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

jbates99
Constraint Violating Yak Guru

390 Posts

Posted - 08/20/2013 :  13:14:55  Show Profile  Reply with Quote
hi experts,

Our developers have found a tool that requires CLR to be enabled (we use 2008 R2 Enterprise)

Do you know of any potential disadvantages that I should consider before enabling Common Language Runtime?

Thanks, Jack

Bustaz Kool
Flowing Fount of Yak Knowledge

USA
1770 Posts

Posted - 08/20/2013 :  17:25:19  Show Profile  Reply with Quote
The issue for me is what is the CLR entity doing and is this a good use of (limited) database resources. A problem can be solved in a number of ways so there will be solutions that can be foisted on the database but might be better implemented at a different layer; string manipulation and formatting being examples. You will lose some visibility into what is in the CLR entity. With native code objects (functions, sprocs, etc.) you have some confidence that they should play nicely within the SQL engine architecture. Also, if you don't know what's in the CLR entity, how will you apply security correctly?

$.02

=================================================
The cure for anything is salt water -- sweat, tears, or the sea. -Isak Dinesen
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

Sweden
30281 Posts

Posted - 08/20/2013 :  18:36:00  Show Profile  Visit SwePeso's Homepage  Reply with Quote
It depends. Does the assembly require UNSAFE or EXTERNAL permission? If so, yes, I would be hesitant.
If only SAFE mode is required, there is nothing the code can do that a normal SP couldn't match.


Microsoft SQL Server MVP, MCT, MCSE, MCSA, MCP, MCITP, MCTS, MCDBA

Edited by - SwePeso on 08/20/2013 18:37:03
Go to Top of Page

jbates99
Constraint Violating Yak Guru

390 Posts

Posted - 08/21/2013 :  15:21:38  Show Profile  Reply with Quote
Thanks for your advice, Bustaz and SwePeso.

The instructions for installing this .DLL call for the Assembly to use the SAFE Permissions set, so I think this will be OK.

Pls see below.
Jack


CREATE ASSEMBLY HeatMap from 'c:\HeatMap\HeatMap.dll' WITH PERMISSION_SET = SAFE

CREATE PROCEDURE dbo.CreateHeatMap (@Width real, @Height real, @SqlStrng nvarchar(4000))
AS
EXTERNAL NAME HeatMap.StoredProcedures.TreeMapGeography
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.05 seconds. Powered By: Snitz Forums 2000