spacerspacer
Free help: USER GUIDE } WHAT'S NEW
Home > Support > Database Guide > How to Repair Damaged Data
spacer


How to Repair Damaged Data


 








See also:
Introduction

Troubleshooting flow chart + worksheet


How to troubleshoot damaged data


Database myths


Causes of data damage


How to repair:

How to export/import

Troubleshooting FAQs

Tips for preventing damaged data

Inside the database

Database size

Windows tips

 




 

 



Clients & Profits features a built-in set of tools, called Database Utilities, for checking, repairing, and tracking the growth of its database.

The Database Utilities tools let system managers check the integrity of the database's data files and then make the appropriate repairs on-the-spot -- before the damage gets worse.

This guide only includes instructions for repairing a damaged database. A complete description of the database tools in Database Utilities can be found in the Database Utilities chapter of your Clients & Profits user guide.

Before Repairing a Damaged Database

Repairing a database can take many hours (rough estimate: 15 minutes per megabyte) and can be run overnight unattended. Since fixing a damaged database is a time-consuming and risky procedure, you’ll increase your chances for success by taking these precautions:

Back up your damaged database. This is very important—there’s a strong likelihood that something will go wrong when using Database Utilities. If Database Utilities stops while it’s working,
then your database is definitely unusable. Making a safety copy of your broken database lets you
restore it if something goes wrong.

Reformat the database’s hard disk or drive volume on the server. This is an important step, too. In many cases, a damaged database is caused by a bad sector on the hard disk of the server, and/or to a lesser extent, a bad hard drive on a user's computer. If a damaged database is repaired on the same drive or volume that caused the corruption, you’ll make the damage worse.

Make sure no one is using Clients & Profits. Repairing a damaged database is a single-user function, so no one can access it while Database Utilities is working. The repair tool can’t be started unless all other users have quit Clients & Profits. Everyone will have to wait until the database is repaired before using Clients & Profits again (be sure everyone’s been notified before you begin the repair, so they have a chance to print any last-minute estimates, job reports, invoices, etc.).

If there’s any doubt about the server’s condition, move the damaged database to a local hard disk on the fastest computer available. Database Utilities is a very demanding tool. The amount of time it needs to repair your database depends on how fast the computer works. It requires a lot of power to work, so it'll finish sooner if you run it on the fastest Windows NT-based PC or Power Mac G5 you have.

Never run Database Utilities on a database from a workstation across the network. You’ll stress the network’s capacity for everyone, regardless of what they do, and leave the database vulnerable to LAN errors.

Disable any background applications, screen savers, and backup programs. Some screen savers don't realize the computer is busy unless it senses someone typing on the keyboard. Since Database Utilities runs by itself without any help from the user, it is sometimes stopped by the screen saver. (If you don't know how to disable your screen saver or if you even have one ask your network administrator.) If a backup program, like Retrospect, is set to back up your drive at night, be sure to disable it until after the repair is complete. Or isolate from the network the computer on which you're running the repair.

Inform your staff not to disturb the computer that’s running Database Utilities. The most common disaster when fixing a broken database is caused by users who don’t realize the computer is busy and turn off its power. Since this stops Database Utilities, the database is trashed entirely. Make sure everyone knows not to touch the computer until the database repair procedure has stopped.

Make sure there’s enough free space on the server’s hard disk. You’ll need free space of about 30% of the size of your database. Database Utilities uses this free space to work; if it runs out of space, it will stop. So if you have a 40mb database, make sure you have at least 75mb of space available.

To Repair a Damaged Database

1 Choose Setup > Utilities > Database Utilities

The Database Utilities window opens, listing the database’s data files alphabetically by name.

2 Click on the data files you wish to repair

To select all data files, click and drag on the data file names. A selection of data files can also be chosen by pressing down the Apple key (on a Mac) or the Control key (on a PC) then clicking on a data file.

3 Choose Edit > Repair Selected Files.

Clients & Profits then prompts you about your backup copy of the database—if you haven’t yet made one, click No, quit Clients & Profits, then copy your database onto a Zip, CD-R, tape, or other backup cartridge. You’ll need this backup copy in case the database repair fails for any reason (if it fails or is canceled, the database will be unusable and you’ll have to restore the backup). Once the database is safely copied, repeat these steps.

4 Click Yes when prompted.

You’ll see a "repairing" progress message as Database Utilities is working, which shows the data file currently being processed and a count of the records that have been repaired. Don’t pay much attention to this count. It’s going to be many times higher than the actual number of records in the database (it's counting indexes and other internal information, not actual records). You’ll see the count increase as the data in a file is fixed. When one file is finished, the next file is started. As long as this happens, Database Utilities is working along properly. When Database Utilities is finished, a dialog box will appear letting you know that database repair is done.


The repair tool in Database Utilities can check and fix some or all data files, depending on just how the database is damaged. Repairing a database can take many hours, and shouldn't be interrupted or else data could be lost.

Testing the Repaired Database

Be sure to test the database (e.g., print reports, add records, etc.) before using it for new data. Try the things that caused problems or didn’t work before the repair; if they work now, then the database was repaired. If not, then the database is probably not usable (and will need to be exported into a new database file).


Next Page: How to Export/Import Damaged Databases



For subscribers: VIDEOS } FAQs/TECH NOTES } LEARN
     Sign up for Clients & Profits news:
     © Clients & Profits, Inc. w e  l o v e  a d v e r t i s i n g