Next is the code to copy database diagrams from one database to another (tested on SQL Server 2005 and 2008)
use [DB_SOURCE_NAME]
DROP TABLE dbo.#tempsysdiagrams
–this will copy your database diagrams into a temporary table
select * into dbo.#tempsysdiagrams from sysdiagrams
use [DB_DESTINATION_NAME]
insert into sysdiagrams ([name],principal_id,version,definition)
select [name],principal_id,version,definition from dbo.#tempsysdiagrams where [name]=’DIAGRAM_NAME’
Happy Diagramming
No Responses