1

We are using a MS SQL Server database and we want to create a database diagram for an existing database.

There were several options on how to do this: In Microsoft Visio 2010, Visual Studio 2013 or even in SQL Server directly.

We are now using Visio 2016 Professional, Visual Studio 2015 Enterprise and Visual Studio 2017 Enterprise and SQL Server 2014. In Visio, the support is gone, only in the Office365 Version there is an extra add-in.

In VisualStudio, the database project works different and the diagram option is now missing (there is a kind of a work-around when creating an Entity Framework digram, but still not what I am looking for)

In Microsoft SQL Server I can create a digram, but every change there will immediately the database directly.

I need a designer to create and save drafts, such as it used to be in Visio 2010.

Any recommendations?

1

You could use Visual Studio/SQL Server Manager GUI to create a "Create table/View/index..." script that creates a long list of SQL DDL statements, enabling you to create a copy of your database (rename it inside the created scripts properly), and then you can work with the diagram of the copied (empty database) inside the Enterprise Manager, SQLServer Datatools.

As a GUI tool, I prefer the non-free Sybase (Now SAP) Powerdesigner to do Schema Design and Documentation.

If you are good at the command line, you should try the free schemacrawler tool that others have suggested in answers for similar questions on this site.

With schemacrawler you can apply certain filters such 'as skip columns that have names such as "free_text01", "free_text02"', ... (or whatever) which is nice to create DB diagrams at varying levels of detail with a few commands.

You can export to SVG but I don''t know how good that works.

  • I downloaded Schemacrawler and Graphviz. It took me a while to get it working. For those who would like to give it a shot, here is the cmd-batch file, that finaly worked for me with SQL Server to create an ER-diagram from a database: call java -classpath ../../_schemacrawler/lib/*;lib/* schemacrawler.Main -server=sqlserver -host=SERVERHOSTNAME -schemas=DATABASENAME.dbo -port=1234 -database=DATABASENAME -user=USERNAME -password=PASSWORD -infolevel=maximum -command=schema -schemacrawler.table.pattern.exclude=".*sysdiagrams" -portablenames -outputformat=svg -outputfile=database-diagram.svg %* – DominikAmon Jan 12 '18 at 13:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.