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

SQL CLR: Liability in Disguise for a DBA? Expand / Collapse
Author
Message
Posted Wednesday, May 23, 2012 1:21 AM
SSC-Addicted

SSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-Addicted

Group: General Forum Members
Last Login: Monday, May 26, 2014 10:11 AM
Points: 452, Visits: 820
First of all, let me make it clear, I am not against the CLR integration at all It serves much better than TSQL in some scenarios.

But being a DBA, my question is, do not CLRs make it a bit difficult to keep the environment secure with optimal performance. Especially, when there is requirement to keep up to date with the latest SQL Server version, learn new enhancements and other daily responsibilities etc. and not to say personal preferences (With least priority though). My concerns are

• How to make sure that the CLR code is safe to import in my environment? Is it handling the exceptions correctly? Is there any code that can be exploited? I agree, most/some of us do have knowledge of .NET, but complex code is hard to look into?
• For security reasons, one have the option to mark the assemblies as SAFE, EXTERNAL_EXCESS etc. which are quite manageable but what about when you have to declare it as UNSAFE? (In my environment it is needed as the CLR is accessing non-SQL database through OLEDB. In this case even Microsoft would not give support until the CLR is disabled temporarily from SQL Server instance).
• Moreover, is it the DBA’s responsibility to keep up to date with .NET framework hotfixes, Service Packs, Upgrade etc.? The Upgrade itself needs refreshing of the assemblies in most cases
• Testing. How you go about testing the CLR? What factors should be looked into?
• Should there be a baseline above which CLR functionality should not be allowed? What is the balanced approach?

I know most of the environments would have the CLRs installed, but what is the best way to manage them and how the segregation of the responsibilities is done? At the end of the day, in most environments, the management seeks an immediate response from the DBAs, when it comes to performance downgrade, server hang etc. and in some cases you find yourself in a predicament

Thanks in advance for suggestions and help.
Post #1304740
Posted Wednesday, May 23, 2012 2:02 AM


SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Friday, August 8, 2014 3:25 AM
Points: 2,283, Visits: 781
Usman Butt (5/23/2012)
First of all, let me make it clear, I am not against the CLR integration at all It serves much better than TSQL in some scenarios.

But being a DBA, my question is, do not CLRs make it a bit difficult to keep the environment secure with optimal performance. Especially, when there is requirement to keep up to date with the latest SQL Server version, learn new enhancements and other daily responsibilities etc. and not to say personal preferences (With least priority though). My concerns are

• How to make sure that the CLR code is safe to import in my environment? Is it handling the exceptions correctly? Is there any code that can be exploited? I agree, most/some of us do have knowledge of .NET, but complex code is hard to look into?
• For security reasons, one have the option to mark the assemblies as SAFE, EXTERNAL_EXCESS etc. which are quite manageable but what about when you have to declare it as UNSAFE? (In my environment it is needed as the CLR is accessing non-SQL database through OLEDB. In this case even Microsoft would not give support until the CLR is disabled temporarily from SQL Server instance).
• Moreover, is it the DBA’s responsibility to keep up to date with .NET framework hotfixes, Service Packs, Upgrade etc.? The Upgrade itself needs refreshing of the assemblies in most cases
• Testing. How you go about testing the CLR? What factors should be looked into?
• Should there be a baseline above which CLR functionality should not be allowed? What is the balanced approach?

I know most of the environments would have the CLRs installed, but what is the best way to manage them and how the segregation of the responsibilities is done? At the end of the day, in most environments, the management seeks an immediate response from the DBAs, when it comes to performance downgrade, server hang etc. and in some cases you find yourself in a predicament

Thanks in advance for suggestions and help.


this really depends on who is writing your CLR code - is it external contractors or internal developers?
have you validated that there is no open source code in the CLR that has a reciprocal license that requires you to publish the source code of your "ENTIRE" product.

I have worked with 3rd party companies before who act as independant code quality auditors and review any potential license violations.

have a look at SQS.com - these guys provide all of these services as well as being able to provide resources and strategy on testing.

I think of all of these testing is the biggest issue to tackle in terms of man hours... functional testing, performance testing (load and soak), regression testing on code changes etc etc - perhaps a nice article/editorial on this site


MVDBA
Post #1304760
Posted Wednesday, May 23, 2012 4:50 AM
SSC-Addicted

SSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-Addicted

Group: General Forum Members
Last Login: Monday, May 26, 2014 10:11 AM
Points: 452, Visits: 820
michael vessey (5/23/2012)


have you validated that there is no open source code in the CLR that has a reciprocal license that requires you to publish the source code of your "ENTIRE" product.


That was not on my mind. Thanks for sharing. But I do not think it is the case for us.



I have worked with 3rd party companies before who act as independant code quality auditors and review any potential license violations.

have a look at SQS.com - these guys provide all of these services as well as being able to provide resources and strategy on testing.


Third party auditors review ....that I cannot see happening for us



I think of all of these testing is the biggest issue to tackle in terms of man hours... functional testing, performance testing (load and soak), regression testing on code changes etc etc - perhaps a nice article/editorial on this site


That would indeed be great.
Post #1304830
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse