tags:

views:

462

answers:

4
+3  Q: 

SQL 2008 .NET CLR

Does SQL 2008 ship with the .NET 3.5 CLR, so that stored procedures written in CLR can use 3.5 features?

+8  A: 

Actually it ships with .NET 3.5 SP1. So yes, the stored procs can use 3.5 features and libraries.

Adam
+1  A: 

I swear this isn't being pedantic, but is an important distinction -- I don't know what specifically you need when you say ".NET 3.5 CLR" -- probably the .NET 3.5 Framework? Possibly C# 3.0 language features? But the CLR that .NET 3.5 runs on is still CLR 2.0. (the link is to the same explanation re: .NET 3.0; I couldn't immediately find this info on 3.5. Actually, the best explanation of CLR vs. Framework vs. language version numbers I've yet found is on page 12 of Teach Yourself WPF in 24 Hours*)

So, my point is that you can even use the features of .NET 3.5 and C# 3.0 on SQL 2005 CLR stored procedures -- we do, at my company -- and there's not even really any trickery to it. All you have to do is have the free 3.5 framework on your server. Obviously the SQL 2005 answer isn't that relevant for your specific question, but hopefully this will be helpful to the person who eventually comes across this page via Google.

*disclosure: I'm friends with the authors

kcrumley
A: 

K,

You're prescient! I'm the guy who hit this from Google and I'm interested in that very answer: "Can I write LINQ to SQL code and install it on SQL 2005?"

Retro Thanks!

Lou

Unfortunately you can't.
Rune Grimstad
A: 

Hello. I'm the guy who hit this from Google too and I have another question: can I use entity framework inside SQL Server 2008 CLR stored procedure?

Michael