如何从 SQL Server 表中恢复已删除的行?
我不小心对一个 WHERE 错误的表运行了 DELETE 命令 条款。
我正在使用 SQL Server 2005。
有没有办法可以帮助我恢复丢失的数据?
I accidentaly ran a DELETE command against a table with a wrong WHERE
clause.
I am using SQL Server 2005.
Is there a way that could help me recover the lost data?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
可以使用 Apex 恢复工具,我已经成功恢复了我不小心删除的表行,
如果您下载试用版,它将仅恢复第 10 行,
请在此处检查http://www.apexsql.com/sql_tools_log.aspx
It is possible using Apex Recovery Tool,i have successfully recovered my table rows which i accidentally deleted
if you download the trial version it will recover only 10th row
check here http://www.apexsql.com/sql_tools_log.aspx
您有完整数据+事务日志备份,对吗?您可以从备份恢复到另一个数据库,然后同步回已删除的行。不过还有很多工作...
(您看过Redgate 的 SQL Log Rescue 吗?<强>更新:仅适用于SQL Server 2000)
有日志浏览器< /a>
You have Full data + Transaction log backups, right? You can restore to another Database from backups and then sync the deleted rows back. Lots of work though...
(Have you looked at Redgate's SQL Log Rescue? Update: it's SQL Server 2000 only)
There is Log Explorer
我认为那是不可能的,抱歉。
这就是为什么每当运行删除或更新时,您应该始终使用
BEGIN TRANSACTION
,如果成功则使用COMMIT
,如果失败则使用ROLLBACK
。I think thats impossible, sorry.
Thats why whenever running a delete or update you should always use
BEGIN TRANSACTION
, thenCOMMIT
if successful orROLLBACK
if not.消失的东西就消失了。我所知道的唯一保护措施是定期备份。
What is gone is gone. The only protection I know of is regular backup.