Sometimes we find that some "orphan" web transactions leave seats locked for several hours and even days. We are trying to find a way to detect these locked seats so we can release them immediately. Although it is easy to find the seats that are locked, we don't know how to find if they are being held by current web purchases. Does anyone knows if there is a way to find when a seat has been locked? That way we can identify the seats that have been locked for some time, e.g .1 hour.
Thanks
Business Analyst The National Ballet of Canada 470 Queens Quay West Toronto, Ontario M5V 3K4 P: 416 345 9686 x453 F: 416 345 8323
We had a similar issue where when we had some network glitches seat server wouldn't release seats.
The following sql is part of an automated job that unlocks the seats which is why the date parameter is not as tight ie we look at seats that were locked before yesterday and limit is to only ones locked by the anonymous web user ie added to basket but user never logged in. The process only returns the locked_by values as it then uses that value to execute tp_cleanup_connnection
select distinct ps.locked_byfrom TX_PERF_SEAT ps (NOLOCK)join T_WEB_ORDER o (NOLOCK) on ps.order_no=o.order_nowhere ps.customer_no=<anonymous web user account>and o.order_dt <convert(varchar(10),DATEADD(day,-1, GETDATE()),120)and seat_status=3
Mark