Page 1 of 1
Access databases not compacting
Posted: 3. Sep 2015, 15:44
by Mark Knows Access
When using Microsoft Access on a WinXP Virtual Machine, if I do the normal Compact/Repair on a database from within Access and the database is on a shared drive, the Compact/Repair doesn't seem to work. That is, the ending file size is unchanged. If I do the exact same thing on the exact same file (but after it has been moved to the VM's "C:" drive), the resultant file size is less. And I'm talking significantly less; like 10MB vs 42MB.
It is my understanding that when Access does an internal Compact/Repair, it really creates an interim database, copies all the items to it, verifies it was created, then deletes the original database, and finally renames the interim. So I don't know why the resultant file doesn't release the unused space if it is on a shared drive! Access doesn't report any problem.
Any clue as to why this would be different based solely on the location of the database?
Re: Access databases not compacting
Posted: 3. Sep 2015, 15:55
by scottgus1
Is the shared drive a true Windows shared folder, that you need networking between host and guest set up for? If so, and your non-Access network functions are working properly, then you'd probably need to talk to Microsoft about the problem.
Is the shared drive a Virtualbox Guest-Additions-established shared folder? If so, Guest Additions shared folders don't have the full Windows functions enabled and are for copying files between host and guest only They are a shortcut for when one doesn't want or can't have a true network between host and guest. Anything else beyond file transfer which happens to work is just a roll of the dice. Anything beyond file transfer that doesn't work will need a true Windows network-established shared folder.
Re: Access databases not compacting
Posted: 4. Sep 2015, 00:24
by Mark Knows Access
I'm just a Virtual Box beginner, so my terminology might not always be correct. My hardware/systems guy set it up for me when I got my new desktop (he copied my old desktop disk over to the WinXP Virtual Machine). So I'm just the typical dumb user!
When I said "Shared Drive", this is what I see in the "Shared Folder" setting for this Virtual Machine. From within the Virtual Machine, it is the F: drive. If I look at that folder from my Windows desktop, it is not marked as shared. Would making it shared help?
Re: Access databases not compacting
Posted: 9. Sep 2015, 14:09
by scottgus1
If I look at that folder from my Windows desktop, it is not marked as shared.
This may be a clue that the shared folder is being established through Virtualbox Guest Additions.
Does your guest's F: drive look like "foldername on vboxsrv (F:)" in My Computer? The "on vboxsrv" is the important part. If so it is a Guest Additions Shared Folder.
Re: Access databases not compacting
Posted: 19. Sep 2015, 18:06
by Mark Knows Access
I shared that folder (normal Windows sharing) on my C: drive. If from within Virtual Box I connect to that folder using "//server/..." like I'd do from anywhere else, I have no problem. If I connect to the folder via Vboxsvr, then I continue to have problems. That is, it won't actually delete the Access locking file (which should get deleted when last person exits a database), nor will it release space when an Access database is compacted. So apparently there is something about the shared folder connection created by Virtual Box that seems to be the issue. I'll just delete that Vboxsvr shared folder and continue to use the normal network connection and I'll be fine.
Thanks for your help.
Re: Access databases not compacting
Posted: 21. Sep 2015, 13:15
by scottgus1
Good you got it figured out. I've read that the developers designed the Guest Additions Shared Folders (via \\vboxsvr) to just move files between host & guest, not for anything else. So many other things one could do with a regular Windows shared folder won't work with Guest Additions Shared Folders. As you've found, a regular Windows shared folder accessed through a normal network is necessary for Access stuff.