-
Notifications
You must be signed in to change notification settings - Fork 908
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SET TRANSACTION ISOLATION LEVEL does not work #25525
Comments
|
That's helpful to understand the issue.
@alanrenmsft @Charles-Gagnon you may know, is this design fixing an issue or is it a bug that should be addressed in a future release? |
This is currently expected behavior, although it does differ from SSMS #7643 (comment) for some context. I don't recall if there was any follow-up to that discussion, maybe @kburtram remembers. So yes, ADS will run the SET commands each time it executes a query (effectively overwriting previous values). SSMS does not do this - it will keep the values from previous executions. |
As a user and developer, I would have expected that isolation level (like the other flags) to be a session-level setting, one which I can change in T-SQL and one that would persist for the duration of the session after I've changed it. I can't think of any other situation where you would have to explicitly (re-)declare a setting with every batch, so this feels like a significant departure from how users have been working with SQL Server in the last two or three decades. And it's not documented or made obvious anywhere at all. I'm sorry, but this makes no sense at all to me. :) |
I have to agree with @dhmacher about this. In this case, I'm not explicitly changing the setting - ADS is invisibly doing it for me. This must be a bug, not a feature. |
In one single word: Unacceptable. I've never been keen on ADS, so I have not used it much, so this is why I have not noticed. Else I would have yelled long ago. |
I added some notes into #7643 regarding the current behavior. Where basically the query options are set each time a query is executed. IIRC, SSMS splits the options into two buckets where some options are set on the session only once initially and other options are reset each time a query is executed. This can create some confusion when executing subsets of a script file by highlighting blocks of text. We should update the way we set options to follow the same options as SSMS. |
The fix for this issue was merged with the most recent STS bump and will be included in the upcoming July release (1.49.0). Related PR linked to issue above. |
Azure Data Studio does not appear to honor transaction isolation levels when set with a T-SQL statement. DBCC USEROPTIONS still reflects the default "read committed" isolation level, and queries still execute with the default isolation level.
Steps to Reproduce:
Does this issue occur when all extensions are disabled?: Yes
The text was updated successfully, but these errors were encountered: