5 Simple Tips to Prevent MS Access Database Corruption

It's important to understand that any time an Access client disconnects unexpectedly, it may set a "corruption flag" in the .mdb file indicating that the database is in a corrupt state (regardless of whether any data has actually been corrupted or not). Any user who attempts to open the database while this flag is set will receive a message, and the database will have to be repaired before it can be used. If the users don't have permission to perform the repair, or don't know how to perform the repair, there may be significant downtime before the database is available again. This can result in a loss of productivity as well as extreme frustration for the users. Following the 5 tips below will minimize your odds of data loss from corruption in your Access databases.

1) Split your database.

The single most important thing you can do to prevent corruption in MS Access databases is to split the database into a "front-end" and a "back-end". The front-end contains all of the forms, queries, and reports, while the back-end contains only the data tables. A copy of the front-end is placed on each user's computer, and the back-end with the table data is stored in a shared folder on the network. How does this prevent corruption? Well, consider the amount of information that must make it across your network to your computer each time you open a form or report. If one bit of that information doesn't make it intact, you risk corrupting your database. Alternatively, if the forms, queries and reports are all stored on your local computer, then the only bit of information that needs to traverse the network is the actual table data. By reducing the amount of data you need to move back and forth across the network, you significantly reduce the chances of corrupting your database. If you're having corruption problems with an Access database on a network drive, splitting the database is the single most important thing you can do to stop it.

2) Don't hold connections open.

This one applies to both programmers and users. If you're a programmer, make sure you close your connections as soon as possible after using them. Leaving the connections open will allow more opportunities for an "unexpected" dropped connection. The only time you may want to leave a connection open longer than required would when it's used inside a loop. For such a case, open the connection at the beginning of the loop, and then close it after the loop is completed. Just make sure it gets closed for all cases (including exceptions).

If you're using a Microsoft Access database or application, be sure to close it when you're finished. Again, leaving the application open provides the opportunity for corruption if a network connection is lost. Remind users to always close the application before going home, as nightly backup jobs may fail or cause corruption in the shared file if there are open connections.

3) Exit the database correctly.

Always close the database or application correctly. Ctrl-Alt-Delete/End Task can wreak havoc on Access databases. Whenever possible, complete your tasks, then close the application using the File - Exit menu option or alternative Exit option provided by the application.

4) Don't skimp on hardware.

Remember that the corruption flag can be set from the slightest packet loss between your computer and the database file. MS Access has sometimes been called "the canary in the coal mine". It has gained this reputation from being the first application to "die" when there's the slightest hint of trouble on your network. Just like the slightest presence of gas caused the canary to die, the slightest presence of network problems and packet loss can kill your Access applications. Make sure you're not using the cheap built-in NICs that come with some PCs. Instead, use brand name network cards. The same goes for cheap hubs. Whenever possible, match good brands of equipment throughout your network.

5) Compact and repair regularly.

Performing the built-in compact and repair function regularly is recommended to prevent corruption and improve performance. Consider automating this function with a utility to compact and repair all of your databases nightly or during the weekend.

Error messages to look out for - the following error messages may signal database corruption:

"The database 'databasename.mdb' needs to be repaired or isn't a Microsoft Access database file."

"Record(s) can't be read, no read permissions on 'databasename.mdb'"

"Unexpected Error 35012"

"Unrecognized database format 'databasename.mdb'."

"'databasename.mdb' isn't an index in this table. Look in the Indexes collection of the TableDef object to determine the valid index names."

"The Microsoft Jet database engine could not find the object 'databases'. Make sure the object exists and that you spell its name and path name correctly."

"The database has been placed in a state by user '' on machine '' that prevents it from being opened or locked"

"Disk Error -- Reserved error (-1601)"

"The database has been placed in an unexpected state."

"Record(s) cannot be read; no read permission on 'MSysObjects'"

"Record(s) cannot be read; no read permission on 'MSysACEs'."

"The Microsoft Jet database engine cannot find the input table or query 'MSysAccessObjects'. Make sure it exists and that its name is spelled correctly."

Conclusion:

While you may never be able to prevent all Microsoft Access database corruption, you should be able to stop 98% of the problems before they occur by following these 5 simple tips. Follow these tips and implement a prudent automated backup schedule to minimize your odds of significant data loss.

Kevin Sparks is a technical writer for Kaizen Software Solutions, the producer of Digital DBA, an automated MS Access monitoring, backup, and compact/repair utility. For more information, visit their website at http://www.kzsoftware.com/products/digitaldba

In The News:


Getting Hard Disk Recovery is Easy
American Chronicle, CA - Dec 4, 2008
Hence, turn off the system at the moment you doubt or actually lose the data and let hard disk recovery do the job. Different data recovery companies master ...

CameraTown.Com (press release)

Data Recovery Made Easy with Hetman Uneraser
Emediawire (press release), WA - Dec 3, 2008
Hetman Software announces the release of Hetman Uneraser, a fully featured data recovery tool to undelete and recover lost and deleted files. ...
Photo Recovery Made Easy: Now with RAW Support PR Web (press release)
all 4 news articles

