Question: When executing a statement through SSMS returning a large recordset , I’m getting a System.OutOfMemoryException error. The error occurs before the recordset fully returns. Why is this error occurring and what is the workaround? I’m using SQL Server 2012 Enterprise Edition . On a 64 bit Windows 2008 server. The full error message is : An error occurred while executing batch. Error message is: Exception of type 'System.OutOfMemoryException' was thrown. Answer: SSMS is a 32 bit process. It is limited to 2GB memory.When using Grid Mode there is a 64 kb limit per database field. If the resultset is... Read more →