Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


SQL CLR: Liability in Disguise for a DBA?


SQL CLR: Liability in Disguise for a DBA?

Author
Message
Usman Butt
Usman Butt
SSC-Addicted
SSC-Addicted (476 reputation)SSC-Addicted (476 reputation)SSC-Addicted (476 reputation)SSC-Addicted (476 reputation)SSC-Addicted (476 reputation)SSC-Addicted (476 reputation)SSC-Addicted (476 reputation)SSC-Addicted (476 reputation)

Group: General Forum Members
Points: 476 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 Sad
• 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.
MVDBA
MVDBA
SSCrazy
SSCrazy (2.4K reputation)SSCrazy (2.4K reputation)SSCrazy (2.4K reputation)SSCrazy (2.4K reputation)SSCrazy (2.4K reputation)SSCrazy (2.4K reputation)SSCrazy (2.4K reputation)SSCrazy (2.4K reputation)

Group: General Forum Members
Points: 2421 Visits: 860
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 Sad
• 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
Usman Butt
Usman Butt
SSC-Addicted
SSC-Addicted (476 reputation)SSC-Addicted (476 reputation)SSC-Addicted (476 reputation)SSC-Addicted (476 reputation)SSC-Addicted (476 reputation)SSC-Addicted (476 reputation)SSC-Addicted (476 reputation)SSC-Addicted (476 reputation)

Group: General Forum Members
Points: 476 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.
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search