MSSSQL에서 어셈블리 사용하는 기능을 실행하는 동안 오류 아래 수신하고 있습니다 :MSSQL로드 어셈블리 오류
:Msg 10314, Level 16, State 11, Line 36 An error occurred in the Microsoft .NET Framework while trying to load assembly id 65800. 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 'exporttoexcel, Version=0.76.0.0, Culture=neutral, PublicKeyToken=f73371c9a1809a3f' 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)
하지만 기능과 어셈블리를 다시 후에는 모든 일정 기간 동안 잘 작동
DROP FUNCTION [dbo].[fnExportToExcel]
DROP ASSEMBLY ExcelExporter
CREATE ASSEMBLY ExcelExporter
AUTHORIZATION [DOMAIN\ACCOUNT]
FROM 'ExportToExcel.dll'
WITH PERMISSION_SET = UNSAFE
CREATE FUNCTION [dbo].[fnExportToExcel](@Query [nvarchar](max), @FilePath [nvarchar](max), @FileName [nvarchar](max), @SheetNames [nvarchar](max))
RETURNS [nvarchar](max) WITH EXECUTE AS CALLER
AS
EXTERNAL NAME ExcelExporter.[ExportToExcel_DLL.cls_ExcelExport].[ExportToExcel]
GO
어떤 아이디어로 인해 MSSQL이 어셈블리 참조를 잃어 버릴 수 있습니까?
EXEC sp_changedbowner 'sa'
당신이 데이터베이스에서 또는 그냥 사는 데이터베이스에서 어셈블리를 호출 : –
나는 데이터베이스를 통해 그것을 부르고있다. – ironcurtain
아마도 다음과 같습니다. https://blogs.msdn.microsoft.com/psssql/2010/03/23/unable-to-load-clr-assembly-intermittently/ –