Re: Sql Server Locks



Why are you deleting and then adding them back in instead of simply Updating
them in place? In any case you must ensure you have a valid index
(preferably a Primary Key) that Sql Server can use to identify the
individual rows. What Isolation level are you using? If it is serializable
you should consider using Read Committed instead. Also make sure the Begin
Tran and Commit Tran are as close together as possible and the transactions
as short as possible.


--
Andrew J. Kelly SQL MVP


"Prasad Dannani" <prasad@xxxxxxxxxxxxx> wrote in message
news:%239RdyPe6FHA.2608@xxxxxxxxxxxxxxxxxxxxxxx
> Hi All,
>
> We have various processes running symultaniously but no two processes will
> access the same record and each process is in a seperate transaction.
>
> The problem is with SQL Server Database Locks.
> i.e. if we access any query in two different transactions then one is
> getting success and the next one is failing.
>
> Example Scenario:
> First process is running for Client "A": This will delete records of
> client A and reinserts the same with some data changes
> First process is running for Client "B": This will delete records of
> client B and reinserts the same with some data changes
>
> In this example the code is same for two clients and the tables accessed
> also same. we are tried with out locks and using row locks but nothing is
> working.
>
> Suggest us which is the best locking option for this kind of scenarios and
> provide us any good links for this kind of scenarios.
>
> With Regards,
> Prasad Dannani
>
>
>


.



Relevant Pages

  • Sql Server Locks
    ... access the same record and each process is in a seperate transaction. ... The problem is with SQL Server Database Locks. ... client A and reinserts the same with some data changes ... provide us any good links for this kind of scenarios. ...
    (microsoft.public.sqlserver.clients)
  • Re: How to switch off automatic blanking of table views in enterprise manager ?
    ... Optimizing Query Performance - ... SQL Server is essentially a puppet of the client application. ... for) the locks acquired on the server. ... blocking problems involves inspecting the client application. ...
    (comp.databases.ms-sqlserver)
  • Re: [2/3] POHMELFS: Documentation.
    ... userspace it works with any underlying filesystem and still is ... Courtesy to transactions, ... Resending transactions to different servers on timeout or error. ... request comes from different client, ...
    (Linux-Kernel)
  • Re: Aging report problem.
    ... The client table contains all clients from ... The transaction table contains all transactions from day one ... The aging ... of which equals 0 and the last 2, from Sept 2007 are still owed and those ...
    (comp.databases.ms-access)
  • Re: Is there an obvious way to do this in python?
    ... a sort of *pointer* to each of the kinds of transactions she can do, ... are shipped separately and *linked* at the client side... ... |upgrade to Python 3000 because it sounds cooler than plain old Python ... You can assume complete control of all the ...
    (comp.lang.python)