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?
(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.
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.
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.
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.
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):
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) Additional workarounds can be found on the Connect issue.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With