solutions products evaluate support partners about
solutions
products
evaluate
support
partners
about
Repairing an Express 4.5 Library
Technical Note 1334
Last Reviewed 13-Apr-2001

Applies To
Express Software Manager version 4.5

Summary
This technical note explains how to repair and maintain the integrity of Express libraries. The procedures involve updating the Microsoft Jet database engine files and running the Express Repair utility to compact and repair the database.

Preventing Library Corruption
To prevent corruption of an Express library, follow the recommendations in Technical Note 1347.

Warning
Never use End Task to close Express. If an Express database operation is taking a long time or if Express Console is not responding, do not end the task. The library will corrupt if End Task is initiated during any Express or Microsoft Access database operation.

Some Express database operations (including opening a library, running an update, or running a report, running a library repair) may take several hours to complete -- particularly when performed across a WAN. Unfortunately, Express Software Manager may not give a visual indication that it is still active, and the progress bar may appear to be stalled.

Instead of pressing Ctrl+Alt+Del to open the Windows NT Task Manager (or the Close Programs dialog box in Windows 95 or Windows 98), look in the Event Viewer to check whether the Express procedure is active. The Event Viewer itself may update slowly, so refrain from ending the task. To reduce the waiting time, increase the RAM and upgrade the processor speed on the computer that runs Express Console. You could also increase the RAM and processor speed of the server.

Repairing a Corrupt Library
To repair a corrupt library, you must obtain and apply updated files from Microsoft and Express Metrix. The downloaded files must be copied onto the computers where Express Console and Express Library Manager are installed.

Step 1: Upgrade the Microsoft Jet Database Engine
Express Software Manager uses Microsoft Access 97 to manage several database functions, such as running reports and consolidating libraries. In turn, Microsoft Access 97 uses the Microsoft Jet database engine for many of its functions. Express Metrix recommends that you install Microsoft Jet 3.5 Service Release 2 (SR-2) or higher to take advantage of the enhanced compact and repair functionality. Follow these steps:

  1. Use a web browser to link to the Microsoft Knowledge Base article at

  1. You need to download Microsoft Jet 3.5 SR-2 or higher. The article contains links to download the most recent releases of Jet 3.5.

    Note: Read the entire article for the steps necessary to install the Jet service releases.

  1. After downloading the Jet 3.5 Service Release self-extracting executable, run it and specify a location for the extracted files.

  2. Close any applications that use the Microsoft Jet database engine, including all Express products, Microsoft Access, and Microsoft Visual Basic.

  3. For each machine where either Express Console or Express Library Manager is installed, copy the extracted files (listed in step 3 above) from the temporary location, replacing any existing versions of these files, into your Windows system folder:

    Windows NT: C:\Winnt\System32

    Windows 95: C:\Win95\System

    Windows 98: C:\Windows\System

Step 2: Obtain the New and Updated Files from Express Metrix
Before you run the database repair utility, which is also used to prevent library corruption, you need to update some files used by Express Console and Express Library Manager.

  1. In a web browser, download and extract the Ex1412as.exe file from the Express Metrix Web site:

  1. By default, .DLL file types are hidden. Follow the steps below to view all files on your computer.

    1. Start Windows Explorer. (Click the Start button, point to Programs, and click Windows Explorer.)

    2. On the View menu, click Options.

    3. Click the View tab.

    4. In the Hidden Files section, click the Show All Files button. Then clear the Hide file extensions for known file types check box.

    5. Click OK.

  2. On the workstation where Express Console is installed, copy or replace files listed below to the Express Console folder, C:\Program Files\WRQ\Express Console.

    1. Copy Exrepair.exe into the Express Console folder.

    2. Back up (copy and rename) these existing files:

      Exclean.mdb
      Exdbapi.dll
      Express.exe
    1. Copy the new (downloaded) version of these files into the Express Console folder.

  1. Similarly, on each Windows NT server or workstation where Express Library Manager is installed, copy or replace the following files to the Express Services folder, typically C:\Program Files\WRQ\Express Services.

    1. Copy Exrepair.exe into the Express Services folder.

    2. Back up (copy and rename) these existing files:

      Exclean.mdb
      Exdbapi.dll
    1. Copy the new (downloaded) version of these files into the Express Services folder.

    Note: If Express Library Manager and Express Console are installed on the same machine, copy Exrepair.exe and replace Exdbapi.dll in both the Express Console and the Express Services folders on that machine.

  1. On each machine where Express Console or Express Library Manager is installed, copy and register the Mscomctl.ocx file as follows:

    1. Copy Mscomctl.ocx to the Windows system directory (Winnt\System32 or Win95\System).

    2. Click Run on the Start menu.

    3. Enter the appropriate command below as one continuous line with no spaces.

      Windows NT: Regsvr32 C:\winnt\system32\mscomctl.ocx

      Windows 95: Regsvr32 C:\win95\system\mscomctl.ocx

      Windows 98: Regsvr32 C:\windows\system\mscomctl.ocx

    1. Repeat steps 4 a-c on each Express Console or Express Library Manager machine.

Step 3: Disable the Child Library Updates
The updated Exdbapi.dll file provides an option to not update the child libraries before consolidating them into a parent library.

Disabling the Update before consolidate setting helps to reduce the chances of network-related file corruption. Express Metrix recommends setting up the Library Manager Service at each site where a library is located to schedule a local update of the library to be performed prior to consolidate. For more information about setting up the Library Manager service, see the section entitled "Automating the Library Maintenance Procedures" below.

Note: Disable the Update before consolidate setting only if the child libraries are updated in some other way before consolidating. For example, if you manually update a child library from Express Console or if the child is located at a remote site that is updated by a Library Manager service running at the remote site, then disable Update before consolidate to make the consolidate more efficient.

To efficiently consolidate a library, disable the update as follows:

  1. In Express Console, open the parent library to disable the child library updates. Click Library Properties on the File menu.

  2. On the Consolidate tab, clear the check box to Update child databases before consolidation.

Step 4: Run Express Metrix's Exrepair Utility
The Exrepair utility, which you obtained with the Express Metrix patch, compacts the Express database (Express.mdb) and runs a library repair.

Before you run Exrepair, note the following administrative considerations:

  • Allow up to six hours with exclusive access to the database. Exrepair.exe runs until the compact and repair procedure is completed.

  • Exrepair.exe must be run from a Windows NT 4.0, Windows 98, or Windows 95 machine. If the library is on a Novell server, run the utility from a connected Windows NT, Windows 98, or Windows 95 machine.

  • Run the Exrepair utility on all Express libraries.

  • Run the utility at off-peak hours. (Or automate the procedure using the instructions in the next section.) You can start Exrepair.exe from Windows Explorer or from a command line.

To run Exrepair from Windows Explorer:
  1. Configure the Event Viewer to capture Debug events:

    1. From the Start menu, point to Programs, Express Software Manager, and click WRQ Event Viewer.

    2. On the File menu, click Log Settings.

    3. Select all of the Event type check boxes, and click OK. If prompted to View Debug events, click Yes.

  2. Close the library in Express Console. (Express.mdb cannot be opened in Express Console or by the Library Manager during the compact and repair operation.)

  3. On the Express Console machine, navigate to C:\Program Files\WRQ\Express Console, and double-click Exrepair.exe.

  4. Browse to the library that you want to repair, and click Repair.

To run Exrepair from a command line:
  1. Configure the Event Viewer to capture Debug events. (See step 1a-c above for details.)

  2. Close the library in Express Console. (Express.mdb cannot be opened in Express Console or by the Library Manager during the compact and repair operation.)

  3. On a command line, enter the syntax below on one continuous line, and replace <library location> with the actual path to the server or share where the Express library is located.

    "C:\Program Files\WRQ\Express Console\Exrepair.exe" <library location>\Applib.lib
Step 5: Verify that the Library Repair Succeeded
Look in the Event Viewer for a message about whether the library repair succeeded or failed.

  1. From the Start menu, point to Programs, Express Software Manager, and click WRQ Event Viewer.

  2. Review the list of messages to verify the outcome of the library repair.

    If the repair was successful, continue with the next section, Automating the Library Maintenance Procedures, to schedule Exrepair to run weekly. You may want to clear the Debug check box in the Event Viewer.

    If the repair failed, continue with step 5.

  1. If the library repair failed, run the Jetcomp utility as follows:

    1. In Windows Explorer on the Express Console machine, navigate to the Express library folder that needs to be repaired.

    2. Rename the Express.mdb file to Express.old.

    3. In the folder where you extracted the Jet 3.5 Service Release self-extracting executable, double-click Jetcomp.exe.

    4. In the Database Compact Utility dialog box, click the button next to the Database to Compact From (Source) field. In the Database to Compact From dialog box, select All Files from the Files of type drop-down menu.

    5. In the same dialog box, navigate to the library folder and double-click Express.old.

    6. In the Database Compact Utility dialog box, in the Database to Compact Into (Destination), enter <path to library>\express.mdb.

    7. Click the Compact button.

  2. After Jetcomp runs, re-run Exrepair.exe for this library. Look in the Event Viewer to verify whether the repair succeeded.

Troubleshooting
If the repair did not succeed, troubleshoot the problem using the following information.

Possible Error Messages
If you create a new library after applying the Express Repair utility, or if your database was imported during the Express Repair process using the Express Repair utility, two errors will occur. (During the repair process, an import only occurs if the first two stages of the repair fail.)

Error when opening Help file: If you try to open the Express Help file while in Reports you will receive the following error:

    "Cannot find Exrpt50.hlp."
When prompted to find the file, click Yes, and the correct Help file, Exrpt40.hlp will be found.

Error when opening Reports from Express Console: When opening Reports from Express Console, you will receive the following error:

    "The profile 'Em50' that you specified on the command line doesn't exist in the Windows Registry."
Click OK and the specified report will open as expected.

Locked Library Files
Library corruption can occur when many clients attempt to open a shared file that is locked by another workstation. Look in the Express.log file to see errors related to the locked file and file corruption.

If the library is located on a Windows NT 4.0 server, be sure to disable Oplock. Follow the procedures in Technical Note 1316.

If the library is located on a Novell server, you can use the Novell administrative tool, WhoHasIt, to identify which workstation has a file locked. This tool is available at http://statsware.ackind.net/whohasit/index.html.

Automating the Library Maintenance Procedures
You can use a scheduler to automate the compact and repair procedures that prevent library corruption. Follow the procedures and samples below.

Install Express Library Manager
Install the Express Library Manager service on each Windows NT 4.0 server that hosts a library. (The service runs only on a Windows NT 4.0 workstation or server.)

To install Express Library Manager:

  1. Run Install.exe from your Express Software Manager product CD.

  2. Select Enterprise Services from the Install screen.

  3. Follow the online help for detailed installation instructions.

  4. If you have not already done so, copy the updated Exdbapi.dll into the C:\Program Files\WRQ\Express Services folder.

Configure Express Library Manager
Verify that child libraries are not scheduled to be updated before being consolidated into a parent library:

  1. In Express Console, open the library you want to schedule, and click Library Manager Properties from the File menu.

  2. Enter or browse for the machine name where the Express Library Manager service is installed. Click OK.

  3. Select the check box for Manager work enabled.

  4. Select the check box to Update database and Consolidate data every <week>.

  5. Click the Options button, which opens the Consolidate tab in Library Properties.

  6. If selected, clear the check box to Update child databases before consolidation.

Schedule a Weekly Repair
Use a scheduler, such as the Windows NT AT command, in conjunction with Express Library Manager to run Exrepair.exe and update the database for each library each week. Allow up to six hours per library.

If you want to use the AT command to schedule a job to run in a background that requires network access (such as mapping a drive), you must change the Schedule service in the Control Panel to run as a user account that has all of the necessary access permissions. By default, the NT scheduler uses the System Account.

Note: In NT Server and Workstation, the default AT scheduler is Schedule. If you installed Internet Explorer 5.0 or Internet Explorer 4.0 with the Active Desktop, the service is called Task Scheduler. Follow the appropriate procedures below.

Configuring the Schedule Service
Only a user account with administrative rights can modify the setting in the Schedule service. To modify the Schedule service settings to use an account other than System Account, follow these steps:

  1. Open Control Panel, then double-click Services.

  2. Click Schedule from the list of services, and then click the Startup button.

  3. In the Service dialog box under Log On As, clear the System Account radio button and select This Account. Specify the user account that you have granted the necessary access permissions.

  4. Stop and restart the Schedule service.

Configuring the Task Scheduler Service
The user name and password for the Task Scheduler service cannot be changed from the System account. You can, however, change the logon information for the specific service you are scheduling.

To do this, double-click My Computer, and then double-click Scheduled Tasks to open the Scheduled Task Wizard. The wizard will prompt you for the user name and password for the specified service.

You can also double-click an already-scheduled service to change the logon properties. (On the Task tab, enter the user account in the Run as field, and then click the Set password button to enter the user's password.)

Related Technical Notes
1316 Express Meter and Windows NT Server File Locking
1347 Preventing the Corruption of Express Libraries
9989 Express Software Manager Technical Notes