I just ran truncate statement on a table and committed. What options do I have to restore the table to the state pre truncate?
Edit: I did this in my dev setup, hence nothing to worry for me, I was just curious to know do I have any options.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You are probably out of luck, sir. If you cannot restore from backup / replay logs (because you don’t have them), then your next option is forensic recovery. That’s beyond trying to explain. To succeed at that, you need to take the machine offline before anything else is written. Copy the whole disk if its MyISAM tables, or just the InnoDB files if it’s InnoDB. Find an expert who can read the file internals and maybe you’ll get it back.