📜  如何检查sql server中运行的是哪个sp - SQL代码示例

📅  最后修改于: 2022-03-11 15:05:18.982000             🧑  作者: Mango

代码示例1
SELECT
  object_name(st.objectid) as ProcName
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