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

  • Question

  • When I try to open up SQL Server Management Studio in SQL Server 2005 I get the following error message:

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

    How do you fix this?


    Friday, March 16, 2012 2:59 PM


All replies

  • Hi,

    Please see - http://support.microsoft.com/kb/926421

    Also, there's a lot of errors regarding this error pointing at the .NET framework. You could try repairing/reinstalling it.



    Also, once you 'OK' the message, can you still get into SSMS?  If so, try resetting the window layout - that's another symptom I found.



    Andrew Bainbridge
    SQL Server DBA

    Please click "Propose As Answer" if a post solves your problem, or "Vote As Helpful" if a post has been useful to you

    • Marked as answer by lcerni Friday, March 16, 2012 4:52 PM
    Friday, March 16, 2012 3:17 PM
  • This is almost always a software error, not a hardware issue.

    I would also suggest you install the latest Service Pack and Cumulative Update to see if the problem is already resolved.

    Friday, March 16, 2012 4:01 PM
  • Thank you....

    I did the following steps:

    1)  I reran Service Pack 4 for all instances
    2)  I repaired .NET Framework 2.0 SP2, 3.0 SP2, and 3.5 SP1
    3)  Rebooted the server

    I was able to log onto SQL Server Studio Management Studio and reran the SSIS package which calls internally another SSIS package and all ran successfully.


    Friday, March 16, 2012 4:54 PM
  • This issue occurred on another server of ours and I rebooted the server and it corrected the issue.


    • Marked as answer by lcerni Friday, March 23, 2012 1:00 PM
    Friday, March 23, 2012 1:00 PM
  • http://stackoverflow.com/questions/596413/attempted-to-read-or-write-protected-memory

    is what did it for me. Not directly, though, but down in the comments, Cocowalla gives this tip:

    I had the same problem after upgrading from .NET 4.5 to .NET 4.5.1. What fixed it for me was running this command:

    netsh winsock reset

    I couldn't agree more! Repairing .NET didn't work, but resetting the winsock did! (Reboot required in both cases).

    • Edited by Hansjp_815 Thursday, May 7, 2015 2:47 PM
    • Proposed as answer by Salera Renamie Thursday, December 27, 2018 5:26 AM
    Thursday, May 7, 2015 2:45 PM
  • I actually ran into the same issue today and after some Google fu I stumbled across this and a few other "suggestions" trying to resolve the issue. I tried to reboot the server, and even re-paired SQL Management Studio. I finally realized that the issue came from trying to edit rows using SQL Management Studio 2012 when the installed version was 2014. After upgrading from 2012, it resolved the issue. Just wanted to put this out there into the interwebz in-case anyone else stumbled across it. 
    Saturday, November 28, 2015 12:17 AM