Matlab2012b gives memory error when loading SQL data.

2 views (last 30 days)
I am moving from 2010a to 2012b and for a given database I could retrieve 100k records in 2010a but get Java memory error in 2012a at 100k records. Java exception occurred: java.lang.OutOfMemoryError: Java heap space at java.util.Arrays.copyOf(Unknown Source) at java.util.Vector.ensureCapacityHelper(Unknown Source) at java.util.Vector.addElement(Unknown Source) at com.mathworks.toolbox.database.fetchTheData.dataFetch( I am using sqljdbc4.jar to access SQL. Is there some other trick with 2012b ?
thanks for any help.

Accepted Answer

Sean de Wolski
Sean de Wolski on 17 Oct 2012
If you're on a 64bit system I highly recommend bumping your Java Heap Space up a fair amount for R2012b. On Win7 8Gb of RAM I have it set to 1000ish.
Home->Preferences->General->Java Heap Memory->Adjust it, apply and restart MATLAB.
Sean de Wolski
Sean de Wolski on 18 Oct 2012
Yes it does use more Java Memory since there's more UI stuff going on.

Sign in to comment.

More Answers (1)

Bobby on 5 Apr 2013
You may get rid of the error owing to fix mdf files analyzes the internal structure of SQL databases and retrieves affected data even after serious data corruption problems


Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!