sql server - Transaction Isolation Level Scopes -


What are the rules for the level of transaction segregation in SQL Server 2005? I know what the different levels mean, but not the manner of implementing them properly outside the script that runs manually. I can not find a guide for practical use in the production-quality code.

Obviously, when you use a command like this, it starts:

  SET transaction isolation level impossible to read  

But where is this end? If I set the ISO level in a stored procedure and then calls that call, then nested corridor receives it? Even better, if I increase the ISO level inside the nested process, then it will be returned to the calling coop. Does not the transaction command such as BEGIN TRAN, ROLLBACK, and COMMIT create any differences?

When a stored proc is called from an application or an agent's job, changes in the level of isolation continue in some way? Do I have to return to the default read commencement at the end of every process?

I will test it in different situations but I do not know how the level of current isolation has been set.

Run the following and see for yourself:

  Purchase Process DBO Place it in such a place as 'the print that does not change the level of separation'; DBCC URO; Make END process dbo.ChangesIsolation print print as 'sproc change that level of isolation inside'; Set Translation ASSOCHATION Level Read Committed; DBCC URO; Go end transfer transfer isolation level can be read; DBCC URO; EXEC dbo.KeepsIsolation; DBCC URO; EXEC dbo.ChangesIsolation; - This indicates that the level of separation is restored after reading out the DBCC UNOPATION process;  

Comments

Popular posts from this blog

c++ - Linux and clipboard -

What is expire header and how to achive them in ASP.NET and PHP? -

sql server - How can I determine which of my SQL 2005 statistics are unused? -