NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Batch Model Database Logging Issues

I am using the Batch process model to test 4 UUTS. It seems that logging is very slow at the end of the test. I am NOT using on-the-fly logging which had its own issues. I am using Test Stand 3.5 with the Microsoft Jet OLE 4.0 driver. After reading a few posts on similar issues, I decided to try to synchronize the use of the data driver by using a LOCK and EARLY UNLOCK before and after calling the Log To Database step in the Test UUT socket entry point. This made quite a difference in that things were much faster after the tests were complete and data was being logged. My basic question is whether this is really necessary or if it is just sympomatic of another problem that I might have somewhere else.

One observation that I made with "on-the-fly" reporting was that I would get an intermittent error indicating that the database is currently locked. This lead me down the synchronization path. The problem with "on-the-fly" is that with the locks, it is much slower.  Is synchronization needed or is it inherent in the ActiveX implementation?

Thanks,
John

0 Kudos
Message 1 of 4
(3,297 Views)

John -
Each batch test socket is a separate execution. What database management system are you using? If you are using Access, which is file based, it is recommended that you enable the Share Data Link Between Executions option on the Data Link tab of the Database Options dialog box. If you do not do this, you basically have a separate connection to the file for each socket and these connections are using a file based locking mechanism to arbitrate which connection can write to the file. If you share the connection, the Access provider handles the arbitration in memory and the speed will be much faster. In general you should probably enable this option.  Note that if you enable Use Transaction Processing with a shared connection, the logging feature can only log one socket at a time because it needs to be able to roll back on a logging error.

Scott Richardson
https://testeract.com
0 Kudos
Message 2 of 4
(3,288 Views)
Scott,
Thanks for the info. I guess that I didn't notice this checkbox and now that you mention it, it makes perfect sense. It is much faster now.  Now that I've enabled sharing on the datalink connection, the synchronization steps no longer seem to be necessary.
John

0 Kudos
Message 3 of 4
(3,285 Views)
Great, thanks for letting us know.
Scott Richardson
https://testeract.com
0 Kudos
Message 4 of 4
(3,261 Views)