This view shows stored procedure activity at the level of procedure statement. Each statement of any stored procedure that was executed during the most recent sample interval is identified by the name and ID of the database that contains the procedure, the name and ID of the procedure, the relative number of the statement within the procedure, and the line of the procedure’s text on which the statement begins.
The view includes the number of times each statement was executed, both during the most recent sample interval and since the start of the recording session. It also contains the average elapsed time needed to execute the statement, both for the sample interval and for the recording session so far.
hs_create_view procedure_activity, "Procedure Database ID", "Value for Sample", "Procedure Database Name", "Value for Sample", "Procedure ID", "Value for Sample", "Procedure Name", "Value for Sample", "Procedure Line Number", "Value for Sample", "Procedure Statement Number", "Value for Sample", "Procedure Execution Count", "Value for Sample", "Procedure Execution Count", "Value for Session", "Procedure Elapsed Time", "Avg for Sample", "Procedure Elapsed Time", "Avg for Session"