how2it07.htm

Database Integrity - how to repair a database

Overview

Once in a while, an InfoTouch database may become corrupt. This can happen for a variety of reasons, but the most common ones are poor electrical connections, power outages and intermittent network connections, or other situations that can cause the computer's operating system (DOS or Windows) to "crash" or "lock up." Because InfoTouch is totally reliant on the computer's operating system to be a solid foundation for operation, if the computer itself runs into problems, there isn't anything InfoTouch can do about it. The result is often a "database error" message that pops up on the InfoTouch error window.

Common database error messages that usually mean a database needs to be repaired

Error messages are generally in two numbered parts, such as 5,2. In addition, you'll usually see the name of the database that's having the problem such as "Datafile error 5,2 in INV.DB." Here's a list of the most common errors (the second number is listed here as x) and additional options of what to do about ithem:

Datafile error 2,x

  1. Reboot the computer.
  2. Make sure the data directory is shared on a network
  3. Check the hard drive for errors. Run SCANDISK to check for errors.
  4. File may be damaged -- restore the noted file from a backup.

                Datafile error 4,x (record key not found)

  1. Try rebooting first.
  2. Rebuild the database if that doesn't work.

                Datafile error 5,x (duplicate record)

  1. Rebuild the database.
  2. Restore from the latest close-out if rebuild doesn't work.

Datafile error 12,x (file not found)

  1. Check the data directory for the existence of the file named in the error message.
  2. Restore the file from the latest backup if it is missing.

Datafile error 14,x (can't open or create the pre-image file)

  1. Reboot the computer and try again.
  2. Check to see if the hard disk is full.
  3. You may have logged into a server but you don't have "write" or "create" privileges on the server. Check with your network administrator.
  4. A file by the same name is "locked" by the server. Reboot the server.

Datafile error 15,x (pre-image error)

  1. Try to rebuild the database first.
  2. Restore from the latest backup if that doesn't work.

Datafile error 18,x (disk full)

  1. There is no room on the destination hard disk. Erase some old BAK files, old documents, or possibly old GLxxxx.LOG general ledger log files to clear out space. Then reboot and try again.
  2. Replace the hard disk with a larger one.

Datafile error 20,x  (Btrieve not loaded into memory)

  1. Reboot the computer and try again.
  2. If the problem persists, you may have to uninstall and reinstall InfoTouch.

Datafile error 91,x (server error-lost communication on the network)

  1. Reboot the register
  2. If that doesn't work, check network connections.
  3. Check to make sure the server is running.

Database Repair Procedure

InfoTouch 2000 includes a handy batch file called FDREBUILD.BAT that automates the process for you. Here's how to use it:

  1. Be absolutely certain that no other users are logged in and using InfoTouch whenever you repair a database.
  2. Build a desktop shortcut to run the program. Assuming that your data directory is the C:\IT2000\VERTICAL folder, your desktop command line would be: cmd.exe /k  c:\it2000\vertical\fdrebuild.bat
  3. Double-click on the desktop shortcut. It should provide a black command prompt box on the screen and a brief sentence for usage.
  4. If the datafile error message related to the INV.DB file, you'd type this to fix it: FDREBUILD  INV  (and press the ENTER key to begin).
  5. Follow the directions on the screen. If an error message pops up during rebuild, you'll want to terminate the rebuild process and call for technical support. An example of a possible error message is an "error recovering variable page" message.
  6. When done, type EXIT (and press ENTER) to exit back to Windows. Then try your InfoTouch system again.

InfoTouch for DOS users have a slightly different procedure, and the name of the handy batch file that automates the repair process is called BUFIX.BAT. Alternately, you may have one named REBUILD.BAT that does the same thing.

  1. At the command prompt, type CD TNS (and press ENTER) to get into the TNS directory.
  2. If the datafile error message related to the INV.DB file, you'd type this to fix it: BUFIX INV  (and press the ENTER key to begin)  or if you have REBUILD.BAT instead, you'd type REBUILD INV.
  3. Watch the screen to see if any additional error codes pop up.
  4. Reboot your computer when you're done and then try your InfoTouch system again.

Database Synchronization Issues

InfoTouch's databases must be "in sync" with one another for the system to maintain its integrity. Here's an example. Let's suppose that you added a piece of inventory to the inventory database and sold it to a customer. The POS.DB (inventory) and INV.DB (sales invoices) databases are kept in sync because both of them have a common reference: the new inventory item number. However, if you subsequently restored the inventory database (POS.DB) from an earlier copy and then ran a listing of the sold items, the older inventory database wouldn't know about the new item and consequently it would likely show up as a "non-inventory" item with an item number that didn't exist in the database, hence, the databases would be "out of sync" with one another and the accurate reporting of information can't be done.

Synchronization issues such as this often arise when various individual files are repaired or restored to the system from a backup instead of restoring the entire backup. Sometimes this isn't critical while at other times, it can be very important because various pieces of information can be spread between two or more database files.

If you must restore an individual data file from a backup because it became so corrupt it could not be repaired, always use the MOST RECENT BACKUP as the source for the restore and try only the individual file first. Start InfoTouch and run some reports from each of the reporting modules to see whether any of the sales or other totals have changed. You often will know right away whether the databases are "close enough" to be in sync because if they're not, you'll likely encounter a secondary error message. Then you can restore the file named in the secondary message and restart the system again. Repeat the process as many times as necessary until the system runs without problems.

 

Click here to return to the menu