Skip to main content
Data Integrity Checks
Updated today

NEW Record Repair Utility

To be used in conjunction with standard data integrity repairs. This first step in the process will avoid long and lengthy reports being run over and over.

Cloning the Structure for Testing Purposes

If you need to test either a data integrity repair or the record repair utility prior to running on the client's system, you will need to take a backup of the database and clone the record structure.

Cloning a structure

To clone the structure, do the following steps:

  • Take a backup of the HowNow database prior to cloning.

  • Using the HowNow Support Utility, select Clone File Structure

    • Step 1 -Create a log with the details of the structure – the folder will be the record path found in their HowNow.ini file and the log file is where you want to store the output file. Once these details are completed, select Create Log.

      The log file created will look like this and is used in the next step of creating the actual structure.


    • Step 2 - Zip up both the backup of the HowNow database and the newly created log file and transfer them to your local machine.

    • Step 3 - Extract the files to a temporary folder somewhere on your machine.

Creating a structure

The next step is to create the actual structure which you can be then use for testing purposes.

  • Using the HowNow Support Utility, select Create File Structure From Log

The log file will be the output created from the client's system and the path will be the location you wish the cloned files to be stored. Once these details are completed, select Create File Structure.


The cloned structure is a mirror image of the selected directory, but contains dummy files with no actual data.

Running the Record Repair Utility

Once you have cloned the structure you are ready for testing the Record Repair Utility. The steps below are the same as the ones you would use if you were running repairs on a live database and record storage structure.

It’s recommended that you run the ‘Recover un-profiled record files’ repair from the data integrity check prior to using the Record Repair Utility (tick check all record files are profiled and then tick Recover un-profiled record files in the repair options). This helps to ensure files with record ID’s in the back end structure are located in the location the database is expecting them to be and will prevent ‘Source file not found’ errors when running the records repair.

  • If you are testing, you will need to copy a hownow.ini file into the new location and amend with the appropriate locations for the database and storage path.

  • It is recommended to create an additional copy of the whole record storage folder and the database in case the utility has to be run again

You will need these files:

RecordRepairUtility.exe

1 AddRepairFilePath.txt

2 spGetFullRecordPath.txt

3 BuildRepairFilePath.txt

4 SelectforRepair.txt

The stored procedure (2 spGetFullRecordPath.txt) may need to be edited to ensure it is using the correct record storage field for the database you’re repairing.

Below is an example of the procedure using Entityname as the storage field. Simply replace this with the desired field.

e.g.

IF (:iColumnID = 0) THEN BEGIN

IF (:iGroupID = 1) THEN BEGIN

Select C.Entityname from CLIENTS C

Where C.CLIENTID = :iSubLocationID

INTO :sStorgageIdentifier;

sFullPath = sStorgageIdentifier || '\' || sFullPath;

Execute the following scripts in order using the Record Repair Utility:

Ensure each script is executed completely before moving on to the next one. This is what the scripts do:

Script 1 – Adds a field to the HowNow database called RepairFilePath

Script 2 – Adds a stored procedure to the database that recalculates record file paths

Script 3 – Runs the procedure from script 2 and populates the RepairFilePath field.

Script 4 – Selects the items that need to be repaired based on the information created by the stored procedure.

Once script 4 has completely executed press the “Run Repair” button – this will repair any files where the record path does not match the database and leave any files that cannot be repairs e.g. the actual file is missing from the storage.

Refer to the standard Data Integrity Check for further checks and repairs.

Did this answer your question?