Compacting a Replicated Database

When you convert a database to a Design Master, Microsoft Jet adds three new fields to your tables and adds new system tables to your database. Many of these new tables contain only a few records, but some of the new tables can grow significantly depending upon the frequency of synchronization between replicas. To reclaim unused space and to help optimize performance, compact your database frequently. In addition, always compact your database before you synchronize.

Û To compact a replicated database

  1. Compact the database into the file Db1.mdb. Don’t open the file Db1.mdb with Microsoft Access.
  2. Rename the original (uncompacted) database by giving it a .bak file name extension. For example, if your original database was named Customers.mdb, rename it to Customers.bak.
  3. Rename Db1.mdb to the original name of your database. For example, rename Db1.mdb to Customers.mdb.

Now you can open your original database. Because it has the same path and the same name, the value of its ReplicaID property doesn’t change and it is still recognized as the Design Master.

See Also   For more information on compacting databases, see “Compacting a Database” in Chapter 15, “Delivering Your Application.”