SQL SERVER查询当前正在执行的存储过程

SELECT
  object_name(st.objectid) as ProcedureName
FROM
  sys.dm_exec_connections as qs 
CROSS APPLY sys.dm_exec_sql_text(qs.most_recent_sql_handle) st 
WHERE
  object_name(st.objectid) is not null

  

posted @ 2020-05-27 11:56  Eric_shi  阅读(1109)  评论(0)    收藏  举报