Re: Locking in SQL Server

From: Tibor Karaszi (tibor_please.no.email_karaszi_at_hotmail.nomail.com)
Date: 10/07/04


Date: Thu, 7 Oct 2004 19:14:23 +0200

I'm afraid that it is difficult to assist more regarding your PM. If he doesn't want to believe that
this is how the product work, well...

> Just for my knowledge I would
> like to know, is this kind of Isolation level is already provided in Oracle,
> Sybase, DB2 etc??

I know it is in Oracle.
I don't think it is in Oracle or DB2, but someone would have to confirm that...

-- 
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"sansaw80" <sansaw80@discussions.microsoft.com> wrote in message 
news:45132349-E47F-41DD-B483-C36293E3FD58@microsoft.com...
> Hi Tibor,
>
> You are right and I completely agree with you. But the problem is my PM is a
> guy from our client and I tried to explain him by showing BOL and books etc.
> But I think main problem is, this is his first proj on SQL server and MS
> technologies, he is basically Java, DB2, AS400 guy.
>
> Well I didn't manage to find exact document but information you provided on
> Yukon had helped me a lot because many sites including MS site explains why
> SNAPSHOT isolation level is being introduce. Just for my knowledge I would
> like to know, is this kind of Isolation level is already provided in Oracle,
> Sybase, DB2 etc??
>
> Many thanks in advance.
>
> "Tibor Karaszi" wrote:
>
>> > By any chance is any of you knows any web site - document from
>> > which I can prove that it is not possible
>>
>> If your manager understand locking, he/she will understand why it isn't possible. If your manager
>> doesn't understand locking, then he/she will not understand such a "proof" either. I haven't seen
>> such a proof explicitly defined, and I fail to see how you would phrase such a statement. You can
>> point your manager to Books Online and ask how your manager proposes this to be implemented.
>>
>> Btw, you are using the term "Deadlock" incorrectly in your original post. What you see there is a
>> blocking. A deadlock is a different things (when you have two connections blocking each other) 
>> and
>> such are resolved by SQL Server within a few seconds.
>>
>> SQL Server 2005 will have snapshot isolation where you work in a freezed time. This means that
>> others can modify data, but you are seeing what the system looked like at an earlier point in 
>> time.
>>
>> -- 
>> Tibor Karaszi, SQL Server MVP
>> http://www.karaszi.com/sqlserver/default.asp
>> http://www.solidqualitylearning.com/
>>
>>
>> "sansaw80" <sansaw80@discussions.microsoft.com> wrote in message
>> news:00A6F807-D518-46BC-A7A7-DC9A5B804992@microsoft.com...
>> > Thanks all for replying to my question. I know all of you are right and what
>> > I want to do is fundamentally not possible. Even when I put this question I
>> > was 90%sure it is not possible but my PM thinks, it is possible (How? He
>> > doesn't know). By any chance is any of you knows any web site - document from
>> > which I can prove that it is not possible. By any chance is this feature will
>> > be provided in Yukun (SQL Server 2005) any comments?
>> >
>> > "sansaw80" wrote:
>> >
>> >> Hi All,
>> >>
>> >> I got basic question about locking. I want while one user is updating a
>> >> data, other user should able to read a data (NOT DIRTY DATA). For example:
>> >>
>> >> Say User A issues the following command:
>> >> Use Northwind
>> >> Go
>> >>
>> >> Begin Transaction
>> >> Update Region with Set RegionDescription = 'South' where RegionID = 4
>> >>
>> >> At this stage User has not closed the transaction. That means User A either
>> >> Commit or Roll back.
>> >>
>> >> At the same time User B issues the following command: (When User A
>> >> transaction is open)
>> >> Use Northwind
>> >> Go
>> >>
>> >> Select * From Region
>> >>
>> >>
>> >> In this case User B goes into Deadlock situation. But what I want is User B
>> >> should able to read the data from the table but data before Update not Dirty
>> >> data.
>> >>
>> >> I tried using UPDLOCK with Update statement but found out User B command
>> >> still goes in Deadlock situation. Only way I could able to execute User B
>> >> command was use either NOLOCK or READPAST. But none of them serves my purpose.
>> >> NOLOCK - gives me Dirty data and READPAST - ignore lock record and shows
>> >> rest of the data.
>> >>
>> >> Please can anyone tell me is there any way to solve this problem. Or am I
>> >> doing something wrong here?
>> >>
>> >> Many thanks in advance.
>> >>
>>
>>
>> 


Relevant Pages

  • RE: Companyweb sts_config error with event id 1000 50070
    ... Microsoft OLE DB Provider for SQL Server ... Use the osql command to attempt to connect to the instance by typing the ... > ##Verify That IIS Is Not Running in IIS 5.0 Isolation Mode ... Open IIS manager console, expand the Application Pools folder, make sure ...
    (microsoft.public.windows.server.sbs)
  • Re: Locking in SQL Server
    ... > By any chance is any of you knows any web site - document from ... SQL Server 2005 will have snapshot isolation where you work in a freezed time. ... >> Say User A issues the following command: ... >> In this case User B goes into Deadlock situation. ...
    (microsoft.public.sqlserver.programming)
  • Re: 2k5 unattended install
    ... Do you have the SQL Server Express edition installed on the machine? ... you'll need to add the following to your command line ... Lead Program Manager ...
    (microsoft.public.sqlserver.setup)
  • FYI: Delete still shows the deleted record
    ... "kit" wrote: ... new SQL Server DB and I'm borrowing code from the previous SQL Server DB ... Put this in the click event of your "DELETE" command button: ... Public Sub DelCurrentRec ...
    (microsoft.public.access.forms)
  • Re: SQL 2005 Tools
    ... I have tried my best to warn the manager who authorized this sort of work. ... and I need to know how to use this thing to connect to the database remotely. ... I have already forwarded TCP port 1433 and UDP port 1434 to the SQL server ... a clumsy or inept developer (or ...
    (microsoft.public.sqlserver.connect)

Quantcast