Bookmark this page Print this page

Appendix 7 – Repairing Access Databases

WARNINGS!

  1. If you encounter technical problems with a Durell system you must contact the “Help” desk on 01823-334142, or email Support@Durell.Co.Uk
  2. Whilst attempting to repair a Durell database, no one should try to go into the Durell system
  3. Durell Software Ltd will accept no responsibility for any action whatsoever taken as a result of this document

Corrupt Database or Wrong Version?

When a Durell System reports an unrecognised database format, first check whether the user is running the correct version of Durell. If the version of Durell is prior to version 3.00, but the database has been upgraded to Access 2000, then the user will receive an unrecognised database format error. This is likely to occur if version 3.00 has been installed on some machines but not all. Take note of the reported file and procedure, as shown below…

  • If the file is “Startup” and the procedure is “Initialisation” then the user is running the wrong version of Durell.
  • If the file is “AppMdi” and the procedure is “Checkdatabases” then the database is corrupt.
  • Overview Of Repair Procedure

    Having found a corrupt database the procedure to follow (as illustrated below) is…

    1. Ensure all locks are removed from the database file
    2. Take a back-up of the corrupt database
    3. Attempt to repair the database with Durell’s repair tool
    4. Attempt to repair the database with Access
    5. Attempt to repair the database with Jetcomp
    6. Run DBCompare to check for missing indexes/tables
    7. Reinstate missing indexes
    8. Check for and reinstate missing data

    1. Remove File Locks

    The maintenance tool provided by Durell Software Ltd provides a way for users to see if a database file still has users locking it…

  • Click the Windows “Start” button
  • Click “Run”
  • Type in the following line:
  • F:\imw-data\upgrade\maintain.exe F:\imw-data\  (n.b. change the data drive letter from “F” as required)

  • In the “Maintain” tool’s drop-down, click on and thereby highlight the corrupt database
  • Click on the “Info” button
  • This will display a list of users that are currently locking it. If none then the file should be free of locks, otherwise to remove the locks the file-server will need to be rebooted.
  • 2. Back-up The Database

    This is required to provide an untouched copy of the database, as it existed before any repairs or changes were attempted…

  • Click the Windows “Start” button
  • Click “Run”
  • Type in the following line:
  • F:\imw-data\

  • Click “OK”
  • Right-click on the “Imw-data.mdb” file (or other database) and select “Copy” from the subsequent menu
  • Click on “Edit” in the menu line then select “Paste”
  • This will create a file called “Copy of Imw-data.mdb” (or other database)
  • 3. Repair 1, Using Durell’s Repair Tool

  • Click the Windows “Start” button
  • Click “Run”
  • Type in the following line:
  • F:\imw-data\update\maintain.exe F:\imw-data\

  • In the “Maintain” tool’s drop-down, click on and thereby highlight the corrupt database
  • Click the “OK” button to start the Durell repair
  • Click “Yes” on the confirmation message
  • This process does not include a progress report. As it will take a number of minutes depending on the size of the database, you are recommended to allow at least 10 minutes even on the smallest file.

    If the process completes successfully a message will appear saying “Operation complete”. If so, click “Ok”, close the maintenance tool and go to step 6.

     

    If the process fails you may need to use Ctrl+Alt+Delete to close the “Maintenance” tool, after which you should go to step 4 if you have Microsoft Access, or step 5 if you don’t.

    Repair 2, Using Microsoft Access
    If the user has Access 2000, then this can be used to repair damaged database files. If the user has upgraded to Durell version 2.97 or later then Access 2000 or later will be needed. If the user is still using a Durell version prior to 2.97 then Access 97 must be used. To repair the database with Access 2000…

  • Start Access 2000
  • Click “File” and then “Open”
  • Using the “Open” dialog, locate the database that you wish to repair
  • Having located the database, click the “Open” button
  • Enter your database password and click “OK” (If you don’t know this contact Durell’s support team)
  • If the database is corrupt Access will display a message saying so, along with the option to repair it – in which case click “Yes”
  • This process does not include a progress report. As it will take a number of minutes depending on the size of the database, you are recommended to allow at least 10 minutes even on the smallest file.

    If the process successfully completes Access 2000 will open up as normal, displaying all the objects in the database, in which case you should go to step 6.

    If the process fails you may need to use Ctrl+Alt+Delete to close Access 2000, after which you should go to step 5.

    Repair 3, Using Jetcomp
    If the two preceding repairs are not successful, Microsoft provides a repair tool called Jetcomp, which you can get from their website or from the Durell support team. To use Jetcomp perform the following steps:

  • Double-click “Jetcomp” to start it
  • Set the path of the source database (e.g. F:\Imw-Data\Imw-Data.mdb), either by typing it with the file extension, or via the “Locate” button
  • Set the path of the destination database (e.g. F:\Imw-Data\Imw-Repaired.mdb) by typing it with the file extension. Ensure the destination database has a different name or location.
  • If the version of Durell is prior to 2.97 then set the destination format to 3.X
  • If the version of Durell is 2.97 or greater then set the destination format to 4.X
  • On some versions of Jetcomp these options are not present, in which case the destination database will be the same
  • Click the “Compact” button
  • If you receive a message requesting a password, click “OK” and enter it (If you don’t know this contact Durell’s support team)
  • Jetcomp displays a progress bar showing the progress of the operation, based on the file sizes of the source, destination and temporary databases.

    If the operation is successful then the progress bar will clear and a message at the bottom left-hand corner will say “Ready”.

    If Jetcomp is unsuccessful you may need to press Ctrl + Alt + Del to end the program. If Jetcomp cannot repair the database you may need to restore an earlier copy of the database file from a backup.

    6. Damage Assessment, Using DBCompare

    DBCompare is a tool for comparing database structures, available from Durell’s support desk. It relies on the following files being set-up in the folders on drive C, exactly as shown below…

      C:\Imw-Data\compare.exe

      C:\Imw-Data\Imw-Data.mdb  ß “Suspect” database (i.e. repaired one)

      C:\Imw-Data\System.mdw

      C:\Imw-Data\Compare.txt

      C:\Imw-Data\olddb\Imw-Data.mdb  ß “Safe” database (i.e. last known intact one)

    The “Suspect” database is the one that’s just been repaired, while the “Safe” database is one known to be intact (i.e. from a recent tape back-up, or the “.dbk” version, automatically created in the data folder by Durell’s “Backup, Compact & Copy” routine). The “system.mdw” file should be copied from the main data folder (e.g. F:\Imw-Data\system.mdw, etc, depending on the drive letter used). Having prepared the above files in the specified folders on DRIVE C, you should…

  • Double-click “compare.exe” to launch the DBCompare program
  • Click “OK” to begin the comparison process, which should only take a few minutes
  • If the process takes more than five minutes, then it is likely that the database is still corrupt and should be abandoned
  • Click “Cancel” to exit the program when the progress indicator shows that it has finished comparing
  • Double-click the “Compare.txt” file to open the comparison report and read it
  • The “Compare.txt” file will list all the differences between the two compared database. This includes missing and additional tables, fields, indexes, and changed fields and indexes. The item of most concern is missing tables (which rarely happens) and missing indexes (which frequently happens). If a table has gone missing then the severity of corruption will have been great and it is recommended that you restore your data from a backup. If an index has gone missing then you can reinsert the index, as described in the following section.

    7. Damage Recovery, Repairing Indexes

    Having identified the indexes that need to be reinserted, you will need to…

  • Start Access
  • Click “File” and then “Open”
  • Using the “Open” dialog, locate the database that you wish to repair
  • Having located the database, click the “Open” button
  • Enter your database password and click “OK” (If you don’t know this contact Durell’s support team)
  • Open the table that the index belongs to using the “Design” view
  • Click “View”
  • Click “Indexes”
  • N.B. All the following index information can be found by referring to the “Safe” database, as described in section 6
  • Type the name of the missing index into an empty row in the “Index Name” column on the “Indexes” dialogue
  • Select the fields on which the index is based in the “Field Name” column
  • Set whether the field is indexed in “Ascending” or “Descending” order
  • Some Indexes may need to have their “Primary” status set to “True”
  • 8. Damage Recovery, Repairing Data

    Corrupt records are most commonly seen as rows in tables that are filled with hash marks, e.g.

    ######### ############# ################ #############

    There is very little that can be done to recover lost data. Typically it will be the data that was in use at the time of corruption. Consider the following two scenarios…

    a) The system crashes while a person is entering a new policy. Having repaired the database and found that the half-entered policy is no longer there, the question arises, “Can we get the lost policy back?” The answer would be “No.”

    b) The system crashes while a person is amending an existing policy that was originally put on a few weeks ago. Having repaired the database and found that the policy is now missing, the question arises, “Can we get the lost policy back?” This time the answer would be “Yes, providing the original version of the record can be copied from a backed-up of the database”. However this will only be true if the copy is done immediately.

    END OF DOCUMENT