Tutorial :Windows 64bit SQL 2005 CLR Install Mystery



Question:

My 32bit .NET application runs SQL 2005 Express SP3 and uses CLR. The install works fine on XP & Vista. The install fails on XP 64bit & Widows 7 64bit machines.

The error is in one of my SQL scripts that creates an Assembly:

Error: “Execution of .NET Framework code is disabled. Set ‘CLR enabled’ configuration option and restart server. (5847)”

Script Code: CREATE ASSEMBLY MyCode FROM 'C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\MyCode.dll' WITH PERMISSION_SET = UNSAFE

HOWEVER when I check the CLR it is enabled. In fact my very first script turns the CLR On and Trustworthy On.

So again, this all works on 32bit machines but not on 64bit.

Suggestions?


Solution:1

On WoW64 (x86 Express instance installed on x64 host OS) you need to restart the instance for the CLR enabled to take effect, see clr enabled Option:

WOW64 servers must be restarted before the changes to this setting will take effect. Restart is not required for other server types.


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »