March 4, 2010 at 8:13 am
I deleted a table in a SQL Server 2008 database via right clicking it and selecting "Delete" in Management Studio and afterwards realized I shouldn't have. Is there any way of undoing this other than restoring the backup?
March 4, 2010 at 8:21 am
Do you have a Mirror, Replicated table, or Database snapshot? If so, you could retrieve it from there. If not, then your only choice would be to restore the database somewhere else and then copy the table over using SSIS or direct querying.
Sorry I can't give you a better answer. Been there, done that.
March 4, 2010 at 8:23 am
Luckily I have the data in a flat file. I'll just recreate it. Just thought it would be nice if there were sort of like a "Recycle Bin"
March 4, 2010 at 8:27 am
That's why backups are important (one of the reasons)
If you drop a table within a transaction, the drop can be rolled back, just like any other change. Once the transaction has been committed, there's no undo.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
March 5, 2010 at 1:12 am
To second GilaMonster's comment...we cannot exempt ourselves as DBAs from the rules we apply to Developers...ALWAYS have a rollbadk plan...NEVER make changes without protection.
March 5, 2010 at 5:46 am
If you are not sure, always create a copy of the table or the object first. Always easier to rename that to recreate.
Andrew SQLDBA
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply