Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Creating a database diagram crashes SSMS with a memory corruption error [closed]

I'm working in SQL Server Management Studio Express version.

When I create database diagrams in SQL Server Management Studio, I get an error:

Attempted to read or write protected memory. This is often an indication that other memory is corrupt.

What's causing this error?

like image 322
Asp.net MVC Avatar asked Jan 24 '14 04:01

Asp.net MVC


People also ask

What happened to MS SSMS database diagrams?

(Visual Design or T-SQL). I posted a workaround to this. 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.

Why does the database diagram tool crash so often?

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.

How do I get a full memory dump of SQL Server management studio?

Get a full memory dump of SQL Server Management Studio (SSMS) when it stops responding or crashes. To capture diagnostic information to troubleshoot a crash or an unresponsive SSMS, follow the steps below. Download ProcDump. Unzip the download into a folder. Open the command prompt and run the following command.

Why can't I open a text annotation diagram in SSMS?

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.


1 Answers

This is a known issue and has been reported on Microsoft Connect: SMSS crashes when creating new database diagram

A possible cause is having VS 2012 installed, installing VS 2013 and later uninstalling VS 2013. It leaves the VS 2012 installation corrupted.

Two workarounds(any one of the steps fixes the issue):

  • Delete C:\Program Files (x86)\Common Files\microsoft shared\Visual Database Tools\dsref80.dll and everything in C:\Program Files (x86)\Common Files\microsoft shared\MSDesigners8\, then run a repair for VS 2012 (OR)
  • Copy the files mentioned above from a system with an uncorrupted installation.

Additional workarounds can be found on the Connect issue.

like image 95
Shiva Avatar answered Sep 28 '22 10:09

Shiva