MSSQL How to find out which table a record was included or modified

1

Is there a way to find out via query which table in a database has changed Update or Insert?

    
asked by anonymous 14.10.2017 / 18:20

1 answer

0

As I checked in SQL SERVE forums, this query will return the value of the last insert:

SELECT o.name as ObjectName, last_user_update,*
FROM sys.dm_db_index_usage_stats s
join sepm01.sys.objects o on s.object_id = o.object_id
WHERE database_id = DB_ID( 'sepm01')

In addition I found a component that will give you a more precise mtrack about this: SQL Server - Change Tracking

    
16.10.2017 / 13:09