如何在SQL Server中删除表后恢复表

时间:2021-04-29 00:02:12

I drop a table in SQL Server using this code:

我使用以下代码在SQL Server中删除一个表:

DROP TABLE temp

Now, I try to recover this table, but I don't know a solution.

现在,我尝试恢复此表,但我不知道解决方案。

Please, tell me a solution for this problem if you know.

如果你知道,请告诉我这个问题的解决方案。

1 个解决方案

#1


3  

If DROP TABLE was executed inside the Transaction and it has not been committed then you can ROLLBACK. But if it isn't, then you need backup of your database. Recover your table from database. If backup is also not present, then search for 3rd party recovery tools.

如果DROP TABLE在事务中执行并且尚未提交,那么您可以ROLLBACK。但如果不是,则需要备份数据库。从数据库中恢复您的表。如果还没有备份,则搜索第三方恢复工具。

#1


3  

If DROP TABLE was executed inside the Transaction and it has not been committed then you can ROLLBACK. But if it isn't, then you need backup of your database. Recover your table from database. If backup is also not present, then search for 3rd party recovery tools.

如果DROP TABLE在事务中执行并且尚未提交,那么您可以ROLLBACK。但如果不是,则需要备份数据库。从数据库中恢复您的表。如果还没有备份,则搜索第三方恢复工具。