Compact and Repair Database

Microsoft Access/Jet databases require routine maintenance to ensure reliability, integrity, and efficiency. When you compact a database, Total Visual Agent invokes the Microsoft Jet Engine to:

  • Consolidate and organize data pages, recovering space used by deleted or renamed objects.
  • Update table and index statistics so the query optimizer can choose the most efficient query plan.
  • Physically reorder the rows in the table in the order of the chosen clustered index on the table.
  • Reset the next available number for AutoNumber (or "counter") fields so the next available number is one higher than the current highest value in the table.
  • Repair the database if structural inconsistencies are found.

With the Compact Action, you can either compact onto a different file name/directory, or compact onto the same file name. If you choose to compact the database onto a different file name.

Compact database options

Unfortunately, you cannot compact and repair a database while it is in use, since performing these Actions requires exclusive access to the database. Scheduling Total Visual Agent Events during off-hours lets you perform these maintenance chores when users are not likely to have the database open.