Reputation: 151
I have one table(Sql server 2014) with 60 million data. while fetching the data i am getting
"An error occurred while executing batch. Error message is: Exception of type 'System.OutOfMemoryException' was thrown."
Can any one please help here?
Upvotes: 14
Views: 74187
Reputation: 81
After I deleted the temp file then it worked. Delete the file permanently Ctrl + Shift + Delete
Upvotes: 0
Reputation: 339
In my case I was having problems even with tables with 8 rows. This worked for me:
This happened due to unused temp files.
Upvotes: 0
Reputation: 41
Solution 1 : Close and re-opening SQL Server Management Studio and try querying.
Solution 2:
Upvotes: 2
Reputation: 11
If you have opened so many new query editors in the SSMS, that can also cause this error. Try closing unnecessary tabs in SSMS.
Upvotes: 1
Reputation: 39
This exception is caused by SSMS process which is occupied by long running queries.Don't worry about it , you can try next time and run your query on next tab.
Upvotes: 0
Reputation: 29
Looks like SQL Management Studio memory leaking for long running sessions. Restart of it helps to solve this issue
Upvotes: 1
Reputation: 251
Close and re-open SQL Management Studio and see if that takes care of it. Mine does this from time to time even on small queries if I leave it open for too long or have too many query windows open.
Upvotes: 24