Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Select count not the same from Web and SSMS
Message
 
 
À
18/03/2015 10:36:47
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Autre
Versions des environnements
SQL Server:
SQL Server 2012
Application:
Web
Divers
Thread ID:
01616928
Message ID:
01616932
Vues:
26
>>Well, if you remove NOLOCK hint you should get 1 row from all applications.
>
>I don't understand. NOLOCK is used either at the application level and in SSMS. So, the command is the same. Also, I do not see the relation with NOLOCK as per the message I created.
>
>This seems to be related to the milliseconds precision that differs from the application and when in SSMS. I have adjusted to rely on a primary key instead.

NOLOCK uses dirty reads. So, if that new record was just added, the select statement may not see it. And it's just a coincidence that one application sees that row and others don't.
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform