Hello, i have a trigger and i want to know the query that raised it, or want to retrieve the last executed query by the server. I think it's a hard question but i know that someone can help me... ThanksOriginally posted by parmaia
Hello, i have a trigger and i want to know the query that raised it, or want to retrieve the last executed query by the server. I think it's a hard question but i know that someone can help me... Thanks
Fire up SQL Profiler and run a trace with the filters configured to limit it to the table in question (object).|||if object_id('dbo.test') is not null
drop table dbo.test
go
create table dbo.test (f1 int null)
go
create trigger dbo.trgIUD_test on dbo.test for insert, update, delete as
dbcc inputbuffer (@.@.spid)
go
insert dbo.test values (1);
go
drop table dbo.test
go|||Originally posted by Steve Duncan
Fire up SQL Profiler and run a trace with the filters configured to limit it to the table in question (object).
Hey, i didn't know that exists, thank you for your help!, has very very use full!
Showing posts with label raised. Show all posts
Showing posts with label raised. Show all posts
Friday, March 23, 2012
Subscribe to:
Posts (Atom)