Reputation: 179
Is there a way to check when and with what parameter values a stored procedure has been executed in SQL Server 2008 R2?
Upvotes: 4
Views: 3046
Reputation: 1829
You can use profiler for the task. See other threads:
How to implement logging and error reporting in SQL stored procedures?
"Debug"(get information) on a running stored procedure in MS Sql Server
Upvotes: 0
Reputation: 6232
As usr said there is no way to do this at all, but you can do this as workaround, which I did in my projects.
Create a log table and implement in each procedure a INSERT INTO log_table
statement where you insert time with GetDate()
, procedure name and logged user. This table you can seek for your informations then.
This for sure only works for the future and not if you want to look for "old-use".
Upvotes: 4