SQL Server 2012 11.0.5058.0
I'm running a very large batch of queries (about 2700) to simulate a user doing X, Y and Z in our app. I have SQL Server's max memory set to 2147483647 MB. However when I run the query I get several messages like so:
An error occurred while executing batch. Error message is: Exception of type 'System.OutOfMemoryException' was thrown.
When I look at the server it has 20GB of memory free and SQL Server is only using 4.8GB (and that number is stable).
I've tried putting some
GO statements in to no avail. I don't know where it is hitting the memory issues. None of the queries return more than a few rows.
How can I get around this memory issue?