Compacting currently open mdb/mde - without closing/reopen

camilovic

Registered User.
Local time
Tomorrow, 00:03
Joined
May 19, 2003
Messages
27
Is possible to compact currently open mdb/mde database - without closing/reopen database after compacting?
 
Pat Hartman said:
The compact and repair process actually creates a new copy of the db. At the end of the process, if it completed sucessfully, the old copy is renamed and the new copy is given the original name. It is possible to compact in place but I wouldn't recommend it as if anything happens during the compact, you could easily loose your whole db.

You cant compact and repair while in the FE. Since when has this changed?

Jon
 
Pat Hartman said:
Tools/Database/Compact and Repair - if you choose it with a db open, it assumes you mean the open db. If you choose it with no db open, it prompts for both from and to names.

Hmm...
I know where it is but I had originally thought while users are in the application you can easily corrupt the database while compacting. I might be wrong though.
 
From Access 2K help.

Compact on close
Note Compacting does not occur if you close a multiuser (shared) database while another user has it open.

Compact an open db
If you are compacting a multiuser (shared) database that is located on a server or shared folder, make sure that no one else has it open.

To me this would mean that if you are compacting an open multiuser db you could have corruption issues if you do not ensure that you are the only user with it open but if you use compact on close it will not fire if there are more than one users in the db. Why they couldn't apply the same logic to compact an open db is beyond me.
 
Last edited:
Now to the original question no you can't compact a db without it automatically closing and opening. It is part of the compact routine to save the original, compact a copy, rename and close old, rename compacted copy to original name, open new compacted "original".
 

Users who are viewing this thread

Back
Top Bottom