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.

  • You can get the object using the objectid column - but, if you want the actual stored procedure call you need to get it from a trace.

    Jeffrey Williams
    “We are all faced with a series of great opportunities brilliantly disguised as impossible situations.”

    ― Charles R. Swindoll

    How to post questions to get better answers faster
    Managing Transaction Logs