恢复数据库时的Assembly错误

来源:互联网 发布:西南大学网络教育 编辑:程序博客网 时间:2024/06/07 17:00
Msg 10314, Level 16, State 11, Line 52
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 'propdataclr, Version=1.0.4680.4247, Culture=neutral, PublicKeyToken=76c5644dd94472c6' or one of its dependencies. Exception from HRESULT: 0x80FC80F1
System.IO.FileLoadException: 
   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)


Fix 非常简单:

USE LEDataDB_30
exec sp_changedbowner [sa]
ALTER DATABASE LEDataDB_30 SET TRUSTWORTHY ON;

原创粉丝点击