I suggest you ...

Allow to set query transaction isolation level

Most of our queries' transaction isolation level is ReadUncommitted. This is very important on our production db to minimize the impact.
I find myself surrounding my queries with TransactionScope all the time.
In addition, some of the queries requries Snapshot isolation's, etc.
It would be very helpful to allow to set the isolation level in the advanced query properties or something similar.
Thanks.

30 votes
Vote 0 votes Vote Vote
Vote
Sign in
Check!
(thinking…)
Reset
or sign in with
  • facebook
  • google
    Password icon
    I agree to the terms of service

    You'll receive a confirmation email with a link to create a password (optional).

    Signed in as (Sign out)
    You have left! (?) (thinking…)
    ShlomiShlomi shared this idea  ·   ·  Admin →

    3 comments

    Sign in
    Check!
    (thinking…)
    Reset
    or sign in with
    • facebook
    • google
      Password icon
      I agree to the terms of service

      You'll receive a confirmation email with a link to create a password (optional).

      Signed in as (Sign out)
      Submitting...
      • Jason DiOrioJason DiOrio commented  · 

        It would also be nice to have support for "set deadlock_priority low;" since any ad hoc queries we do don't want to get in production's way. I'm currently working on a workaround for this, but it would be nice to have it build into the context in some way.

      • ShlomiShlomi commented  · 

        Hi Bill,
        If you want I've created a small snippet for TransactionScope - 'tscope':
        (can used also as surround-with)

        <?xml version="1.0" encoding="utf-8" ?>
        <CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
        <CodeSnippet Format="1.0.0">
        <Header>
        <Title>TransactionScope</Title>
        <Shortcut>tscope</Shortcut>
        <Description></Description>
        <Author>Shlomi</Author>
        <SnippetTypes>
        <SnippetType>Expansion</SnippetType>
        <SnippetType>SurroundsWith</SnippetType>
        </SnippetTypes>
        </Header>
        <Snippet>
        <Code Language="csharp"><![CDATA[using (TransactionScope scope = new TransactionScope(TransactionScopeOption.Required,
        new TransactionOptions { IsolationLevel = System.Transactions.IsolationLevel.ReadUncommitted }))
        {
        $selected$ $end$
        }]]>
        </Code>
        </Snippet>
        </CodeSnippet>
        </CodeSnippets>

      • Bill SorensenBill Sorensen commented  · 

        A big +3 here. We are required to use nolock hints when running ad hoc queries against production. This makes it difficult to use LINQPad as often as I'd like.

      Knowledge Base and Helpdesk