当前位置:网站首页>【数据库数据恢复】SQL Server数据库所在磁盘分区空间不足报错的数据恢复案例
【数据库数据恢复】SQL Server数据库所在磁盘分区空间不足报错的数据恢复案例
2022-07-27 12:17:00 【51CTO】
数据库数据恢复环境:
某品牌服务器存储有2组raid,一组raid1(2块硬盘),一组raid5(5块硬盘);
存放有SqlServer数据库。
数据库故障:
存放SqlServer数据库的分区由于数据量增加而导致原来划分的空间不足,管理员在另外一个分区中生成了一个.ndf文件并将数据库路径指向这个分区继续使用,一段时间后数据库出现故障报错,提示连接失效,SqlServer数据库无法附加查询。管理员于是进行尝试性数据恢复操作没有成功恢复数据,于是联系我们数据恢复中心进行数据恢复。
数据库数据恢复过程:
1、备份数据。服务器数据恢复工程师将故障服务器存储的所有磁盘都镜像备份。
2、数据库故障分析。由于SqlServer数据库文件所在磁盘分区空间不足,数据库无法正常运行,出现逻辑错误。分析存储中RAID1和RAID5的结构,根据获取到的raid信息分别虚拟重组出RAID1和RAID5并查看其中数据。 由于在数据库发生故障之后,管理员尝试过多次在原环境恢复数据库的数据,原始数据库文件被更改、覆盖,磁盘空间被多次重复擦除写入,所以无法使用管理员多次尝试恢复之后的数据库文件进行修复。 好在管理员在数据库发生故障,尝试进行恢复之前备份过一份数据库文件。
3、数据库修复。将之前备份的数据库文件尝试在数据库中附加,结果附加失败,错误提示如下:

错误提示主数据库文件和次级数据库文件不匹配,数据库数据恢复工程师查看.ndf文件底层,发现.ndf文件中几乎没有数据。尝试取消.mdf文件和.ndf文件之间关联,只用.mdf文件进行附加仍然出现错误提示:

错误提示日志文件(.ldf)和数据库文件(.mdf)不匹配。 于是数据库数据恢复工程师尝试对数据库进行无数据库附加,附加成功。但是发现数据库系统表损坏,无法正常使用。

数据库数据恢复工程师对数据库的系统表尝试修复,但是系统表损坏严重无法修复。
解析数据库文件中的数据库记录,北亚数据恢复工程师编写相应的程序提取数据库文件中的数据库记录,分析数据库备份获取数据库中的表结构,重构表结构并把提取出的数据库记录导入到新的表中。
数据验证:
由管理员对提取出的数据库记录进行验证,确认所有数据完全恢复。顺便提醒一下大家,在数据库的使用过程中,要合理分配数据库文件所在磁盘的空间,及时清理垃圾数据,保证数据库的正常、安全运行。
边栏推荐
- iptables防火墙
- Leetcode 02: sword finger offer 58 - I. flip the word order (simple); T123. Verify palindrome string; T9. Palindromes
- 图像分割 vs Adobephotoshop(PS)
- 基于bolt数据库实现简单的区块链 day(2)
- Go replace with local code
- Finding the finite zero point of transfer function under different sampling periods
- JS string method summary
- Ali II: what if the AOF file in redis is too large?
- Plus版SBOM:流水线物料清单PBOM
- Go Introduction (2)
猜你喜欢

MySQL数据库主从复制集群原理概念以及搭建流程

我在英国TikTok做直播电商

In the first half of the year, the number of fires decreased by 27.7%. Guangdong will improve the fire safety quality of the whole people in this way

How to make a graph? Multiple subgraphs in a graph are histogram (or other graphs)

孤独的年轻人,戒不了Jellycat

go入门篇 (4)

Iptables firewall

Introduction to box diagram

解决@OneToMany查询陷入循环引用问题

广东:剧本杀等新行业新业态场所,消防安全监管不再“缺位”
随机推荐
Leetcode 03: t58. Length of the last word (simple); Sword finger offer 05. replace spaces (simple); Sword finger offer 58 - ii Rotate string left (simple)
The difference between microcomputer and single chip microcomputer
[product] about wechat product analysis
deeplab系列详解(简单实用年度总结)
Greek alphabet reading
配置更改删除了路由过滤器,分布路由器不堪重负:加拿大网络大瘫痪
CLS monitoring alarm: ensure high availability of online services in real time
Wilcoxon rank sum and signed rank
Principle of PWM and generation of PWM wave
Could not load dynamic library ‘libcudnn.so.8‘;
SMA TE: Semi-Supervised Spatio-Temporal RepresentationLearning on Multivariate Time Series
NewTicker使用
Example of MATLAB dichotomy (example of finding zero point by dichotomy)
广东财政多举措助力稳住粮食安全“压舱石”
I do live e-commerce in tiktok, UK
The bank's face recognition system was broken: a depositor was stolen 430000 yuan
Detailed explanation of MATLAB S-function
Pytorch shows the summary like tensorflow
Introduction to box diagram
Finding the finite zero point of transfer function under different sampling periods