Server数据库图表迁移到另一个数据库

Server数据库图表迁移到另一个数据库

本文介绍了如何将SQL Server数据库图表迁移到另一个数据库?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的团队最近使用TFS源文件从头开始重建了他们的SQL Server 2005开发数据库。

My team recently rebuilt their SQL Server 2005 development database from scratch using the TFS source files.

之后,我们有了一个非常干净的数据库,和生产环境。但是,我们还失去了在旧开发数据库中创建了几个月的数据库图表。

Afterwards, we had a nice clean database that more closely matched our test and production environments. However, we also lost the database diagrams that had been created over the months in the old development database.

有没有人知道导出SQL Server 2005数据库图表的方法从一个数据库到另一个包含相同表和模式对象的数据库?

Does anyone know of a way to export a SQL Server 2005 database diagram from one database to another that contains the same tables and schema objects?

UPDATE:

Valentin和CMS下面的答案应该工作很好。我接受了Valentin的,因为它是第一个,我已经开始使用它。

Both Valentin and CMS's answers below should work just fine. I accepted Valentin's because it was first and I had already started using it.

我最终创建一个名为robsysdiagrams的临时表,并将所有的数据复制并使用将数据插入到磁盘中。然后我在脚本中将robsysdiagrams重命名为sysdiagrams,并在目标数据库上运行它。一切正常。

I ended up creating a temp table called 'robsysdiagrams' and copied all the data into that and used the Microsoft SQL Server Database Publishing Wizard to script the data inserts out to disk. I then renamed robsysdiagrams to sysdiagrams in the script and ran it on the destination database. Everything worked fine.

推荐答案

Rob,
有一个表sysdiagrams,
尝试创建表并插入旧数据库中的数据。
它应该工作。

Rob,there is a table 'sysdiagrams' which holds the diagram definitions.Try to create the table and insert the data from old database.It should work.

HTH

这篇关于如何将SQL Server数据库图表迁移到另一个数据库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-13 23:57