SQL Clone
SQLServerCentral is supported by Redgate
Log in  ::  Register  ::  Not logged in

What's in your CLR?

By Jeff Moden,

Today we have a guest editorial from Jeff Moden, the anti-RBAR crusader himself,  with an interesting Friday poll. This was originally published on Dec 11, 2009.

I'm really curious so I thought I'd conduct a bit of a survey.  If you have the time and the inclination, I'd sure love to see your thoughtson this.  Thanks folks. :-)

OK, the following occurred during another person's Q&A with a well known SQL Server MVP...

Q: Considering those who are using SQLCLR, what are the biggest or most common problems? What do developers need to watch out for?

A: SQLCLR should not be looked at as a panacea. It's not going to solve all of your problems, but when properly applied, it will solve many of them. Developers like to jump on a new technology and ride it—for better or for worse—as far as it will take them, and the SQLCLR world is no different. I've heard horror stories about developers rewriting an entire application worth of stored procedures using SQLCLR, causing memory problems and severely limiting scalability. This is not the correct use case for the technology; just like with any other tool, it should be used in moderation, in situations in which it’s appropriate.

The above Q&A is part of a teaser for the PASS conference but it does bring up a couple of questions of my own...

1.  What's in YOUR CLR?  In other words, what have you written a CLR for?  What did it do?  If you don't use CLR's, why not?

2.  If you have written CLR's, why did you write them (or it)?  Was it because you didn't know how to do item 1 above in T-SQL, it couldn't be done in T-SQL, or because it was more performant as a CLR or something else?

3.  Looking back at it, was it an appropriate thing to do?

4.  Even if you haven't written a CLR, what would you consider a CLR to be appropriate for?  Please be a bit specific if you can and if you have the time.  Saying something like "math intensive tasks" or "string manipulation" tasks is what most people say but there's a lot of those things that can easily be done in T-SQL. 

For this Friday poll, what would you consider a task that should done in a CLR instead of T-SQL and why?

Total article views: 610 | Views in the last 30 days: 2
Related Articles

Stairway to SQLCLR Level 6: Development Tools Intro

This time we look at the commonly used tools for doing SQLCLR development: Visual Studio (VS), SQL S...


Soundex - Experiments with SQLCLR Part 2

Constructive feedback on SOUNDEX - Experiments with SQLCLR lead to further experimentation with phon...


Stairway to SQLCLR Level 1: What is SQLCLR?

The first step to using the SQLCLR begins with this overview of what is possible and what is not. St...


Practical usage of SQLCLR: Building QueryToHtml function

This article shows a few techniques with SQLCLR to to transform a query result into HTML.


Consider the Downside

Steve Jones asks software developers to consider the issues we may have with lax internal security.

friday poll