有没有办法知道从“exec sp_execute”执行的SP执行了什么?在SQL事件探查器? [英] Is there any way to know which SP executed from "exec sp_execute" in SQL profiler?

查看:101
本文介绍了有没有办法知道从“exec sp_execute”执行的SP执行了什么?在SQL事件探查器?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经跟踪了一个SQL分析器并获得了一些进程跟踪。我有一个命令,其中存储过程通过命令执行

I have traced a SQL profiler and got some process tracings. I got one command in which the stored procedure is executing by the command

exec sp_execute





我可以跟踪哪个存储过程是否已在此代码中执行?



或者还有其他方法可以跟踪SQL INSERT,UPDATE或存储过程执行过程吗?



提前致谢。



我的尝试:



我试图通过以下查询得到结果,但我没有任何结果。



SELECT session_id,text

来自sys.dm_exec_requests AS r

交叉申请

sys.dm_exec_sql_text(sql_handle)AS s

WHERE session_id =



Can I trace that which stored procedure had been executed in this code?

Or is there any other way to trace the SQL INSERT, UPDATE OR Stored Procedure execution process?

Thanks in advance.

What I have tried:

I have tried to get the result by the following query but I couldn't have any result.

SELECT session_id, text
FROM sys.dm_exec_requests AS r
CROSS APPLY
sys.dm_exec_sql_text(sql_handle) AS s
WHERE session_id =

推荐答案

使用Express Profiler:

选择使用过滤器运行

选择列和事件

将以SP:开头的事件设置为True



E xpressProfiler - 主页 [ ^ ]
Using Express Profiler:
Select "Run with filters"
Select "Columns and events"
Set the Events starting with "SP:" to True

ExpressProfiler - Home[^]


这篇关于有没有办法知道从“exec sp_execute”执行的SP执行了什么?在SQL事件探查器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