如何从 SQL Server 2005 表中恢复已删除的行?
如何从 SQL Server 2005 表中恢复已删除的行?
How to recover a deleted row from SQL Server 2005 table?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
如何从 SQL Server 2005 表中恢复已删除的行?
How to recover a deleted row from SQL Server 2005 table?
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(5)
如果您的数据库备份已删除数据:
如果没有备份但您的数据库处于完全恢复模式:
reader 或使用 DBCC LOG 命令。
您需要第三方工具的帮助,因为事务日志没有详细记录。这是因为它的目的不是用于这种恢复。但是,如果您可以阅读它,其中有很多有用的详细信息,可用于恢复意外删除的数据。
If you have database backups that have deleted data:
If there are no backups but your database is in full recovery mode:
reader or using DBCC LOG command.
You’ll need help from third party tools because transaction log is not well documented. This is because it’s purpose is not to be used for this kind of recovery. However, if you can read it there are a lot of useful details there that can be used to recover accidentally deleted data.
回滚事务(如果您启动了事务)。
恢复备份(如果有的话)。
[编辑] 如果您有事务日志,您应该能够将数据库的备份恢复到该行被删除之前的大致位置(假设您知道那是什么时候)。
Rollback the transaction (if you started one).
Restore a backup (if you have one).
[edit] If you have transaction logs, you should be able to restore the backup of the database to the point roughly just before the row was deleted (assuming you know when that was).
有两种方法可以恢复特定的表:
t-log
备份的no_truncate
选项恢复后不进行恢复There are two ways we can recovery specific table:
no_truncate
option fort-log
backupApexSQL Log 工具可以作为已删除行的解决方案。如果数据库事务日志(在线、备份)中存在 DELETE 操作(数据库未使用简单恢复模型),该工具可以为该操作创建撤消 T-SQL 脚本。
免责声明:我在 ApexSQL 担任产品支持工程师
The ApexSQL Log tool can be the solution for deleted rows. In case the DELETE operation exists (the database was not using the Simple recovery model) in database transaction logs (online, backups), the tool can create an undo T-SQL script for the operation.
Disclaimer: I work as a Product Support Engineer at ApexSQL
如果您需要“恢复到某个时间点”选项,请不要忘记为数据库设置完整恢复模式!
Don't forget to set full recovery model for a database if you need the "restore to a point in time" option!