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?
OutOfMemoryException Exception of type 'System. OutOfMemoryException' was thrown. To resolve this issue, I had to restart Visual Studio or go to the Windows Task Manager and terminate IIS Express process. This error could happen due to a variety of reasons related to memory consumption of the application.
Use sqlcmd Utility instead of SSMS to run the SQL queries. This method enables queries to be run without the resources that are required by the SSMS UI. Additionally, you can use the 64-bit version of Sqlcmd.exe to avoid the memory restriction that affects the 32-bit SSMS process.
OutOfMemoryException Class (System) The exception that is thrown when there is not enough memory to continue the execution of a program.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With