简体   繁体   English

SQL Server备份还原问题

[英]SQL server backup restore issue

Asking this question for a friend of mine. 向我的一个朋友问这个问题。

My client had send me a Back up file of a database in SQL Server 2008. 我的客户端向我发送了SQL Server 2008中数据库的备份文件。

I installed SQL Server 2008 Express Edition. 我安装了SQL Server 2008 Express Edition。

Then i tried to Restore the given Back file with this but unfortunately its throwing an error 然后我尝试用此方法还原给定的Back文件,但不幸的是它引发了错误

"The media family on device is incorrectly formed . SQL Server can not process this media family.RESTORE HEADER ONLY is terminating abnormally .(Microsoft SQL Server, Error 3241)" “设备上的媒体系列格式不正确。SQLServer无法处理此媒体系列。仅RESTORE HEADER异常终止。(Microsoft SQL Server,错误3241)”

I searched for this error and evry where they says may be the back up might be corrupted. 我搜索了此错误,然后发现他们说备份可能已损坏。

But my client is able to restore the same at their end. 但是我的客户最终可以恢复原样。

Any idea? 任何想法?

Have you applied the latest service packs to your copy of SQL Server 2008? 您是否已将最新的Service Pack应用于SQL Server 2008的副本? Try that, and then do a RESTORE HEADERONLY command in Sql Enterprise manager. 尝试执行此操作,然后在Sql Enterprise Manager中执行RESTORE HEADERONLY命令。 That will give you the properties of the file you're trying to backup. 这将为您提供您要备份的文件的属性。 Is your client using Express Edition as well? 您的客户也使用Express Edition吗?

It is possible that the backup file became corrupt during transit. 备份文件在传输过程中可能已损坏。

I would suggest that the client either: 我建议客户:

  • re-send the database backup file 重新发送数据库备份文件
  • or create another one. 或创建另一个。

It may also be pertinent to suggest to the client that when creating the Database Backup they use the CHECKSUM option to validate the contents of the backup file that is produced. 还可能建议客户端在创建数据库备份时使用CHECKSUM选项来验证所生成的备份文件的内容。


CHECKSUM CHECKKSUM

Enables backup checksums, so that BACKUP can do the following: 启用备份校验和,以便BACKUP可以执行以下操作:

  1. Prior to writing a page to the backup media, BACKUP verifies the page (page checksum or torn page), if this information is present on the page. 在将页面写入备份介质之前,如果页面上存在此信息,则BACKUP会验证页面(页面校验和或页面撕裂)。

  2. Regardless of whether page checksums are present, BACKUP generates a separate backup checksum for the backup streams. 无论是否存在页面校验和,BACKUP都会为备份流生成单独的备份校验和。 Restore operations can optionally use the backup checksum to validate that the backup is not corrupted. 还原操作可以选择使用备份校验和来验证备份未损坏。 The backup checksum is stored on the backup media, not on the database pages. 备份校验和存储在备份介质上,而不在数据库页面上。 The backup checksum can optionally be used at restore time. 可以在还原时选择使用备份校验和。


References 参考文献

SQL Server Books Online - Backup Database SQL Server联机丛书-备份数据库

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM