Consider the following scenario:
- You run a query against some dynamic management views (DMVs) in Microsoft SQL Server 2008, Microsoft SQL Server 2008 R2 or in Microsoft SQL Server 2012. For example, you run a query against the sys.dm_exec_procedure_stats and dm_exec_trigger_stats views.
- The query uses plan_handle as a predicate.
- The query plan that the plan_handle predicate points to does not exist.
In this scenario, the query enters an infinite loop that never stops running, you may receive a "Non-yielding Scheduler" error, and a minidump file could be generated. Additionally, you cannot kill the query, and the SQL Server service cannot be restarted. You have to restart the computer or use the SHUTDOWN WITH NOWAIT command to restart the SQL Server service.