find query syntax from fn_dblog

  • Hi,

    i there a way to find the syntax that was run from the fn_dblog?

    THX

  • the log does not save the commands that were executed, only the data that actually changed.

    you'd want to start using a trace or extended events to capture commands in the future.

    what exactly are you trying to find? whodunnit information, or rollback commands, or what?

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • This can be helpful

    SELECT st.[text], *

    FROM sys.dm_exec_query_stats qs

    CROSS APPLY sys.dm_exec_sql_text(qs.plan_handle) st

    INNER JOIN sys.dm_exec_cached_plans cp ON qs.plan_handle = cp.plan_handle

    Regards,

    Igor

    Igor Micev,My blog: www.igormicev.com

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply