Msg 3241, Level 16, State 0, Line 2
The media family on device 'G:\backup\ProdDB_backup.bak' is incorrectly formed. SQL Server cannot process this media family.
Msg 3013, Level 16, State 1, Line 2
RESTORE FILELIST is terminating abnormally.
解决方法:
此错误通常表示损坏的备份或存储或传输备份的介质发生故障。 查找另一种备份,以便从不同的介质还原,或者尝试早期或更高版本的备份。
另请参阅有关 TDE 数据库的备份/还原的KB5014298 - 修复:执行 RESTORE DATABASE 或 RESTORE LOG 期间出现错误 3241
有关更多故障排除想法,请参阅 从备份还原数据库时与媒体相关的错误
错误 3203 和 3203 的示例
错误 3202 和 3203 是在出现 I/O 相关问题时引发的备份错误。 这两个错误指示是执行读取还是写入请求,并显示 I/O 失败导致的基础 OS 错误。 已观察到这些示例:
Msg 3203, Level 16, State 1, Line 1
Read on "G:\SQLDATA\ProductionDb.ndf" failed: 483(The request failed due to a fatal device hardware error.)
Msg 3013, Level 16, State 1, Line 1
BACKUP DATABASE is terminating abnormally.
Msg 3202, Level 16, State 1, Line 2
Write on "Y:\SQLDATA\ProductionDb.bak" failed: 1117(The request could not be performed because of an I/O device error.)
Msg 3013, Level 16, State 1, Line 2
RESTORE DATABASE is terminating abnormally.
Msg 3202, Level 16, State 1, Line 14
Write on "\\BackupServer\Share\ProdDb.bak" failed: 112(There is not enough space on the disk.)
Msg 3013, Level 16, State 1, Line 14
BACKUP DATABASE is terminating abnormally.
解决方法:
OS 483 和 1117 的示例指示 I/O 设备故障。 检查存储介质的故障或损坏。 查看系统事件日志、硬件配置和日志,并与硬件管理员和供应商合作,解决存储备份的媒体的任何问题。 下面是系统事件日志中可能发现的消息示例,该日志指示需要解决的 I/O 问题:
Warning PM,Disk,153,None,The IO operation at logical block address 0xe90525a0 for Disk 3 (PDO name: \Device\00000017) was retried.
如果引发 OS 错误 112 指示空间问题,请确保在发送备份的本地或远程存储上有足够的磁盘空间。 如果有足够的空间可用,请确保存储介质的可靠性。
3624 的示例
在某些情况下,错误 3013 可能与系统断言一起引发。 如果备份失败并出现断言,则主要焦点是解决断言本身。 下面是观察到的问题的示例:
Msg 3013, Sev 16, State 1, Line 1
VERIFY DATABASE is terminating abnormally.
Msg 3624, Sev 20, State 1, Line 1
A system assertion check has failed. Check the SQL Server error log for details. Typically, an assertion failure is caused by a software bug or data corruption. To check for database corruption, consider running DBCC CHECKDB. If you agreed to send dumps to Microsoft during setup, a mini dump will be sent to Microsoft. An update might be available from Microsoft in the latest Service Pack or in a Hotfix from Technical Support.
Error: 17066, Severity: 16, State: 1.
SQL Server Assertion: File: mediaRead.cpp:429 Expression: !m_ActiveConsumptionList.IsEmpty () || !m_ActiveReads.IsEmpty () || !m_DecodeOutputQ.IsEmpty () || (CFeatureSwitchesMin::GetCurrentInstance ()->FEnableCheckingActiveDecodeQueueEnabled () && !m_ActiveDecodeInput.IsEmpty ()) SPID: 74 Process ID: 25440
解决方法:
查看 SQL Server 错误日志,并使用本文 中所述的方法MSSQLSERVER_3624 对断言失败进行故障排除:
在数据库上运行 DBCC CHECKDB,并确保 I/O 路径上的所有组件正常运行。
联机查找部分或全部断言表达式,了解任何已知问题。 例如,如果搜索 m_ActiveConsumptionList.IsEmpty,你可能会发现 KB4469554 - FIX:在 SQL Server 2014、2016 和 2017 中还原压缩备份期间发生断言错误。
将 SQL Server 更新到更高版本(累积更新)
确保没有外部组件干扰并导致故障
错误 4303 的示例
此示例演示了事务日志序列的还原,该序列失败并引发错误 3013。 特定错误 4303 指示在此还原之前缺少更多事务日志还原,或者事务日志备份文件已损坏。 例如,LSN = 4294967295429496729565535似乎不是有效的 LSN,这可能是备份文件或介质损坏的结果。
Msg 4303, Level 16, State 1, Line 3
The roll forward start point is now at log sequence number (LSN) 8177105000003941300003. Additional roll forward past LSN 4294967295429496729565535 is required to complete the restore sequence.
Msg 3013, Level 16, State 1, Line 3
RESTORE DATABASE is terminating abnormally.
解决方法:
如果遇到错误(如 4303 和 3013),请找到另一个可还原的好备份。 此外,检查存储介质的稳定性,并在必要时进行备份和修复。
排查 SQL Server 备份和还原操作问题。