added files from swmgmt03
This commit is contained in:
23
DBG - get list of sp in execution cache.sql
Normal file
23
DBG - get list of sp in execution cache.sql
Normal file
@@ -0,0 +1,23 @@
|
||||
use arizona
|
||||
|
||||
SELECT p.name, max(ps.last_execution_time) last_time
|
||||
FROM sys.dm_exec_procedure_stats ps
|
||||
JOIN sys.procedures AS p ON (ps.object_id = p.object_id)
|
||||
GROUP BY p.name
|
||||
|
||||
|
||||
SELECT
|
||||
DB_NAME(database_id) AS database_name,
|
||||
OBJECT_NAME(object_id, database_id) AS object_name,
|
||||
cached_time,
|
||||
last_execution_time,
|
||||
execution_count,
|
||||
total_elapsed_time,
|
||||
total_worker_time
|
||||
FROM
|
||||
sys.dm_exec_procedure_stats
|
||||
WHERE
|
||||
OBJECT_NAME(object_id, database_id) IS NOT NULL
|
||||
and DB_NAME(database_id) = 'arizona'
|
||||
ORDER BY
|
||||
last_execution_time DESC;
|
||||
Reference in New Issue
Block a user