ODBC Microsoft Access Driver: Not enough space on temporary disk

odbc

I am running spatial modelling software that uses an Access database to store data needed for the computation. Each model run, data is loaded into the model from a Microsoft Access 2010 database using an SQL query and the Jet Database Engine 4.0. The connection between the software and the database is made with ODBC.

I need to run the model for thousands of locations, but after tens of model runs I get the error: “[ODBC Microsoft Access Driver] Not enough space on temporary disk”. After restarting the model, the computation runs ok for the same query and data set, but I quickly get the error again. The amount of data that is loaded differs per model run, with a maximum of ~30.000 records. When loading in only small datasets of max. 1000 records, the error does not occur.

The following did not work:

  • increasing the MaxLocksPerFile in the windows registry
  • increasing the MaxBufferSize
  • Compacting and repairing the .mdb file
  • there is enough space on my temporary disk

Interestingly, I did not have any problems with the same model on my old system (32-bit Windows XP). Only on this computer (64-bit Windows 7, 16 Gb RAM) the error occurs. The modelling software is 32-bit, and the ODBC connection is set with odbcad32.exe in “c:\Windows\SysWOW64\” directory. It seems there is a memory leak in the Windows7 version, as the same model and data works fine on an older Windows XP computer with less memory.
Any ideas are greatly appreciated!

Best Answer

Generally: Replace the Access database with SQL Express. Its maximum database size is 10 GB. It might be faster too.

If you don't want to migrate, try comparing the query plans (ShowPlan debugging). I assume that Access is using another plan because it has possible access to more resources.