回滚DROP TABLE命令 [英] Rollback DROP TABLE command

查看:821
本文介绍了回滚DROP TABLE命令的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我删除了错误的表,我确实需要恢复已删除的数据。我没有最近的备份。是否有一些脚本在其他方式带回来。找到了一些脚本,但我不想进行实验,我需要100%的解决方案

I dropped wrong table and I really need to recover deleted data. I don’t have recent backup. Is there some script on some other way to bring table back. Found some scripts but I don’t want to experiment , I need solution that will work 100%

推荐答案

如我所知,如果你正在使用SIMPLE恢复模型,然后没有办法恢复丢弃的表。



SYSTOOLS有第三方工具: SQL Server数据库恢复 [ ^ ]和内核数据恢复: SQL恢复 [ ^ ]可以帮到你。我从未使用它。
As good as i know, if you are using the SIMPLE recovery model, then there is no way to restore dropped table.

There is a third party tool by SYSTOOLS: SQL Server Database Recovery[^] and by Kernel Data Recovery: SQL recovery[^] which may help you. I''m never used it.


首先,您需要停止服务器并创建mdf和ldf文件的副本。如果幸运的话,您的数据仍然存在,您可以使用 ApexSQL Recover 恢复它[ ^ ]或其他一些用于数据恢复的工具。



这可能的原因是drop table不会立即删除数据但只重新分配这些空格并将其标记为空闲,以便其他表可以使用它。因此,您需要在被覆盖之前快速行动(这就是您需要创建MDF和LDF副本的原因)
First you need to stop your server and create a copy of both mdf and ldf files. If you had luck your data is still there and you can recover it with ApexSQL Recover[^] or some other tool made for data recovery .

Reason why this is possible is that drop table doesn’t delete data immediately but only reallocates this spaces and markes it as free so other tables can use it. Therefore you need to act fast before it’s overwritten (that’s why you need to create copies of MDF and LDF)


这篇关于回滚DROP TABLE命令的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