I'm currently using the latest version of SSMS (17.8.1) on windows 10 and everytime I try to create a database diagram it crashes without giving me any error message. I've already tried to re-install SSMS but the problem still occurs.
I've found that the database diagram tool seems to crash if you modify things outside of the diagram.
Diagrams appear to remain stable if:
- The database diagram tool is used to do all of your modifications, thus retaining all metadata of the process within the diagram.
- Your database structure is modified outside of the diagram which is then deleted and recreated each time.
- The entire database is built, ground up, to a point that you are satisfied and feel that it won't change. The database should then be diagrammed post-beta.
Whichever method is used, this is a known issue.
To confirm, I have this issue while using SSMS 18.4 against a SQL 2016 Express instance.
Current Status - 10/03/2021 - SSMS Version 18.7.1
I still have issues with the diagram tool. It is slightly more stable, though, if you modify anything outside of a current diagram, the editor complains about metadata and you lose your work. In fact, I found that I had to also close and reopen SSMS to ensure I could edit or create a diagrams. So, while SSMS remains a little more stable (that's debatable), whatever has been done is not a solution.
Roll on version 37.n - let's hope it's fixed by then!
Further Notes From a Small Island (12/03/2021)
There also appears to be an issue with putting your PC to sleep, particularly if you're working over a VPN. I found that when you sleep your computer, then attempt to modify a diagram that was left open, the editor errors with various meta-data related faults (there has been more than one fault). The remedy to this was to reconnect the VPN, then refresh the database diagrams folder in SSMS...
This should allow you to save the diagram.
Update - 29/03/2022
I've been using database diagrams more regularly, as of version 18.10, and the diagramming tools do appear to be more consistent, now. Most of the previously mentioned issues seem to have gone (as highlighted by @HannahVernon in the comment below), but I have found one odd issue, which could be down to either a service or, possibly, the GPU drivers on my PC (as yet unknown).
As the DB Diagram tool is primarily for that purpose - representing the current database in a diagram form, I like to align the join lines with their respective columns on either end of the join. This makes for a more complete diagram, rather than the usually inexplicable lines you see in some, projecting from a random place around the border of the table to another. However, SSMS crashes for me when dragging connectors into place if I pause, without movement, for longer than about 5 seconds (arbitrary figure at the moment, I haven't timed this).
To replicate the fault...
- Create two tables (A and B), one with a primary key, one with a foreign key.
- Create a database diagram and drag the primary key of A onto the foreign key of B.
- Okay the dialogs for setting up the link.
- The link will be created, usually, by the most direct path from A to B. If the two tables are on the same plane (for instance, when the diagram is first created), the line will be direct...
A.TestColPKshould link to
B.TestFK, I would usually align the joins like so...
- However, if I drag either the PK symbol () or the FK symbol () into place, but don't release the mouse button, SSMS will crash, giving a perpetually spinning cursor.
I have posted this issue on Microsoft's own tech forum, but with little return on the issue.
I'd love to hear from anyone who does encounter the issue, especially if they discover why!