Last active
September 19, 2017 15:22
-
-
Save nire0510/208afb23befc33da7546 to your computer and use it in GitHub Desktop.
[MS SQL History] Search query in MSSQL queries history #database
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
SELECT t.[text] | |
FROM sys.dm_exec_cached_plans AS p | |
CROSS APPLY sys.dm_exec_sql_text(p.plan_handle) AS t | |
WHERE t.[text] LIKE N'%PART_OF_YOUR_QUERY%'; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment