我收到以下错误。
服务器还原失败
我最近将 SQL Server 2005 Express 升级到 SQL Server 2008 Express。
- 我在生产服务器上进行了备份,SQL Server 2008
- 备份效果很好,并且我尝试在生产服务器上恢复备份,效果很好。
- 我用 FileZila 软件下载了 .Zip 格式的备份文件(这也很好)。
- 但是当我尝试恢复该文件时,出现以下错误。
服务器还原失败
执行 Transact-SQL 语句或批处理时发生异常。 (Microsoft.SqlServer.ConnectionInfo)
------------------------------------------ 附加信息:
设备 'C:\go4sharepoint_1384_8481 上的媒体系列.bak' 的格式不正确。 SQL Server 无法处理该媒体系列。 RESTORE HEADERONLY 异常终止。 (Microsoft SQL Server,错误:3241)
如需帮助,请单击:http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=09.00.4053&EvtSrc=MSSQLServer&EvtID=3241&LinkId= 20476
我尝试过但不起作用的事情
尝试 1
尝试使用以下命令进行备份
BACKUP DATABASE go4sharepoint_1384_8481
TO DISK='C:\HostingSpaces\dbname_jun14_2010_new.bak' 并使用 FORMAT
并尝试恢复该文件。
尝试2
有人写信来测试我的 SQL Server 版本。
当我尝试在 SQL Server 2008 中运行以下命令时,
Select @@Version
它给出以下输出
Microsoft SQL Server 2005 - 9.00.4053.00 (Intel X86) 2009 年 5 月 26 日 14:24:20 版权所有 (c) 1988-2005 Windows NT 6.0 上的 Microsoft Corporation Express Edition(内部版本 6002:Service Pack 2)
我的生产数据库位于 SQL Server 中2008,我试图在 SQL Server 2008 中恢复数据库,但以上版本显示好像我正在使用 SQL Server 2005。
知道如何恢复 SQL Server 2008 DB。
非常感谢。
I am getting following error.
Restore failed for Server
I have recently upgraded SQL Server 2005 Express to SQL Server 2008 Express.
- I have taken a Backup on Production Server, having SQL Server 2008
- Backup was good and I tried restoring Backup on Production Server, that works great.
- Than I downloaded that backup file in .Zip format with FileZila Software (And that is good too).
- But when I tried to restore that file I am getting following error.
Restore failed for Server
An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)
------------------------------ ADDITIONAL INFORMATION:
The media family on device 'C:\go4sharepoint_1384_8481.bak' is incorrectly formed. SQL Server cannot process this media family. RESTORE HEADERONLY is terminating abnormally. (Microsoft SQL Server, Error: 3241)
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=09.00.4053&EvtSrc=MSSQLServer&EvtID=3241&LinkId=20476
Things I tried which didn't worked
Attempt 1
Try to take backup using following command
BACKUP DATABASE go4sharepoint_1384_8481
TO DISK='C:\HostingSpaces\dbname_jun14_2010_new.bak' with FORMAT
And tried restore that file.
Attempt 2
Somebody wrote to test Version of my SQL Server.
When I tried to run following command in SQL Server 2008
Select @@Version
It is giving following output
Microsoft SQL Server 2005 - 9.00.4053.00 (Intel X86) May 26 2009 14:24:20 Copyright (c) 1988-2005 Microsoft Corporation Express Edition on Windows NT 6.0 (Build 6002: Service Pack 2)
My Production Database is in SQL Server 2008, and I am trying to restore DB in SQL Server 2008 but above version is showing as if i am using SQL Server 2005.
Any idea how can I restore SQL Server 2008 DB.
Many Thanks.
发布评论
评论(5)
您无法在较低版本上从较高的 SQL Server 版本恢复备份 - 这在 SQL Server 中从未实现过。
如果您有 SQL Server 2008 备份,则只能在 SQL Server 2008(或更高版本)计算机上恢复该备份,但不能在 2005 机器上恢复。没有技巧,没有解决方法,没有办法做到这一点。
You cannot restore a backup from a higher SQL Server version on a lower version - this has never been able in SQL Server.
If you have a SQL Server 2008 backup, you can only restore that on a SQL Server 2008 (or later) machine - but not on a 2005 box. No trick, no workaround, no way to do it.
这里你有两个选择。
使用 RESTORE 命令时使用WITH REPLACE。这将覆盖现有数据库并恢复备份文件所代表的数据库状态。
删除您尝试恢复到的数据库,然后使用 RESTORE 命令再次恢复。这将创建一个新数据库,其状态由备份文件表示。
请注意,在这两个选项中,您都将丢失尝试恢复到的数据库的现有数据。
You have 2 options here.
Use WITH REPLACE while using the RESTORE command. This will overwrite the existing database and restore the database state represented by the backup files.
Delete the database to which you are trying to restore to and restore again using RESTORE command. This will create a new database with the state represented by the backup files.
Please note that in both these options you will lose the existing data of the database you are trying to restore to.
确保它安装正确 - 在您的program files\microsoft sql server 目录中应该有一个 100/150 文件夹。在 setup bootstrap\log 中查看安装日志。
Make sure it is installed correctly - in your program files\microsoft sql server directory there whould be a 100/150 folder. Check out the install log in setup bootstrap\log.
如上所述,出现此行为的原因是,默认情况下 SQL Server 不允许将数据库备份还原到旧版本的 SQL Server,无论备份来源的数据库的兼容性级别如何。
您可以尝试:
脚本登录
脚本全文索引
脚本触发器
单击“确定”
单击“下一步”
尽管上面列出的过程应该有效:
1.它不会迁移所有数据库对象(例如序列或队列)
2. 如果您的数据库包含 SQL Server 无法识别的依赖项(例如对驻留在链接服务器上的数据库的依赖项),则可能会失败。
您可以查看 解决方案中心。您还可以考虑使用第三方工具。
As described above the reason for this behaviour is that by default SQL Server doesn't allow restoring a database backup to an older version of SQL Server, regardless of the compatibility level of the database the backup was taken from.
You can try to:
Script Logins
Script Full-Text Indexes
Script Triggers
Click OK
Click Next
Although the procedure listed above should work:
1. It doesn’t migrate all of the database objects (e.g. sequences or queues)
2. It might fail if your database contains dependencies which SQL Server fails to recognize (e.g. dependencies to databases residing on linked servers)
You can take a look at the rest of the article on Solution center. There is also third party tools you can take in consideration.
您是否有可能没有将 2005 实例升级到 2008,而是将 2008 与 2005 并排安装,并且连接到现有的 2005 实例?查找您计算机上的其他实例。
Is it possible that, instead of upgrading your 2005 instance to 2008, you instead installed 2008 side-by-side with 2005, and you're connecting to your existing 2005 instance? Look for other instances on your machine.