FIX: Indirect checkpoints on tempdb database cause "Non-yielding scheduler" error in SQL Server 2016 and 2017

Ισχύει για: SQL Server 2016 Enterprise CoreSQL Server 2016 EnterpriseSQL Server 2016 Developer

Symptoms


By default, indirect checkpoints are turned on for the tempdb database in Microsoft SQL Server 2016 and 2017. Under heavy-workload conditions, a "Non-yielding scheduler" error may occur.

Resolution


This fix is included in the following updates and service pack:

Service pack information for SQL Server 2016

       Service Pack 2 for SQL Server 2016

Workaround


To work around this issue, turn off indirect checkpoints on the tempdb database by using one of the following Data Definition Language (DDL) statements.

This should be done as follows:

  • On the modeldb database (this also changes the default value for new databases), run the following statement:
    ALTER DATABASE [model] SET TARGET_RECOVERY_TIME = 0 MINUTES
  • Or, directly on the tempdb database every time that the instance starts up by using the SQL Server Agent by using the following statement:
    ALTER DATABASE [tempdb] SET TARGET_RECOVERY_TIME = 0 MINUTES
  • Or, periodically issue manual checkpoints against the tempdb database by using the following statement:
    use tempdbgocheckpointgo

Status


Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.

References


Learn about the terminology Microsoft uses to describe software updates.