Related Information Examples & Tutorials

Database Maintenance - External

Routine database maintenance may be run from within Collect!. However, you may want to run maintenance with Collect! shut down. This may be necessary for repairing certain types of errors, or it may be desirable for scheduling a routine maintenance during off hours when no one is using Collect!.

We recommend you backup critical data files before running maintenance since, if the machine is failing, the maintenance, while manipulating data files, may cause undesirable consequences and, potentially, loss of data.

tip.gif Please refer to Backup Database Topics for options for backing up your files.

External maintenance is run from the Command Prompt.

From The Command Prompt

To run maintenance directly from the Command Prompt it is necessary:

  • To be familiar with using the Command Prompt (formerly called the DOS Prompt)
  • To understand how the file system structure works (Hard drive letters, folders, and files)
  • To be able to move around in this environment

Please know where your Collect! program is located so that you can navigate to the proper directory.

tip.gif These instructions are for the database MASTERDB. If you are maintaining a different database, please refer to the section entitled Folder Name.

tip.gif These instructions are for running a full maintenance. If you only want to check the state of your database, please refer to the section entitled Check Database.

1. Make sure that everyone is signed out of Collect!.

2. Make sure that the RDM Server (CV11 Server) is still up and running.

2. Select START, Programs, Accessories and then select Command Prompt.

3. When the Prompt is displayed, navigate to your CV11\bin folder.

4. Type the following: check

This will run a standard check on your database and display a blue window logging the results of the check routine. If errors are noted, you can resolve them by running one or several of the other utilities.

5. Depending on the errors you encounter in this log, you can resolve them with the following commands.

rebuild - Run this if you have missing keys or index problems.

fix - Run this if you have any of the following errors:

Set, Pointer, Member, Owner, Record



6. The desired end result should be a message indicating zero errors encountered. The results of the check are stored in a file called MasterdbCheck.txt. The results of the fix are stored in a file called MasterdbRepair.txt. The results are displayed for you when maintenance is finished. The results files are stored in the CV11\bin folder.

Folder Name

To run the maintenance utilities on a folder other than the MASTERDB folder, include the folder name in the command line and the CV11 Server parameters as shown below. The database name must be 8 characters or less. The results are stored in the CV11\bin folder with the folder name prepended. For example, DemoRepair.txt.

Examples:

C:\CV11\bin> check demodb RDS admin secret

This runs the check utility on the DEMODB database and stores the results in DemodbCheck.txt in the CV11\bin folder.

C:\CV11\bin> fix prosdb RDS admin secret

This runs the fix utility on the PROSDB database and stores the results in ProsdbRepair.txt in the CV11\bin folder.

Top of page.

How To Run Maintenance When You Have Multiple Users

When you have multiple users there are a few extra precautions that you want to take to ensure that your maintenance runs smoothly. Please refer to the beginning of this document for standard procedures and tips that apply to any maintenance procedure.

Before you run maintenance in a multi user environment, please perform the following steps.

  • Everyone must exit the Collect! program.
  • Make sure no users are attached to the Collect! files over the network.
  • Run maintenance from the Server.
  • .
  • Make sure that the RDM Server (CV11 Server) is up and running.
  • Ensure that no one attempts to sign into Collect! or to copy Collect! files while maintenance is being run.

tip.gif The external maintenance utility, fix.bat, shipped with CV11.3 Build 6.1 and newer renames connect.ini to xconnect.ini before it begins the maintenance. This prevents remote machines which rely on this file from being able to connect to the server. The connect.ini file will be restored when fix.bat finishes. If it does not finish due to a crash or user intervention, check.bat will restore it.

The external maintenance utility, check.bat, shipped with CV11.3 Build 6.1 and newer looks for xconnect.ini and attempts to rename it to connect.ini if it finds one.

Top of page.

Check Database

If you only want to run check on your database, you can do this when users are logged into Collect!. It is only necessary to have everyone signed out when you are running the fix or rebuild utilities.

1. Make sure that the RDM Server (CV11 Server) is up and running.

2. On your Server, select START, Programs, Accessories and then select Command Prompt.

3. When the Prompt is displayed, navigate to your CV11\bin folder.

4. Type the following: check

This will run a standard check on your masterdb database and display the results of the check routine. Results are also logged to the ..\bin\MasterDbCheck.txt.

If there are no errors reported, then you do no have to run any other utilities.

If errors are found, you can run a targeted fix, rather than your whole system.

Top of page.

Dbanalyze Utility

Collect! ships with a utility that may be used to check the state of all the files in all your databases. This is very handy because it can run when users are signed in. If errors are found, you can run a targeted fix on a single database, rather than your whole system.

The DBAnalyze utility checks the catalog as well as devices. It can be run with arguments to target only your working database.

Please refer to Help topic, Dbanalyze Utility for details and examples of running a targeted fix.

Top of page.

See Also

- Introduction To External Maintenance
- Database Maintenance - Internal
- Database Maintenance - Troubleshooting
- Database Maintenance Topics

Top of page.

Was this page helpful? Do you have any comments on this document? Can we make it better? If so how may we improve this page.

Please click this link to send us your comments: helpinfo@collect.org