SQL server indeed has locking but that is usually only deployed to maintain state during a single transaction or stored procedure call. In fact SS differentiates between pessimistic and optimistic locking during data access operations and defaults to a pessimistic locking model in which readers block writers and vice versa. But that is only at the point of interaction with the database.
for most applications, a select and subsequent update operations are separated by gaps in time where no lock is being held, unlike an MVDBMS where an update lock is typically held for the duration of the intent to perform the range of maintenance activities on a specific record e.g the time it is being held in an update screen. So for logical concurrency in SS you need to consider how to identify optimistic locking conflicts (actually the easy bit, that is what the timestamp column type - a misnomer as it has absolutely nothing to do with time - was designed for) and then more critically what to do about it. if you use a dumb tool like the various query building options in Visual Studio, you will end up with a dataset that can identify a locking conflict but then simply aborts the update, which is extremely ungraceful. What the developer should then do is to make a decision about when and how to merge the changes so the update can continue with no loss and whilst retaining transactional integrity. that is the harder part. Sent from my iPad On 11 May 2012, at 21:03, "Symeon Breen" <syme...@gmail.com> wrote: > But locking is very different in the Sql server world, and much of it is > done by the server itself. > > > > -----Original Message----- > From: u2-users-boun...@listserver.u2ug.org > [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of David Jordan > Sent: 11 May 2012 17:22 > To: U2 Users List > Subject: Re: [U2] training material on LOCKS > > Brian > > You are too generous, I am stunned at how few SQL developers understand > locking. > > Regards > > David Jordan > > > _______________________________________________ > U2-Users mailing list > U2-Users@listserver.u2ug.org > http://listserver.u2ug.org/mailman/listinfo/u2-users > ----- > No virus found in this message. > Checked by AVG - www.avg.com > Version: 10.0.1424 / Virus Database: 2425/4990 - Release Date: 05/10/12 > > _______________________________________________ > U2-Users mailing list > U2-Users@listserver.u2ug.org > http://listserver.u2ug.org/mailman/listinfo/u2-users _______________________________________________ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users