Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 262809
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T22:32:56+00:00 2026-05-11T22:32:56+00:00

What are the scoping rules for transaction isolation levels in SQL Server 2005? I

  • 0

What are the scoping rules for transaction isolation levels in SQL Server 2005? I know what the different levels mean, but not how to properly apply them outside of a manually run script. I can’t find a guide for practical use in production-quality code.

Obviously, the scope begins when you use a command like this:

SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED 

But where does it end? If I set the iso level in a stored procedure and then that proc calls another, does the nested proc inherit it? Even better, if I escalate the iso level inside the nested proc is it going to carry back out into the calling proc? Do transaction commands like BEGIN TRAN, ROLLBACK, and COMMIT make any differences?

When a stored proc is called by an application or an agent job do the isolation level changes persist in some way? Do I always have to revert to the default READ COMMITTED at the end of each proc?

I would test it in different situations but I don’t know how to read what the current isolation level is set to.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-11T22:32:56+00:00Added an answer on May 11, 2026 at 10:32 pm

    Run the following and see for yourself:

    CREATE PROCEDURE dbo.KeepsIsolation
    AS
    BEGIN
    PRINT 'Inside sproc that does not change isolation level';
    DBCC USEROPTIONS;
    END
    GO
    
    CREATE PROCEDURE dbo.ChangesIsolation
    AS
    BEGIN
    PRINT 'Inside sproc that changes isolation level';
    SET TRANSACTION ISOLATION LEVEL READ COMMITTED;
    DBCC USEROPTIONS;
    END
    GO
    SET TRANSACTION ISOLATION LEVEL REPEATABLE READ;
    DBCC USEROPTIONS;
    EXEC dbo.KeepsIsolation;
    DBCC USEROPTIONS;
    EXEC dbo.ChangesIsolation;
    -- demonstrates that isolation level restored to REPEATABLE READ after exiting the procedure
        DBCC USEROPTIONS;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 119k
  • Answers 119k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer After much investigation, I've found the best way to be… May 11, 2026 at 11:47 pm
  • Editorial Team
    Editorial Team added an answer from the document of class code.InteractiveInterpreter([locals]): The optional locals argument… May 11, 2026 at 11:47 pm
  • Editorial Team
    Editorial Team added an answer So the command doesn't run arbitrary code. All it does… May 11, 2026 at 11:47 pm

Related Questions

What are the scoping rules for variables in a jsp page with pages added
What exactly are the Python scoping rules? If I have some code: code1 class
I believe I'm getting bitten by some combination of nested scoping rules and list
What guidelines do you follow to improve the general quality of your code? Many

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.