Re: ADO.NET Transaction Locking



Usually, this works fine without anything special. I don't understand why if
the entire transaction takes 2 seconds, why other clients are timing out,
even if the transaction is locking the whole table? That should be quick
enough, so that the other clients can just wait the 2 seconds, and then the
data they want should be available again.

In general, make sure your updates and anything your stored procedure is
doing, is using the table index for its queries, so table scans aren't being
done.

"scott" <scott@xxxxxxxxxxxxx> wrote in message
news:2F64AACF-34DE-41EA-8987-70FF2A5905F2@xxxxxxxxxxxxxxxx
I have a transaction that is Updating or inserting multiple tables(12 or
more) This transaction takes about a 2 seconds to perform. During that
two
seconds. We are getting timeouts expired errors from other clients
requesting records from the same 12 or so tables. What setting is there
to
say only lock the changed or new records do not lock the entire table
which
is what appears to be happening?

I am using SPs to do all inserting and a multiple command objects.

What is occuring in the ado.net lock is it a table lock page lock or
record
lock.
These are simple insert or updates, except for one procedure that
validates
the data.


.



Relevant Pages

  • Re: Sql Server Queue?
    ... Say I lock down this stored procedure as you suggested. ... > commit transaction ... > but here you are responsable for releasing the app lock manually. ...
    (microsoft.public.sqlserver.programming)
  • Re: Working Transactions somehow started not to work
    ... Transaction and locking are not properties of recordsets but are properties ... Opening a served-based cursor will put a lock on ... If a connection is closed, ... SL> and are not associated necessarily with server-based cursors. ...
    (microsoft.public.access.adp.sqlserver)
  • Re: controlling lock order in transactions
    ... Andrew J. Kelly SQL MVP ... > ROLLBACK TRANSACTION; ... > find in the clients sp that could be causing the dead lock is the join on ...
    (microsoft.public.sqlserver.programming)
  • Re: controlling lock order in transactions
    ... I believe the default isolation level for .net may be ... My transaction ONLY performs INSERTS. ... Yes it will put an exclusive lock on the row being inserted but Serializable ... COMMIT TRANSACTION ...
    (microsoft.public.sqlserver.programming)
  • Re: Tansaction/locking MSSQL2000
    ... >transaction behavior in single statements [not a BEGIN TRANSACTION ... >tables I need to lock so there is not a race later]? ... If the table is already held by an exclusive lock ... When the transaction is finished (due to ROLLBACK/COMMIT, releasing the ...
    (microsoft.public.sqlserver.programming)