July 23, 2007 at 8:41 am
Hi,
How can i recover deleted data from a permanent table by delete clause ?
Suppose i did't use begin tran ..
Thanks in advance
Amit Choudhary
July 23, 2007 at 8:46 am
You need to use a tool that can read the transaction log then.
There are a few different out there.
The other option is to restore your database...
/Kenneth
July 23, 2007 at 9:51 am
Kenneth has the only items I know of (unless you had a trace running).
ApexSQL has ApexLog
Lumigent has Log Explorer
Red Gate has Log Rescue
Probably more out there.
July 24, 2007 at 1:21 am
I guess you can recover your data back in two ways:
1. By taking backup of your db, before deleting the data, and recover it later. Or
2. Create an object in "tempdb" by running the SELECT * INTO #objectname FROM <TableName> query, and after deletion you can recover it back by running the same above query on to your db. One problem of using "tempdb" is, the db iteself is temporary, i.e., if we close the connection whatever the objects we have created in tempdb will lose. So make sure the data should be recovered before the connection is closed.
Please Clarify if I'm wrong.
Regards,
-Kiran
July 24, 2007 at 7:32 pm
??? He's already deleted the data by mistake... how is either method you suggest going to recover data that's already been deleted?
I agree with the others... only way is going to be able to get to the transaction log using one of the methods (software packages) listed.
Of course, you could always use the undocumented DBCC LOG (dbname,3) command and write your own hack
--Jeff Moden
Change is inevitable... Change for the better is not.
July 24, 2007 at 11:55 pm
Before speaking all these first what is the recovery model your database is running if its simple no ways to recover the data only to restore to your last backup else if its full and you have a backup of the database take a log backup and do a point in time recovery.
Cheers,
Sugeshkumar Rajendran
SQL Server MVP
http://sugeshkr.blogspot.com
July 25, 2007 at 2:30 am
Good catch.
Didn't think of recovery model playing a crucial role..
(need more coffee...)
/Kenneth
July 25, 2007 at 6:34 am
Heh... and I just "assumed"... we all know what happens when you do that, eh
--Jeff Moden
Change is inevitable... Change for the better is not.
Viewing 8 posts - 1 through 7 (of 7 total)
You must be logged in to reply to this topic. Login to reply