I have a SQL Server database that I wrongly executed a delete script on it that removed an important records from a filestream-enabled table called Images.

after the execution immediately I created a backup, now this backup contains a big .LDF log file and also the filestream folder container contains the files that its records were removed.

  1. Using the Dedicated Admin Connection I were able to see the file stream tombstone tables, for the backup I have the filestream tombstone table contains a lot of records which I think indicates to the removed records, but am I able to recover the whole rows or to get the row ID from the information provided in this table ?

    The following data are provided by the tombstone table :

    filestream_value_name ---> I used this value to go to the physical file in the filstream container and its existed.
  2. Using a recovery application I were able to recover almost all the records in the other tables, even the Images table rows restored, but the Data column which is the filestream column always contains 48-byte long binary data that you can see an example of them from here, I'm wondering how can I use this data to link them to a "tombstone" row or maybe to get the their file name in the filestream container file ?

  • I noticed that the data starting from the byte 28 until the byte 23 (zero based index) is the GUID of the row, I'm trying now to solve the other parts that may lead me to their corresponding row maybe in the "filestream_tombstone" table! – Amer Sawan Dec 26 '13 at 18:27
  • 3
    I hate to point out the obvious, but why did you do a backup after the delete? That should have been done before the delete. – Max Vernon Dec 26 '13 at 23:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.