Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 How to Rollback a droptable in sql server 2k5

Author  Topic 

cplusplus
Aged Yak Warrior

567 Posts

Posted - 2007-03-29 : 11:25:18
i by mistake hit the delete button on the sql server 2005 since it was on terminal services, it confused me and deleted dropped the table, is there a way to rollback that or restore that table.

Please help thank you very much.

snSQL
Master Smack Fu Yak Hacker

1837 Posts

Posted - 2007-03-29 : 11:32:48
You can't roll back, since you didn't perform the drop in a transaction. You will have to restore the database from a backup. You can restore the database under a different name then create the table in the original database again (use your script if you have it saved, or generate it from the the table in the restored database), then an INSERT ... SELECT to get all the rows from the table in the restored database into the new table in the original database.

Once you're done, drop the restored database - BEING VERY CAREFUL to drop the restored database, not the original!
Go to Top of Page
   

- Advertisement -