Access Generating DB1, DB2 etc

Ziggy1

Registered User.
Local time
Today, 13:31
Joined
Feb 6, 2002
Messages
462
I have a DB on the server, it is not set up for any users. The DB is just there for convienience any one can go in and print off a report, generally only one person at a time would ever update it.

It works fine, but I need to know why does it create database copies of itself (named DB1, DB2 etc).

I have "Compact on Close" checked, someone told me this could be the cause?


Thanks for any replies,
 
Ziggy,

That's the cause.

When you compact a database, access opens a new database with the
name dbn.mdb. Where the n is the next largest number of the files
db1.mdb, db2.mdb and so on.

It then individually copies each object into the new database. Most of
the time it is successful, deletes your current database, then renames
the dbn.mdb to your current database name.

If it is unsuccessful, then it just leaves the dbn.mdb file out there.
In a lot of cases, that db is OK. You'd have to verify that.

You can try manually importing all objects into a new blank db. You can
first do all tables, then forms, then reports ... Doing this you might find a
form or report that is "bad".

Sorry, no easy solution.

Wayne
 
Yes, 'Compact on Close' is almost certainly the cause. When the database compacts, it is actually creating a new file, transferring all objects to the new file, deleting the old file, and then renaming the new one. If another user is in the database while it is trying to compact, then it can't Delete and Rename and will make a copy called DB1, DB2, etc. So, basically, what you need to do is to get all users out of the db before compacting/repairing.
 
Thanks Wayne,

I just wanted to confirm that was the cause, it's not causing me any problems other than server space, so I'll either delete them or remove the compact on close and do it manually.

Ziggy
 

Users who are viewing this thread

Back
Top Bottom