I have a back-end database that is set to compact on close (in the database options). Half of the time, this works as expected. The other times, I get this error (copied from the server's Event Viewer):
Microsoft Access
The query cannot be completed. Either the size of the query result is larger than the maximum size of a database (2 GB), or there is not enough temporary storage space on the disk to store the query result.
P1: 503183
P2: 16.0.4266.1001
P3:
P4:
The database is 705 MB and there is over 840 GB of free space on the disk where it resides. The error happens just before the compact command is done - the old database was copied to dbname.mdb, the old database was deleted, the dbname.mdb database has been
renamed. All that needs to happen is for Access to finish closing. Instead, I get the above error. Users can still open the front-end database and attach to the back-end.
This is a problem in particular for my batch processes. I run an Access script via a command line in a batch file. The batch process will not finish because the database is not closing.
This has been going on intermittently for months. I did not get this error when the database was almost twice the size (I was able to remove a duplicate table).
How do I determine what is happening and how do I fix this!