The weirdest computing disasters of 2008
ZDNet - 22 hours ago
The top 10 data blunders of 2008, compiled by data recovery firm Kroll Ontrack, have seen people across the world falling victim to acts of great stupidity ...

International Business Times

Step By Step Data Recovery with Undelete Wizard
International Business Times, NY - Dec 3, 2008
Data recovery software by Wizard Recovery company makes it easy to anyone to recover lost and deleted files after a system crash. ...

Vital Tools to Keep Your System Up and Running
MarketWatch - Dec 3, 2008
Real-time data recovery: This is a new category that fills in the gap in data protection in-between backups. A common source of data loss is files ...

i365(TM), A Seagate Company, Joins the ABA Member Advantage ...
MarketWatch - Dec 2, 2008
Our offerings include i365 EVault Data Protection software and SaaS for backup and recovery; i365 Retention Management solutions for data recovery, ...

Hosting.com Presents Cloud Computing Solution at Gartner's Data ...
MarketWatch - 13 hours ago
Hosting.com provides enterprise colocation, cloud computing, dedicated hosting, managed hosting, disaster recovery and business continuance services to a ...

SonicWALL Launches Comprehensive Backup and Recovery Solution for ...
MarketWatch - 17 hours ago
Human error is to blame for as much as 33 - 40 percent of all data loss, firms are fast realizing that tape-based recovery solutions are no longer suitable ...

Dollar mixed ahead of Nov. jobs data
MarketWatch - 25 minutes ago
... broad based recovery over the medium term," they wrote. Strategists at HBOS said an adverse reaction by equities to Friday's US nonfarm payrolls data ...

Layne Christensen Reports Record Third Quarter Fiscal 2009 Earnings
MarketWatch - Dec 4, 2008
Included in last year's income before income taxes for the nine months was $1626000 in non-recurring income from the recovery of previously written off ...
Mining Oil Announces Third Quarter 2008 Results and Listing on the ... MarketWatch
all 14 news articles
data recovery - Google News

Data Backup for Beginners

It's 10pm. Do you know where your data is?Data. Small... Read More

Computer Data Recovery Options

Losing files on your computer can be a frightening experience... Read More

How To Use Spyware Elimination Software

Spyware elimination software is designed to detect and eliminate spyware.... Read More

Did You Loose Your Windows XP Password? What Should You Have Done Before it Happened?

There is a common problem that happens with lot of... Read More

Online Data Backups for Newbies

How long have you been doing business online? Whether you... Read More

Disaster Recovery Made Easy With Online Backups

Whenever disaster strikes the most critical asset that every company... Read More

Read This Now: Its Not If You Will Lose Your Data, Its When Will You Lose Your Data

With Adware, SpyWare, E-Mail Viruses, Java Script Viruses and Hardware... Read More

Data Recovery: Beginners Tips

Right now you probably in a lot of mental pain,... Read More

5 RAID Data Recovery Prevention Tips

If you have spent the time to increase your computer's... Read More

When Disaster Strikes: How Long Would Your Business Survive if Files On Your Computer Disappeared?

A Tornado? In Birmingham? In The United Kingdom? Unthinkable!Yes, in... Read More

Business Continuity and Disaster Recovery - A Business Not a Technology Issue

Hackers, hurricanes, fires, flooding, power outages, denial of service attacks,... Read More

Big Time Disaster Recovery Solutions Available for the Little Guy

There was a time - not too long ago -... Read More

Backup Your Data Or Lose Your Life!

Oh the perils of collecting those precious photos on your... Read More

Data Recovery Processes

Six months ago my computer crashed. When I turned my... Read More

Backup -- But Where To?

We all know we have to backup regularly, but those... Read More

Sea-Front or Action-gate

June 25, 2005Seagate Technologies' web site now indicates the company... Read More

3 Ways Computers Can Hurt Your Ministry - Part 1 - Ineffective Data Backups

Our computers have become almost indispensable ministry tools. What would... Read More

Comparing Data Recovery Software

Software programmers recognize the importance of data files, and thankfully,... Read More

HasYour Computer Hard Drive Ever Crashed? Are You Challenged by Backups?

The following scenario's have probably been repeated thousands of times,... Read More

Business Continuity and Disaster Recovery - Reducing Your Risk Profile

Like all plans, there is an ultimate goal to achieve.... Read More

I Lost It! Simple Guide To Recovering Corrupted Images And Files

WinUndelete http://www.deprice.com/winundelete.htmWinUndelete? is an easy to use undelete software utility... Read More

Its All In The Planning - Surviving Disaster

ITS ALL IN THE PLANNING - PREPARING FOR THE UNTHINKABLE*... Read More

How To Limit Hard Drive Data Recovery Costs

With the value on information rising day by day, one... Read More

Data Recovery The Easy Way

If you aren't prepared in advance, you will most likely... Read More

Do I Really Need To Backup?

Okay, computers a machine, right? Okay, maybe not yours. You... Read More