简体   繁体   English

在SQL Server中执行CLR过程时出错

[英]Getting error on executing CLR procedure in sql server

I am using the microsoft sql server 2008. On executing the CLR procedure i am getting the below error. 我正在使用Microsoft sql server2008。执行CLR过程时,出现以下错误。

An error occurred in the Microsoft .NET Framework while trying to load assembly id 65547. The server may be running out of resources, or the assembly may not be trusted with PERMISSION_SET = EXTERNAL_ACCESS or UNSAFE. 尝试加载程序集ID 65547时,Microsoft .NET Framework中发生错误。服务器可能资源不足,或者PERMISSION_SET = EXTERNAL_ACCESS或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 'clrprocedure, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. 有关此错误的更多信息:System.IO.FileLoadException:无法加载文件或程序集'clrprocedure,版本= 0.0.0.0,Culture = neutral,PublicKeyToken = null'或其依赖项之一。 An error relating to security occurred. 发生与安全性有关的错误。 (Exception from HRESULT: 0x8013150A) System.IO.FileLoadException: (来自HRESULT的异常:0x8013150A)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) System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef,证据AssemblySecurity,StackCrawlMarkInMark) )在System.Reflection.Assembly.Load(字符串assemblyString)处的System.Reflection.Assembly.InternalLoad(字符串assemblyString,证据assemblySecurity,StackCrawlMark和stackMark,布尔值用于自省)

Please suggest. 请提出建议。

After a long R&D, i got the solution. 经过长时间的研发,我找到了解决方案。

The TRUSTWORTHY property of the database was turned OFF previously. 数据库的TRUSTWORTHY属性先前已关闭

I turned it ON and now it is working fine for me. 打开它,现在它为我工作的罚款。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM