• Grant Fritchey (3/27/2013)


    opc.three (3/27/2013)


    Grant Fritchey (3/27/2013)


    Actually, if you use extended events you can filter by batch_text in sql_batch_completed or by statement in rpc_completed and then use the like_i_sql_unicode_string to do a like statement looking for that particular table or even that particular column in reference in the statement. And, since this type of filtering in extended events is done at a lower level within process, it should have very low impact.

    I tried a task like this on a Database Snapshot not too long but found it to be impossible with EE in 2008. The predicates you mentioned look to be 2012, or did I mess something?

    Oops, yeah, for 2008 you don't have those predicates. Jonathan has a suggestion here how you can still use ExEvents to get the job done though.

    It's funny how Jonathan's name comes up when looking for help with EE. I ran into that same thread when tracking my aforementioned Snapshot-auditing issue: http://www.sqlservercentral.com/Forums/Topic1395766-1550-1.aspx

    I ended up giving up on EE for adding auditing to my snapshot and ended up going with Trace. I was seeing some erratic beahvior with the sqlserver.lock_acquired event plus the solution Jonathan proposed where we would use the sqlserver.sql_text and sqlserver.tsql_stack actions was a little on the heavy side for the instance I would have been adding it too.

    There are no special teachers of virtue, because virtue is taught by the whole community.
    --Plato