且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

在SQL Server 2012中检索已删除的行?

更新时间:2023-02-07 08:27:26

你可以选择一些选项尝试。



如果你有备份,你可以执行备份恢复,如描述此处。但是,没有备份就不那么容易了。您可以尝试阅读SQL事务日志,但只有当您的数据库处于完全恢复模式时才能这样做。



您可以使用未记录的函数手动读取事务日志DBCC LOG或fn_dblog。请查看此主题以获取更多详细信息:

http:// ***。 com / questions / 9014531 / read-sql-server-transaction-log



第二个选项是使用某些第三方交易日志阅读器,例如 ApexSQL日志



另一种选择是使用时间点恢复,但它会撤消您可能想要的所有其他交易保持。
There are some options you could try.

If you have backups, you can perform a backup restore like described here. However, without backups it’s not that easy. You can try reading SQL transaction log, but you can do that only if your database was in full recovery model.

You can read transaction log manually by using undocumented functions like DBCC LOG or fn_dblog. Look at this thread for more details:
http://***.com/questions/9014531/read-sql-server-transaction-log

Second option is using some third party transaction log readers, e.g. ApexSQL Log.

Another option is to use point in time recovery, but it would undo all other transactions you might want to keep.