当前位置:网站首页>Essentially a database data recovery 】 【 database cannot read data recovery case
Essentially a database data recovery 】 【 database cannot read data recovery case
2022-08-03 15:32:00 【North Asia Data Recovery】
SqlServer database failure & analysis:
The data of the SQL server database cannot be read.The administrator contacts our data recovery center for database data recovery.
The database data recovery engineer analyzed the faulty database and found that the reason why the SQL Server database file could not be read was because the underlying File Record was truncated to 0, the beginning of the file could not be found, and the data table structure was also damaged.The space of about 80M in front of the image file and a part of the space in the middle are overwritten, and the system table is damaged and cannot be read. Consider using an automatic backup file to extract the table structure.
日志中的操作记录:
Because the system table is damaged, the structure of a large number of data tables cannot be determined, and the recovery work can only be performed by database data recovery engineers based on experience.
Database data recovery plan:
After consultation with the Beiya database data recovery engineer team, the following database data recovery plan was determined:
Backup user data - analyze the database of the old data in the backup file - find the data table from the old databaseStructure——Extract the structure of a part of the data table from the log——Extract intact data from the log and residual data——Recover the corresponding data according to the log, and check whether the data is correct——Recover all data after checking that the data is correct.
SqlServer database data recovery process:
1. Backup data.
Hardware engineers first detect whether there is a physical failure of the hard drive.Make mirror backups of each hard disk after no hardware problems are found.
Backup all hard drive data with professional tools:
2. Scan image files.
Open the residual files with tools and analyze the underlying data of the hard disk, and find that there are still many SQL Server logs and backup files in the underlying hard disk.There are many operation records of database insert statements in the residual log.The table creation statement and some old data are found in the residual backup file, and try to extract the data.
In order to speed up data extraction, Beiya data recovery engineers have written a small program to extract database-related data, scan all residual database data in the entire hard disk, and extract all data.
3. Analyze scan data.
After analyzing all the scanned log files, it is found that there are data pages in the log files, which have a fixed beginning and end. Each piece of data has its own object ID number in a fixed position.Continue to search for data records with the same object Id, and find that the structure is the same. It can be determined that this is intact data and can be extracted.
After analyzing the scanned backup file, it is found that many table building statements can be extracted from it, and a part of the table structure can be obtained.For the remaining table structure, since the part truncated to 0 happens to be in the system table, there is no way to extract the table structure, and the table structure and data type can only be inferred from the data extracted from the log.
4. Extract data.
According to the previous analysis, Beiya data recovery engineer wrote a program to extract the table building statement from the backup file, analyze the table structure and various data types according to the table building statement, and search for 22H, 22H, 22H,07H, 05H table.Write a new program to extract the records in the log according to the correspondence between these established tables and OBJECT_IDs, correspond to the data and tables according to the object ID, and insert them into the new table.
5. Verify all data.
After verification by the administrator, the recovered new table is basically the same as the data observed using professional tools, and the data recovery is successful.
边栏推荐
猜你喜欢
随机推荐
How to use binary search and find whether the rotation in the array contains a (target) value?Rotate the sorted array leetcode 81. Search
gocron定时任务管理系统的安装与运行
2021年12月电子学会图形化四级编程题解析含答案:质数判断器
C#.NET 国密数字信封
基于牛顿方法在直流微电网潮流研究(Matlab代码实现)
跨桌面端之组件化实践
【指针内功修炼】函数指针 + 函数指针数组 + 回调函数(二)
Flink作业调度详解
Currency ATM: Solana Wallet Has Unknown Security Vulnerability, A Large Number Of Users' Digital Assets Are Stolen
上亿数据怎么玩深度分页?兼容MySQL + ES + MongoDB
nodeJs--跨域
夜神浏览器fiddler抓包
2021年12月电子学会图形化四级编程题解析含答案:森林运动会
How much does Ark Survival Evolved cost?
MySQL性能优化的'4工具+10技巧'
Internship Road: Documenting Confusion in My First Internship Project
动态链接库.dll、.so和静态库.a,cmake指令
简介undo log、truncate、以及undo log如何帮你回滚事物?
AWS中国区SDN Connector
PHP中高级面试题 – 第一天