CLR Assemblies error

Nilesh Patel 111 Reputation points
2021-12-24T07:45:00.997+00:00

Getting CLR error while doing assessment using Data Migration Assistant (DMA) tool from on-premise SQL server to Azure SQL Managed Instance.

Need help to resolve this please help.
Attaching 2 screenshots of the error having all the descriptions.

Thanks.160118-clr-assemblies.png160240-clr-assemblie-2.png

SQL Server on Azure Virtual Machines
Azure SQL Database
Azure Migrate
Azure Migrate
A central hub of Azure cloud migration services and tools to discover, assess, and migrate workloads to the cloud.
717 questions
SQL Server Migration Assistant
SQL Server Migration Assistant
A Microsoft tool designed to automate database migration to SQL Server from Access, DB2, MySQL, Oracle, and SAP ASE.
494 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. YufeiShao-msft 7,056 Reputation points
    2021-12-24T09:13:34.433+00:00

    HI @Nilesh Patel ,

    Beginning with SQL Server 2017 (14.x)Database Engine, an sp_configure option called clr strict security is introduced to enhance the security of CLR assemblies.
    but also can add the CLR strict security feature to Microsoft SQL Server 2016, 2014, 2012 according to KB4018930

    When upgrading a server, the feature is turned off for backward compatibility in SQL Server, 'CLR strict security' will be set to 0, but it is not recommended.
    please running the following command to check your assemblies if be set to 1, the value of 1 means that the CLR strict security is switched on:

     SELECT * FROM sys.configurations WHERE name LIKE 'clr strict security';  
    

    If not, to set the value to 1, please try to this command:

     EXEC sp_configure 'clr strict security',1;  
     GO  
     RECONFIGURE;  
     GO  
    

    Additional:
    https://stackoverflow.com/questions/44083098/clr-strict-security-on-sql-server-2017#:~:text=Beginning%20with%20SQL%20Server%202017%2C%20an%20sp_configure%20option,EXTERNAL_ACCESS%20assemblies%20as%20if%20they%20were%20marked%20UNSAFE.
    https://www.sqlshack.com/impact-clr-strict-security-configuration-setting-sql-server-2017/

    -------------

    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.