从SQL触发器获取查询 [英] Get Query From SQL trigger

查看:83
本文介绍了从SQL触发器获取查询的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



有谁知道我如何获得触发触发器的陈述.说我将触发器放在桌子上.

插入,更新,删除后

并且一旦插入了新行,我就可以提取为执行此操作而被触发的insert语句.

任何帮助都很好

请不要在谷歌上快速搜索答案我已经完成了谷歌搜索".

Hi

Does anyone know how I can get the statment that fired the trigger. say i place a trigger on a table.

AFTER INSERT, UPDATE, DELETE

And once a new row is inserted so I can extract the insert statement that was fired in order to do this.

Any help would be great

Please no quickly googled answers "I already did the googling"

推荐答案

使用SQL Server事件探查器跟踪已执行的语句.可通过Microsoft SQL Server 2008访问该语句- >性能工具-> SQL Server Profiler
Use SQL Server Profiler to track the statements that are executed.It is accessed through Microsoft SQL Server 2008 -> Performance Tools -> SQL Server Profiler


这篇关于从SQL触发器获取查询的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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