Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

I am trying to create an assembly on my SQL Server 2005 server. Here is what I am using:

CREATE ASSEMBLY [SQLCLRTest]
    AUTHORIZATION [dbo]
    FROM 'path\to\my\file.dll'
    WITH PERMISSION_SET = EXTERNAL_ACCESS;

I am getting this error as ouput:

Msg 0, Level 11, State 0, Line 0
A severe error occurred on the current command.  The results, if any, should be discarded.
Msg 0, Level 20, State 0, Line 0
A severe error occurred on the current command.  The results, if any, should be discarded.

When I look at my error logs I find the following in the stack trace:

Exception Log -  EXCEPTION_ACCESS_VIOLATION

I've been Googling around and the only solution I have seen to this is to change the database owner, which is not an option for me. I'm thinking that I need to have some sort of permissions set for my user but I can't find exactly what I need.

Could anyone give me some advice on how to handle this? It would be very much appreciated.

Thanks!

Edit The version of SQL Server:

Microsoft SQL Server 2005 - 9.00.5057.00 (X64)
share|improve this question
    
What exactly does your assembly do? Have you tried using PERMISSION_SET = UNSAFE? –  Thomas Stringer Jul 31 '12 at 14:21
    
And what is the build of SQL Server (SELECT @@VERSION;)? Most access violations are bugs, and most get fixed. It's quite possible that refreshing your installation will magically fix this... –  Aaron Bertrand Jul 31 '12 at 15:07
    
@Shark the assembly defines a function that gets a web resource by URL and converts it to a base64 string. I first tried to deploy this using Visual Studio 2010 but got the error shown above. What I posted is my attempt at creating the assembly manually, and I again am getting this error. –  TheMethod Jul 31 '12 at 15:10
    
@ Aaron Bertrand, I edited the post to include version. –  TheMethod Jul 31 '12 at 15:11
    
The latest public hotfix available is 9.00.5296 (support.microsoft.com/kb/2615425). It might be worth a shot on a test server to see if the fix is in there somewhere (it may not be a public bug/fix). –  Aaron Bertrand Jul 31 '12 at 15:33
show 1 more comment

migrated from stackoverflow.com Jul 31 '12 at 14:59

This question came from our site for professional and enthusiast programmers.

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.