SQL Server 2017 monitor and alert of stored procedure duration while it is still running

Viewed 42

SQL Server 2017 CU6 Enterprise. Is there a way to monitor and alert on running stored procedures on specific database if more than - say two minutes - has passed - but, while it is still running. I know multiple resources exist to capture that after it was done - e.g. xEvents, QueryStore, .. - but I need to capture that while stored procedure is still running and then write to eventlog or sending email with powershell or else.

Thanks.

1 Answers
Related