Enable SQL Server CLR

FlexNet Manager Suite requires Microsoft's SQL Server Common Language Runtime (CLR) Integration to be enabled prior to upgrading for increased performance.
Important: Failure to move the database to the new SQL Server instance prior to running the database upgrade scripts, can lead to Common Language Runtime (CLR)/Flexera certificate issues.

When upgrading the compliance database, particularly during schema transitions (for example, from version 21.x to 22.x), you may encounter the error:

"The server may be running out of resources, or the assembly may not be trusted."

This issue is typically related to SQL Server certificate trust settings and can be resolved using one of the following approaches:

If upgrading from FlexNet Manager Suite 20xxR1 or later, you may replace the SQL Server certificate before attempting the database upgrade. To avoid trust-related errors:
  1. Temporarily set the database's Trustworthy property to OFF.
  2. Run the database upgrade.
  3. Set Trustworthy back to ON after the upgrade completes.
If upgrading from FlexNet Manager Suite 20xxR1 or earlier, delay replacing the SQL Server certificate until after the upgrade attempt. If the error occurs:
  1. Revert to the previous certificate.
  2. Rerun the upgrade until the error is triggered.
  3. Remove the old certificate and reapply the new one.
  4. Rerun the upgrade.

Flexera recommends proactively addressing this scenario in your upgrade planning.

To enable SQL Server CLR:

  1. In SQL Server Management Studio, locate the SQL Server instance to be used by FlexNet Manager Suite.
  2. Enable Microsoft SQL Server Common Language Runtime (CLR) Integration.
    1. For SQL Server 2019 or later, you first need to install a Flexera signed security certificate which identifies the installation as a trusted assembly.
      Tip: If it happens that your various databases for FlexNet Manager Suite are on separate database servers running SQL Server 2019 or later, remember to install a copy of the certificate on each server, as follows.
      1. Check for any existing certificates and associated users, for example, FlexeraUser.
      2. Delete the old certificate and its associated logon and user.
      3. Download the Flexera signed security certificate zip relevant to your SQL Server version from the Product & License Center. Extract the FlexeraCodeSignining.cer file from the downloaded archive to a temporary location on the host where Microsoft SQL Server is running, in a file path to which the SQL Server service account has read access.
      4. Edit the SQLScript.sql file from the archive, and replace <location> with the path where you have copied the FlexeraCodeSigning.cer file. Save your change.
      5. Open SQL Server Studio and execute your updated SQLScript.sql file.
    2. Enable Microsoft SQL Server Common Language Runtime (CLR) Integration by executing the following stored procedure:
      sp_configure 'show advanced options', 1;  
                              GO  
                              RECONFIGURE;  
                              GO  
                              sp_configure 'clr enabled', 1;  
                              GO  
                              RECONFIGURE;  
                              GO 
      Note: By default the CLR integration feature is disabled and must be enabled by the DB system administrator before database creation and installation. CLR is disabled by default to increase security in shared hosting contexts. However, in this context, Flexera is a known vendor supplying trusted code for an environment fully controlled by your administrators. Flexera warrants that the CLR DLL signed by Flexera does not attempt to elevate privileges or behave maliciously.