September 18, 2008 at 3:44 am
Hi to All,
Anyone pls give solution to how to recover a accidently deleted table in MS-SQL.
Thanks in advance.
September 18, 2008 at 7:11 am
If you have a snapshot, you can recover the table from the snapshot. Else I suggest to restore the database with another name and export the table to the original database.
September 18, 2008 at 7:16 am
If this is SQL 2000, go download Log Rescue from Red Gate (I work for them, it's free) and it might be able to read the T-log or log backup and give you a script to undo the transaction.
If it's 2005, ApexSQL has a tool to read that log.
September 18, 2008 at 7:21 am
....or take a log backup, restore the latest full backup to a different db name with norecovery apply the log backup that was just taken to the point in time that was just prior to the table deletion using with recovery and then copy the table back to the original database. Obviously not a great solution if working with a huge database but it gives you a great opportunity to test your backups and recovery processes.
Unfortunately this only works if you have the database in full recovery model too.
David
@SQLTentmaker“He is no fool who gives what he cannot keep to gain that which he cannot lose” - Jim Elliot
September 18, 2008 at 12:26 pm
How big is your database..the way you say it was accidentally deleted I dont think it was either big or it was mission critical. Anyways if you use Litespeed then use the object recovery to restore the single table from the backup. If not use BCP or as some people above suggested restore to a different name and then export data.
Thanks
The_SQL_DBA
MCTS
"Quality is never an accident; it is always the result of high intention, sincere effort, intelligent direction and skillful execution; it represents the wise choice of many alternatives."
September 18, 2008 at 9:54 pm
Thanks for reply.....
I will work on the solutions you have given......
September 22, 2008 at 4:03 am
Is there any other way to recover it?
September 22, 2008 at 4:43 am
suhas.kanade (9/22/2008)
Is there any other way to recover it?
What way(s) did you try? Didn't it work? What errors did you encounter?
Viewing 8 posts - 1 through 7 (of 7 total)
You must be logged in to reply to this topic. Login to reply