SQL에서 어셈블리를 만들려고하는데 다음 DLL을로드 할 수 없습니다. SQL에서 'System.ServiceModel.Internals'어셈블리를 만들지 못했습니다.
create assembly [system.servicemodel.internals]
from 'C:\Windows\Microsoft.NET\Framework64\v4.0.30319\System.ServiceModel.Internals.dll'
with permission_set = safe;
go
System.ServiceModel.Internals
내가 (거의 100 % 유사)이 해결 질문을했다 Failed to CREATE AN ASSEMBLY in SQL 그래서 같은Msg 6218, Level 16, State 2, Line 2 CREATE ASSEMBLY for assembly 'System.ServiceModel.Internals' failed because assembly 'System.ServiceModel.Internals' failed verification. Check if the referenced assemblies are up-to-date and trusted (for external_access or unsafe) to execute in the database. CLR Verifier error messages if any will follow this message [ : System.Runtime.IOThreadScheduler+ScheduledOverlapped::.ctor][mdToken=0x6000185][offset 0x00000023][found unmanaged pointer][expected unmanaged pointer] Unexpected type on the stack. [ : System.Runtime.IOThreadScheduler+ScheduledOverlapped::Post][mdToken=0x6000183][offset 0x0000000D][found unmanaged pointer][expected unmanaged pointer] Unexpected type on the stack. [ : System.Runtime.IOThreadScheduler+ScheduledOverlapped::Cleanup][mdToken=0x6000184][offset 0x00000019][found unmanaged pointer][expected unmanaged pointer] Unexpected type on the stack. [ : System.Runtime.Diagnostics.DiagnosticsEventProvider::WriteMessageEvent][mdToken=0x6000357][offset 0x0000004B][found ref 'System.String'] Expected numeric type on the stack. [ : System.Runtime.Diagnostics.DiagnosticsEventProvider::WriteEvent][mdToken=0x6000359][offset 0x0000012B] Instruction cannot be verified. [ : System.Runtime.Diagnostics.DiagnosticsEventProvider::WriteEvent][mdToken=0x6000359][offset 0x0000003F] Instruction cannot be verified. [ : System.Runtime.Diagnostics.DiagnosticsEventProvider::WriteEvent][mdToken=0x600035a][offset 0x00000061][found ref 'System.String'] Expected numeric type on the stack. [ : System.Runtime.Diagnostics.DiagnosticsEventProvider::WriteEvent][mdToken=0x600035b][offset 0x0000001F][found unmanaged pointer][expected unmanaged pointer] Unexpected type on the stack. [ : System.Runtime.Diagnostics.DiagnosticsEventProvider::WriteTransferEvent][mdToken=0x600035c][offset 0x0000007C] Instruction cannot be verified. [ : System.Runtime.Diagnostics.DiagnosticsEventProvider::WriteTransferEvent][mdToken=0x600035c][offset 0x000002F4][found Native Int][expected unmanaged pointer] Unexpected type on the stack. [...
닷넷을하려고 노력 버전의 SQL Server 및 파일이 동일 v4.0.30319
나는 select * from sys.dm_clr_properties
문을 실행했는데 결과가 정상적으로 보입니다.
directory C:\Windows\Microsoft.NET\Framework64\v4.0.30319\
version v4.0.30319
state CLR is initialized
SQL 버전 : 어떻게 어셈블리를 만드는 방법 11.2.5058.0
어떤 생각?
Assembly 'DataLoader' references assembly 'system.servicemodel.internals, version=4.0.0.0, culture=neutral, publickeytoken=31bf3856ad364e35.', which is not present in the current database. SQL Server attempted to locate and automatically load the referenced assembly from the same location where referring assembly came from, but that operation has failed (reason: 2(The system cannot find the file specified.)). Please load the referenced assembly into the current database and retry your request.
blacai이 행운? 지금까지 동일한 문제가 발생했습니다 – jaxxbo
작업량으로 인해 제공된 솔루션을 테스트 할 수 없습니다. 확인해도 대답이 – blfuentes
@blacai로 표시됩니다. David Manning의 대답이 올바른지 확인할 수 있습니다. 단순히 SAFE 대신 UNSAFE의 PERMISSION_SET을 사용하기 만하면됩니다. 확실히 SQL Server 2012를 실행하고 위에서 만든 CREATE ASSEMBLY 코드를 복사하고 실행 한 다음 오류를 확인하고 '안전'을 'UNSAFE'로 변경하고 다시 실행하여 작동했습니다. –