SQL Server 2008外部程序集

时间:2014-06-30 21:28:21

标签: c# sql-server-2008

我有一个外部程序集我试图加载到SQL Server 2008并且我一直收到与上一篇文章相同的错误。

SQL Server stops loading assembly

    Msg 10314, Level 16, State 11, Line 3
    An error occurred in the Microsoft .NET Framework while trying to load assembly id     65536. 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.FileLoadException: Could not load file or assembly 'MY_ASSEMBLY, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The given assembly name or codebase was invalid. (Exception from HRESULT: 0x80131047)
System.IO.FileLoadException: 
   at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
   at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
   at System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean forIntrospection)
   at System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString, Evidence       assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection)
   at System.Reflection.Assembly.Load(String assemblyString)

我已经尝试了所有建议的步骤,对我没有任何意义,任何想法?

我正在使用在我的计算机上创建的本地服务器,并且我已经尝试使用备份还原数据库由我创建的新数据库(默认所有者),以及一个全新的数据库' sa'作为所有者。我们将不胜感激:)

编辑:好的,这是我收到的错误信息,这是我尝试使用

的内容
USE myDatabase
GO

EXEC sp_changedbowner 'sa'
ALTER DATABASE myDatabase SET TRUSTWORTHY ON 

alter authorization on database::myDatabase to sa;

我只想弄清楚为什么会这样。

0 个答案:

没有答案