Pages

Wednesday, November 10, 2004

How to find a locking action

On occasion, when rolling back an assignment action and a locking error occurs, it might not always be obvious which assignment action is responsible for the lock. In these circumstances, the following sql may be of assistance:

select ppa.action_type,
ppa.effective_date,
ppa.payroll_action_id,
paa.assignment_action_id
from pay_payroll_actions ppa,
pay_assignment_actions paa,
pay_action_interlocks pai
where ppa.payroll_action_id = paa.payroll_action_id and
paa.assignment_action_id = pai.locking_action_id and
pai.locked_action_id = &lockedid

/ e.g. where &lockedid is the assignment_action_id of the action you are trying to remove. In this case, a Quickpay is being locked out by a Pre-Payment run.

No comments: