追踪已删除的数据库中的记录

时间:2021-02-24 19:20:06

I Need to track down the records deleted from the tables from a database. Apart from triggers any other way to do it in sql server?

我需要从数据库中追踪从表中删除的记录。除了在sql server中触发任何其他方式吗?

1 个解决方案

#1


1  

The only way you can do this is to restore the database form a backup and compare the tables, I'd probably go with an EXCEPT query:

你可以做到这一点的唯一方法是从备份恢复数据库并比较表,我可能会使用EXCEPT查询:

select * from restored_db.table
EXCEPT
select * from current_db.table

#1


1  

The only way you can do this is to restore the database form a backup and compare the tables, I'd probably go with an EXCEPT query:

你可以做到这一点的唯一方法是从备份恢复数据库并比较表,我可能会使用EXCEPT查询:

select * from restored_db.table
EXCEPT
select * from current_db.table