Skip to content
English
  • There are no suggestions because the search field is empty.

Capacity reports show rsErrorExecutingCommand or "Forecast failed"

The capacity report stops with rsErrorExecutingCommand for DataSet_LinearRegression, or shows a "Forecast failed" row. Enable CLR integration and let SQL Server trust the forecast assembly.

Applies to: OpsLogix Capacity trending reports (all versions) · SCOM 2019, 2022, 2025 · SQL Server 2017 and later
Last updated: October 2026 · Reading time: 6 minutes

The forecasts in the capacity reports are calculated by a .NET (CLR) assembly, OpsLogix.IMP.Capacity.SQL.Module, which the management pack installs in the SCOM data warehouse database. When SQL Server does not run that assembly, or could not install it, the reports cannot calculate a forecast. This article explains how to recognise this and how to fix it without lowering the security of the SQL Server.

Symptoms

  • Version 1.0.3 and earlier: the report stops with An error has occurred during report processing. (rsProcessingAborted) Query execution failed for dataset 'DataSet_LinearRegression'. (rsErrorExecutingCommand).
  • Version 1.0.13 and later: the report runs, but the first row shows Forecast failed: <message> in place of the server name. The message after the colon is the SQL Server error.
  • Any version: the Operations Manager event log on the management servers shows event 31565 (failed to deploy a data warehouse component) for the OpsLogix capacity management pack.

Quickest fix: the trust script

From version 1.0.13.11, the download of the management pack contains Trust-OpsLogixCapacityAssembly.sql. Run it on the SQL Server instance of the data warehouse, as a member of sysadmin: it switches on CLR integration and trusts the assembly of that version, while clr strict security stays on. Run it before you import a new version. If the deployment already failed, run it now: SCOM retries the deployment by itself, and restarting the Microsoft Monitoring Agent service (HealthService) on a management server makes it retry sooner. The steps below do the same by hand, for versions without the script.

Find the cause

Message or eventCauseFix
Execution of user code in the .NET Framework is disabled. Enable "clr enabled" configuration option.CLR integration is switched off on the SQL Server instance.Step 1
Event 31565 mentioning CREATE ASSEMBLY and clr strict security (SQL error 10343)SQL Server 2017 and later only load assemblies they trust, so the management pack could not install the assembly.Step 2
Could not find stored procedure 'OpsLogixCapacityReports_...', or Invalid object name 'dbo.GetLRPercentage'The data warehouse script of the management pack did not finish, usually for the reason above.Step 2, then check event 31565

Step 1: Enable CLR integration

Run this on the SQL Server instance that hosts the SCOM data warehouse database. It takes effect immediately; you do not need to restart SQL Server.

EXEC sp_configure 'clr enabled', 1;
RECONFIGURE;

You need the ALTER SETTINGS server permission, which members of the sysadmin and serveradmin roles have.

Step 2: Let SQL Server trust the forecast assembly

SQL Server 2017 and later have clr strict security switched on. The OpsLogix assembly is created with the SAFE permission set, so you do not need to set the data warehouse database to TRUSTWORTHY, and you should not leave clr strict security switched off. Instead, add this one assembly to the list of trusted assemblies. You need the sysadmin role for these steps.

  1. Check whether the assembly is installed. In the data warehouse database (default name OperationsManagerDW) run:
    SELECT name, permission_set_desc, create_date
    FROM sys.assemblies
    WHERE name = 'OpsLogix.IMP.Capacity.SQL.Module';
    If it returns a row, go to step 4.
  2. Switch off clr strict security for a short while, so that the management pack can install the assembly:
    EXEC sp_configure 'show advanced options', 1;
    RECONFIGURE;
    EXEC sp_configure 'clr strict security', 0;
    RECONFIGURE;
  3. Wait until SCOM has deployed the data warehouse script again: the query in step 1 returns a row and event 31565 no longer appears. SCOM retries the deployment by itself; restarting the Microsoft Monitoring Agent service (HealthService) on a management server makes it try again sooner.
  4. Add the installed assembly to the trusted assemblies. Run this in the data warehouse database:
    DECLARE @hash varbinary(64), @name nvarchar(4000);
    SELECT @hash = HASHBYTES('SHA2_512', f.content), @name = a.clr_name
    FROM sys.assemblies a
    JOIN sys.assembly_files f ON f.assembly_id = a.assembly_id AND f.file_id = 1
    WHERE a.name = 'OpsLogix.IMP.Capacity.SQL.Module';

    IF @hash IS NOT NULL
       AND NOT EXISTS (SELECT 1 FROM sys.trusted_assemblies WHERE hash = @hash)
        EXEC sys.sp_add_trusted_assembly @hash, @name;
  5. Switch clr strict security back on:
    EXEC sp_configure 'clr strict security', 1;
    RECONFIGURE;
  6. Run the report again.

After an upgrade of the management pack

Every version of the management pack contains a new build of the assembly, with a new hash. An upgrade replaces the assembly, so on SQL Server 2017 and later run the trust script of the new version before you import it, or repeat steps 2 to 5 after the import. You can then remove the hash of the old version: list the trusted assemblies with SELECT * FROM sys.trusted_assemblies; and remove the old entry with EXEC sys.sp_drop_trusted_assembly <hash>;.

Still not working?

  • Check the newest event 31565 on the management servers: its description names the statement that failed.
  • A report that shows No License Found has a licence problem, not a CLR problem. See Capacity reports show "No License Found".
  • Contact OpsLogix support through Submit a support ticket and include the text of event 31565 or of the "Forecast failed" row.