I always forget to save the quires that I'm executing against sql server and want to recover them without writing them back, here's a handy script which I use for this
select objtype,p.size_in_bytes,[sql].text
from sys.dm_exec_cached_plans p
outer apply sys.dm_exec_sql_text (p.plan_handle) sql
where [sql].[test] like '%Something goes here%'
order by usecounts desc
Subscribe to:
Post Comments (Atom)

1 comments:
Danke sehr an den Webmaster.
Gruss Nadja
Post a Comment