Friday, February 17, 2012

Database Locking

I have a TableA and if UserA is reading and modifying some data, then I want
UserB and all the rest of the users must wait until UserA is done modifying
that row of data. How this is done in SQL DATABASE? Please advice. Please
give me an example. ThanksHi,
This is based on the ISOLATION LEVEL. By default sql server is READ
COMMITTED isolation and in this Isolation all the other users will wait
until the
USER A commits the transactions.
Just read the Isolation in books online to get more information on this.
Thanks
Hari
SQL Server MVP
"hngo01" <hngo01@.discussions.microsoft.com> wrote in message
news:38B65B95-AB0B-48E6-BF7B-D516D25D3D71@.microsoft.com...
>I have a TableA and if UserA is reading and modifying some data, then I
>want
> UserB and all the rest of the users must wait until UserA is done
> modifying
> that row of data. How this is done in SQL DATABASE? Please advice.
> Please
> give me an example. Thanks

No comments:

Post a Comment