Database, Repair

 

[Revised Apr 06]

 

Because pharmacy data is so important, four levels of recovery from database corruption are provided;

 

1. 'Repair' (as below) runs a quick check on the database, and can fix some problems. It should tried if problems arise.

 

2. Compact database is a more thorough which rebuilds all indexes and clears out temporary data. It is part of the monthly preventative maintenance and can fix most database problems..

 

3. In the rare situation that both these fail 'Restore from backup', which can usually be accomplished without loss of data due to RxOne roll-forward recovery ability which will enter for itself work done since the last backup was taken.

 

4. A 'Restore' is unlikely to fail, so if restoring does not help consider whether the disk might be full, and see how many *.tmp files exist and whether they are clogging the hard drive. Normally all *.tmp files can be deleted.... but note;

Warning; If the DOS 'QuickScript' program is on the same computer, do not erase all the TMP files as a file names index.tmp is used by QuickScript.

 

To 'Repair' the database

From the RxOne 'Start Menu' select Tools, Utilities, Database utilities, Repair.

It usually takes between 10 seconds and five minutes, depending on the amount of repair necessary.

 

If this utility cannot be reached through the start menu, go through the 'my computer' to c:\phcypro\repair.exe and click on that to run it directly.

 

Automatic 'Repair' of DB

[Warning, do not set this to work automatically unless requested by Help-desk]

This option will run an automatic 'Repair' and 'Compact' of the database overnight. (Tools, Options, Switchboard, Select Maintain Database Checkbox and enter a time for the maintenance to begin e.g. 2300). Note: The time entered must be after 1700hrs).

 

Failure of Rebuild

The 'repair' will sometimes fail if a non-standard database path is used, see below.

 

Only if problems still persist, see 'Rebuild database' below.

 

Related topics

Compact database

Non-standard database path

Preventative maintenance

Database corrupt

Rebuild database

Restore

TMP files, erasing

 

'---------------------------------------------------------

[Future Function   Aug 05]

The JetComp utility will replace 'Repair'

Proposed method;

- When a user selects to "Repair" database, a program will open detailing what is going to be done, and also warning the user that they should not continue without first     calling the help desk. This should only be allowed to run on the master.

- The program then makes a copy of the existing Lots.mdb. This could be called LotsBack.mdb or similar.

- The existing (ie. corrupted) database is then renamed LotsOld.mdb or similar.

- The program then shells to the JetComp utility.

- Here the user would select the LotsOld.mdb database as the source.

- They would input "C:\PhcyPro\lotsdb\Lots.mdb" as the destination. This way there won't be any need to rename the new, repaired database.

- If it's all successful, LotsBack.mdb and LotsOld.mdb are deleted, otherwise LotsBack.mdb is renamed Lots.mdb and LotsOld.mdb is deleted.

 

Perhaps we could have a short database integrity check after the JetComp utility is finished (and control is passed back to the repair front end) to check whether the repair has been successful or not.