August 11, 2011 at 12:37 pm
I am getting the error below when trying run a select statement using a SQL CLR function.
I am on SQL 2k8 sp1.
I have read the articles and this is what I have done to attempt a fix:
Alter Authorization Database::dbName to SA
Alter Database dbName set trustworthy on
EXEC sys.sp_changedbowner @loginame = sa
Checked that the server principals and dbs have the matching SIDs
SELECT * FROM sys.server_principals sp
SELECT * FROM sys.databases d
Deleted and recreated the assembly.
Checked the broken assembly in this db with a working version of this assembly in a db on the same server. They appear to be identical.
DBServer is not under memory pressure
The startup attrib is –g1000 – so there is enough memory.
None of these techniques have panned out. Any other suggestions?
An error occurred in the Microsoft .NET Framework while trying to load assembly id 65542. The server may be running out of resources, or the assembly may not be trusted with PERMISSION_SET = EXTERNAL_ACCESS or UNSAFE. Run the query again, or check documentation to see how to solve the assembly trust issues. For more information about this error:
System.IO.FileNotFoundException: Could not load file or assembly 'XXX, Version=XXX, Culture=neutral, PublicKeyToken=XXX' or one of its dependencies. The system cannot find the file specified.
System.IO.FileNotFoundException:
at System.Reflection.Assembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection)
at System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection)
at System.Reflection.Assembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection)
at System.Reflection.Assembly.Load(String assemblyString)
Steve
August 11, 2011 at 11:37 pm
Just FYI... I was able to take an outage tonight.
I did a Detach/Attach to the DB.
Preformed all the alter auth and set trustworthy steps
BOOM...its working now.
Problem remaining... what happened in the first place?
I know the DB was not restored and I know that it had not been detached and reattached.
Steve
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply