This view shows stored procedure activity for procedure statements. Each statement of any stored procedure that was executed during the most recent sample interval is identified by:
Name and ID of the database that contains the procedure
Name and ID of the procedure
Relative number of the statement within the stored procedure
Line of the procedure’s text on which the statement begins
The view shows the:
Number of times each statement was executed, both during the most recent sample interval and since the start of the session
Average elapsed time needed to execute the statement, both for the sample interval and for the session so far
SMC_SIZET procedure_activity_count = 10;
SMC_DATAITEM_STRUCT procedure_activity_view[] = {
{ SMC_NAME_ACT_STP_DB_ID,SMC_STAT_VALUE_SAMPLE },
{ SMC_NAME_ACT_STP_DB_NAME, SMC_STAT_VALUE_SAMPLE },
{ SMC_NAME_ACT_STP_ID, SMC_STAT_VALUE_SAMPLE },
{ SMC_NAME_ACT_STP_NAME, SMC_STAT_VALUE_SAMPLE },
{ SMC_NAME_STP_LINE_NUM, SMC_STAT_VALUE_SAMPLE },
{ SMC_NAME_STP_STMT_NUM, SMC_STAT_VALUE_SAMPLE },
{ SMC_NAME_STP_NUM_TIMES_EXECUTED, SMC_STAT_VALUE_SAMPLE },
{ SMC_NAME_STP_NUM_TIMES_EXECUTED, SMC_STAT_VALUE_SESSION },
{ SMC_NAME_STP_ELAPSED_TIME, SMC_STAT_AVG_SAMPLE },
{ SMC_NAME_STP_ELAPSED_TIME, SMC_STAT_AVG_SESSION }
};