All Questions
5 questions
4
votes
2
answers
7k
views
Query to find plan details for a specific stored procedure, searching by name
I'm trying to write a query to find information about query stats and the query plan for a specific stored procedure, but I can't manage to find the right DMV or query to look for a specific stored ...
2
votes
1
answer
1k
views
Wrong Last Execution Time sys.dm_exec_procedure_stats
I am running the following query it shows a Stored Proc that I know ran on Mon 6/6/2016 8:45 AM but the below query shows that the last execution time was 2016-05-19 12:09:23.197. Is there something I ...
6
votes
1
answer
8k
views
sys.dm_exec_procedure_stats missing history?
My boss would like me to find which (of approx 400+) stored procedures are not being used by our website any more. I'm found and reworked a script to give me the details of most recent executions, ...
5
votes
1
answer
539
views
sys.dm_exec_procedure_stats DMV contents contradict BOL
I am doing some analysis of long running stored procedures and have come across something of an anomaly, according to books online sys.dm_exec_procedure_stats should only display one row per cached ...
5
votes
2
answers
4k
views
Is it possible to determine what part of a stored procedure is currently executing?
Say I have a stored procedure like this (assume that the table schemas are fine):
CREATE PROCEDURE p_MyProc
AS
INSERT MyTable SELECT Col1 FROM Table1
INSERT MyTable SELECT Col2 FROM Table2
INSERT ...