I have an error message that occurs every time I use SQL Server 2012 Management Studio to open or create a new database diagram, followed by an automatic restart of SSMS.
The error message is
Attempted to read or write protected memory. This is often an indication that other memory is corrupt. (Microsoft.VisualStudio.OLE.Interop)
Here's what I did to produce this problem:
Earlier, I had installed SQL Server 2008: via an option available when I downloaded Visual Basic Express 2010. No errors yet. I could create and edit database diagrams without problems. Then I uninstalled VB Express 2010, and installed Visual Studio 2012, only to find out that it was a trial version, which I didn't like, so I uninstalled Visual Studio 2012. I launched SSMS 2008 and tried to open a database diagram in one of my databases. I received an error that said
Specified Module cannot be Found. (MS Visual Database Tools)
I installed SQL Server 2012 with Management Studio, and then used the SSMS 2012 to try opening the database diagram. And instead of Specified module
error, I got the error about attempting to read or write protected memory.
I am running Windows 7, SQL Server 2012 Express and I didn't uninstall SQL Sever 2008 Express (yet), Visual C# 2010 Express, Visual Basic 2010 Express.
EDIT: I attempted to fix this problem by applying a hotfix named SQLServer2012_RTM_CU1_kb2679368_11_0_2316_x64. It did not fix the problem. The hotfix was suggested by a user in an MSDN forum at this link: http://social.msdn.microsoft.com/Forums/en/sqlexpress/thread/1753d7ba-f6ec-4a8e-a1c9-ded2a5b7c607
I bumped into the same issue. Mine is SQL 2012 in windows7. I was trying connect to a sql server 2014 in Windows 2012 R2.
The problem was resolved after I upgraded my SQL 2012 client to 2014.
It is interesting that it was fine to work with SQL2014 with Windows 2012 but not windows 2012 R2.
For the sake of completeness I added this answer with all steps required to solve this issue
It is a stupid error, which can occur in nearly all sersion of SQL Server Management Studio.
Look for a machine that had SSMS installed which ist still working without any error.
Copy all files of the folder from the working machine to the faulting machine
Folder 1: C:\Program Files (x86)\Common Files\microsoft shared\Visual Database Tools\
Folder 2: C:\Program Files (x86)\Common Files\microsoft shared\MSDesigners8\
Start SSMS again and the error is gone
verified for 2008R2, 2012, 2014
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