SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 

Get your favorite SSC scripts directly in SSMS with the free SQL Scripts addin. Search for scripts directly from SSMS, and instantly access any saved scripts in your SSC briefcase from the favorites tab.
Download now (direct download link)

Export diagrams

By Jonas Gunnarsson,

The script generates an import script for SQL Server Management Studio diagrams.
Easy to use, exports all diagrams in current database, to a script. Tip: Place it in your repository.

Remarks

The name of diagrams need to be unique in database. The script don't replace an existing diagram. (may be in next release;)

Verify existing diagram names first! List the database diagram(s) for current database:

select * from sysdiagrams;

Usage

Run the script against database and select result to file.

Note
Objects required to use database diagrams is added for owner, when clicking on folder Database Diagrams in SSMS.

Further reading

References

Revisions

  • 1.0 2018-05-25 First version

Total article views: 186 | Views in the last 30 days: 186
 
Related Articles
ARTICLE

Database Modeling and Diagrams with SQL Server 2008

How to use Database Diagram tool in SQL SERVER.

FORUM

Database diagrams

Database diagrams

SCRIPT

Generate scripts for SQL Server Management Studio diagrams

The procedure generates an import script of diagrams.

FORUM

SQL Server Database diagram

Copy Database diagram in SQL Server with Relationship

FORUM

Database Diagram

Facing Problem with Database Diagram

Tags
diagram    
 
Contribute