3

I have an SQL Server 2005 server, and I'd like to run a .Net CLR stored procedure on it. However, I'd like to use .NET Framework 3.5.

If I try this right now, I get this error:

Error: Assembly 'system.core, version=3.5.0.0, culture=neutral, publickeytoken=b77a5c561934e089.' was not found in the SQL catalog.

I'm told this is possible in SQL Server 2008, because SQL Server 2008 ships with .NET Framework 3.5. However, I'm wondering if there's a way to add .NET Framework 3.5 to my SQL Server 2005 installation, so that I can run .NET 3.5 stored procedures on it.

0

3 Answers 3

4

This might be a stupid question but... If system.core can't be found, do you have the framework 3.5 installed on the database server?

Sign up to request clarification or add additional context in comments.

2 Comments

Well, I don't actually have access to check...I figured I'd ask before putting in a request. Is it really just as simple as installing the .net 3.5 runtime?
That would be a minimum requirement. How did you expect it to work if 3.5 wasn't installed?
2

The result of google + trial & error

EXEC dbo.sp_changedbowner @loginame = N'sa', @map = true
GO
sp_configure 'clr enabled', 1
GO
RECONFIGURE
GO
ALTER DATABASE [MyDB] SET TRUSTWORTHY ON
GO
CREATE ASSEMBLY [System.Core]
AUTHORIZATION [dbo]
FROM 
'C:\Program Files\Reference Assemblies\Microsoft\Framework\v3.5\System.Core.dll'
WITH PERMISSION_SET = UNSAFE
GO

Sites:

1 Comment

ALTER DATABASE [MyDB] SET TRUSTWORTHY ON There is no need to use this line and also it may cause security issues.
1

This thread might be helpful to you.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.