问题
Is there a way to check when and with what parameter values a stored procedure has been executed in SQL Server 2008 R2?
回答1:
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".
回答2:
No, sorry. There is no way to do this.
回答3:
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
来源:https://stackoverflow.com/questions/10821275/stored-procedure-parameter-values-logging