Reputation: 2608
Every now and then, I'll get the following message on my screen when running something large in SSMS: An error occurred while executing batch. Error message is: Exception of type 'System.OutOfMemoryException' was thrown.
The issue is, that once this error gets thrown, there seems to be no respite other than a reboot of the machine. I understand that this is an issue with memory on my machine and that this doesn't affect the server at all; however, rebooting in the middle of the day for a dev is never pleasant.
Any help would be greatly appreciated!
Upvotes: 1
Views: 5726
Reputation: 339
This worked for me:
This happened due to unused temp files.
Upvotes: 0
Reputation: 1
I encountered this today when trying to get an execution plan for a troublesome query then SSMS became completely non responsive for me.
Was able to work around this by opening sqlcmd, finding the problem query with sp_who2 then killing it.
At this point I was able to access other tabs I had open in SSMS and copy a couple that had not been saved to a notepad. Of course, when I tried to do anything else Windows said that SSMS was not responsive and gave me the option to force close it or debug.
Upvotes: 0
Reputation: 2423
Since I came up with the original "Comment" answer... Here it is.
Closing SSMS should terminate the transaction and free up memory.
Glad this worked out for you.
Upvotes: 2