Home > Database > Mysql Tutorial > body text

SQL Server:验证数据库备份文件

WBOY
Release: 2016-06-07 15:41:45
Original
1298 people have browsed it

最近有一次,在从一份数据库备份文件(.bak)时,遇到了以下错误: The media family on device is incorrectly formed. SQL Server cannot process this media family Error: 3241 遇到这样的错误,可能是由两种原因引起的: (1) 在高版本的SQL Server数据

最近有一次,在从一份数据库备份文件(.bak)时,遇到了以下错误:

The media family on device is incorrectly formed. SQL Server cannot process this media family Error: 3241
Copy after login

遇到这样的错误,可能是由两种原因引起的:

(1) 在高版本的SQL Server数据库中备份得到备份文件,然后试图在低版本的SQL Server中进行恢复;

(2) 备份文件损坏。


已经可以排除(1)这种情况,那么只能是情况(2)了。后来发现果然是原因(2)引起的,实际上最初生成的备份文件格式就已经损坏了。

其实(2)这种情况是可以避免的,只需要在生成备份文件后验证一下。

验证的方法很简单,一条SQL语句就能做到,如下:

RESTORE VERIFYONLY FROM DISK = '>'
Copy after login



Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!