Stored procedures access count

  • Is anyone knows how to calculate access count of stored procedure from server restart?

    Please share information if knows

  • Without some custom monitoring or auditing, you can't.

    The procedure_stats DMV shows execution count since the procedure was last compiled, but that's all you can get, and last compile won't usually match with when the server restarted.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • Thanks for sharing the information

  • Set up auditing. You're in SQL Server 2014. You can use extended events. It won't help you now, but it will help you tomorrow and next week and...

    "The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
    - Theodore Roosevelt

    Author of:
    SQL Server Execution Plans
    SQL Server Query Performance Tuning

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply