CLR in SQL 2019 : Permissions

  • I'm using an CLR which I've used plenty of times in the past and have running fine on SQL 2017.

    I've implemented on a database in SQL 2019 and functions runs fine, returning the desired results.

    When I try to run the same code via a sql agent job, I get ...

    .NET Framework execution was aborted. The UDP/UDF/CLR type did not revert thread token.

    The statement has been terminated.

    Similarly when I surround the code with EXECUTE AS LOGIN and REVERT it also fails.

    So this is down to the account this is running under.

    I started reading about signing , but the .DLL isn't my code (it's OpenPseudonymiser), I also found this about strict clr security https://www.sqlshack.com/impact-clr-strict-security-configuration-setting-sql-server-2017/

    Any help MUCH appreciated, i've spent too long on this.

     

     

     

  • Thanks for posting your issue and hopefully someone will answer soon.

    This is an automated bump to increase visibility of your question.

  • I know this post is quite old. Has anyone found the cause of this? It seems to be related to impersonation for me as well

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply