Win Surprise Gifts!!!
Top 5 Contributors of the Month
Post New Question
Subscribe to Forum
Get Last executed stored procedure
October 27, 2010
How to get the last executed stored procedure in Sql Server
Syed Shakeer Hussain
Posted Date: October 27, 2010 Points: 5
Run the Below query
SELECT object_name(m.object_id), MAX(qs.last_execution_time)
FROM sys.sql_modules m
LEFT JOIN (sys.dm_exec_query_stats qs
CROSS APPLY sys.dm_exec_sql_text (qs.sql_handle) st)
ON m.object_id = st.objectid
AND st.dbid = db_id()
GROUP BY object_name(m.object_id)
To post reply
Related Questions Related Questions
i got a problem on registration form using stored procedure and classes
How to get output value from stored procedure?
Table name as parameter in SQL Stored Procedure
get value from output parameter from stored procedure
How do I call a Stored Procedure with one associative array as Out put Parameter ?
How to find the Recently accessed stored Procedure?
Where will the text of the stored procedure gets stored?
What is Precompiled in terms of Stored Procedure in Sql Server?
Difference between Stored Procedure and function in Sql Server
Can we have a Stored Procedure and a table with a same name? if not why?
Latest Forum Questions From The Same Category
Help to get SQL output
how to restore my sql database from my hosting provider?
SQL query to update date range
Add allowance to employee table is wrong or true according to my case
how to remove trailing zeroes in a decimal in sql server
Required Union All Result in two different column
Sql Multiple table data retrival
Table Translation records
How select huge Data from sql without take long time?
Passing using parameter in store procedure get the top3 record from the table
Find more Forum Questions on C#, ASP.Net, Vb.Net, SQL Server and more
Quick Links For Forum Categories:
Hall of Fame
Terms of Service
Tell A Friend