stored procedure parameter values logging

纵然是瞬间 提交于 2021-01-27 07:10:31

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!