database_design

APPNOTE: Copy/overwrite Database Diagrams


— Copy/overwrite Database Diagrams from One Server to Another Server within the same instance.


— Source: PMT_MCD

— Target: PMT_MCD_2


USE PMT_MCD_2

DELETE sysDiagrams

where name in (select name from PMT_MCD.dbo.sysDiagrams)

SET identity_insert sysDiagrams on

INSERT sysDiagrams (name, principal_id, diagram_id, version, definition)

select name, principal_id, diagram_id, version, definition

from PMT_MCD.dbo.sysDiagrams

SET identity_insert sysDiagrams off