<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>惜分飞 &#187; SQL Server</title>
	<atom:link href="https://www.xifenfei.com/category/database/sql-server/feed" rel="self" type="application/rss+xml" />
	<link>https://www.xifenfei.com</link>
	<description>提供7*24专业数据库(Oracle,SQL Server,MySQL,PostgreSQL等)恢复和技术支持@Tel:17813235971</description>
	<lastBuildDate>Sun, 22 Nov 2026 15:21:14 +0000</lastBuildDate>
	<language>zh-CN</language>
		<sy:updatePeriod>hourly</sy:updatePeriod>
		<sy:updateFrequency>1</sy:updateFrequency>
	
	<item>
		<title>模拟sql server故障备份完成恢复实现数据0丢失</title>
		<link>https://www.xifenfei.com/2025/12/sql-bak-0-lost-data.html</link>
		<comments>https://www.xifenfei.com/2025/12/sql-bak-0-lost-data.html#comments</comments>
		<pubDate>Fri, 12 Dec 2025 02:39:26 +0000</pubDate>
		<dc:creator><![CDATA[惜分飞]]></dc:creator>
				<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[sql最后ldf备份]]></category>
		<category><![CDATA[备份结尾日志]]></category>

		<guid isPermaLink="false">https://www.xifenfei.com/?p=11833</guid>
		<description><![CDATA[联系：手机/微信(+86 17813235971) QQ(107644445)  &#8230; <a href="https://www.xifenfei.com/2025/12/sql-bak-0-lost-data.html">继续阅读 <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<div id="xifenfeicopyright">
<p>联系：<a href="https://www.xifenfei.com/about_xifenfei" target="_blank">手机/微信(+86 17813235971)   QQ(107644445)</a><a target="_blank" href="http://wpa.qq.com/msgrd?v=3&#038;uin=107644445&#038;site=qq&#038;menu=yes"><img src="https://www.xifenfei.com/wp-content/themes/img/site_qq.jpg" alt="QQ咨询惜分飞" title="QQ咨询惜分飞"/></a></p>
<p>标题：<a href="https://www.xifenfei.com/2025/12/sql-bak-0-lost-data.html" target="_blank">模拟sql server故障备份完成恢复实现数据0丢失</a></p>
<p>作者：<a href="https://www.xifenfei.com" target="_blank">惜分飞</a>©版权所有[未经本人同意,不得以任何形式转载,否则有进一步追究法律责任的权利.]</p>
</div>
<p>在sql server数据库中,使用备份还原,可以用来恢复的备份文件只能是全备、增量备份、事务日志备份,在很多情况下,sql server生产库异常,最后的事务日志没有来得及备份(但是ldf文件存在),这种情况下如何最大限度恢复数据实现数据0丢失,其实最重要的关键点就是对最后异常库的ldf文件的事务日志进行备份,在sql server里面给这个操作起了一个专业的词叫做:备份结尾日志（Tail of log).我这边通过一个实验来模拟整个操作过程.<br />
1. 创建一个库,恢复模式为完整<br />
<a href="https://www.xifenfei.com/wp-content/uploads/2025/12/s1.png"><img src="https://www.xifenfei.com/wp-content/uploads/2025/12/s1.png" alt="s1" width="1137" height="239" class="alignleft size-full wp-image-11834" /></a><br />
<hr />
2.创建表并插入一条记录,然后进行全备<br />
<a href="https://www.xifenfei.com/wp-content/uploads/2025/12/s2.png"><img src="https://www.xifenfei.com/wp-content/uploads/2025/12/s2.png" alt="s2" width="513" height="205" class="alignleft size-full wp-image-11836" /></a><br />
<a href="https://www.xifenfei.com/wp-content/uploads/2025/12/s3.png"><img src="https://www.xifenfei.com/wp-content/uploads/2025/12/s3.png" alt="s3" width="800" height="401" class="alignleft size-full wp-image-11835" /></a><br />
<hr />
3. 再插入一条记录,并做事务日志备份<br />
<a href="https://www.xifenfei.com/wp-content/uploads/2025/12/s4.png"><img src="https://www.xifenfei.com/wp-content/uploads/2025/12/s4.png" alt="s4" width="538" height="212" class="alignleft size-full wp-image-11838" /></a><br />
<a href="https://www.xifenfei.com/wp-content/uploads/2025/12/s5.png"><img src="https://www.xifenfei.com/wp-content/uploads/2025/12/s5.png" alt="s5" width="691" height="372" class="alignleft size-full wp-image-11837" /></a><br />
<hr />
4. 再插入一条记录,并在脱机情况下删除掉数据库的mdf文件（模拟故障）,在实际生产中如果原机器损坏,可以把在新机器上安装同版本sql,然后创建同名库,把ldf文件替换<br />
<a href="https://www.xifenfei.com/wp-content/uploads/2025/12/s6.png"><img src="https://www.xifenfei.com/wp-content/uploads/2025/12/s6.png" alt="s6" width="641" height="319" class="alignleft size-full wp-image-11839" /></a><br />
<a href="https://www.xifenfei.com/wp-content/uploads/2025/12/s8.png"><img src="https://www.xifenfei.com/wp-content/uploads/2025/12/s8.png" alt="s8" width="1139" height="454" class="alignleft size-full wp-image-11840" /></a><br />
<hr />
5. 进行最后的ldf(事务日志的备份),在sql server中这个备份操作叫做“备份结尾日志（Tail of log)”,先尝试直接使用图形化工具进行备份<br />
<a href="https://www.xifenfei.com/wp-content/uploads/2025/12/s9.png"><img src="https://www.xifenfei.com/wp-content/uploads/2025/12/s9.png" alt="s9" width="926" height="400" class="alignleft size-full wp-image-11841" /></a><br />
<hr />
6. 图形化这种情况无法直接备份,使用命令行形式成功备份<br />
<a href="https://www.xifenfei.com/wp-content/uploads/2025/12/s10.png"><img src="https://www.xifenfei.com/wp-content/uploads/2025/12/s10.png" alt="s10" width="615" height="245" class="alignleft size-full wp-image-11842" /></a><br />
<hr />
这里备份命令带WITH NORECOVERY、WITH NO_TRUNCATE、WITH CONTINUE_AFTER_ERROR相关内容官方描述:</p>
<pre class="brush: bash; title: ; notranslate">
如果数据库处于联机状态并且您计划对数据库执行还原操作，则从备份日志结尾开始。 
要避免联机数据库出错，必须使用 BACKUP Transact-SQL 语句的 WITH NORECOVERY 选项。

如果数据库处于脱机状态而无法启动，则需要还原数据库，从备份日志结尾开始。 
由于此时不会发生任何事务，因此请使用 WITH NO_TRUNCATE 选项。 
NO_TRUNCATE 实际上与仅复制事务日志备份相同。 由于此时不会发生任何事务，因此可以选择使用 WITH NORECOVERY。

如果数据库损坏，则尝试使用 WITH CONTINUE_AFTER_ERROR 语句的 BACKUP 选项执行结尾日志备份。

