Case:
Customers accidentally deleted the MDF file of the MS SQL database. Before finding us, we had scanned the MDF file that could not be scanned before it could be added.
Solution:
After communicating with the user, it was found that the user did not store the scan results in the logical D drive, but the user could not be sure that the data was in the D drive, nor did he know when it was deleted. We analyzed the files found by the user with the software, and found that the first 270 pages of the files found were normal. Through the analysis of these information, we obtained the database path as D:SYBAK, the file name is SYS_DATA.MDF, and the database size is 11M- Between 15M, after checking with the user, it is determined that the library is the database it needs. Then analyze the file system as FAT32. Compared with NTFS, FAT32 is relatively “chaotic” in management. Due to the frequent “write and read” operations, the database will definitely generate a large number of fragments, and once the file is deleted, it will increase the number of fragments that are overwritten. possibility. The MDF page-level collection is directly performed on the logical D disk, and then all the collected pages are analyzed to eliminate the useless interfering “dirty library”. After analysis, it is found that although the library file is small, there are nearly 20 fragments. These fragments There are also many missing pages, and it seems that some fragments are covered. Directly reorder and reorganize these page files to obtain the recovery results, and then perform the repair table operation to obtain the database. After checking with the user, except for one of the three tables required by the user, the contents of the other two tables are completely covered. All are normal, so far the data recovery is complete.