The SQL Server SqlClr implementation contains a list of blessed .net build methods that will work in SQL Server. This is managed through Host Security Attributes . More accurately
SQL Server prohibits the use of a type or member that has a HostProtectionAttribute that specifies the value of HostProtectionResource SharedState, Synchronization, MayLeakOnAbort, or ExternalProcessMgmt. This prevents the collection of calls from members that provide sharing, perform synchronization, may leak resources at completion, or affect the integrity of the SQL Server process.
Depending on the “Access” settings of your assembly, SQL Server throws an error (when SAFE) or does nothing with the locked method ( UNSAFE and EXTERNAL ACCESS ).
Unfortunately, for you, the System.ComponentModel.LicenseContext class has a SharedState host security attribute and is part of the code that is not allowed. As a result, somewhere in your code there is a method call in LicenseManager that will silently do nothing.
In any case, the components launched by the lump in the SQL Server process are not a good idea, since a failure in the lump component will cause the failure of your entire SQL Server.
source share