2

I know that how many times it was executed from execution_count in sys.dm_exec_procedure_stats.

But how these values are calculated?

Is there any way to know how these values get calculated?

I want whole log when the stored procedure was first time executed to till last_execution_time logs.

Devart
  • 119,203
  • 23
  • 166
  • 186
KD29
  • 109
  • 1
  • 3
  • 15

1 Answers1

2

The statictics are reset each time the server restarts, and the DMV is documented here: https://msdn.microsoft.com/en-us/library/cc280701.aspx

ErikEJ
  • 40,951
  • 5
  • 75
  • 115
  • Hi @ErikEj , how this `execution_count` get calculated? I mean somewhere sp execution `datetime`must be stored ? So I want the whole log when- when the sp was executed and where this info is Stored? – KD29 Dec 29 '15 at 09:27
  • SQL Server does not log query executions in the way you want (without use of Profiler, 3rd party tools or a roll your own solution). See this previous discussion for more: http://stackoverflow.com/questions/5299669/how-to-see-query-history-in-sql-server-management-studio. – David Rushton Dec 29 '15 at 09:50