About this question
I mistakenly deleted around 2,000,000 records from a remote SQL Server 2008 table. The server is not granting me access to the backup files on the server side. Is there any way to get back these records?
I mistakenly deleted around 2,000,000 records from a remote SQL Server 2008 table. The server is not granting me access to the backup files on the server side. Is there any way to get back these records?
Log in to share your answer and help other learners.
Log in to answerBest Answer · By JanBask MS SQL Server Expert
Answered on Jul 19, 2021
Is your database in full recovery mode? If yes, are you doing transaction log backups? If yes, do you have a backup utility like Quest LiteSpeed, Red Gate SQL Backup in undelete sql server , or Idera SQLSafe? If yes, those utilities can undelete objects from backup files (including the fulls and transaction logs) - but explaining how to use those is beyond the scope of what I can do here. Contact the vendor for instructions.
If not, restore the full backup and transaction logs as a database with a different name. (Don't overwrite the existing database.) You'll be able to get an up-to-the-second copy of the object before the delete happens, but you'll need to use the stopat part of the restore command to specify when to stop restoring the commands. You need to stop before the delete happens.
If no, go grab a copy of a log reader utility like Quest LiteSpeed or Apex SQL Log. These utilities can connect to the database server, examine the log file, and help you undo transactions. I'm not sure if the demo versions will work, but the paid ones definitely will. If no (not in full recovery mode), restore the last full backup as a database with a different name. (Don't overwrite the database you've already got.) From there, you'll be able to restore whatever records were online at the time of the backup in the undelete sql server, but you'll lose all of the changes since.
Free tutorials and interview questions from industry experts — learn the skill, then get ready to prove it.
Step-by-step SQL Server guides from industry experts
Common SQL Server interview questions, answered
Guides, tips and career advice on SQL Server from JanBask experts.
SQL Server Top 75 SSAS Interview Questions and Answers For Beginners & Experts
Prepare for your SSAS interview with our comprehensive guide featuring 75 top SQL Server Analysis Services interview questions…
SQL Server How to Become a SQL Database Administrator?
How to become a sql database administrator In 2025, discover what these professionals do, explore how much they earn and learn…
SQL Server OLAP vs OLTP: Key Differences, Architectures, Performance & Real-World Examples
Compare OLTP vs OLAP with clear definitions, architecture diagrams, real-world examples, and FAQs. Learn when to use each system…
SQL Server 70+ Most Asked SSIS Interview Questions for Freshers & Experienced
Prepare for your next SQL Server Integration Services (SSIS) interview with our top 70+ SSIS interview questions and answers.…