Answered by:
SQL CLR version on 2008

Question
-
Dear SQL Team,
This is a variant of the discussion here. I have .NET Framework 4.0 and SQL Server 2008 installed on the box. The box also has frameworks 2.0 (3.5) too.
- Would SQL Server 2008 automatically chose the latest version of CLR installed on the system or is it hard bound to .NET Framework 2.0 (3.5) only?
- Is there a way we can configure SQL CLR to use a particular version of CLR something like bindingRedirect.
Wednesday, July 13, 2011 3:48 PM
Answers
-
Dear SQL Team,
This is a variant of the discussion here. I have .NET Framework 4.0 and SQL Server 2008 installed on the box. The box also has frameworks 2.0 (3.5) too.
- Would SQL Server 2008 automatically chose the latest version of CLR installed on the system or is it hard bound to .NET Framework 2.0 (3.5) only?
- Is there a way we can configure SQL CLR to use a particular version of CLR something like bindingRedirect.
It appears to me that 2008 R2 version is still using CLR version 2.0 you can confirm it by running
select * from sys.dm_clr_propertieseven .net framework 3.5 underlying uses CLR version 2.0
.net framework 4 came with latest CLR version 4.0
edit:The following blog post confirms that
/**
SQL Server 2008 and SQL Server 2008 R2 will continue to load the latest service release of the version 2.0 CLR as the version is locked before initialization of the CLR begins. While future versions of SQL Server may load newer versions of the CLR, or even support the loading of multiple CLR's within the process, version 2.0 of the CLR is here to stay for SQLCLR within SQL Server 2008 and SQL Server 2008 R2.
**/
- Edited by Chirag Shah Wednesday, July 13, 2011 5:01 PM Edit: blog link for confirmation
- Proposed as answer by Olaf HelperMVP Wednesday, July 13, 2011 5:08 PM
- Marked as answer by Alex Feng (SQL) Friday, July 22, 2011 9:46 AM
Wednesday, July 13, 2011 4:53 PM
All replies
-
Dear SQL Team,
This is a variant of the discussion here. I have .NET Framework 4.0 and SQL Server 2008 installed on the box. The box also has frameworks 2.0 (3.5) too.
- Would SQL Server 2008 automatically chose the latest version of CLR installed on the system or is it hard bound to .NET Framework 2.0 (3.5) only?
- Is there a way we can configure SQL CLR to use a particular version of CLR something like bindingRedirect.
It appears to me that 2008 R2 version is still using CLR version 2.0 you can confirm it by running
select * from sys.dm_clr_propertieseven .net framework 3.5 underlying uses CLR version 2.0
.net framework 4 came with latest CLR version 4.0
edit:The following blog post confirms that
/**
SQL Server 2008 and SQL Server 2008 R2 will continue to load the latest service release of the version 2.0 CLR as the version is locked before initialization of the CLR begins. While future versions of SQL Server may load newer versions of the CLR, or even support the loading of multiple CLR's within the process, version 2.0 of the CLR is here to stay for SQLCLR within SQL Server 2008 and SQL Server 2008 R2.
**/
- Edited by Chirag Shah Wednesday, July 13, 2011 5:01 PM Edit: blog link for confirmation
- Proposed as answer by Olaf HelperMVP Wednesday, July 13, 2011 5:08 PM
- Marked as answer by Alex Feng (SQL) Friday, July 22, 2011 9:46 AM
Wednesday, July 13, 2011 4:53 PM -
Hello Deepak,
As Chirag mentioned, you have to differentiate between .NET version and CLR version; see .NET Framework Versions and Dependencies.
You can use .NET 3.5 in SQL Server 2008 R2, and .NET 3.5 is still CLR 2.0.
Olaf Helper
* cogito ergo sum * errare humanum est * quote erat demonstrandum *
Wenn ich denke, ist das ein Fehler und das beweise ich täglich
Blog XingWednesday, July 13, 2011 5:08 PM