PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Forums Hébergement > Forum Hébergement serveur > ms.sqlserver.server > Key Range Locking / Next-Key Locking - How to disable it ?
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
Key Range Locking / Next-Key Locking - How to disable it ?

Réponse
 
LinkBack Outils de la discussion
Vieux 16/05/2008, 10h06   #1
Roberto
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Key Range Locking / Next-Key Locking - How to disable it ?

Key Range Locking

(also called Next-Key Locking)

There is a way to disable the Key Range Locking mechanism under MS SQL
Server 2005 (or 2008) ?

Using MySQL, it can be disabled by enabling the
innodb_locks_unsafe_for_binlog system variable.
Using IBM DB2, it can be disabled by db2set DB2_RR_TO_RS=YES_OVERRIDE_RI

I believe that it can be disabled also with MS SQL Server, but how can I do
it ?

I want to prevent that during an INSERT statements some other rows will be
blocked.
  Réponse avec citation
Vieux 16/05/2008, 12h33   #2
Alejandro Mesa
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut RE: Key Range Locking / Next-Key Locking - How to disable it ?

Roberto,

This lock is used maily when using TRANSACTION ISOLATION LEVEL
SERIALIZABLE. Can you use a lower level like READ COMMITTED?


AMB


"Roberto" wrote:

> Key Range Locking
>
> (also called Next-Key Locking)
>
> There is a way to disable the Key Range Locking mechanism under MS SQL
> Server 2005 (or 2008) ?
>
> Using MySQL, it can be disabled by enabling the
> innodb_locks_unsafe_for_binlog system variable.
> Using IBM DB2, it can be disabled by db2set DB2_RR_TO_RS=YES_OVERRIDE_RI
>
> I believe that it can be disabled also with MS SQL Server, but how can I do
> it ?
>
> I want to prevent that during an INSERT statements some other rows will be
> blocked.

  Réponse avec citation
Vieux 16/05/2008, 15h07   #3
Alex Kuznetsov
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Key Range Locking / Next-Key Locking - How to disable it ?

On May 16, 4:06 am, Roberto <Robe...@discussions.microsoft.com> wrote:
> Key Range Locking
>
> (also called Next-Key Locking)
>
> There is a way to disable the Key Range Locking mechanism under MS SQL
> Server 2005 (or 2008) ?
>
> Using MySQL, it can be disabled by enabling the
> innodb_locks_unsafe_for_binlog system variable.
> Using IBM DB2, it can be disabled by db2set DB2_RR_TO_RS=YES_OVERRIDE_RI
>
> I believe that it can be disabled also with MS SQL Server, but how can I do
> it ?
>
> I want to prevent that during an INSERT statements some other rows will be
> blocked.


What kind of problem are you tying to solve? Different RDBMS have
different ways of solving concurrency problems.
  Réponse avec citation
Vieux 26/05/2008, 08h34   #4
Roberto
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Key Range Locking / Next-Key Locking - How to disable it ?



"Alex Kuznetsov" wrote:

> On May 16, 4:06 am, Roberto <Robe...@discussions.microsoft.com> wrote:
> > Key Range Locking
> >
> > (also called Next-Key Locking)
> >
> > There is a way to disable the Key Range Locking mechanism under MS SQL
> > Server 2005 (or 2008) ?
> >
> > Using MySQL, it can be disabled by enabling the
> > innodb_locks_unsafe_for_binlog system variable.
> > Using IBM DB2, it can be disabled by db2set DB2_RR_TO_RS=YES_OVERRIDE_RI
> >
> > I believe that it can be disabled also with MS SQL Server, but how can I do
> > it ?
> >
> > I want to prevent that during an INSERT statements some other rows will be
> > blocked.

>
> What kind of problem are you tying to solve? Different RDBMS have
> different ways of solving concurrency problems.
>


Usually I use the READ UNCOMMITTED Isolation level.
and after under DB2 I use row locking clause in the select statement.

"SELECT .... FOR READ ONLY " if I don't want any kind of lock at row level
or
"SELECT ... WITH RS USE AND KEEP EXCLUSIVE LOCKS" when I want lock a row on
the table.

under db2 this works fine.

I need to replicate this environment under SQL 2005 (but I don't have
experience about it )

My application is a 100 % J2ee Application Running under JBoss/WAS/SAP
Netweaver...

Thank a lot for the reply and sorry the delay in this reply..

  Réponse avec citation
Vieux 27/05/2008, 14h22   #5
Alex Kuznetsov
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Key Range Locking / Next-Key Locking - How to disable it ?

On May 26, 2:34 am, Roberto <Robe...@discussions.microsoft.com> wrote:
> "Alex Kuznetsov" wrote:
> > On May 16, 4:06 am, Roberto <Robe...@discussions.microsoft.com> wrote:
> > > Key Range Locking

>
> > > (also called Next-Key Locking)

>
> > > There is a way to disable the Key Range Locking mechanism under MS SQL
> > > Server 2005 (or 2008) ?

>
> > > Using MySQL, it can be disabled by enabling the
> > > innodb_locks_unsafe_for_binlog system variable.
> > > Using IBM DB2, it can be disabled by db2set DB2_RR_TO_RS=YES_OVERRIDE_RI

>
> > > I believe that it can be disabled also with MS SQL Server, but how can I do
> > > it ?

>
> > > I want to prevent that during an INSERT statements some other rows will be
> > > blocked.

>
> > What kind of problem are you tying to solve? Different RDBMS have
> > different ways of solving concurrency problems.

>
> Usually I use the READ UNCOMMITTED Isolation level.
> and after under DB2 I use row locking clause in the select statement.
>
> "SELECT .... FOR READ ONLY " if I don't want any kind of lock at row level
> or
> "SELECT ... WITH RS USE AND KEEP EXCLUSIVE LOCKS" when I want lock a row on
> the table.
>
> under db2 this works fine.
>
> I need to replicate this environment under SQL 2005 (but I don't have
> experience about it )
>
> My application is a 100 % J2ee Application Running under JBoss/WAS/SAP
> Netweaver...
>
> Thank a lot for the reply and sorry the delay in this reply..


in 2005 you can use snapshot isolation, which in some cases gives you
better performance than READ UNCOMMITTED, and also provides consistent
data, no dirty reads. If you want to lock the rows which you select,
you can use REPEATEBLE RAD or SERIQLIZABLE isolation levels, or a
UPDLOCK hint.
  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 03h25.


Édité par : vBulletin® version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières ©2000-2008
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,13640 seconds with 13 queries