|
ApexSQL Knowledgebase Tips and How-to Articles for Apex SQL Tools ApexSQL Log Basics Part 3 of 3: Truncated Data Recovery DESCRIPTION The following steps show how to recover truncated data using ApexSQL Log. ApexSQL Log can recover data that was lost due to execution of the TRUNCATE TABLE command. The source of recovered data can only be online data files. The transaction log cannot be used in this option since Truncate does not write rows to the transaction log. Recovery is done by analysis of free pages in the MDF file and quality of recovered data depends on post-event database activity. SOLUTION STEP 1: Open the "Recovery Wizard" ![]() From the File menu, select "Recovery Wizard". STEP 2: Choose a Data Source ![]() Connect to a SQL Server database by selecting a server, providing login credentials, and choosing a database. STEP 3: Select Recovery Option ![]() Select "Recover Data Loss from Truncate Table Operations". Click "Next". STEP 4: Select Tables ![]() Select the tables that you want to recover. Click "Next". STEP 5: Select Recovery Script Path ![]() On the Script File Name, specify where you want to save your generated recovery script. Click "Finish". STEP 6: Execute generated recovery script ![]() The result of a successful recovery operation is a saved script that, when run, will recover the database’s table structures and data. This script can be copied to the clipboard or to SQL Server's Query Analyzer. It can also be saved to a file or even executed directly to the database. Here, we choose to copy the script to Query Analyzer and run it there. STEP 7: Verify successful execution of script ![]() When the script execution completes, the results are displayed. You have successfully recovered your data. SEE ALSO ApexSQL Log Basics Part 1 of 3: Working with a SQL Server Transaction Log ApexSQL Log Basics Part 2 of 3: Dropped or Deleted Data Recovery AUTHOR Janice Lee LAST REVIEW DATE 21 August 2007 Labels: ApexSQL Log |
© 2008 Apex SQL Tools All Rights Reserved | 1.919.968.8444 | Contact Us | Terms of Use | Privacy Policy







