将数据库从 sql server 2008 移至 2005
我当前有一个位于 SQL Server 2008 中的数据库要移动到 SQL Server 2005。我想将 2008 数据库备份到 bak 文件并将其导入到 2005,但在备份时在 SSMS 2008 中找不到任何选项。过去有人有类似的需求吗?你是如何做到这一点的?
I have a database currently in SQL Server 2008 to be moved to SQL Server 2005. I would like to backup the 2008 db to a bak file and import it to 2005, but couldn't find any options in SSMS 2008 while taking backup. Has anyone had a similar need in the past? How did you manage this through?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
要将备份恢复到旧版本的 SQL Server,您可以使用第三方工具 ApexSQL Diff 和 ApexSQL Data Diff。
您可以在本文中阅读该过程的详细说明:将 SQL Server 数据库备份恢复到旧版本的 SQL Server
希望这会有所帮助
免责声明:我在 ApexSQL 担任支持工程师
To restore the backup to an older version of SQL Server you can use third party tools, ApexSQL Diff and ApexSQL Data Diff.
You can read detailed explanation of the process in this article: Restoring SQL Server database backup to an older version of SQL Server
Hope this helps
Disclaimer: I work for ApexSQL as a Support Engineer
您可以尝试发布数据库向导。
从链接:
You could try the Publish Database Wizard.
From the link:
我认为您无法在 2005 年服务器上恢复 2008 年备份。尝试使用第 3 方架构/数据迁移工具,例如 SQL Examiner Suite 或 RedGate 的 SQL Compare
I don't think you can restore 2008 backup on 2005 server. Try 3rd party schema/data migration tool, like SQL Examiner Suite or RedGate's SQL Compare
你不能这样做。您永远无法将更新的 SQL Server 数据库恢复到旧版本。
您唯一的选择是编写需要插入的数据的脚本,或者使用 Red-Gate 等数据比较工具 SQL 数据比较 比较两个数据库(并从新数据库更新旧数据库)。 SQL Data Compare 还可以将备份(任何版本)与服务器上的实时数据库进行比较。
You cannot do this. You never could restore a more recent SQL Server database to an older version.
Your only option is to script out the data you need to insert, or use a data comparison tool like Red-Gate SQL Data Compare to compare the two databases (and update your older one from the newer). SQL Data Compare will also work comparing a backup (any version) to a live database on a server.
它比这更容易,因为(假设您的数据库没有使用任何 2008 年独有的功能)它们使用相同的格式(*.mdf)。只需将数据库与 2008 服务器分离,将 mdf 文件复制到 2005 服务器,然后将副本附加到 2005 服务器。在 sql server management studio 中右键单击数据库时,查找“附加/分离”选项。
It's easier than that, since (assuming your db isn't using any 2008-only features) they use the same format (*.mdf). Simply detach your database from your 2008 server, copy the mdf file to the 2005 server, and attach the copy to the 2005 server. Look for the Attach/Detach option when you right click on a database in sql server management studio.