Issue

- There are duplicated records in a detailed view of TA report of BioStar client.

- There are duplicated logs in log list of monitoring menu of BioStar Client.


Relevant problem





Cause

- Automatically, BioStar 1.93 moves old log from TB_EVENT_LOG to TB_EVENT_LOG_BK except the log of current day.  It's for preventing performance issue of BioStar1. 

-> About the performance problem, please refer the article Device Disconnection When Event Log Table Has More Than 10 Million Logs)

- After that, there would be same log data in TB_EVENT_LOG if the administrator tries to upload log manually in [Upload Log] of Task of Monitoring Menu.


Solution 

Turn off the auto log movement of BioStar1.



How to turn off the auto log movement

1. Stop BioStar1 Server

2. Download the attached file and then, copy it to C:\Program Files (x86)\BioStar\server.

3. Start BioStar1 Server



Appendix


How to delete the duplicated log data between TB_EVENT_LOG and TB_EVENT_LOG_BK

- The below query is for duplicated log data and log deletion from TB_EVENT_LOG_BK


1. Stop BioStar1 Server
2. Run MSSQL Management studio

3. Just in case, make a backup DB for current status 

4. Copy the below query and run it


DELETE FROM TB_EVENT_LOG_BK
WHERE nEventLogIdn IN (
SELECT BK.nEventLogIdn FROM TB_EVENT_LOG LG, TB_EVENT_LOG_BK BK
WHERE LG.nDateTime = BK.nDateTime
AND LG.nReaderIdn = BK.nReaderIdn
AND LG.nEventIdn = BK.nEventIdn
AND LG.nUserID = BK.nUserID
AND LG.nIsLog = BK.nIsLog
AND LG.nTNAEvent = BK.nTNAEvent
AND LG.nIsUseTA = BK.nIsUseTA
AND LG.nType = BK.nType
)