Article ID: 209137 - Last Review: January 26, 2005 - Revision: 4.1 How to troubleshoot and repair a damaged Jet 4.0 database in Access 2000This article was previously published under Q209137 Novice: Requires knowledge of the user interface on single-user
computers. This article applies only to a Microsoft Access database (.mdb). For a Microsoft Access 2002 or Access 2003 version of
this article, see
283849
(http://support.microsoft.com/kb/283849/
)
. On This PageSUMMARY Environmental factors may leave your database file damaged.
The symptoms of a corrupted database can range from "#Deleted" appearing in
certain records, to the inability to open one of the objects in the database,
to the complete inability to open the file in Access. The Compact and Repair
utility in Microsoft Access is a useful tool that you can use to recover and to
optimize Microsoft Access 2000 database files. This article describes this
Access 2000 utility and then offers other ways to repair damaged databases.
Also, information about what can cause corruption is provided. MORE INFORMATION Although the steps outlined in this article are typically
successful for recovering damaged database files, to safeguard your data you
must create a backup copy of your database file as frequently as you can. The Compact and Repair UtilityThe Compact utility gets rid of empty space in an existing database. The Compact utility does this by creating a new destination database and then by copying each object in the old database to the new database. If you select to compact the database to the original database name instead of a new database, the Compact utility creates a temporary database, exports all of the objects from the original database to the temporary database, removes the original database, and then renames the temporary database to the name of the original database.The Repair utility tries to repair only the tables, the queries, and the indexes in the database. The Repair utility does not try to repair damaged forms, reports, macros, or modules. The following is a list of actions the Compact utility performs:
Important Guidelines for Running the Compact and Repair UtilityBefore you can run the Compact and Repair Utility on a database, the following conditions must be met:
Recovering a Damaged DatabaseThe following steps outline a general method that you can use for repairing a damaged database:
As a final option, some consultants may provide a Microsoft Access database repair service. Because this is such a specialized service, the most efficient way to locate a consultant is to post a message in the Microsoft Access "Third Party and User Groups" Internet newsgroup, which has the following newsgroup address:
microsoft.public.access.3rdpartyusrgrp
For additional information about Microsoft
Access Internet newsgroups, click the article number below to view the article
in the Microsoft Knowledge Base: 150057
(http://support.microsoft.com/kb/150057/EN-US/
)
ACC: Microsoft Access Newsgroups Available on the Internet
Typical Causes of .mdb File CorruptionThere are four main causes of corruption in Access/Jet .mdb files.Database Is Suspect/Corrupted Because of Interrupted Write OperationCorrect shut down that is completed by clicking Exit or Close on the File menu, is highly recommended. However, if a database is open and is writing data when Access is incorrectly shut down, the Jet Database Engine may mark the file as suspect/corrupted. This can occur if the computer is manually turned off without first shutting down Windows or if power is lost. Other situations may not shut down Access but may still interfere with the writing of data to the disk by Jet while the database is open. This can occur, for example, when networks experience data collisions or when disk drives malfunction. If any of these interruptions occur, then Jet may mark the database as potentially corrupted.When Jet begins a write operation, it sets a flag and then resets the flag when the operation is complete. If a write operation is interrupted, the flag remains set. When you try to open that database again, Jet determines that the flag is set and then reports that the database is corrupted. In most cases, the data in the database is not actually corrupted, but the set flag alerts Jet that corruption may have occurred. In cases such as this, if you compact or repair, or do both, you can typically restore the database. Fortunately, there are ways to determine which user and which workstation is responsible for marking the file as suspect. See "How to Determine What Users/Workstations Are Causing the File to be Marked Suspect" topic later in this article to determine which users or workstations, or both, may cause Jet to mark the file as suspect. Faulty Networking HardwareIn this case, the file corruption does not involve the Jet Engine. Rather, the file is literally corrupted by some outside cause. The cause can be one or more links in the hardware chain between the computer that the database resides on and the computer that has the database open. This list includes, but is not limited to, network interface cards, network cabling, routers, and hubs.Hardware-based corruption is typically indicated by .mdb files that cannot be restored through the use of compacting, of repairing, or of Jetcomp. Hardware corruption typically occurs until the responsible hardware is repaired or is replaced. Opening and Saving the .mdb File in Another ProgramThere is no way to recover a .mdb file that is opened and then is saved in a different program. For example, Microsoft Word permits you to open an Access database, and then to save it. (No purpose is served if you open a .mdb file in another application because all you see are extended characters.) Saving the file this way causes the .mdb file to prompt you for a database password when you try to open the file in Access. This occurs although the file may have never been password protected in Access. The password prompt occurs in such cases because the first byte range that Access checks when it opens a file is the location where the database password is. If that byte contains corrupted data, Access treats the file as password protected. Even if there was a way to get around the password prompt in this case, the database is still unrecoverable because the binary structure is scrambled and therefore unreadable to Access. You must recover a backup copy of the file as the only solution in this case. For additional information about this issue, click the article number below to view the article in the Microsoft Knowledge Base:243895
(http://support.microsoft.com/kb/243895/EN-US/
)
ACC2000: Database Password Appears Even Though It Was Never Set
Mismatched Versions of the Jet Database EngineIf you run different versions of the Jet Database Engine in your environment, you can also cause corruption of an Access database. Different versions of Jet write to the database differently, and therefore can be the cause of corruption in a database.How to Determine What Users/Workstations Are Causing the File to be Marked SuspectWhen you troubleshoot to find out what is causing database corruption, in some cases you may have to see who is logged into the database. With Microsoft Visual Basic for Applications in Access 2000, you can output a list of users who are logged into a specific database.For additional information about how to do this and example code, click the article number below to view the article in the Microsoft Knowledge Base: 198755
(http://support.microsoft.com/kb/198755/EN-US/
)
HOW TO: Check Who Logged into Database with Jet UserRoster in Access 2000
Methods That Can Be Used to Prevent Corruption
REFERENCESFor more
information about repairing databases, click Microsoft Access Help on the Help menu, type repairing in the Office Assistant or the Answer Wizard, and then click Search to view the topic. For additional information about a downloadable utility that may also repair a damaged database, click the article number below to view the article in the Microsoft Knowledge Base: 273956
(http://support.microsoft.com/kb/273956/EN-US/
)
ACC2000: Jet Compact Utility Available in Download Center
For additional information about troubleshooting
databases in earlier versions of Access, click the article numbers below to
view the articles in the Microsoft Knowledge Base: 279334
(http://support.microsoft.com/kb/279334/EN-US/
)
ACC97: How to Repair a Damaged Jet 3.5 Database
109953
(http://support.microsoft.com/kb/109953/EN-US/
)
ACC: How to Troubleshoot/Repair Damaged Jet 3.0 and Prior Databases
| Article Translations
|
Back to the top
