Home Forums SQL Server 2005 T-SQL (SS2K5) How to get the actual query text being fired for a particular operation. I'm trying to implement a trigger on a table where i need to store the query also. RE: How to get the actual query text being fired for a particular operation. I'm trying to implement a trigger on a table where i need to store the query also.

  • DBCC InputBuffer (SPID) will give you the text sent to the SQL Server, if that helps.

    Atlantis Interactive - SQL Server Tools
    My blog[/url]
    Why I wrote a sql query analyzer clone