Question about "shared read blocks" -
09-20-2011
, 02:19 PM
Hi,
I have a question about "shared read blocks". I have an application
that runs a transaction at isolation level=3. After the transaction
is run and committed, I am left with "shared read blocks" for the
tables that were updated in the transaction.
Why?
I checked the converted transaction log and I have commits for all the
transactions. (Below is the transaction log).
As it is the application is not working because if another user loads
a second instance of the application and tries to run the same
transaction it will fail. I need to close the original application
for the locks to clear.
The locks in sa_locks look like this after the transaction runs:
conn usrId table_name lock_type lock_name
32 DBA DBA.iInv S 25769948040
32 DBA DBA.iMaestro S 47244785050
32 DBA DBA.wFacts SP0000 107374857757
32 DBA DBA.wFactsXMes SP0000 180389300171
32 DBA DBA.wFactsXSemana SP0000 274878582002
32 DBA DBA.wMovimiento SP0000 30065445427
If I run the transaction again on the same connection, it works;
however,
I'm using 9.0.2.3687
Why do the shared read locks remain, in particular the SPD0000 types?,
and is there a way to clear them? I'm using an ODBC connection, and
the transaction is running on the client code.
Best regards,
Edgard
P.D. Transaction log:
--CHECKPOINT-0000-058895780996-2011-09-20 15:07
--CONNECT-1025-058895781017-DBA-2011-09-20 15:07
--BEGIN TRANSACTION-1025-058895781028
BEGIN TRANSACTION
go
--UPDATE-1025-058895782440
UPDATE DBA.iTrans
SET Status=20481
WHERE idLoc=13
AND idSeq=980196
go
--COMMIT-1025-058895782450
COMMIT WORK
go
--BEGIN TRANSACTION-1025-058895782451
BEGIN TRANSACTION
go
--UPDATE-1025-058895784021
UPDATE DBA.iInv
SET Cantidad=7394.1869,
CostoTotal=1678.85133,
timeStampCambio='2011-09-20 15:07:33.0',
CostoPromedio=.22705,
CantidadContabilidad=7036.35186
WHERE Bodega=134003100
AND Item=16800
go
--UPDATE-1025-058895784247
UPDATE DBA.wFacts
SET Cantidad=110400,
CostoTotal=25185.46,
ValorTotal=25185.46
WHERE Item=16800
AND ClienteSuplidor=132000188
AND Bodega=134003100
AND Tipo=1
AND Fecha='2011-05-31 00:00'
go
--UPDATE-1025-058895784465
UPDATE DBA.wFactsXMes
SET Cantidad=126400,
CostoTotal=28835.54,
ValorTotal=28835.54
WHERE Item=16800
AND Fecha='2011-05-01 00:00'
AND ClienteSuplidor=132000188
AND Bodega=134003100
AND Tipo=1
go
--UPDATE-1025-058895784686
UPDATE DBA.wFactsXSemana
SET Cantidad=110400,
CostoTotal=25185.46,
ValorTotal=25185.46
WHERE Item=16800
AND Fecha='2011-05-30 00:00'
AND ClienteSuplidor=132000188
AND Bodega=134003100
AND Tipo=1
go
--UPDATE-1025-058895785458
UPDATE DBA.wMovimiento
SET Compras=126400,
CCompras=28835.54,
VCompras=28835.54
WHERE Item=16800
AND Fecha='2011-05-01 00:00'
AND Bodega=134003100
go
--UPDATE-1025-058895785923
UPDATE DBA.iTransRow
SET Status=65
WHERE idLoc=13
AND idSeq=980196
AND idLinea=1
go
--COMMIT-1025-058895785936
COMMIT WORK
go
--BEGIN TRANSACTION-1025-058895785937
BEGIN TRANSACTION
go
--UPDATE-1025-058895785938
UPDATE DBA.iTrans
SET Status=16449,
HoraCambio='14:09:32.0'
WHERE idLoc=13
AND idSeq=980196
go
--COMMIT-1025-058895785962
COMMIT WORK
go
--BEGIN TRANSACTION-1025-058895785963
BEGIN TRANSACTION
go
--INSERT-1025-058895786107
INSERT INTO
DBA.iTransHash(idLoc,idSeq,HashEncabezado,HashLine as,FechaCambio,
HoraCambio)
VALUES (13,980196,'','','2011-09-20 00:00','14:09:32.0')
go
--COMMIT-1025-058895786128
COMMIT WORK
go
--CONNECT-1016-058895780985-DBA-2011-09-20 15:07
--ROLLBACK-1016-058895786129
ROLLBACK WORK
go
--ROLLBACK-1025-058895786129
ROLLBACK WORK
go |