Tasks which runs on Batch fails because LOCK problems

rrojo7229

Member
Hi,

We work with a Third software,so our development it is quite limited.

We have around 20 branches where it runs Batch programs at night.

But if someone leaves the screen opened in a Maintenance screen ,that could lock the table.

So, at night the Batch program fails for Lock wait timeout.

21:39:34 Usr 21: Lock wait timeout of 1800 seconds expired (8812)

I wondering to build an script where will force the disconnection from the DB before the Batch programs starts, but how can I know which user it is LOCKING an specific table?
I reckon to start to write a program/scripts using tables:
- _Connect, _Lock

Do you have any other better solution?

Thanks,
Kind regards,
 
Yes. Don't lock records while the user interface is blocking for input.

This is a fundamental principle. If you violate it you will have many problems. This is one of them.

If you are very lucky this problem is isolated and you can track it down at the time that it occurs by either writing some custom code to display the appropriate _Lock and _Connect records or you could use something that already exists like ProTop
 
Back
Top