-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 8 posts ] 
Author Message
 Post subject: MSSQL Status
PostPosted: Tue Sep 20, 2005 10:27 am 
Regular
Regular

Joined: Thu Aug 28, 2003 6:30 am
Posts: 58
Hibernate version: 3.0.4 and 3.1beta2

Name and version of the database you are using: MSSQL 2000

Can anyone say me what mssql locking status is?
I get deadlocks using MS SQL2000 and i don't see pessimistic locking in sql queuries generated by hibernate.

Does Hibernate support MSSQL pesimistic locking ?
I found that Gavin said such words "This SQL Server specific problem is a very well-known limitation in the current release." in this topic.
http://forum.hibernate.org/viewtopic.ph ... mssql+lock

Is this problem fixed or when it'll be fixed?

Thank's


Top
 Profile  
 
 Post subject:
PostPosted: Wed Sep 21, 2005 5:28 am 
Regular
Regular

Joined: Thu Aug 28, 2003 6:30 am
Posts: 58
Does nobody work with MSSQL 2000 ?


Top
 Profile  
 
 Post subject:
PostPosted: Wed Sep 21, 2005 6:31 am 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
You can have deadlocks wo explicit pessimistic locking use.

_________________
Emmanuel


Top
 Profile  
 
 Post subject:
PostPosted: Wed Sep 21, 2005 6:55 am 
Regular
Regular

Joined: Thu Aug 28, 2003 6:30 am
Posts: 58
emmanuel wrote:
You can have deadlocks wo explicit pessimistic locking use.

I know it, but now i cann't turn on pessimistic locking on MSSQL.
And my question was about pessimistic locking on MSSQL or when it will be implemented in Hibernate.

Thank's


Top
 Profile  
 
 Post subject:
PostPosted: Wed Sep 21, 2005 12:03 pm 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
Quote:
I get deadlocks using MS SQL2000 and i don't see pessimistic locking in sql queuries generated by hibernate.

If you use explicit pessimistic locking it will be worse.
The locking are used by MSSQL depending on the JDBC isolation level you choose.

_________________
Emmanuel


Top
 Profile  
 
 Post subject:
PostPosted: Wed Sep 21, 2005 12:22 pm 
Regular
Regular

Joined: Thu Aug 28, 2003 6:30 am
Posts: 58
emmanuel wrote:
If you use explicit pessimistic locking it will be worse.
The locking are used by MSSQL depending on the JDBC isolation level you choose.

I have many threads which select, update, insert the same or new data from the same table, that's why i need pesimistic locking(i don't want that 2 threads select the same message, could you say how can i do it without pesimistic locking ? ).

It works good in Oracle but in MSSQL as i said there're deadlocks or 2 threads working with the same data.
In Oracle i use select ... for update and also oracle has row locking model.
I want to make the same pesimistic row locking with MSSQL and in other situation i want "select ... with (nolock) ..."

Could you say it's possible with Hibernate or i have to create own MS SQL dialect ?

Also if you give me a link to article about mssql locking and JDBC isolation level, i'll say big thank to you :) (I'm newbie in MSSQL)

Thank's


Top
 Profile  
 
 Post subject:
PostPosted: Thu Sep 22, 2005 6:24 am 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
So that's a different problem you didn't expressed in the previous posts :-)
I don't know about the Sql Server bug we have, I don't think it has been fixed though.
For the isolation level, it's normalized at the JDBC level
Search google on JDBC isolation level, you should be able to find what you want
http://java.sun.com/docs/books/tutorial/jdbc/basics/transactions.html
Also, if you have Hibernate in Action, there is a very clean explaination on isolation level and tx in chapter 5

_________________
Emmanuel


Top
 Profile  
 
 Post subject:
PostPosted: Thu Sep 22, 2005 6:35 am 
Regular
Regular

Joined: Thu Aug 28, 2003 6:30 am
Posts: 58
emmanuel wrote:
So that's a different problem you didn't expressed in the previous posts :-)

You're right, but i asked about pessimistic locking and you were trying to understand my problem :)

emmanuel wrote:
I don't know about the Sql Server bug we have, I don't think it has been fixed though.

I see, so i'll create own MS SQL dialect to fix this bug or feature :)

emmanuel wrote:
For the isolation level, it's normalized at the JDBC level
Search google on JDBC isolation level, you should be able to find what you want
http://java.sun.com/docs/books/tutorial/jdbc/basics/transactions.html
Also, if you have Hibernate in Action, there is a very clean explaination on isolation level and tx in chapter 5

Thank's


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 8 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.