SQL Server 2014 tracking information

51 views Asked by At

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 ?

1

There are 1 answers

0
Fourat On

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