February 8, 2013 at 2:45 am
Hello Friends,
I got a query from one of my team member’s friend. Here is the scenario :
SQL server Version : SQL 2005
Database Recovery Model : Simple
Issue : Jr. DBA has run a truncate command on a table having 1 mn rows (confused on similar naming convention between production / dev) . After knowing the mistake, he requested for data recovery.
Unfortunately, the database is quite old, 2 Weeks back.
Any Ideas ??
Thanks,
Chetan
February 8, 2013 at 2:53 am
Unless the truncate was run in a transaction that has not yet been committed or there's a recent backup to restore, that data is not coming back.
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
February 8, 2013 at 2:57 am
@Gila
Truncate command was not in transaction.
February 8, 2013 at 3:33 am
Then the only way would be to restore the database from backup.
February 13, 2013 at 8:57 pm
This was removed by the editor as SPAM
February 13, 2013 at 11:17 pm
prettsons (2/13/2013)
If you don't have backup then you can also try third party SQL Database Recovery Software to repair your database. First try software demo version.
Except that the database wasn't damaged.
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
February 14, 2013 at 7:08 am
Find the most recent backup prior to the truncate.
Restore the database temporarily with a different name, such as "ProductionDB_20130115Backup" to identify what it is.
Copy the table from ProductionDB_20130115Backup to ProductionDB.
When you are confident you no longer need the restored database, delete ProductionDB_20130115Backup.
Better than nothing I would think.
Viewing 7 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic. Login to reply