views:

32

answers:

1

com.microsoft.sqlserver.jdbc.SQLServerException: The system is out of memory. Use server side cursors for large result sets:Java heap space. Result set size:280,236,031. JVM total memory size:423,297,024.

I am trying to fetch a big data set from SQL and I get following error. Let me know if anyone have seen something similar and willing to drop a line.

A: 

Have you tried increasing the amount of memory available to your JVM? On the command line, add -Xmx1024m to increase the JVMs memory footprint to 1Gig. Its not a long term solution, but it will solve your immediate problem.

J. O'Hara
I am not using Java directly. So there would be no way to specify this unless I do it at JVM itself which I don't believe I have access to.
If whatever is getting the data is running out of memory and you can't change that the only way forward is to reduce the amount of memory you use in one go. a number of possibilities spring to mind but would depend on what you want to do and what software you are using.
vickirk
I tried increasing the memory available. But it still gives me the same error. Any one know why?