I got this error running a query that goes against 2 tables with combined 50k rows.
An error occurred while executing batch.
Error message is: Insufficient memory to continue the execution of the program.
How do I get around this?
Edit
I get this when I run DBCC MEMORYSTATUS
Msg 2571, Level 14, State 1, Line 1
User 'XXXX\YYYY' does not have permission to run DBCC memorystatus.
New Edit
The server worked fine the next morning without reboots or anything else.