SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 How to Rollback a droptable in sql server 2k5
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

cplusplus
Aged Yak Warrior

532 Posts

Posted - 03/29/2007 :  11:25:18  Show Profile  Reply with Quote
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
Flowing Fount of Yak Knowledge

USA
1837 Posts

Posted - 03/29/2007 :  11:32:48  Show Profile  Reply with Quote
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
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.05 seconds. Powered By: Snitz Forums 2000