Depending on each company, country, or region, it may be necessary to delete old user logs according to security policies.
For this case, you can delete the AC, TA log history by running the query below.
Caution
- This operation will change your database directly. Suprema HIGHLY suggest you make a backup before executing the queries on the site.
1. Delete BioStar 1 AC Log
Run the below query and edit the date that you need to delete from.
i.e. Log Deletion of the old logs which date is less than 2020-03-01.
DELETE FROM TB_EVENT_LOG WHERE nDateTime < DATEDIFF (ss, '1970-01-01 00:00:00', '2020-03-01 00:00:00')
2. Delete BioStar 1 TA Log
Run the below query and edit the date that you need to delete from.
i.e. Deletion of the old TA report records which date is less than 2020-03-01.
DELETE FROM TB_TA_RESULT WHERE nDateTime < DATEDIFF (ss, '1970-01-01 00:00:00', '2020-03-01 00:00:00')
3. Delete BioStar 1.93 AC Log Backup Table Data
Please confirm if BioStar DB has TB_EVENT_LOG_BK table.
Run the below query and edit the date that you need to delete from.
i.e. Deletion of the old AC report records which date is less than 2020-03-01.
DELETE FROM TB_EVENT_LOG_BK WHERE nDateTime < DATEDIFF (ss, '1970-01-01 00:00:00', '2020-03-01 00:00:00')
4. Other
If the date of deletion is clear, such as deleting logs older than 30 days or deleting logs older than 100 days when performing a delete query at the customer site, you can refer to the query below.
e.g.) Assuming that a month is 30 days and if you want to delete logs older than 6 months, you can delete logs older than 180 days.
DELETE FROM TB_EVENT_LOG WHERE DATEADD(s,nDateTime,'1970-01-01 00:00:00') <= GETDATE() - 180