0

I have problem with data in rows in some table. I want to know how they have changed. If someone changed via update or code application. Unfortunately I didn't have options “Change tracking = on“ and I can’t use function - I get an error

Msg 22105, level 16, state 1, line 1

Is there a chance to check it out somehow ?

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
Anka Anka
  • 1
  • 1

1 Answers1

0

Check UPDATE queries on that table :

SELECT  dest.*
FROM    sys.dm_exec_query_stats AS deqs
        CROSS APPLY sys.dm_exec_sql_text(deqs.sql_handle) AS dest
WHERE   deqs.last_execution_time > '5/19/2011 11:00'
        AND dest.text LIKE 'UPDATE YOUR_TABLE SET%';

Source : https://dba.stackexchange.com/questions/4043/can-i-see-historical-queries-run-on-a-sql-server-database

Fourat
  • 2,366
  • 4
  • 38
  • 53