Uncategorized

CLR Integration in SQL Server 2005

I have just finished reading a white paper regarding CLR integration in SQL Server 2005. To me, the integration of the CLR into SQL Server has been the most exciting aspect of the new version so I was glad to see a paper getting into some of the details of its place in the toolbox.

When I reached the section regarding the steps that must be taken to “install” a managed code procedure I couldn’t help but think that it sounded like a lot of manual steps to perform for every assembly. Luckily, Microsoft anticipated this and built functionality to automate much of this though Visual Studio 2005.

Highlights of the paper include:

  • A discussion of when managed code procedures are preferred to T-SQL.
  • Demonstrations of using managed stored procedures to validate column values using regular expressions.
  • Examples of table valued functions that retrieve their value from externally hosted XML documents (such as RSS feeds).

While the paper mentioned that other assemblies may be referenced from the assemblies that are uploaded into SQL Server 2005, a few questions on this subject were left unanswered though. [If these questions have been answered in other papers, I’d love to be directed to them.]

  • Do the referenced assemblies have to be uploaded into SQL Server too?
  • Can the managed code procedure consume Web Services?
  • Can the managed code procedures reference assemblies stored in the GAC?

I truly hope that developers take the time to thoroughly understand when managed code procedures are appropriate. Too often, features are overused simply “because they’re there.” I regularly see people fall into this mindset where they feel that they must use a feature or tool because of the “coolness” of it rather than actually examining if it is the proper thing to do.

A great example of this mindset is found with PowerPoint presentations. How often do people use multi-million color backgrounds or assign a sound to every animation simply for the sake of doing it and because they think that it is “cool” or “neat?”

More often than not, these presentations are unreadable because the text blends into the background. If the eyestrain from trying to read the slides doesn’t give the audience members a collective headache, the constant mechanical keyboard sound certainly will!

What’s worse is that these presenters typically seem to be completely oblivious to the frustration that they have given to their audience. It’s as though the tool has made them forget that their purpose is to present information. Additionally, these presenters do not seem to realize that the audience has learned little from the presentation because they have gotten lost in the distractions created by the presenter.

Let it snow

Thanksgiving is upon us and right on cue, so is winter. My wife (Esther) and I were travelling to visit my parents when the rain changed to sleet and finally into snow, but only after a “nice” layer of ice had formed on the interstate.

What is normally a two hour trip quickly stretched into four hours of nearly bumper-to-bumper traffic with vehicles of all shapes and sizes sliding off the road. Several cars had crashed into trees while others were crushed against the concrete barrier.

Frozen, two-inch diameter branches have been breaking off of the trees in my parents’ back yard. Some smaller branches had also broken off of their tree and fallen into the street. Luckily, we were able to avoid any incidents on the way.

Today was the first opportunity I have had to learn how my ’05 VW Jetta TDI handles winter weather. Overall it handled well until I reached an area with about four inches of loose snow. It was then that I started missing the Quattro that was present on my old TT.

Inaugural Post

There has been a lot of buzz in the media lately about these “blogs” so I thought I’d hop on the bandwagon and start my own. This will not be updated daily but I’ll try to post as often as time permits and I have something to say.

My intent here is to encourage discussion about programming practices and upcoming technologies. That being said, I’ll post here and direct the subjects typically along the lines of something I’m working on. Occasionally, I’ll post about an article I have read. Depending on what is going on, I may even post about something that is happening in my life.

Just for reference, I have been using the .NET Framework almost as long as it has been available. By no means do I claim to know every aspect of it. There are plenty of namespaces that I have not even begun to examine or use primarily because the applications I have developed have not needed the functionality provided therein.

My .NET language of choice is C#. I have not ventured very far into VB.NET though I typically have no problem reading it. The rationale for the language preference is partially based in syntax and partially based in capabilities.

For database technology, my area of expertise is SQL Server 2000. I have not worked with SQL Server 2005 nor have I read much about it yet but the little that I have read has gotten my attention.

Feedback on my posts is encouraged. I hope to be able to use this blog as a platform for not only contributing to the community but also to learn and grow from it.