I'm pretty new when it comes to memory issues with SQL. Our company currently has SSMS 2012 (we updated from SSMS 2008 R2).
I'm running a procedure in SSMS 2012 that has two cursors. Within the cursors, I have a dynamic SQL statement that is grabbing certain data from tables. When the procedure is done, I notice that the data grabbed from those tables is correct in certain instances and incorrect in others. This changes with every run (final result is VERY large). I know my code is correct because I have tested it with less data and my coworker has checked it as well.
I did just notice that the 2008 R2 version has recommended RAM of 2.048GB or more and the 2012 version has recommended RAM of at least 4GB. Our company currently has 4GB of RAM on our server (blame IT). Could this be a reason as to why when I run it one time I get correct data and when I run it another time I don't?
Any sort of explanation would be helpful as I am pretty new to this stuff.