SQL Server 2005 and CLR

Another interesting MSDN article has been published. Using CLR Integration in SQL Server 2005 is a broad (and verbose) description of key aspects of CLR/T-SQL integration. Among the questions answered are:

  • Stored procedures: managed code vs. T-SQL?
  • How do I write stored procedures and functions in C# (or VB or whatever)?
  • How to access and return data to the caller from a CLR SP?
  • What are TVFs (Table valued functions)? (in short: functions that return a table-like stream of data)
  • Writing your user-defined aggregation operators (can you say SELECT THIRD_BIGGEST(Age) FROM Person?)
  • How to use custom-defined types (.net structs/classes) as column types?

Grab a cup of coffee (or whichever poison you prefer) and allocate at least half an hour if you intend to read the article in one go. It's heavy but definitely worth it. Some of the examples – such as the RSS reader implemented as a TVF – sound ridiculous at first, but think about it. All of this is going to change the way we program against databases and design our architectures. The start of the revolution is only a year away.

November 17, 2004 В· Jouni Heikniemi В· No Comments
Posted in: .NET

Leave a Reply