SSMS crashes when try to modify database diagram (v18.2)

10,540

Solution 1

On July 22, 2020 MS released SSMS version 18.6 and one of the items in its Bug Fixes list is Database Diagrams:

Fixed long outstanding issue with Database Diagrams, causing both the corruption of existing diagrams and SSMS to crash. If you created or saved a diagram using SSMS 18.0 through 18.5.1, and that diagram includes a Text Annotation, you won't be able to open that diagram in any version of SSMS. With this fix, SSMS 18.6 can open and save a diagram created by SSMS 17.9.1 and prior. SSMS 17.9.1 and previous releases can also open the diagram after being saved by SSMS 18.6. See SQL Server user feedback.

They refer to the UserVoice item that I mentioned below in my original answer. That item got 1239 votes and is now marked as Completed and has a link to blog post by Drew Skwiers-Koballa, Program Manager, SQL Server. The blog post has almost identical text:

The 18.6 release is the second major release of SSMS in 2020 and packs several high impact changes, including a fix for crashes in database diagrams.

If you created or saved a diagram using SSMS 18.0 through 18.5.1, and that diagram includes a Text Annotation, you won’t be able to open that diagram in any version of SSMS. With this fix, SSMS 18.6 can open and save a diagram created by SSMS 17.9.1 and prior as well as by other SSMS 18.6 instances. SSMS 17.9.1 and prior versions will also be able to open the diagram after being saved by SSMS 18.6.

Here is my original answer that I wrote before SSMS 18.6 was released.


MS acknowledged that there is a problem with Database Diagrams feature in the SSMS as of 18.2 (Still 18.5.1). You can use the previous SSMS version 17.9.1, which supports all features of SQL Server 2017 that you use.

In fact, they removed Database Diagrams feature in SSMS 18.0, then returned it back in 18.1 after people asked for it, but it has a problem.

In Release notes for SQL Server Management Studio (SSMS) under Known issues (18.2) there is an item:

Database Diagram created from on an SSMS running on machine A cannot be modified from machine B (it would crash SSMS). See UserVoice for more details.

Vote for a fix on UserVoice: SSMS 18.1 Crashes when Opening a Database Diagram

The MS Product Manager replied there:

I’d like to provide an update on this issue/

Unfortunately, it is proving to be pretty complex to deal with this this ancient technology that is used by SSMS. That’s why it’s being quite challenging for me to find a fix.

I’ll keep working on this, but sadly there is no fix in sight yet.

-Matteo

Solution 2

Issue has been fixed in 18.6, updated it today and works like a charm, but mind that you have to recreate all the diagrams that you have created in versions 18.0 to 18.5. If you create them again with 18.6 they open without crashing.

Share:
10,540
Ivan-San
Author by

Ivan-San

By day: Godinez Programmer By night: Hardcore PC Gamer

Updated on June 05, 2022

Comments

  • Ivan-San
    Ivan-San about 2 years

    When I try to modify a database diagram created before the application restart and crashes when trying to access. It happen only when I save the diagram and close the application. When I try to reopen it throws me an error then restart the SSMS.

    I'm running SQL Server 14.0.100 Express Edition.

    I reviewed the Microsoft Event Viewer and I get this:

    Faulting application name: Ssms.exe, version: 2019.150.18142.0, time stamp: 0x5d3573be Faulting module name: DataDesigners.dll, version: 2019.150.18142.0, time stamp: 0x5d3573f0 Exception code: 0xc0000005 Fault offset: 0x00004be8 Faulting process id: 0x5ec8 Faulting application start time: 0x01d56d761e232f6c Faulting application path: C:\Program Files (x86)\Microsoft SQL Server Management Studio 18\Common7\IDE\Ssms.exe Faulting module path: C:\Program Files (x86)\Microsoft SQL Server Management Studio 18\Common7\IDE\Tools\VDT\DataDesigners.dll Report Id: e797c8be-6448-4547-9f6f-146cd92d8178 Faulting package full name: Faulting package-relative application ID:

    • Sean Lange
      Sean Lange almost 5 years
      I would suggest that if your are using the visual designer to make schema changes you should learn how to do it with t-sql. The designer seems easy but it causes other issues. Among them names for constraints and such that don't make any sense.
    • Ivan-San
      Ivan-San almost 5 years
      Yeah sure I can, but if we have this tool for making our work more easier why not take advantage. I have been working for like 1 year using the visual designer and I haven't get this errors since they updated to a new version. The visual design it reduce my db design time. That's why I'm using it.
    • Sean Lange
      Sean Lange almost 5 years
      The main reason I stay away from the visual designer is because the constraints and foreign keys it creates have a useless name which makes database maintenance a lot more painful than it needs to be. As for why you are receiving that error I have no idea.
    • Ivan-San
      Ivan-San almost 5 years
      Good point, there's many areas of opportunity with the designer and I agree with you we should be able to learn and perform both types of modeling. (Visual Design or T-SQL).
    • Eric
      Eric almost 5 years
      How can visual designer faster than t-sql? Unless you type with 1 finger.
    • Sql Surfer
      Sql Surfer almost 5 years
      The Visual Studio Sql Server Database Project Type can give you a similar toolset.
    • Sql Surfer
      Sql Surfer almost 5 years
      Try this... Reboot your machine. Start ssms with no active connections. Connect to your target database - do nothing else yet. navigate (do NOT Open) to your diagram. Without opening the diagram right click on it and click refresh. Then try to open your diagram. If it opens without error immediately save it. This might help you in your situation.
    • KumarHarsh
      KumarHarsh almost 5 years
      It can be permission issue also.Like Permission to open table in design mode is denied.so when we try to open table in design mode SSMS crash.May be "Grant permission not properly executed".not sure why it occur.
    • Adail Retamal
      Adail Retamal over 4 years
      I posted a workaround to this.
  • xr280xr
    xr280xr over 4 years
    This seems worthy of the bounty
  • motevalizadeh
    motevalizadeh about 4 years
    Have the same issue on 18.5.1
  • Ivan-San
    Ivan-San about 4 years
    The user -Matteo answered on this thread feedback.azure.com/forums/908035-sql-server/suggestions/… "I regret to inform that I did not get to fix this for SSMS 18.5, you may have read in the Release Notes. I’ll be on this as soon as I can. I feel bad… I know :("
  • Brian MacKay
    Brian MacKay over 3 years
    Can't believe this is still an issue but it's great to know that text diagrams cause the problem. I have moved on to third party solutions for diagrams - which is ridiculous.