Honey Store Repair Procedure

Creation date: 3/10/2022 11:20 AM    Updated: 11/16/2022 9:38 AM   honeystore

This procedure describes how to repair HS files with APISHSTrendFileViewer

Please be aware that depending on the size and state of your databases, this operation might take several days. (!!!)

When to perform a repair:

The repair procedure will organize the database and combine a lot of smaller files into larger files, increasing performance if there has been a long time since last time the db was repaired.
Also in cases where the server has had an ungraceful shutdown and files has been incorrectly terminated, the repair function may sort this out.
Additionally, it may solve the issue if you find the error message below in the logs.
(Please add additional error messages below, if you find situations where a repair corrected your issue)



ALARM from: ApisOPCDHA/CApisOPCHDAServer::ReadRaw

»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»

CApisHSReader::ReadRaw FAILED! DB: EG-KO-Log10Min; Item: EG-KO-SSS-MV.PPC.Voltage_Command; handle: 0x10002a! Reached the end of the file.  (80070026)



Before we start the procedure, we need to delete the existing log files from any previous executions.

Browse to the database directory. (For instance; C:\APIS\DBs)
Run the following command:

Del /s *.log

This will delete all files that has a .log extension, and /s will make sure subfolders is included.

Browse to the APIS installation folder. (For instance C:\APIS)
For 32-bit installations, drop the 64/x64 parts below.

Browse to the \bin64 folder.

Run the command below.

WARNING!
Make sure you include “-serial”, or the server might lock up completely after some time.

APISHSTrendFileVIewerx64.exe –serial

Select “File” → “Repair trendfiles directory…”





Select the directory of the HS files, typically x:\APIS\DBs

If you get the error message below, you will have to type / paste the path manually.




 

Make sure “Automatically repair trendfiles?” and “Include subfolders” is checked. The others should be un-checked.





Click “Start task”





A percentage counter will show the progress. Once it reaches 100%, the operation is complete.

WARNING!
Usage of the “Verbose output” over an extended period of time will slow down the process considerably.
Please uncheck this option unless you are actively monitoring the output.