Tag Archives: clears all plans for a single database

DBCC FLUSHPROCINDB

DBCC FLUSHPROCINDB command is used to clears all plans for a single database. For example, the following code, will clear all the plans for pubs database and force to recompile all stored procedures on first execution.     ----Determine the id of the pubs database DECLARE @intDBID INTEGER SET @intDBID = (SELECT dbid                 FROM [...]