Please start any new threads on our new 
    site at https://forums.sqlteam.com.  We've got lots of great SQL Server
    experts to answer whatever question you can come up with.
    
        | 
                
                    | 
                            
                                | Author | Topic |  
                                    | poratipsPosting Yak  Master
 
 
                                        105 Posts | 
                                            
                                            |  Posted - 2013-07-23 : 12:10:11 
 |  
                                            | Hi,We are getting right now following error:We have Sql 2005 with 4 GB MemoryThere is insufficient system memory to run this query.Error: 701, Severity: 17, State: 42.then it contains another messages like:MEMORYCLERK_SQLGENERAL (Total) 	VM Reserved = 0 KB 	VM Committed = 0 KB 	AWE Allocated = 0 KB 	SM Reserved = 0 KB 	SM Committed = 0 KB	SinglePage Allocator = 31280 KB	MultiPage Allocator = 4504 KBCACHESTORE_ relatedUSERSTORE_ related |  |  
                                    | James KMaster Smack Fu Yak Hacker
 
 
                                    3873 Posts | 
                                        
                                          |  Posted - 2013-07-23 : 13:06:57 
 |  
                                          | I have not run into this problem, but googling for it, I see this support issue - see if that sheds any light: http://support.microsoft.com/kb/2001221 |  
                                          |  |  |  
                                    | poratipsPosting Yak  Master
 
 
                                    105 Posts | 
                                        
                                          |  Posted - 2013-07-23 : 17:46:28 
 |  
                                          | Thanks James.I already seen that url. Our query is very complex and big so we might need to look into and also replication runs every few minutes interval so consuming more memory. |  
                                          |  |  |  
                                    | russellPyro-ma-ni-yak
 
 
                                    5072 Posts | 
                                        
                                          |  Posted - 2013-07-24 : 09:19:41 
 |  
                                          | is there a very large IN(...) clause?  IF so, try putting the values into a temp table and joining to it instead of using IN.If that's not it, post the query. |  
                                          |  |  |  
                                    | jackvMaster Smack Fu Yak Hacker
 
 
                                    2179 Posts |  |  
                                    | poratipsPosting Yak  Master
 
 
                                    105 Posts | 
                                        
                                          |  Posted - 2013-07-29 : 11:31:46 
 |  
                                          | Thanks all of you, It was query issue which is building dynamically but this time it was not proper joined.During new migration in production for Sql 2008R2, what should be memory settings for MIN and MAX as we have Replication DBB also running with other batch job? |  
                                          |  |  |  
                                |  |  |  |