在损坏的数据库上，仅当日志文件未受损、数据库处于支持结尾日志备份的状态并且数据库不包含任何大容量日志更改时，
日志尾部备份才会成功。 如果无法创建结尾日志备份，则最新日志备份后提交的任何事务都将丢失。
</pre>
<p>7. 进行数据库还原操作(这里先删除了故障库和对应ldf文件),也可以还原成其他库名和不同路径,也可以通过命令行进行还原(全备和除最后一个事务日志之前的备份需要使用WITH NORECOVERY)<br />
<a href="https://www.xifenfei.com/wp-content/uploads/2025/12/s11.png"><img src="https://www.xifenfei.com/wp-content/uploads/2025/12/s11.png" alt="s11" width="857" height="399" class="alignleft size-full wp-image-11845" /></a><br />
<a href="https://www.xifenfei.com/wp-content/uploads/2025/12/s12.png"><img src="https://www.xifenfei.com/wp-content/uploads/2025/12/s12.png" alt="s12" width="852" height="379" class="alignleft size-full wp-image-11844" /></a><br />
<a href="https://www.xifenfei.com/wp-content/uploads/2025/12/s13.png"><img src="https://www.xifenfei.com/wp-content/uploads/2025/12/s13.png" alt="s13" width="494" height="273" class="alignleft size-full wp-image-11843" /></a><br />
<hr />
基于上述测试,完美的恢复故障之前的所有数据</p>
<div id="crp_related"><ul><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2025/10/linux7-8-single-user.html" rel="bookmark" class="crp_title">redhat系列7/8进入单用户模式</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2025/10/grubx64-efi-not-found.html" rel="bookmark" class="crp_title">Failed to open \EFI\redhat\grubx64.efi &#8211; Not Found 故障处理</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2025/12/ufs-recovery-lvm.html" rel="bookmark" class="crp_title">linux异常磁盘lvm恢复操作演示</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2025/01/fio-disk-destruction-recovery.html" rel="bookmark" class="crp_title">fio测试io,导致磁盘文件系统损坏故障恢复</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2025/01/ar8mswin1256.html" rel="bookmark" class="crp_title">中文环境显示AR8MSWIN1256（阿拉伯语字符集）</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2025/02/sql-server-recovering.html" rel="bookmark" class="crp_title">sql server数据库“正在恢复”故障处理</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2025/03/aix-disk-had-oracle-recovery.html" rel="bookmark" class="crp_title">aix磁盘损坏oracle数据库恢复</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2025/09/delete-df-some-overwrit-recovery.html" rel="bookmark" class="crp_title">删除数据库文件并部分覆盖情况下Oracle恢复</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2025/01/first-oracle-21c-recovery-ask.html" rel="bookmark" class="crp_title">第一例Oracle 21c恢复咨询</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2025/04/sql-tempdb-error.html" rel="bookmark" class="crp_title">可能是 tempdb 空间用尽或某个系统表不一致故障处理</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2025/12/orarecovery-suspend-oracle-open.html" rel="bookmark" class="crp_title">win平台挂起Oracle数据库启动进程</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2025/11/mysql-drop-database-recovery.html" rel="bookmark" class="crp_title">mysql drop database 恢复思路</a></li></ul></div>]]></content:encoded>
			<wfw:commentRss>https://www.xifenfei.com/2025/12/sql-bak-0-lost-data.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>sql server 事务日志备份异常恢复案例</title>
		<link>https://www.xifenfei.com/2025/12/sql-server-transaction-log-backup-recovery.html</link>
		<comments>https://www.xifenfei.com/2025/12/sql-server-transaction-log-backup-recovery.html#comments</comments>
		<pubDate>Thu, 11 Dec 2025 02:41:24 +0000</pubDate>
		<dc:creator><![CDATA[惜分飞]]></dc:creator>
				<category><![CDATA[SQL Server恢复]]></category>
		<category><![CDATA[sql 备份异常恢复]]></category>
		<category><![CDATA[sql故障恢复]]></category>

		<guid isPermaLink="false">https://www.xifenfei.com/?p=11823</guid>
		<description><![CDATA[联系：手机/微信(+86 17813235971) QQ(107644445)  &#8230; <a href="https://www.xifenfei.com/2025/12/sql-server-transaction-log-backup-recovery.html">继续阅读 <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<div id="xifenfeicopyright">
<p>联系：<a href="https://www.xifenfei.com/about_xifenfei" target="_blank">手机/微信(+86 17813235971)   QQ(107644445)</a><a target="_blank" href="http://wpa.qq.com/msgrd?v=3&#038;uin=107644445&#038;site=qq&#038;menu=yes"><img src="https://www.xifenfei.com/wp-content/themes/img/site_qq.jpg" alt="QQ咨询惜分飞" title="QQ咨询惜分飞"/></a></p>
<p>标题：<a href="https://www.xifenfei.com/2025/12/sql-server-transaction-log-backup-recovery.html" target="_blank">sql server 事务日志备份异常恢复案例</a></p>
<p>作者：<a href="https://www.xifenfei.com" target="_blank">惜分飞</a>©版权所有[未经本人同意,不得以任何形式转载,否则有进一步追究法律责任的权利.]</p>
</div>
<p>有客户的sql server数据库运行在双机环境中,由于心跳网络异常导致双机频繁切换最终数据库损坏DBCC检查报大量错误</p>
<pre class="brush: bash; title: ; notranslate">
DBCC CHECKDB('OLTP') WITH NO_INFOMSGS, ALL_ERRORMSGS

Msg 8909, Level 16, State 1, Line 1
Table error: Object ID 0, index ID -1, partition ID 0, alloc unit ID 28147935764938752 (type Unknown), page ID (1:33059984) contains an incorrect page ID in its page header. The PageId in the page header = (68:3276868).
Msg 8909, Level 16, State 1, Line 1
Table error: Object ID 0, index ID -1, partition ID 0, alloc unit ID 11540680206712832 (type Unknown), page ID (1:33059985) contains an incorrect page ID in its page header. The PageId in the page header = (102:6488116).
Msg 8909, Level 16, State 1, Line 1
Table error: Object ID 0, index ID -1, partition ID 0, alloc unit ID 16888988233302016 (type Unknown), page ID (1:33059986) contains an incorrect page ID in its page header. The PageId in the page header = (93:6619252).
Msg 8909, Level 16, State 1, Line 1
Table error: Object ID 0, index ID -1, partition ID 0, alloc unit ID 16888988233302016 (type Unknown), page ID (1:33059987) contains an incorrect page ID in its page header. The PageId in the page header = (93:6619252).
Msg 8909, Level 16, State 1, Line 1
Table error: Object ID 0, index ID -1, partition ID 0, alloc unit ID 16888988233302016 (type Unknown), page ID (1:33059988) contains an incorrect page ID in its page header. The PageId in the page header = (93:6619252).
Msg 8909, Level 16, State 1, Line 1
Table error: Object ID 0, index ID -1, partition ID 0, alloc unit ID 28147836977938432 (type Unknown), page ID (1:33059989) contains an incorrect page ID in its page header. The PageId in the page header = (73:6619248).
Msg 8909, Level 16, State 1, Line 1
……………………
Object ID 1961110077, index ID 0, partition ID 72057594217627648, alloc unit ID 72057594256687104 (type In-row data): Page (1:36535484) could not be processed.  See other errors for details.
Msg 8928, Level 16, State 1, Line 1
Object ID 1961110077, index ID 0, partition ID 72057594217627648, alloc unit ID 72057594256687104 (type In-row data): Page (1:36535485) could not be processed.  See other errors for details.
Msg 8928, Level 16, State 1, Line 1
Object ID 1961110077, index ID 0, partition ID 72057594217627648, alloc unit ID 72057594256687104 (type In-row data): Page (1:36535486) could not be processed.  See other errors for details.
Msg 8928, Level 16, State 1, Line 1
Object ID 1961110077, index ID 0, partition ID 72057594217627648, alloc unit ID 72057594256687104 (type In-row data): Page (1:36535487) could not be processed.  See other errors for details.
CHECKDB found 0 allocation errors and 24 consistency errors in table 'CIOMessage' (object ID 1961110077).
CHECKDB found 0 allocation errors and 17955 consistency errors in database 'OLTP'.

Completion time: 2025-11-19T17:13:03.2762122+08:00
</pre>
<p>客户每天做全库备份,每4小时做事务日志备份,备份类似这样的情况<br />
<a href="https://www.xifenfei.com/wp-content/uploads/2025/12/sql0.png"><img src="https://www.xifenfei.com/wp-content/uploads/2025/12/sql0.png" alt="sql0" width="870" height="452" class="alignleft size-full wp-image-11824" /></a><br />
<hr />
客户尝试使用全备进行恢复,结果发现只有13日的全备是好的,可以还原出来数据库,其他备份还原直接报错,基于这样的情况,可以希望把数据恢复到11月19日.我接手这个故障之后,先尝试还原13日的备份<br />
<a href="https://www.xifenfei.com/wp-content/uploads/2025/12/sql6.png"><img src="https://www.xifenfei.com/wp-content/uploads/2025/12/sql6.png" alt="sql6" width="726" height="365" class="alignleft size-full wp-image-11825" /></a><br />
<hr />
然后尝试人工应用事务日志备份,类似命令</p>
<pre class="brush: bash; title: ; notranslate">
RESTORE LOG OLTP1121 FROM DISK = 'D:\share\OLTP_backup_2025_11_13_030001_7745248.trn' WITH NORECOVERY
RESTORE LOG OLTP1121 FROM DISK = 'D:\share\OLTP_backup_2025_11_13_060001_3581210.trn' WITH NORECOVERY
RESTORE LOG OLTP1121 FROM DISK = 'D:\share\OLTP_backup_2025_11_13_090001_2856408.trn' WITH NORECOVERY
RESTORE LOG OLTP1121 FROM DISK = 'D:\share\OLTP_backup_2025_11_13_120002_0713663.trn' WITH NORECOVERY
RESTORE LOG OLTP1121 FROM DISK = 'D:\share\OLTP_backup_2025_11_13_150001_7305524.trn' WITH NORECOVERY
RESTORE LOG OLTP1121 FROM DISK = 'D:\share\OLTP_backup_2025_11_13_180000_9123036.trn' WITH NORECOVERY
RESTORE LOG OLTP1121 FROM DISK = 'D:\share\OLTP_backup_2025_11_13_210001_3663138.trn' WITH NORECOVERY
RESTORE LOG OLTP1121 FROM DISK = 'D:\share\OLTP_backup_2025_11_14_000001_1605695.trn' WITH NORECOVERY
RESTORE LOG OLTP1121 FROM DISK = 'D:\share\OLTP_backup_2025_11_14_030001_7280782.trn' WITH NORECOVERY
………………
RESTORE LOG OLTP1121 FROM DISK = 'D:\share\OLTP_backup_2025_11_17_180001_1343952.trn' WITH NORECOVERY
</pre>
<p>结果在OLTP_backup_2025_11_17_180001_1343952文件位置报错</p>
<pre class="brush: bash; title: ; notranslate">
Processed 0 pages for database 'OLTP_1121', file 'OLTP' on file 1.
Processed 10388 pages for database 'OLTP1121', file 'OLTP_log' on file 1.
Msg 9004, Level 16, State 3, Line 1
An error occurred while processing the log for database 'OLTP_1121'.  If possible, restore from backup. 
If a backup is not available, it might be necessary to rebuild the log.
Msg 3013, Level 16, State 1, Line 1
RESTORE LOG is terminating abnormally.

Completion time: 2025-11-21T13:41:54.2352031+08:00
</pre>
<p>通过图形化界面进行事务日志恢复也报错<br />
<a href="https://www.xifenfei.com/wp-content/uploads/2025/12/sql7.png"><img src="https://www.xifenfei.com/wp-content/uploads/2025/12/sql7.png" alt="sql7" width="692" height="218" class="alignleft size-full wp-image-11826" /></a><br />
<hr />
基于这样的情况,数据库层面的正常恢复途径只能恢复到11月17日18时左右数据,因为后面的日志发生了损坏,无法继续正常恢复,对于这种情况,我们这边使用日志解析工具对剩余事务日志备份进行解析,生成.sql文件<br />
<a href="https://www.xifenfei.com/wp-content/uploads/2025/12/sql3.png"><img src="https://www.xifenfei.com/wp-content/uploads/2025/12/sql3.png" alt="sql3" width="1016" height="351" class="alignleft size-full wp-image-11827" /></a><br />
<a href="https://www.xifenfei.com/wp-content/uploads/2025/12/sql1.png"><img src="https://www.xifenfei.com/wp-content/uploads/2025/12/sql1.png" alt="sql1" width="956" height="642" class="alignleft size-full wp-image-11828" /></a><br />
<hr />
然后客户把解析出来的.sql文件依次在会到11月17日18时的库上面去执行,这样顺利吧客户整体数据库恢复到最新状态,完成本次恢复任务(注意后续可能一些类似序列值需要调整)</p>
<div id="crp_related"><ul><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2025/04/sql-tempdb-error.html" rel="bookmark" class="crp_title">可能是 tempdb 空间用尽或某个系统表不一致故障处理</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2025/12/sql-bak-0-lost-data.html" rel="bookmark" class="crp_title">模拟sql server故障备份完成恢复实现数据0丢失</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2025/11/mysql-drop-database-recovery.html" rel="bookmark" class="crp_title">mysql drop database 恢复思路</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2023/02/innodb-database-page-corruption-on-disk-or-a-failed-file-read-of-page.html" rel="bookmark" class="crp_title">InnoDB: Database page corruption on disk or a failed file read of page恢复</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2026/02/expdp-xml-ora-22924.html" rel="bookmark" class="crp_title">expdp导出xml列报ORA-22924故障处理</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2021/05/avaddon-db-recovery.html" rel="bookmark" class="crp_title">Avaddon勒索病毒数据库恢复</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2025/10/linux7-8-single-user.html" rel="bookmark" class="crp_title">redhat系列7/8进入单用户模式</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2025/06/format-disk-mysql-recovery.html" rel="bookmark" class="crp_title">文件系统格式化MySQL数据库恢复</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2025/10/grubx64-efi-not-found.html" rel="bookmark" class="crp_title">Failed to open \EFI\redhat\grubx64.efi &#8211; Not Found 故障处理</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2025/02/sql-server-recovering.html" rel="bookmark" class="crp_title">sql server数据库“正在恢复”故障处理</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2025/12/ufs-recovery-lvm.html" rel="bookmark" class="crp_title">linux异常磁盘lvm恢复操作演示</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2025/01/fio-disk-destruction-recovery.html" rel="bookmark" class="crp_title">fio测试io,导致磁盘文件系统损坏故障恢复</a></li></ul></div>]]></content:encoded>
			<wfw:commentRss>https://www.xifenfei.com/2025/12/sql-server-transaction-log-backup-recovery.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>CHECKDB 发现了 N 个分配错误和 M 个一致性错误</title>
		<link>https://www.xifenfei.com/2025/05/checkdb-error.html</link>
		<comments>https://www.xifenfei.com/2025/05/checkdb-error.html#comments</comments>
		<pubDate>Sat, 03 May 2025 11:49:05 +0000</pubDate>
		<dc:creator><![CDATA[惜分飞]]></dc:creator>
				<category><![CDATA[SQL Server恢复]]></category>
		<category><![CDATA[SGAM 或 IAM]]></category>
		<category><![CDATA[sql 2000恢复]]></category>
		<category><![CDATA[sql恢复]]></category>

		<guid isPermaLink="false">https://www.xifenfei.com/?p=11442</guid>
		<description><![CDATA[联系：手机/微信(+86 17813235971) QQ(107644445)  &#8230; <a href="https://www.xifenfei.com/2025/05/checkdb-error.html">继续阅读 <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<div id="xifenfeicopyright">
<p>联系：<a href="https://www.xifenfei.com/about_xifenfei" target="_blank">手机/微信(+86 17813235971)   QQ(107644445)</a><a target="_blank" href="http://wpa.qq.com/msgrd?v=3&#038;uin=107644445&#038;site=qq&#038;menu=yes"><img src="https://www.xifenfei.com/wp-content/themes/img/site_qq.jpg" alt="QQ咨询惜分飞" title="QQ咨询惜分飞"/></a></p>
<p>标题：<a href="https://www.xifenfei.com/2025/05/checkdb-error.html" target="_blank">CHECKDB 发现了 N 个分配错误和 M 个一致性错误</a></p>
<p>作者：<a href="https://www.xifenfei.com" target="_blank">惜分飞</a>©版权所有[未经本人同意,不得以任何形式转载,否则有进一步追究法律责任的权利.]</p>
</div>
<p>接到一个朋友的数据库故障请求,dbcc checkdb报以下错误</p>
<pre class="brush: bash; title: ; notranslate">
服务器: 消息 8905，级别 16，状态 1，行 1
扩展盘区 (1:5144)（属于数据库 ID 8）在 GAM 中标记为已分配，但没有 SGAM 或 IAM 分配过该盘区。
服务器: 消息 8929，级别 16，状态 1，行 1
对象 ID 2: 在文本 ID 800849920 中发现错误，该文本的所有者是由 RID = (1:143:7) id = 1218103380 and indid = 4 标识的数据记录。
服务器: 消息 8961，级别 16，状态 1，行 1
表错误: 对象 ID 2。text、ntext 或 image 节点（位于页 (1:3813)，槽 0，文本 ID 800849920）与该节点位于页 (1:489)，槽 4 处的引用不匹配。
'myhis' 的 DBCC 结果。
CHECKDB 发现了 1 个分配错误和 0 个一致性错误，这些错误并不与任何单个的对象相关联。
'sysobjects' 的 DBCC 结果。
对象 'sysobjects' 有 905 行，这些行位于 13 页中。
'sysindexes' 的 DBCC 结果。
对象 'sysindexes' 有 635 行，这些行位于 26 页中。
CHECKDB 发现了 0 个分配错误和 2 个一致性错误（在表 'sysindexes' 中，该表的对象 ID 为 2）。
'syscolumns' 的 DBCC 结果。
………………
对象 'yj_sqd_taoc' 有 0 行，这些行位于 0 页中。
'h_zdytj' 的 DBCC 结果。
对象 'h_zdytj' 有 0 行，这些行位于 0 页中。
CHECKDB 发现了 1 个分配错误和 4 个一致性错误（在数据库 'myhis' 中）。
DBCC 执行完毕。如果 DBCC 输出了错误信息，请与系统管理员联系。
</pre>
<p>主要为:<br />
1. 扩展盘区 (1:5144)（属于数据库 ID 8）在 GAM 中标记为已分配，但没有 SGAM 或 IAM 分配过该盘区。<br />
2. 表错误: 对象 ID 2。text、ntext 或 image 节点（位于页 (1:3813)，槽 0，文本 ID 800849920）与该节点位于页 (1:489)，槽 4 处的引用不匹配。<br />
3. CHECKDB 发现了 0 个分配错误和 2 个一致性错误（在表 &#8216;sysindexes&#8217; 中，该表的对象 ID 为 2）<br />
<br />
这个库是sql server 2000的版本,处理起来相对麻烦一些(由于该版本太老,很多工具软件对sql 2000版本支持不太好),后面通过sql恢复工具和sql控制台中的所有任务&#8211;>数据导入功能,对于个表异常表进行单独迁移完成本次任务<br />
<a href="https://www.xifenfei.com/wp-content/uploads/2025/05/QQ20250503-194327.png"><img src="https://www.xifenfei.com/wp-content/uploads/2025/05/QQ20250503-194327.png" alt="QQ20250503-194327" width="499" height="379" class="alignleft size-full wp-image-11443" /></a><br />
<hr />
再次使用dbcc进行检测,一切正常,客户业务也恢复正常<br />
<a href="https://www.xifenfei.com/wp-content/uploads/2025/05/QQ20250503-194523.png"><img src="https://www.xifenfei.com/wp-content/uploads/2025/05/QQ20250503-194523.png" alt="QQ20250503-194523" width="621" height="333" class="alignleft size-full wp-image-11444" /></a><br />
<hr />
<div id="crp_related"><ul><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2025/04/gam-sgam-pfs-error-recovery.html" rel="bookmark" class="crp_title">GAM、SGAM 或 PFS 页上存在页错误处理</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2025/03/sql-bak-err23-recovery.html" rel="bookmark" class="crp_title">sql数据库备份失败&#8212;失败: 23(数据错误(循环冗余检查)</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2025/04/sql-tempdb-error.html" rel="bookmark" class="crp_title">可能是 tempdb 空间用尽或某个系统表不一致故障处理</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2025/02/sql-server-recovering.html" rel="bookmark" class="crp_title">sql server数据库“正在恢复”故障处理</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2025/12/sql-bak-0-lost-data.html" rel="bookmark" class="crp_title">模拟sql server故障备份完成恢复实现数据0丢失</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2025/10/linux7-8-single-user.html" rel="bookmark" class="crp_title">redhat系列7/8进入单用户模式</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2025/10/grubx64-efi-not-found.html" rel="bookmark" class="crp_title">Failed to open \EFI\redhat\grubx64.efi &#8211; Not Found 故障处理</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2025/12/ufs-recovery-lvm.html" rel="bookmark" class="crp_title">linux异常磁盘lvm恢复操作演示</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2025/01/fio-disk-destruction-recovery.html" rel="bookmark" class="crp_title">fio测试io,导致磁盘文件系统损坏故障恢复</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2025/01/ar8mswin1256.html" rel="bookmark" class="crp_title">中文环境显示AR8MSWIN1256（阿拉伯语字符集）</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2025/12/sql-server-transaction-log-backup-recovery.html" rel="bookmark" class="crp_title">sql server 事务日志备份异常恢复案例</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2025/03/aix-disk-had-oracle-recovery.html" rel="bookmark" class="crp_title">aix磁盘损坏oracle数据库恢复</a></li></ul></div>]]></content:encoded>
			<wfw:commentRss>https://www.xifenfei.com/2025/05/checkdb-error.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>可能是 tempdb 空间用尽或某个系统表不一致故障处理</title>
		<link>https://www.xifenfei.com/2025/04/sql-tempdb-error.html</link>
		<comments>https://www.xifenfei.com/2025/04/sql-tempdb-error.html#comments</comments>
		<pubDate>Wed, 23 Apr 2025 13:01:15 +0000</pubDate>
		<dc:creator><![CDATA[惜分飞]]></dc:creator>
				<category><![CDATA[SQL Server恢复]]></category>
		<category><![CDATA[tempdb 空间用尽或某个系统表不一致]]></category>
		<category><![CDATA[错误: 7105]]></category>

		<guid isPermaLink="false">https://www.xifenfei.com/?p=11427</guid>
		<description><![CDATA[联系：手机/微信(+86 17813235971) QQ(107644445)  &#8230; <a href="https://www.xifenfei.com/2025/04/sql-tempdb-error.html">继续阅读 <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<div id="xifenfeicopyright">
<p>联系：<a href="https://www.xifenfei.com/about_xifenfei" target="_blank">手机/微信(+86 17813235971)   QQ(107644445)</a><a target="_blank" href="http://wpa.qq.com/msgrd?v=3&#038;uin=107644445&#038;site=qq&#038;menu=yes"><img src="https://www.xifenfei.com/wp-content/themes/img/site_qq.jpg" alt="QQ咨询惜分飞" title="QQ咨询惜分飞"/></a></p>
<p>标题：<a href="https://www.xifenfei.com/2025/04/sql-tempdb-error.html" target="_blank">可能是 tempdb 空间用尽或某个系统表不一致故障处理</a></p>
<p>作者：<a href="https://www.xifenfei.com" target="_blank">惜分飞</a>©版权所有[未经本人同意,不得以任何形式转载,否则有进一步追究法律责任的权利.]</p>
</div>
<p>有客户sql server数据库由于异常断电,导致数据库访问异常<br />
<a href="https://www.xifenfei.com/wp-content/uploads/2025/04/QQ20250422-132721.png"><img src="https://www.xifenfei.com/wp-content/uploads/2025/04/QQ20250422-132721.png" alt="QQ20250422-132721" width="734" height="432" class="alignleft size-full wp-image-11428" /></a><br />
<hr />
对其做dbcc检查发现报：检查已终止。收集事实数据时检测到错误。可能是 tempdb 空间用尽或某个系统表不一致。请检查前面的错误消息。错误<br />
<a href="https://www.xifenfei.com/wp-content/uploads/2025/04/QQ20250422-121636.png"><img src="https://www.xifenfei.com/wp-content/uploads/2025/04/QQ20250422-121636.png" alt="QQ20250422-121636" width="668" height="215" class="alignleft size-full wp-image-11429" /></a><br />
<hr />
查看sql server 日志,发现报错日志内容为:<br />
04/22/2025 10:50:26,spid58,未知,DBCC CHECKDB (SHINVA) WITH no_infomsgs executed by sa terminated abnormally due to error state 5. Elapsed time: 0 hours 0 minutes 1 seconds.<br />
04/22/2025 10:50:26,spid58,未知,The Database ID 7<c/> Page (1:147440)<c/> slot 0 for LOB data type node does not exist. This is usually caused by transactions that can read uncommitted data on a data page. Run DBCC CHECKTABLE.<br />
04/22/2025 10:50:26,spid58,未知,错误: 7105，严重性: 22，状态: 9。<br />
对于这种情况,尝试重建LDF,和REPAIR_ALLOW_DATA_LOSS方案都失败,最终确认通过逻辑迁移的方式完成恢复,然后再次尝试dbcc一切正常,完成本次恢复任务<br />
<a href="https://www.xifenfei.com/wp-content/uploads/2025/04/20250423210001.png"><img src="https://www.xifenfei.com/wp-content/uploads/2025/04/20250423210001.png" alt="20250423210001" width="1216" height="627" class="alignleft size-full wp-image-11430" /></a><br />
<hr />
<div id="crp_related"><ul><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2025/12/sql-bak-0-lost-data.html" rel="bookmark" class="crp_title">模拟sql server故障备份完成恢复实现数据0丢失</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2025/10/linux7-8-single-user.html" rel="bookmark" class="crp_title">redhat系列7/8进入单用户模式</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2025/10/grubx64-efi-not-found.html" rel="bookmark" class="crp_title">Failed to open \EFI\redhat\grubx64.efi &#8211; Not Found 故障处理</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2025/12/ufs-recovery-lvm.html" rel="bookmark" class="crp_title">linux异常磁盘lvm恢复操作演示</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2025/01/fio-disk-destruction-recovery.html" rel="bookmark" class="crp_title">fio测试io,导致磁盘文件系统损坏故障恢复</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2025/02/sql-server-recovering.html" rel="bookmark" class="crp_title">sql server数据库“正在恢复”故障处理</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2025/01/ar8mswin1256.html" rel="bookmark" class="crp_title">中文环境显示AR8MSWIN1256（阿拉伯语字符集）</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2025/09/delete-df-some-overwrit-recovery.html" rel="bookmark" class="crp_title">删除数据库文件并部分覆盖情况下Oracle恢复</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2025/11/mysql-drop-database-recovery.html" rel="bookmark" class="crp_title">mysql drop database 恢复思路</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2025/04/gam-sgam-pfs-error-recovery.html" rel="bookmark" class="crp_title">GAM、SGAM 或 PFS 页上存在页错误处理</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2025/01/first-oracle-21c-recovery-ask.html" rel="bookmark" class="crp_title">第一例Oracle 21c恢复咨询</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2025/03/aix-disk-had-oracle-recovery.html" rel="bookmark" class="crp_title">aix磁盘损坏oracle数据库恢复</a></li></ul></div>]]></content:encoded>
			<wfw:commentRss>https://www.xifenfei.com/2025/04/sql-tempdb-error.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>GAM、SGAM 或 PFS 页上存在页错误处理</title>
		<link>https://www.xifenfei.com/2025/04/gam-sgam-pfs-error-recovery.html</link>
		<comments>https://www.xifenfei.com/2025/04/gam-sgam-pfs-error-recovery.html#comments</comments>
		<pubDate>Tue, 01 Apr 2025 14:16:24 +0000</pubDate>
		<dc:creator><![CDATA[惜分飞]]></dc:creator>
				<category><![CDATA[SQL Server恢复]]></category>
		<category><![CDATA[GAM]]></category>
		<category><![CDATA[SGAM 或 PFS 页上存在页错误]]></category>

		<guid isPermaLink="false">https://www.xifenfei.com/?p=11389</guid>
		<description><![CDATA[联系：手机/微信(+86 17813235971) QQ(107644445)  &#8230; <a href="https://www.xifenfei.com/2025/04/gam-sgam-pfs-error-recovery.html">继续阅读 <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<div id="xifenfeicopyright">
<p>联系：<a href="https://www.xifenfei.com/about_xifenfei" target="_blank">手机/微信(+86 17813235971)   QQ(107644445)</a><a target="_blank" href="http://wpa.qq.com/msgrd?v=3&#038;uin=107644445&#038;site=qq&#038;menu=yes"><img src="https://www.xifenfei.com/wp-content/themes/img/site_qq.jpg" alt="QQ咨询惜分飞" title="QQ咨询惜分飞"/></a></p>
<p>标题：<a href="https://www.xifenfei.com/2025/04/gam-sgam-pfs-error-recovery.html" target="_blank">GAM、SGAM 或 PFS 页上存在页错误处理</a></p>
<p>作者：<a href="https://www.xifenfei.com" target="_blank">惜分飞</a>©版权所有[未经本人同意,不得以任何形式转载,否则有进一步追究法律责任的权利.]</p>
</div>
<p>有客户sql server数据库由于硬件故障,导致dbcc的时候报类似GAM、SGAM 或 PFS 页上存在页错误</p>
<pre class="brush: bash; title: ; notranslate">
kzj2025的 DBCC 结果。
Service Broker 消息 9675，状态 1: 已分析的消息类型: 14。
Service Broker 消息 9676，状态 1: 已分析的服务约定: 6。
Service Broker 消息 9667，状态 1: 已分析的服务: 3。
Service Broker 消息 9668，状态 1: 已分析的服务队列: 3。
Service Broker 消息 9669，状态 1: 已分析的会话端点: 0。
Service Broker 消息 9674，状态 1: 已分析的会话组: 0。
Service Broker 消息 9670，状态 1: 已分析的远程服务绑定: 0。
Service Broker 消息 9605，状态 1: 已分析的会话优先级: 0。
消息 8939，级别 16，状态 98，第 1 行
表错误: 对象 ID 0，索引 ID -1，分区 ID 0，分配单元 ID -2958221917649371136 
(类型为 Unknown)，页 (12337:808857908)。测试(IS_OFF (BUF_IOERR, pBUF-&gt;bstat))失败。值为 12716041 和 -10。
消息 8998，级别 16，状态 2，第 1 行
GAM、SGAM 或 PFS 页上存在页错误，无法对数据库 ID 6 中从 (1:186024) 到 (1:194111) 
 的页继续进行分配完整性检查。原因请参阅其他错误消息。
CHECKDB 发现有 2 个分配错误和 0 个一致性错误与任何单个的对象都没有关联。
sys.sysrscols的 DBCC 结果。
对象 'sys.sysrscols' 的 171 页中有 16248 行。
sys.sysrowsets的 DBCC 结果。
……………………
对象 'gspz_pmaintainidx' 的 12 页中有 1658 行。
DiseasesMedicationsIndex_temp的 DBCC 结果。
对象 'DiseasesMedicationsIndex_temp' 的 0 页中有 0 行。
GSP_BackBill的 DBCC 结果。
对象 'GSP_BackBill' 的 0 页中有 0 行。
Gsp_L_KwGradeIndex的 DBCC 结果。
对象 'Gsp_L_KwGradeIndex' 的 0 页中有 0 行。
Web_T_Message的 DBCC 结果。
对象 'Web_T_Message' 的 0 页中有 0 行。
CHECKDB 在数据库 'kzj2025' 中发现 2 个分配错误和 0 个一致性错误。
DBCC 执行完毕。如果 DBCC 输出了错误信息，请与系统管理员联系。

完成时间: 2025-03-29T19:53:21.6977003+08:00
</pre>
<p><a href="https://www.xifenfei.com/wp-content/uploads/2025/04/QQ20250329-225441.png"><img src="https://www.xifenfei.com/wp-content/uploads/2025/04/QQ20250329-225441.png" alt="QQ20250329-225441" width="1610" height="564" class="alignleft size-full wp-image-11393" /></a><br />
<hr />
由于GAM、SGAM 或 PFS是和sql数据库文件的空间分配有关系,对于这种情况,一般无法直接修复,需要对库进行重构的方法进行修复,我们处理之后,dbcc检查一切正常<br />
<a href="https://www.xifenfei.com/wp-content/uploads/2025/04/dbcc-ok.png"><img src="https://www.xifenfei.com/wp-content/uploads/2025/04/dbcc-ok.png" alt="dbcc-ok" width="749" height="306" class="alignleft size-full wp-image-11390" /></a><br />
<hr />
<div id="crp_related"><ul><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2025/05/checkdb-error.html" rel="bookmark" class="crp_title">CHECKDB 发现了 N 个分配错误和 M 个一致性错误</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2025/04/sql-tempdb-error.html" rel="bookmark" class="crp_title">可能是 tempdb 空间用尽或某个系统表不一致故障处理</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2025/03/sql-bak-err23-recovery.html" rel="bookmark" class="crp_title">sql数据库备份失败&#8212;失败: 23(数据错误(循环冗余检查)</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2025/12/sql-bak-0-lost-data.html" rel="bookmark" class="crp_title">模拟sql server故障备份完成恢复实现数据0丢失</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2025/02/sql-server-recovering.html" rel="bookmark" class="crp_title">sql server数据库“正在恢复”故障处理</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2025/10/linux7-8-single-user.html" rel="bookmark" class="crp_title">redhat系列7/8进入单用户模式</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2025/10/grubx64-efi-not-found.html" rel="bookmark" class="crp_title">Failed to open \EFI\redhat\grubx64.efi &#8211; Not Found 故障处理</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2025/12/ufs-recovery-lvm.html" rel="bookmark" class="crp_title">linux异常磁盘lvm恢复操作演示</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2025/01/fio-disk-destruction-recovery.html" rel="bookmark" class="crp_title">fio测试io,导致磁盘文件系统损坏故障恢复</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2025/01/ar8mswin1256.html" rel="bookmark" class="crp_title">中文环境显示AR8MSWIN1256（阿拉伯语字符集）</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2025/09/delete-df-some-overwrit-recovery.html" rel="bookmark" class="crp_title">删除数据库文件并部分覆盖情况下Oracle恢复</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2025/12/sql-server-transaction-log-backup-recovery.html" rel="bookmark" class="crp_title">sql server 事务日志备份异常恢复案例</a></li></ul></div>]]></content:encoded>
			<wfw:commentRss>https://www.xifenfei.com/2025/04/gam-sgam-pfs-error-recovery.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>sql数据库备份失败&#8212;失败: 23(数据错误(循环冗余检查)</title>
		<link>https://www.xifenfei.com/2025/03/sql-bak-err23-recovery.html</link>
		<comments>https://www.xifenfei.com/2025/03/sql-bak-err23-recovery.html#comments</comments>
		<pubDate>Fri, 21 Mar 2025 12:35:46 +0000</pubDate>
		<dc:creator><![CDATA[惜分飞]]></dc:creator>
				<category><![CDATA[SQL Server恢复]]></category>
		<category><![CDATA[23(数据错误(循环冗余检查)]]></category>
		<category><![CDATA[sql备份失败]]></category>
		<category><![CDATA[磁盘坏道]]></category>

		<guid isPermaLink="false">https://www.xifenfei.com/?p=11365</guid>
		<description><![CDATA[联系：手机/微信(+86 17813235971) QQ(107644445)  &#8230; <a href="https://www.xifenfei.com/2025/03/sql-bak-err23-recovery.html">继续阅读 <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<div id="xifenfeicopyright">
<p>联系：<a href="https://www.xifenfei.com/about_xifenfei" target="_blank">手机/微信(+86 17813235971)   QQ(107644445)</a><a target="_blank" href="http://wpa.qq.com/msgrd?v=3&#038;uin=107644445&#038;site=qq&#038;menu=yes"><img src="https://www.xifenfei.com/wp-content/themes/img/site_qq.jpg" alt="QQ咨询惜分飞" title="QQ咨询惜分飞"/></a></p>
<p>标题：<a href="https://www.xifenfei.com/2025/03/sql-bak-err23-recovery.html" target="_blank">sql数据库备份失败&#8212;失败: 23(数据错误(循环冗余检查)</a></p>
<p>作者：<a href="https://www.xifenfei.com" target="_blank">惜分飞</a>©版权所有[未经本人同意,不得以任何形式转载,否则有进一步追究法律责任的权利.]</p>
</div>
<p>有客户sql server数据库备份失败,提示如下<br />
<a href="https://www.xifenfei.com/wp-content/uploads/2025/03/bk-fail.png"><img src="https://www.xifenfei.com/wp-content/uploads/2025/03/bk-fail.png" alt="bk-fail" width="849" height="465" class="alignleft size-full wp-image-11366" /></a><br />
<hr />
从这个报错看,比较明显是由于底层(文件系统损坏或者扇区访问异常导致),进一步查看系统事件确认是由于扇区异常导致(设备\Device\HarddiskO\DR0有一个不正确的区块)<br />
<a href="https://www.xifenfei.com/wp-content/uploads/2025/03/disk-error.png"><img src="https://www.xifenfei.com/wp-content/uploads/2025/03/disk-error.png" alt="disk-error" width="755" height="749" class="alignleft size-full wp-image-11367" /></a><br />
<hr />
对于这种情况,当访问到文件所在的损坏扇区位置,就会报io错误,终止访问,文件也无法直接拷贝.通过专业工具对文件进行拷贝恢复确认一些扇区损坏而且被跳过(这部分数据肯定丢失)<br />
<a href="https://www.xifenfei.com/wp-content/uploads/2025/03/sq.png"><img src="https://www.xifenfei.com/wp-content/uploads/2025/03/sq.png" alt="sq" width="912" height="200" class="alignleft size-full wp-image-11368" /></a><br />
<hr />
由于文件本身跳过了损坏的扇区,需要确认损坏的部分影响哪些对象和哪些类型的损坏,通过DBCC检测出来异常信息如下</p>
<pre class="brush: bash; title: ; notranslate">
消息 8976，级别 16，状态 1，第 1 行
表错误: 对象 ID 1478296326，索引 ID 70，分区 ID 72057594244038656，分配单元 ID 72057594277527552 (类型为 In-row data)。在扫描过程中未发现页 (1:1577857)，但该页的父级 (1:87825) 和上一页 (1:1576364) 都引用了它。请检查以前的错误消息。
消息 8978，级别 16，状态 1，第 1 行
表错误: 对象 ID 1478296326，索引 ID 70，分区 ID 72057594244038656，分配单元 ID 72057594277527552 (类型为 In-row data)。页 (1:1577859) 缺少上一页 (1:1577857) 对它的引用。可能是链链接有问题。
消息 8939，级别 16，状态 98，第 1 行
表错误: 对象 ID 1478296326，索引 ID 70，分区 ID 72057594244038656，分配单元 ID 72057594277527552 (类型为 In-row data)，页 (1:1577857)。测试(IS_OFF (BUF_IOERR, pBUF-&gt;bstat))失败。值为 133129 和 -4。
消息 8928，级别 16，状态 1，第 1 行
对象 ID 1478296326，索引 ID 70，分区 ID 72057594244038656，分配单元 ID 72057594277527552 (类型为 In-row data): 无法处理页 (1:1577857)。有关详细信息，请参阅其他错误消息。


消息 8939，级别 16，状态 98，第 1 行
表错误: 对象 ID 2005582183，索引 ID 66，分区 ID 72057594242859008，分配单元 ID 72057594276347904 (类型为 In-row data)，页 (1:385339)。测试(IS_OFF (BUF_IOERR, pBUF-&gt;bstat))失败。值为 133129 和 -4。
消息 8928，级别 16，状态 1，第 1 行
对象 ID 2005582183，索引 ID 66，分区 ID 72057594242859008，分配单元 ID 72057594276347904 (类型为 In-row data): 无法处理页 (1:385339)。有关详细信息，请参阅其他错误消息。
消息 8976，级别 16，状态 1，第 1 行
表错误: 对象 ID 2005582183，索引 ID 66，分区 ID 72057594242859008，分配单元 ID 72057594276347904 (类型为 In-row data)。在扫描过程中未发现页 (1:385339)，但该页的父级 (1:127857) 和上一页 (1:385338) 都引用了它。请检查以前的错误消息。
消息 8978，级别 16，状态 1，第 1 行
表错误: 对象 ID 2005582183，索引 ID 66，分区 ID 72057594242859008，分配单元 ID 72057594276347904 (类型为 In-row data)。页 (1:1682744) 缺少上一页 (1:385339) 对它的引用。可能是链链接有问题。
</pre>
<p>然后通过DBCC进行修复,修复成功提示如下</p>
<pre class="brush: bash; title: ; notranslate">
修复: 已为数据库 'myhis' 中的对象 'dbo.h_xxxxx, idx_xxxxx_ckdmx_id' 成功地重新生成了 Nonclustered 索引。
修复: 页 (1:1577857) 已从对象 ID 1478296326，索引 ID 70，分区 ID 72057594244038656，分配单元 ID 72057594277527552 (类型为 In-row data)释放。
消息 8945，级别 16，状态 1，第 6 行
表错误: 将重新生成对象 ID 1478296326，索引 ID 70。
        该错误已修复。
消息 8928，级别 16，状态 1，第 6 行
对象 ID 1478296326，索引 ID 70，分区 ID 72057594244038656，分配单元 ID 72057594277527552 (类型为 In-row data): 无法处理页 (1:1577857)。有关详细信息，请参阅其他错误消息。
        该错误已修复。
消息 8939，级别 16，状态 98，第 6 行
表错误: 对象 ID 1478296326，索引 ID 70，分区 ID 72057594244038656，分配单元 ID 72057594277527552 (类型为 In-row data)，页 (1:1577857)。测试(IS_OFF (BUF_IOERR, pBUF-&gt;bstat))失败。值为 2057 和 -4。
        该错误已修复。
消息 8976，级别 16，状态 1，第 6 行
表错误: 对象 ID 1478296326，索引 ID 70，分区 ID 72057594244038656，分配单元 ID 72057594277527552 (类型为 In-row data)。在扫描过程中未发现页 (1:1577857)，但该页的父级 (1:87825) 和上一页 (1:1576364) 都引用了它。请检查以前的错误消息。
        该错误已修复。
消息 8978，级别 16，状态 1，第 6 行
表错误: 对象 ID 1478296326，索引 ID 70，分区 ID 72057594244038656，分配单元 ID 72057594277527552 (类型为 In-row data)。页 (1:1577859) 缺少上一页 (1:1577857) 对它的引用。可能是链链接有问题。
        该错误已修复。
对象 'h_zysfdmx' 的 365541 页中有 2705291 行。
CHECKDB 在表 'h_xxxxx' (对象 ID 1478296326)中发现 0 个分配错误和 4 个一致性错误。
CHECKDB 在表 'h_xxxxx' (对象 ID 1478296326)中修复了 0 个分配错误和 4 个一致性错误。

修复: 已为数据库 'myhis' 中的对象 'dbo.h_xxx, idx_xxx_ckdmx_id' 成功地重新生成了 Nonclustered 索引。
修复: 页 (1:385339) 已从对象 ID 2005582183，索引 ID 66，分区 ID 72057594242859008，分配单元 ID 72057594276347904 (类型为 In-row data)释放。
消息 8945，级别 16，状态 1，第 6 行
表错误: 将重新生成对象 ID 2005582183，索引 ID 66。
        该错误已修复。
消息 8928，级别 16，状态 1，第 6 行
对象 ID 2005582183，索引 ID 66，分区 ID 72057594242859008，分配单元 ID 72057594276347904 (类型为 In-row data): 无法处理页 (1:385339)。有关详细信息，请参阅其他错误消息。
        该错误已修复。
消息 8939，级别 16，状态 98，第 6 行
表错误: 对象 ID 2005582183，索引 ID 66，分区 ID 72057594242859008，分配单元 ID 72057594276347904 (类型为 In-row data)，页 (1:385339)。测试(IS_OFF (BUF_IOERR, pBUF-&gt;bstat))失败。值为 2057 和 -4。
        该错误已修复。
消息 8976，级别 16，状态 1，第 6 行
表错误: 对象 ID 2005582183，索引 ID 66，分区 ID 72057594242859008，分配单元 ID 72057594276347904 (类型为 In-row data)。在扫描过程中未发现页 (1:385339)，但该页的父级 (1:127857) 和上一页 (1:385338) 都引用了它。请检查以前的错误消息。
        该错误已修复。
消息 8978，级别 16，状态 1，第 6 行
表错误: 对象 ID 2005582183，索引 ID 66，分区 ID 72057594242859008，分配单元 ID 72057594276347904 (类型为 In-row data)。页 (1:1682744) 缺少上一页 (1:385339) 对它的引用。可能是链链接有问题。
        该错误已修复。
对象 'h_sfdmx' 的 1226 页中有 10928 行。
CHECKDB 在表 'h_xxx' (对象 ID 2005582183)中发现 0 个分配错误和 4 个一致性错误。
CHECKDB 在表 'h_xxx' (对象 ID 2005582183)中修复了 0 个分配错误和 4 个一致性错误。
</pre>
<p><a href="https://www.xifenfei.com/wp-content/uploads/2025/03/QQ20250320-220759.png"><img src="https://www.xifenfei.com/wp-content/uploads/2025/03/QQ20250320-220759.png" alt="QQ20250320-220759" width="670" height="335" class="alignleft size-full wp-image-11370" /></a><br />
<hr />
再次使用DBCC检查数据库,一切正常,没有其他报错.然后在恢复过程中ldf文件也有大量扇区异常,对ldf文件进行截断处理</p>
<pre class="brush: sql; title: ; notranslate">
ALTER DATABASE MYHIS SET RECOVERY SIMPLE;
DBCC SHRINKFILE (MYHIS_log, 0);
ALTER DATABASE MYHIS SET RECOVERY FULL;
</pre>
<div id="crp_related"><ul><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2025/04/gam-sgam-pfs-error-recovery.html" rel="bookmark" class="crp_title">GAM、SGAM 或 PFS 页上存在页错误处理</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2025/05/checkdb-error.html" rel="bookmark" class="crp_title">CHECKDB 发现了 N 个分配错误和 M 个一致性错误</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2025/04/sql-tempdb-error.html" rel="bookmark" class="crp_title">可能是 tempdb 空间用尽或某个系统表不一致故障处理</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2025/12/sql-bak-0-lost-data.html" rel="bookmark" class="crp_title">模拟sql server故障备份完成恢复实现数据0丢失</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2025/02/sql-server-recovering.html" rel="bookmark" class="crp_title">sql server数据库“正在恢复”故障处理</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2025/10/linux7-8-single-user.html" rel="bookmark" class="crp_title">redhat系列7/8进入单用户模式</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2025/10/grubx64-efi-not-found.html" rel="bookmark" class="crp_title">Failed to open \EFI\redhat\grubx64.efi &#8211; Not Found 故障处理</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2025/01/ar8mswin1256.html" rel="bookmark" class="crp_title">中文环境显示AR8MSWIN1256（阿拉伯语字符集）</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2025/12/ufs-recovery-lvm.html" rel="bookmark" class="crp_title">linux异常磁盘lvm恢复操作演示</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2025/01/fio-disk-destruction-recovery.html" rel="bookmark" class="crp_title">fio测试io,导致磁盘文件系统损坏故障恢复</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2025/09/delete-df-some-overwrit-recovery.html" rel="bookmark" class="crp_title">删除数据库文件并部分覆盖情况下Oracle恢复</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2025/08/pg_wal_filename-logseq-mismatch.html" rel="bookmark" class="crp_title">pg_wal中文件的名称中的logseq和实际文件中的logseq不匹配</a></li></ul></div>]]></content:encoded>
			<wfw:commentRss>https://www.xifenfei.com/2025/03/sql-bak-err23-recovery.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>sql server数据库“正在恢复”故障处理</title>
		<link>https://www.xifenfei.com/2025/02/sql-server-recovering.html</link>
		<comments>https://www.xifenfei.com/2025/02/sql-server-recovering.html#comments</comments>
		<pubDate>Tue, 11 Feb 2025 03:59:16 +0000</pubDate>
		<dc:creator><![CDATA[惜分飞]]></dc:creator>
				<category><![CDATA[SQL Server恢复]]></category>
		<category><![CDATA[sql 正在恢复 处理]]></category>
		<category><![CDATA[sql恢复]]></category>
		<category><![CDATA[sql故障处理]]></category>

		<guid isPermaLink="false">https://www.xifenfei.com/?p=11220</guid>
		<description><![CDATA[联系：手机/微信(+86 17813235971) QQ(107644445)  &#8230; <a href="https://www.xifenfei.com/2025/02/sql-server-recovering.html">继续阅读 <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<div id="xifenfeicopyright">
<p>联系：<a href="https://www.xifenfei.com/about_xifenfei" target="_blank">手机/微信(+86 17813235971)   QQ(107644445)</a><a target="_blank" href="http://wpa.qq.com/msgrd?v=3&#038;uin=107644445&#038;site=qq&#038;menu=yes"><img src="https://www.xifenfei.com/wp-content/themes/img/site_qq.jpg" alt="QQ咨询惜分飞" title="QQ咨询惜分飞"/></a></p>
<p>标题：<a href="https://www.xifenfei.com/2025/02/sql-server-recovering.html" target="_blank">sql server数据库“正在恢复”故障处理</a></p>
<p>作者：<a href="https://www.xifenfei.com" target="_blank">惜分飞</a>©版权所有[未经本人同意,不得以任何形式转载,否则有进一步追究法律责任的权利.]</p>
</div>
<p>客户的sql server数据库在未知情况下,突然不可用,然后查看发现数据库处于“正在恢复”状态，无法使用<br />
<img src="https://www.xifenfei.com/wp-content/uploads/2025/02/zzhf.png" alt="zzhf" width="648" height="412" class="alignleft size-full wp-image-11221" /><br />
<hr />
查看日志发现“错误：10982，严重性：16，状态：1”<br />
<img src="https://www.xifenfei.com/wp-content/uploads/2025/02/rz.png" alt="rz" width="1332" height="562" class="alignleft size-full wp-image-11222" /><br />
<hr />,<br />
查看数据库文件情况<br />
<img src="https://www.xifenfei.com/wp-content/uploads/2025/02/QQ20250210-201158.png" alt="QQ20250210-201158" width="1065" height="81" class="alignleft size-full wp-image-11223" /><br />
<hr />
通过分析确认mdf文件本身完整,没有异常,强制挂载mdf文件如下错误<br />
<img src="https://www.xifenfei.com/wp-content/uploads/2025/02/20250210182925.jpg" alt="20250210182925" width="1161" height="322" class="alignleft size-full wp-image-11224" /><br />
<hr />
通过一些技巧进行规避,数据库挂载成功,并且checkdb检查正常,没有任何错误,至此完成该故障恢复<br />
<img src="https://www.xifenfei.com/wp-content/uploads/2025/02/checkdb.png" alt="checkdb" width="1272" height="981" class="alignleft size-full wp-image-11228" /><br />
<hr />
<div id="crp_related"><ul><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2025/12/sql-bak-0-lost-data.html" rel="bookmark" class="crp_title">模拟sql server故障备份完成恢复实现数据0丢失</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2025/12/ufs-recovery-lvm.html" rel="bookmark" class="crp_title">linux异常磁盘lvm恢复操作演示</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2025/10/linux7-8-single-user.html" rel="bookmark" class="crp_title">redhat系列7/8进入单用户模式</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2025/01/fio-disk-destruction-recovery.html" rel="bookmark" class="crp_title">fio测试io,导致磁盘文件系统损坏故障恢复</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2025/01/ar8mswin1256.html" rel="bookmark" class="crp_title">中文环境显示AR8MSWIN1256（阿拉伯语字符集）</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2025/10/grubx64-efi-not-found.html" rel="bookmark" class="crp_title">Failed to open \EFI\redhat\grubx64.efi &#8211; Not Found 故障处理</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2025/03/aix-disk-had-oracle-recovery.html" rel="bookmark" class="crp_title">aix磁盘损坏oracle数据库恢复</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2025/04/sql-tempdb-error.html" rel="bookmark" class="crp_title">可能是 tempdb 空间用尽或某个系统表不一致故障处理</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2025/09/delete-df-some-overwrit-recovery.html" rel="bookmark" class="crp_title">删除数据库文件并部分覆盖情况下Oracle恢复</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2025/01/first-oracle-21c-recovery-ask.html" rel="bookmark" class="crp_title">第一例Oracle 21c恢复咨询</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2016/01/vmware-vsphere6-0-%e5%88%9d%e8%af%95.html" rel="bookmark" class="crp_title">VMware vSphere6.0 初试</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2025/11/mysql-drop-database-recovery.html" rel="bookmark" class="crp_title">mysql drop database 恢复思路</a></li></ul></div>]]></content:encoded>
			<wfw:commentRss>https://www.xifenfei.com/2025/02/sql-server-recovering.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>数据库附加失败 错误5172</title>
		<link>https://www.xifenfei.com/2022/11/sql-error-5172.html</link>
		<comments>https://www.xifenfei.com/2022/11/sql-error-5172.html#comments</comments>
		<pubDate>Sun, 27 Nov 2022 05:27:49 +0000</pubDate>
		<dc:creator><![CDATA[惜分飞]]></dc:creator>
				<category><![CDATA[SQL Server恢复]]></category>
		<category><![CDATA[sql 附加失败]]></category>
		<category><![CDATA[错误 5172]]></category>

		<guid isPermaLink="false">https://www.xifenfei.com/?p=10069</guid>
		<description><![CDATA[联系：手机/微信(+86 17813235971) QQ(107644445)  &#8230; <a href="https://www.xifenfei.com/2022/11/sql-error-5172.html">继续阅读 <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<div id="xifenfeicopyright">
<p>联系：<a href="https://www.xifenfei.com/about_xifenfei" target="_blank">手机/微信(+86 17813235971)   QQ(107644445)</a><a target="_blank" href="http://wpa.qq.com/msgrd?v=3&#038;uin=107644445&#038;site=qq&#038;menu=yes"><img src="https://www.xifenfei.com/wp-content/themes/img/site_qq.jpg" alt="QQ咨询惜分飞" title="QQ咨询惜分飞"/></a></p>
<p>标题：<a href="https://www.xifenfei.com/2022/11/sql-error-5172.html" target="_blank">数据库附加失败 错误5172</a></p>
<p>作者：<a href="https://www.xifenfei.com" target="_blank">惜分飞</a>©版权所有[未经本人同意,不得以任何形式转载,否则有进一步追究法律责任的权利.]</p>
</div>
<p>SQL server 数据库附加附失败  错误 5172<br />
<a href="https://www.xifenfei.com/wp-content/uploads/2022/11/sql-attach-err.jpg"><img src="https://www.xifenfei.com/wp-content/uploads/2022/11/sql-attach-err.jpg" alt="sql-attach-err" width="1661" height="628" class="alignnone size-full wp-image-10070" /></a><br />
<hr />
通过分析是由于ldf文件损坏（具体原因是客户被中勒索病毒,部分文件解密没有彻底成功）<br />
<a href="https://www.xifenfei.com/wp-content/uploads/2022/11/ldf-error.jpg"><img src="https://www.xifenfei.com/wp-content/uploads/2022/11/ldf-error.jpg" alt="ldf-error" width="1224" height="497" class="alignnone size-full wp-image-10071" /></a><br />
<hr />
通过人工特殊处理,附加数据库成功,数据库checkdb检测正常，数据查询正常<br />
<a href="https://www.xifenfei.com/wp-content/uploads/2022/11/20221126194946.jpg"><img src="https://www.xifenfei.com/wp-content/uploads/2022/11/20221126194946.jpg" alt="20221126194946" width="511" height="609" class="alignnone size-full wp-image-10072" /></a><br />
<a href="https://www.xifenfei.com/wp-content/uploads/2022/11/20221127125234.jpg"><img src="https://www.xifenfei.com/wp-content/uploads/2022/11/20221127125234.jpg" alt="20221127125234" width="1189" height="756" class="alignnone size-full wp-image-10073" /></a><br />
<hr />
如果有sql 数据库问题无法自行解决,需要专业恢复技术支持，请联系我们:<a href="https://www.xifenfei.com/sql-server-recovery" title="专业Sql Server数据库恢复服务" rel="noopener" target="_blank">专业Sql Server数据库恢复服务</a><br />
<strong><font color="red" size=4>电话/微信:17813235971 &nbsp;&nbsp;   Q Q:107644445<a target="_blank" href="https://wpa.qq.com/msgrd?v=3&amp;uin=107644445&amp;site=qq&amp;menu=yes"><img id="xffqqimg" src="//www.xifenfei.com/wp-content/themes/img/site_qq.jpg" alt="QQ咨询惜分飞" title="QQ咨询惜分飞"></a>  &nbsp;&nbsp;  E-Mail:dba@xifenfei.com</font></strong></p>
<div id="crp_related"><ul><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2022/02/decrypt20firemail-cc-eking.html" rel="bookmark" class="crp_title">.[decrypt20@firemail.cc].eking 数据库勒索恢复</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2022/04/eking-oracle-recovery.html" rel="bookmark" class="crp_title">[back2023@proxy.tg].eking勒索数据库恢复</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2020/11/sql-drop-database-recovery.html" rel="bookmark" class="crp_title">sql server 删除数据库恢复</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2022/10/mkp-elbie-recovery.html" rel="bookmark" class="crp_title">.mkp和.Elbie勒索加密数据库可恢复</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2022/10/oracle-drop-tablespace-ultimate-recovery.html" rel="bookmark" class="crp_title">oracle drop tablespace 恢复最后一招</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2022/07/ora-702_recovery-tool.html" rel="bookmark" class="crp_title">ORA-00702一键恢复工具</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2026/03/wman-mysql-recovery.html" rel="bookmark" class="crp_title">.wman扩展名勒索mysql数据库恢复</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2021/10/makop-recovery.html" rel="bookmark" class="crp_title">.makop加密数据库恢复</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2021/03/eking-db-recovery.html" rel="bookmark" class="crp_title">.eking扩展名数据库恢复</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2021/02/globeimposter-alpha666qqz-recovery.html" rel="bookmark" class="crp_title">.Globeimposter-Alpha666qqz加密恢复</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2021/11/makop-database-recovery.html" rel="bookmark" class="crp_title">.makop加密数据库恢复</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2021/11/eking-recovery.html" rel="bookmark" class="crp_title">.eking加密数据库恢复</a></li></ul></div>]]></content:encoded>
			<wfw:commentRss>https://www.xifenfei.com/2022/11/sql-error-5172.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>sql server 删除数据库恢复</title>
		<link>https://www.xifenfei.com/2020/11/sql-drop-database-recovery.html</link>
		<comments>https://www.xifenfei.com/2020/11/sql-drop-database-recovery.html#comments</comments>
		<pubDate>Sat, 21 Nov 2020 14:50:30 +0000</pubDate>
		<dc:creator><![CDATA[惜分飞]]></dc:creator>
				<category><![CDATA[SQL Server恢复]]></category>
		<category><![CDATA[sql删除数据库恢复]]></category>
		<category><![CDATA[sql数据库恢复]]></category>
		<category><![CDATA[sql碎片]]></category>
		<category><![CDATA[sql碎片恢复]]></category>
		<category><![CDATA[sql碎片重组]]></category>

		<guid isPermaLink="false">https://www.xifenfei.com/?p=8920</guid>
		<description><![CDATA[联系：手机/微信(+86 17813235971) QQ(107644445)  &#8230; <a href="https://www.xifenfei.com/2020/11/sql-drop-database-recovery.html">继续阅读 <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<div id="xifenfeicopyright">
<p>联系：<a href="https://www.xifenfei.com/about_xifenfei" target="_blank">手机/微信(+86 17813235971)   QQ(107644445)</a><a target="_blank" href="http://wpa.qq.com/msgrd?v=3&#038;uin=107644445&#038;site=qq&#038;menu=yes"><img src="https://www.xifenfei.com/wp-content/themes/img/site_qq.jpg" alt="QQ咨询惜分飞" title="QQ咨询惜分飞"/></a></p>
<p>标题：<a href="https://www.xifenfei.com/2020/11/sql-drop-database-recovery.html" target="_blank">sql server 删除数据库恢复</a></p>
<p>作者：<a href="https://www.xifenfei.com" target="_blank">惜分飞</a>©版权所有[未经本人同意,不得以任何形式转载,否则有进一步追究法律责任的权利.]</p>
</div>
<p>有客户通过sql server控制台,直接把一个生产库给删除了.删除之后客户没有做任何操作,联系到我们,通过工具反删除恢复,未找到正确文件(根据经验有时候就算恢复出来文件也大量坏块).只能采用底层技术进行恢复,使用sql扫描磁盘发现效果良好<br />
<a href="https://www.xifenfei.com/wp-content/uploads/2020/11/20201121221315.jpg"><img src="https://www.xifenfei.com/wp-content/uploads/2020/11/20201121221315.jpg" alt="20201121221315" width="703" height="343" class="alignnone size-full wp-image-8921" /></a><br />
<hr />
恢复出来mdf文件,但是没有ldf文件,无法直接附加数据库,只能通过强制发放进行附加尝试<br />
<a href="https://www.xifenfei.com/wp-content/uploads/2020/11/20201121222950.jpg"><img src="https://www.xifenfei.com/wp-content/uploads/2020/11/20201121222950.jpg" alt="20201121222950" width="567" height="201" class="alignnone size-full wp-image-8922" /></a><br />
<hr />
<a href="https://www.xifenfei.com/wp-content/uploads/2020/11/20201121222901.jpg"><img src="https://www.xifenfei.com/wp-content/uploads/2020/11/20201121222901.jpg" alt="20201121222901" width="792" height="733" class="alignnone size-full wp-image-8923" /></a><br />
<hr />
<a href="https://www.xifenfei.com/wp-content/uploads/2020/11/20201121222754.jpg"><img src="https://www.xifenfei.com/wp-content/uploads/2020/11/20201121222754.jpg" alt="20201121222754" width="584" height="213" class="alignnone size-full wp-image-8924" /></a><br />
<hr />
<a href="https://www.xifenfei.com/wp-content/uploads/2020/11/20201121222725.jpg"><img src="https://www.xifenfei.com/wp-content/uploads/2020/11/20201121222725.jpg" alt="20201121222725" width="492" height="253" class="alignnone size-full wp-image-8925" /></a><br />
<hr />
运气不错,强制附加成功,数据库可以查询,如果无法附加成功,或者查询表报错,可以通过mdf文件单独处理,最大限度恢复数据<br />
<a href="https://www.xifenfei.com/wp-content/uploads/2020/11/20201121223109.jpg"><img src="https://www.xifenfei.com/wp-content/uploads/2020/11/20201121223109.jpg" alt="20201121223109" width="862" height="604" class="alignnone size-full wp-image-8926" /></a><br />
<hr />
如果你不小心删除了sql server的数据库,请第一时间保护现场,联系我们,可以最大限度恢复数据,减少损失,请参考:<a href="https://www.xifenfei.com/sql-server-recovery" title="专业Sql Server数据库恢复服务" rel="noopener" target="_blank">专业Sql Server数据库恢复服务</a>,如果需要联系我们:<br />
<strong><font color="red" size=4>电话/微信:17813235971 &nbsp;&nbsp;   Q Q:107644445<a target="_blank" href="https://wpa.qq.com/msgrd?v=3&amp;uin=107644445&amp;site=qq&amp;menu=yes"><img id="xffqqimg" src="//www.xifenfei.com/wp-content/themes/img/site_qq.jpg" alt="QQ咨询惜分飞" title="QQ咨询惜分飞"></a>  &nbsp;&nbsp;  E-Mail:dba@xifenfei.com</font></strong></p>
<div id="crp_related"><ul><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2020/11/eight-recovery.html" rel="bookmark" class="crp_title">.eight加密数据库恢复</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2020/10/rman-encrypted-file-recovery.html" rel="bookmark" class="crp_title">rman 文件被加密恢复支持</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2020/01/mysql-encrypted-recovery.html" rel="bookmark" class="crp_title">mysql数据库被加密恢复</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2020/11/259461356qq-com-recovery.html" rel="bookmark" class="crp_title">259461356@qq.com加密数据库恢复</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2020/03/digital-suffix-encrypted-database-recovery.html" rel="bookmark" class="crp_title">数字后缀名加密数据库恢复</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2020/10/datarecovery-sx-data.html" rel="bookmark" class="crp_title">.[data@recovery.sx].data加密数据库恢复</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2020/06/lockbit-db-recovery.html" rel="bookmark" class="crp_title">.lockbit加密数据库恢复</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2020/02/hardlogprotonmail-com-harma-recovery.html" rel="bookmark" class="crp_title">.[hardlog@protonmail.com].harma加密数据库恢复</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2020/03/mdf-0kb-recovery.html" rel="bookmark" class="crp_title">sql server 数据库 mdf 0kb 恢复</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2020/05/mysql-ibd-encrypted-recovery.html" rel="bookmark" class="crp_title">mysql ibd文件被加密恢复</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2020/08/oracle-recovery-tools-202008.html" rel="bookmark" class="crp_title">Oracle Recovery Tools&#8212;202008</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2020/06/oracle-datafile-encrypted-recovery.html" rel="bookmark" class="crp_title">又一例oracle数据文件被加密恢复</a></li></ul></div>]]></content:encoded>
			<wfw:commentRss>https://www.xifenfei.com/2020/11/sql-drop-database-recovery.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>sql server 数据库由于操作错库删除表恢复</title>
		<link>https://www.xifenfei.com/2020/04/sql-drop-recovery.html</link>
		<comments>https://www.xifenfei.com/2020/04/sql-drop-recovery.html#comments</comments>
		<pubDate>Thu, 16 Apr 2020 14:09:30 +0000</pubDate>
		<dc:creator><![CDATA[惜分飞]]></dc:creator>
				<category><![CDATA[SQL Server恢复]]></category>
		<category><![CDATA[sql drop table恢复]]></category>
		<category><![CDATA[sql 恢复]]></category>

		<guid isPermaLink="false">https://www.xifenfei.com/?p=8618</guid>
		<description><![CDATA[联系：手机/微信(+86 17813235971) QQ(107644445)  &#8230; <a href="https://www.xifenfei.com/2020/04/sql-drop-recovery.html">继续阅读 <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<div id="xifenfeicopyright">
<p>联系：<a href="https://www.xifenfei.com/about_xifenfei" target="_blank">手机/微信(+86 17813235971)   QQ(107644445)</a><a target="_blank" href="http://wpa.qq.com/msgrd?v=3&#038;uin=107644445&#038;site=qq&#038;menu=yes"><img src="https://www.xifenfei.com/wp-content/themes/img/site_qq.jpg" alt="QQ咨询惜分飞" title="QQ咨询惜分飞"/></a></p>
<p>标题：<a href="https://www.xifenfei.com/2020/04/sql-drop-recovery.html" target="_blank">sql server 数据库由于操作错库删除表恢复</a></p>
<p>作者：<a href="https://www.xifenfei.com" target="_blank">惜分飞</a>©版权所有[未经本人同意,不得以任何形式转载,否则有进一步追究法律责任的权利.]</p>
</div>
<p>有客户找到我们,由于操作不当把原本应该在备库上执行的drop table语句放到生产库上来执行了,导致生产库的表全部被干掉<br />
<a href="//www.xifenfei.com/wp-content/uploads/2020/04/20200416220255.png"><img src="//www.xifenfei.com/wp-content/uploads/2020/04/20200416220255.png" alt="20200416220255" width="407" height="467" class="alignnone size-full wp-image-8619" /></a><br />
<hr />
通过让客户提供相关的数据文件进行分析并进行恢复,由于客户删除掉表之后没有进行其他操作,因此恢复效果很好.<br />
<a href="//www.xifenfei.com/wp-content/uploads/2020/04/20200416215043.jpg"><img src="//www.xifenfei.com/wp-content/uploads/2020/04/20200416215043.jpg" alt="20200416215043" width="813" height="268" class="alignnone size-full wp-image-8620" /></a><br />
<hr />
<a href="//www.xifenfei.com/wp-content/uploads/2020/04/20200416220601.jpg"><img src="//www.xifenfei.com/wp-content/uploads/2020/04/20200416220601.jpg" alt="20200416220601" width="1175" height="558" class="alignnone size-full wp-image-8622" /></a><br />
<hr />
如果有sql server数据库被误操作(drop，truncate，delete 表等),应该第一时间避免写操作,比如:脱机拷贝数据文件,停掉所有数据库操作等防止由于进一步的写入导致覆盖,从而使得恢复效果不好.如果有恢复需求,可以联系我们.</p>
<div id="crp_related"><ul><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2020/02/sql-recovery-tools.html" rel="bookmark" class="crp_title">从一个表恢复看sql恢复工具</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2020/01/mysql-encrypted-recovery.html" rel="bookmark" class="crp_title">mysql数据库被加密恢复</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2020/03/horseleader-db-recovery.html" rel="bookmark" class="crp_title">.horseleader加密数据库恢复</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2020/04/ncov-oracle-recovery.html" rel="bookmark" class="crp_title">.ncov加密oracle数据库恢复</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2020/06/lockbit-db-recovery.html" rel="bookmark" class="crp_title">.lockbit加密数据库恢复</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2020/08/oracle-recovery-tools-202008.html" rel="bookmark" class="crp_title">Oracle Recovery Tools&#8212;202008</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2020/03/digital-suffix-encrypted-database-recovery.html" rel="bookmark" class="crp_title">数字后缀名加密数据库恢复</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2020/08/oracle-recovery-tools-missing000000.html" rel="bookmark" class="crp_title">Oracle Recovery Tools恢复MISSING00000文件故障</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2020/02/hardlogprotonmail-com-harma-recovery.html" rel="bookmark" class="crp_title">.[hardlog@protonmail.com].harma加密数据库恢复</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2020/11/sql-drop-database-recovery.html" rel="bookmark" class="crp_title">sql server 删除数据库恢复</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2020/03/oracle-rm-partial-coverage-recovery.html" rel="bookmark" class="crp_title">oracle文件被删除且部分被覆盖恢复案例</a></li><li style="list-style-type:decimal;font-size:11px;" ><a href="https://www.xifenfei.com/2020/08/coincidenceleague-db-recovery.html" rel="bookmark" class="crp_title">coincidenceleague加密数据库恢复</a></li></ul></div>]]></content:encoded>
			<wfw:commentRss>https://www.xifenfei.com/2020/04/sql-drop-recovery.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
