0

Context: SQL Server 2012

Microsoft SQL Server Management Studio  11.0.3128.0
Microsoft Data Access Components (MDAC) 6.1.7601.17514
Microsoft MSXML                         3.0 4.0 5.0 6.0 
Microsoft Internet Explorer             9.11.9600.16521
Microsoft .NET Framework                4.0.30319.18444
Operating System                        6.1.7601

When in SSMS I execute the query

select * from sys.dm_clr_properties

and get told

directory   C:\Windows\Microsoft.NET\Framework\v2.0.50727\
version     v2.0.50727
state       CLR is initialized

How do I set the dm_clr_properties to .NET v4? The servers in town are also running SQLServer 2012 and respond to the same select statement with details about v4.

bugmagnet
  • 7,631
  • 8
  • 69
  • 131
  • Excuse me, but where do you talk of managment studio at all? The SSMS query is not a SSMS query at all - it is a query sent to SQL Server so the output is - the SQL Server output, not what ssms runs in. SQL Server seems in your case to run .net 2.0 – TomTom Apr 08 '14 at 07:46
  • Fair comment. I'm not a SQLServer guru at all ... far from it. I'm just trying to work out how to get a local 32bit SSMS running against SQLServer 2012 to work like a remote 64bit SSMS running against SQLServer 2012. However that's achieved ...... – bugmagnet Apr 08 '14 at 07:55
  • More backstory: I'm trying to build a CLR stored procedure. It's going to be unpleasant to develop it in NET v2 locally and then try to run it on v4 remotely ... which won't work. – bugmagnet Apr 08 '14 at 07:57
  • But SSMS can not execute a SP at all. SSMS is just a frntend to a server. WHen you ask for "select * from sys.dm_clr_properties" SSMS is not executing anything - it is sending this string to the server you are connected to and then it is displaying the result. As such, whatever SSMS is running is irrelevant, and the return of this select has nothing to do with what SSMS is running. – TomTom Apr 08 '14 at 08:04
  • Hmmmm ... will have to check this out ... – bugmagnet Apr 08 '14 at 08:27
  • Use .NET framework 3.5 and you'll be OK. – dean Apr 08 '14 at 08:51
  • @dean: How about you say that in an answer and I can give you a big green tick. – bugmagnet Apr 08 '14 at 08:59
  • Are you sure it's not 2008(r2) server? What is the output of `SELECT @@VERSION`? – dean Apr 08 '14 at 09:08
  • Microsoft SQL Server 2005 - 9.00.5000.00 (Intel X86) Dec 10 2010 10:56:29 Copyright (c) 1988-2005 Microsoft Corporation Express Edition on Windows NT 6.1 (Build 7601: Service Pack 1) – bugmagnet Apr 08 '14 at 09:19
  • 1
    So, your local management studio may be 2012, but the server you're running queries against is 2005 still. You will need 2012 or 2014 to use newer version of .NET framework. – dean Apr 08 '14 at 10:05
  • Makes sense. I can still give you a green tick if you want. – bugmagnet Apr 08 '14 at 10:38
  • I've moved it to answers. – dean Apr 08 '14 at 16:56

1 Answers1

2

Your local management studio may be 2012, but the server you're running queries against is 2005 still. You will need 2012 or 2014 to use newer version of .NET framework.

dean
  • 9,960
  • 2
  • 25
  • 26