Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Transaction Isolation
Message
 
 
À
17/08/2007 16:41:19
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Autre
Divers
Thread ID:
01248883
Message ID:
01248960
Vues:
24
>Are T-SQL SELECT statements outside of transaction grouping (BEGIN / COMMIT) affected in any way by the current value of SET TRANSACTION ISOLATION LEVEL?

Sure they affected. The SQL statements obey current isolation level. Check Locking Hints in BOL on how you can overrite it for the current statement.

>There is some discussion (heated debate?) that all stored procedures used for reporting only should include the statement:
>
>-- SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED
>
>Some maintain that there is no effect at all unless the SET is followed by a BEGIN / COMMIT transaction pair.

Incorrect. See above.

>
>Others feel that the effect of 'READ UNCOMMITTED' in a read-only transaction is the same as a naked 'SELECT' with no SET or BEGIN / COMMIT.

Incorrect. See above.

>
>Finally, a few feel that including the SET...UNCOMMITTED statement for stored procedures used for reporting is the 'only way to go'

It depends on type of report. You wouldn't want to run any accounting report this way.
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform