How to resolve failed assembly verification when installing assembly into SQL Server


I need to do SFTP from within a SQL Server context. I can do FTP with MS libraries, but they do not support SFTP.

So I downloaded Rebex, and put together a sample project, and tried to install it into SQL Server as a CLR stored procedure.

When doing this, SQL Server gives the following message:

Msg 6218, Level 16, State 2, Line 3

CREATE ASSEMBLY for assembly 'RebexTest' failed because assembly 'Rebex.Common' 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

[ : Rebex.Security.Certificates.CertificateStore::Exists][mdToken=0x60003b0]
[offset 0x000000C7] Method is not visible.

Is there a way to fix this so I can install it into SQL Server?

asked on Stack Overflow Oct 9, 2013 by Greg Gum • edited Jan 19, 2018 by Martin Vobr

1 Answer


Unfortunately, Rebex components can only be used in CLR procedures with the PERMISSION_SET = UNSAFE option. See detailed explanation on the Rebex support forum.

answered on Stack Overflow Oct 15, 2013 by Jan Ĺ otola

User contributions licensed under CC BY-SA 3.0