Compact and repair a database Show
Access for Microsoft 365 Access 2021 Access 2019 Access 2016 Access 2013 Access 2010 Access 2007 More...Less Database files can grow quickly as you use them, sometimes impeding performance. They can also occasionally become corrupt or damaged. You can use the Compact and Repair Database command to prevent or fix these problems. The compact process does not compress your data — it makes your database file smaller by eliminating unused space. The Compact and Repair Database command can also help improve performance of your database. Tip Splitting a database can help prevent the corruption of database files and limit the loss of data by keeping the data in a separate file that users do not access directly. Ways to compact and repair a databaseThere are several approaches to compacting and repairing a database. A common practice is to automatically compact and repair a database when it closes. In addition, you can manually run the Compact and Repair Database command, when you have a database open, and on a database that is not open. Before you beginTake the following actions before you begin a compact and repair operation:
Top of Page Automatically compact and repair a database when it closesYou can select the Compact on Close database option if you want to automatically compact and repair a database when it closes. Setting this option affects only the database that is currently open. Set this option separately for each database that you want to automatically compact and repair. In multiuser databases, you might not want to set this option, because it can momentarily disrupt database availability.
Top of Page Manually compact and repair a database that you have open
Top of Page Manually compact and repair a database that is not openUse this procedure when you can't directly open an Access database.
Access creates a copy of the compacted and repaired database in the same location. Top of Page Compact and repair a corrupted database when Access prompts youWhen you try to open a database file that is corrupted, if you are prompted by Access to compact and repair the database, select Yes. Two things can happen:
Top of Page Why you should compact and repair a databaseThis overview explains how using the Compact and Repair Database command can help prevent and correct the following problems that sometimes affect a database: files growing larger with use and files becoming corrupted. Database files grow with useAs you add and update data and change its design, a database file becomes larger. Some of this growth comes from new data, but some comes from other sources:
As your database file fills up with the remains of temporary and deleted objects, its performance can degrade. Objects may open more slowly, queries may take longer than normal to run, and typical operations generally seem to take longer. Top of Page Database files can become corruptedIn particular circumstances, a database file can become corrupted. If a database file is shared over a network and multiple users work directly with the file simultaneously, that file has a small risk of becoming corrupted. The risk of corruption is somewhat greater if users frequently edit data in Memo fields, and the risk grows over time. You can mitigate this risk by using the Compact and Repair Database command. Often, this type of corruption results from a problem with a Visual Basic for Applications (VBA) module and does not pose a risk of data loss. However, this type of corruption does pose a risk of database design damage, such as lost VBA code or unusable forms. Rarely, database file corruption does result in data loss. Usually, this loss is limited to the last action of one user; that is, a single change to data. When a user starts to change data and the change is interrupted — for example, because of network service loss — Access marks the database file as corrupted. The file can be repaired, but some data may be missing after the repair is complete. Need more help?What function does compacting an Access database perform?Periodically, you should compact the Access database. Compacting allows Access to rearrange the data by filling in the space left behind by the deleted objects.
What is not true about field names in databases?What is not true about field names? They can be up to 64 characters in length.
Which of the following statements is true about how Access and Excel share data?Which of the following statements is TRUE about how Access and Excel share data? Access can import data from Excel, and export data to Excel. If data from an Excel worksheet is imported into Access and no column headings exist, the data will import using: Field1, Field2, Field3, etc.
What happens if you delete a field from a table that contains data?You can delete a field from a query or from a table in Access. When you delete a field from a query, the field remains in the database, but is no longer used in the query. When you delete a field from a table, the field is deleted from the entire database.
|