Below is a manual method of resetting T&A configurations through the database. 


Caution: Only proceed with the procedure below when instructed by the technical support team.

               Although the queries below will not make you lose any data, it is not recommended to manually alter the database unless its necessary. 



Instructions to access your Maria DB is shown in the following article: [BioStar 2] MariaDB Access and Account Configuration


Script Option (Out of data)

Attached .zip file includes a .bat script that runs the same queries as below without a database management software. 

Run it with administrator privileges. 



Resetting Device Synchronization with BioStar 2.7.10 or above 

Running the query below will sync the device logs from the AC database to the T&A database again:


From the recent Biostar 2, the recent 3 months' information is recorded since you upgrade.

Please make a backup first, and then stop all BioStar 2 services, and run the below queries.

--Manual Syncrhonize the table punchlog in BioStar 2 TA DB
UPDATE sync_last_index SET last_sync_index = 0 WHERE table_name LIKE 'T_LG2021%'; --Below qurey is optional usage
--Increase the range of device TA punclog
UPDATE device SET tna_use_enable_date = '2020-01-01 00:00:00.000' where tna_use=1;




Resetting Device Synchronization with old versions more than BioStar 2.7.10

Running the query below will sync the device logs from the AC database to the T&A database again:


For BioStar 2.4~2.7.8 

UPDATE `biostar_tna`.`eventsync` SET `last_query_end_datetime`='2017-06-01 00:00:00' WHERE  `id`!=0;
UPDATE `biostar_tna`.`eventsync` SET `eddt`='2017-06-01 00:00:00' WHERE  `id`!=0;
COMMIT;


For BioStar 2.3 

UPDATE `biostar_tna`.`eventsync` SET `last_query_end_datetime`='2017-06-01 00:00:00' WHERE  `id`!=0;
UPDATE `biostar_tna`.`eventsync` SET `end_datetime`='2017-06-01 00:00:00' WHERE  `id`!=0;
COMMIT;


This query means: sync logs of all T&A devices starting back from 2017-06-01 again. If you would like to configure to another date, change the date values as necessary.

After running this query and waiting for a while for the sync to finish, rebuild the user reports in T&A to see the changes.





Initializing T&A Register

Running this query will force you to re-register T&A with the screen below:

Note: Your previous T&A configurations will remain. 


Access the database and run the query below: 

UPDATE biostar_tna.systemsetting SET ext_system_session_id= null, ext_system_id= null,
ext_sys_biostar_session_id = null, ext_sys_session_udt_datetime = null,
last_udt_ver_for_user_sync = null, is_complete_user_sync=0 WHERE id=1;


When you access the T&A menu of BioStar 2 again, the register screen will appear again. 

Enter the admin account to register again.