SQL server 2012 - Error: attempted to read or write protected memory

When I am trying to Edit my tables on my newly installed SQL server management studio, I am getting the error below

Exception has been thrown by the target of an invocation. (mscorlib)
 Additional information:
   Attempted to read or write protected memory. This is often an indication that 
   other memory is corrupt. (Microsoft.VisualStudio.OLE.Interop)

Here is the image of the error


How to Resolve this issue? Thanks

Asked by:- neena
: 9668 At:- 1/16/2018 3:23:51 PM
SQL exception-mscorlib

2 Answers
profileImage Answered by:- jaya

Looking at your error and details of newly installed SQL server management studio, can you determine the SQL server version using the SQL query on your master database


as maybe you are trying to edit SQL server database(new version like 2014 version) which is different from your SQL server management studio(older version like 2012 version), I have faced this issue and was able to resolve it by reinstalling my management studio and database, you can also upgrade your management studio version

At:- 1/17/2018 9:24:14 AM

profileImage Answered by:- vikas_jk

For the above issue, following issues can be there:

  1. Your SQL server version is higher than SQL server management Studio (SSMS), example, if your SQL server version is 2012, use SQL server management studio 2012 or 2014 or above. You can check SQL version here
  2. Your .NET framework is upgraded, then you need reboot your PC and then run this cmd command "netsh winsock reset".
At:- 10/28/2020 11:48:33 AM

Login/Register to answer
Register directly by posting answer/details

Full Name *

Email *

By posting your answer you agree on privacy policy & terms of use