I am getting the below error even after closing and reopening ssms and no other query running under my login however it is quite possible other users...from what I see from sp_whoisactive only 1 user and few maintenance queries are running. However, instance does not respond slow. I want to generate estimated plan so that I can look into possible tuning of query or maybe add IDX if required.
Query is deleting records around 3.2k records.
"An error occurred while executing batch. Error message is: Exception of type 'System.OutOfMemoryException' was thrown."
Sample below query
Declare @Srnumber int
Declare @Srnumbermg int
exec sp_phelp_remove ****, @Srnumber ,@Srnumbermg - the full query is multiple lines of same code with CHANGED Srnumber .
exec sp_phelp_remove 0001 , @Srnumber ,@Srnumbermg
exec sp_phelp_remove 0002 , @Srnumber ,@Srnumbermg