You experience slow Configuration Manager console performance or unusual SQL query timeouts for certain Configuration Manager database queries in environments running Microsoft SQL Server 2016 or 2014.
SQL Server Cardinality Estimation (CE) changes introduced with SQL Server 2014 and SQL Server 2016 may cause performance issues with certain Configuration Manager queries in some environments, depending on variables such as site configuration, environment complexity, and the general state of load and performance of the SQL server.
In affected environments, Configuration Manager may run better when the site database is configured at a different SQL CE compatibility level. To identify the recommended CE level for your version of SQL Server, refer to the following chart:
|SQL Server version||Supported compatibility level values||Recommended compatibility level for ConfigMgr|
|SQL Server 2016||130, 120, 110, 100||130|
|SQL Server 2014||120, 110, 100||110|
To identify what SQL CE compatibility level is in use for the Configuration Manager database, run the following query:
SELECT name, compatibility_level FROM sys.databases
On SQL Server 2014, to identify whether using SQL Server 2012 CE may improve Configuration Manager query performance, identify a query that is running slowly and manually test its performance at the SQL 2012 CE compatibility level. To do this, run the query in SQL Server Management Studio with <option (querytraceon 9481)
> and compare the execution time to its performance without the flag. For more information on using querytraceon
with trace flag 9481 at the specific-query level, see Enable plan-affecting SQL Server query optimizer behavior that can be controlled by different trace flags on a specific-query level
. For information about using SQL Profiler to identify slow queries see, SQL Server Profiler
See the following example of a specific-query test run at the SQL 2012 CE level:
The query above and deployment ID CS100012 are for demonstration purposes only and will vary by environment.
If the above test indicates that performance gains can be achieved, use the following command in SQL Server Management Studio to set the Configuration Manager database running on SQL Server 2014 to the SQL Server 2012 CE compatibility level:
ALTER DATABASE <CM_DB>
SET COMPATIBILITY_LEVEL = 110;
To set a Configuration Manager database running on SQL Server 2016 to the SQL Server 2016 CE compatibility level, use the following:
ALTER DATABASE <CM_DB>Note
SET COMPATIBILITY_LEVEL = 130;
In the two examples above, replace <CM_DB>
with your Configuration Manager site database name.
Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section and is investigating.