Home > Archive > microsoft.public.sqlserver.server > November 2002 > optimistic vs pessimistic locking





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author optimistic vs pessimistic locking
Andy

2002-11-20, 10:24 am

"Egbert Nierop \(MVP for IIS\)" <egbert_nierop@nospam.com> wrote in message news:<#x6Qf#GkCHA.1584@tkmsftngp11>...
<<>>
> DOTNET even has taken a step further and locking nearly seems possible or a
> feature since everything is loosely connected.
>
> I needed a feature for a webfarm (more webservers connected and running as
> one application) to have a unique access point per session, and one user
> should not access that point at the same time *even* in read mode..
> Solution? Apply an update lock hint in the SELECT statement...

<<>>

I don't really understand what you need.
Optimistic locking has checksum.
Isn't that enough?

Otherwise.
Soft-locking?
User and timestamp.
Problem with web is making sure you un-soft-lock.

If you just wanted to read the data non-concurrently.
Use an object on the server for reading and put all requests single
threaded through this?
Egbert Nierop \(MVP for IIS\)

2002-11-20, 3:23 pm

"Andy" <aon14@lycos.co.uk> wrote in message
news:553b50a7.0211200815.1e3914fd@posting.google.com...
> "Egbert Nierop \(MVP for IIS\)" <egbert_nierop@nospam.com> wrote in

message news:<#x6Qf#GkCHA.1584@tkmsftngp11>...
> <<>>
> > DOTNET even has taken a step further and locking nearly seems possible

or a
> > feature since everything is loosely connected.

>
> I don't really understand what you need.
> Optimistic locking has checksum.
> Isn't that enough?
>

No, Don't you understand that some products can not rely on just only *one*
DBMS? So a TIMESTAMP or checksum, column is already out of sight.

What I want, is simply **synchronization** just like a Mutex (win32) on a
single machine normally would achieve, but this time on multiple machines
(ASP.NET) for a single user.

A great possibility for instance, exists on Session components (that I
wrote) that need to be shared among a webfarm. As you can understand, you
cannot allow that a session will be red/updated concurrently by two pages
where TWO or more ASP.NET pages would *fight* for the update (one will
loose), right?

So what I did, is applying a (UPDLOCK) hint but that's really dirty, I ---do
not ---- want to apply non ANSI statements to SQL, I want the driver (in
ADO.NET or OleDB) handle that kind of locking for me.

(Compare with Conn.IsolationMode = xActSerializable)


Sponsored Links





Free Braindumps | MCSE braindumps software forum

Copyright 2003 - 2008 examnotes.net