-->
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.  [ 1 post ] 
Author Message
 Post subject: Dialect provider question
PostPosted: Tue Apr 03, 2007 11:32 am 
Beginner
Beginner

Joined: Wed Mar 14, 2007 12:35 pm
Posts: 24
Our DBA insists that "with (nolock)" be added to all select queries. I know this is a stupid request by him, but I'm the lowly developer :P. In his defense, they do alot of batch stuff which does add some requirements like this. Anyhow, to satisfy this request, I tried the following :

Code:
    public class CustomMsSql2000Dialect : MsSql2000Dialect {
        public override string AppendLockHint(LockMode lockMode, string tableName) {
            return tableName + " with (nolock)";
        }
    }


However, it appears that this isn't being called under all circumstances (joined tables, IQuery.UniqueResult, etc). It does appear to work when I call IQuery.List.

Setting the IsolationLevel to ReadUncommited does not appear to apply to all scenarios either and our DBA also doesn't believe in doing this at the .NET level anyhow. Does isolation level even apply in all of this totally anyhow?

So yes, dumb requirement or not, I have it, so any help would be appreciated.


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

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.