This file contains hidden or 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 cp.bucketid,cp.size_in_bytes, st.text | |
| FROM sys.dm_exec_cached_plans cp | |
| CROSS APPLY sys.dm_exec_sql_text(plan_handle) AS st |
This file contains hidden or 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 DTL.resource_type | |
| ,CASE | |
| WHEN DTL.resource_type IN ( | |
| 'DATABASE' | |
| ,'FILE' | |
| ,'METADATA' | |
| ) | |
| THEN DTL.resource_type | |
| WHEN DTL.resource_type = 'OBJECT' | |
| THEN OBJECT_NAME(DTL.resource_associated_entity_id, SP.[dbid]) |
This file contains hidden or 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
| go | |
| checkpoint; | |
| go | |
| dbcc dropcleanbuffers; | |
| go | |
| dbcc freeproccache; | |
| go |