Last active
June 20, 2019 14:52
-
-
Save gordonglas/5d9a3ef0c41e32a382569201d73db0af to your computer and use it in GitHub Desktop.
T-SQL Delete SQL Server plan cache #tsql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- get plan_handle(s) | |
SELECT plan_handle, st.text | |
FROM sys.dm_exec_cached_plans | |
CROSS APPLY sys.dm_exec_sql_text(plan_handle) AS st | |
where text like N'%#raw_searches_to_process%' | |
-- then pass plan_handle to: | |
DBCC FREEPROCCACHE (0x05000600AD74597D10E736078B02000001000000000000000000000000000000000000000000000000000000); | |
GO | |
DBCC FREEPROCCACHE (0x0600060066FD5913009C389C8C02000001000000000000000000000000000000000000000000000000000000); | |
GO | |
DBCC FREEPROCCACHE (0x06000600293C182D208E389C8C02000001000000000000000000000000000000000000000000000000000000); | |
GO |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment