<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://www2.sqlblog.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Kalen Delaney : snapshot isolation</title><link>http://www2.sqlblog.com/blogs/kalen_delaney/archive/tags/snapshot+isolation/default.aspx</link><description>Tags: snapshot isolation</description><dc:language>en</dc:language><generator>CommunityServer 2.1 SP2 (Build: 61129.1)</generator><item><title>Geek City: Growing Rows with Snapshot Isolation</title><link>http://www2.sqlblog.com/blogs/kalen_delaney/archive/2011/11/19/growing-rows-with-snapshot-isolation.aspx</link><pubDate>Sun, 20 Nov 2011 00:43:00 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:39890</guid><dc:creator>Kalen Delaney</dc:creator><slash:comments>1</slash:comments><comments>http://www2.sqlblog.com/blogs/kalen_delaney/comments/39890.aspx</comments><wfw:commentRss>http://www2.sqlblog.com/blogs/kalen_delaney/commentrss.aspx?PostID=39890</wfw:commentRss><description>I just finished a wonderful week in Stockholm, teaching a class for Cornerstone Education. We had 19 SQL Server enthusiasts, all eager to find out everything they could about SQL Server Internals. One questions came up on Thursday that I wasn’t sure of...(&lt;a href="http://www2.sqlblog.com/blogs/kalen_delaney/archive/2011/11/19/growing-rows-with-snapshot-isolation.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://www2.sqlblog.com/aggbug.aspx?PostID=39890" width="1" height="1"&gt;</description><category domain="http://www2.sqlblog.com/blogs/kalen_delaney/archive/tags/internals/default.aspx">internals</category><category domain="http://www2.sqlblog.com/blogs/kalen_delaney/archive/tags/snapshot+isolation/default.aspx">snapshot isolation</category></item><item><title>Did You Know? What's the Capital of Idaho?</title><link>http://www2.sqlblog.com/blogs/kalen_delaney/archive/2008/06/30/whats-the-capital-of-idaho.aspx</link><pubDate>Tue, 01 Jul 2008 02:37:00 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:7584</guid><dc:creator>Kalen Delaney</dc:creator><slash:comments>3</slash:comments><comments>http://www2.sqlblog.com/blogs/kalen_delaney/comments/7584.aspx</comments><wfw:commentRss>http://www2.sqlblog.com/blogs/kalen_delaney/commentrss.aspx?PostID=7584</wfw:commentRss><description>&lt;P&gt;Can you say it out loud? You might have known the capital was Boise, but if you pronounced it Boy-zee, you were wrong. I was there last Wednesday for the kickoff meeting of the Boise SQL Server User Group, and was told that if I didn't pronounce the name correctly, everyone would know immediately that I wasn't from around there.&amp;nbsp; The correct pronunciation is Boy-sea, or as I was spelling it when writing to my friend there: Boycee.&lt;/P&gt;
&lt;P&gt;We had over 30 people show up for my presentation, in which I compared the two different concurrency models that SQL Server 2005 has available. I didn't dive into a really deep level discussion about the internals of locking and snapshot isolation, because there were people there with all different experience levels. I tried to stick to the behavioral differences and the costs involved with both choices.&lt;/P&gt;
&lt;P&gt;It was a very enthusiastic group, with lots of good questions. There was also lots of good food, much than we could eat! We had about 20 pizzas, 3 coolers full of cold drinks, several bags of chips,&amp;nbsp; and also several bags of cookies.&lt;/P&gt;
&lt;P&gt;I get a lot of requests to come talk at User Groups, and usually I am open to it when I am in town teaching a class. This was the first time that I actually traveled by plane to go somewhere just to give a free User Group talk, and I did it because my good friend Cindy Gross, who works for Microsoft in Boise, asked me to.&amp;nbsp; And Cindy made it well worth my while, giving me a wonderful guided tour of the Idaho capital, and a fabulous breakfast on Thursday!&lt;/P&gt;
&lt;P&gt;Hopefully, I'll make it back again and Cindy has promised to take me rafting down the river. That sounds great, if I get back before the Winter!&lt;/P&gt;
&lt;P&gt;&lt;FONT color=#ff00ff size=4&gt;~Kalen&lt;/FONT&gt;&lt;/P&gt;&lt;img src="http://www2.sqlblog.com/aggbug.aspx?PostID=7584" width="1" height="1"&gt;</description><category domain="http://www2.sqlblog.com/blogs/kalen_delaney/archive/tags/concurrency/default.aspx">concurrency</category><category domain="http://www2.sqlblog.com/blogs/kalen_delaney/archive/tags/food/default.aspx">food</category><category domain="http://www2.sqlblog.com/blogs/kalen_delaney/archive/tags/snapshot+isolation/default.aspx">snapshot isolation</category><category domain="http://www2.sqlblog.com/blogs/kalen_delaney/archive/tags/user+groups/default.aspx">user groups</category></item><item><title>Geek City: How SQL Server Detects the Correct Versioned Rows</title><link>http://www2.sqlblog.com/blogs/kalen_delaney/archive/2008/04/03/how-sql-server-detects-the-correct-versioned-rows.aspx</link><pubDate>Thu, 03 Apr 2008 19:16:00 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:6033</guid><dc:creator>Kalen Delaney</dc:creator><slash:comments>4</slash:comments><comments>http://www2.sqlblog.com/blogs/kalen_delaney/comments/6033.aspx</comments><wfw:commentRss>http://www2.sqlblog.com/blogs/kalen_delaney/commentrss.aspx?PostID=6033</wfw:commentRss><description>&lt;P&gt;Here is a question I just received from the feedback page on my web site: 
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;FONT color=#000080&gt;I have finished the book &amp;lt;the storage engine&amp;gt; and like it very much. I am now reading &amp;lt;query tuning and optimization&amp;gt; &lt;/FONT&gt;
&lt;P&gt;&lt;FONT color=#000080&gt;I know in the READ COMMITTED SNAPSHOT isolation, when a row is being modified in a transaction, it generates an old committed version so another transaction can read it without being blocked. &lt;/FONT&gt;
&lt;P&gt;&lt;FONT color=#000080&gt;But I don’t know how SQL Server uses SNAPSHOT isolation to prevent Phantom Read being happening. &lt;/FONT&gt;
&lt;P&gt;&lt;FONT color=#000080&gt;In SERIALIZABLE isolation the ranged key or the whole table is locked, but in SNAPSHOT isolation, it can NOT generate any committed version since the row does NOT exist at the moment. So how does it know that the newly inserted data should not be included in the second SELECT statement?&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color=#000080&gt;-Tom&lt;/FONT&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Tom is correct in that INSERTS do not generate versioned rows. However, SQL Server is able to keep track of when each change was made under snapshot isolation. Once a database is enabled for snapshots, every rows inserted, deleted or modified gets an additional 14 bytes of overhead added to it. These bytes contain 2 pieces of information. First is a row pointer to the previous committed version of the row, which is stored in the version store in tempdb. This pointer is only used for deleted and updated rows, since there will be no previous values for newly inserted rows. &lt;/P&gt;
&lt;P&gt;However, these extra bytes also include a value called XSN, or transaction sequence number, which you can think of like a timestamp for a database. Any database enabled for snapshot keeps an internal XSN value, that is incremented each time any change is made, or any snapshot select is performed. The metadata also keeps track of all active transactions, and what the XSN was when the transaction started. It uses the view &lt;EM&gt;sys.dm_tran_active_snapshot_database_transactions&lt;/EM&gt; for this.&amp;nbsp; So when you are reading data, SQL Server will look at the XSN number in each row, and not return any rows that have an XSN value greater than the XSN value at the time the transaction started.&lt;/P&gt;
&lt;P&gt;I hope this helps!&lt;/P&gt;
&lt;P&gt;&lt;FONT color=#ff00ff size=5&gt;~Kalen&lt;/FONT&gt; 
&lt;P&gt;&lt;A href="http://www.insidesqlserver.com/"&gt;www.InsideSQLServer.com&lt;/A&gt;&lt;BR&gt;&lt;A href="http://www.sqlserverdvd.com/"&gt;www.SQLServerDVD.com&lt;/A&gt;&lt;/P&gt;&lt;img src="http://www2.sqlblog.com/aggbug.aspx?PostID=6033" width="1" height="1"&gt;</description><category domain="http://www2.sqlblog.com/blogs/kalen_delaney/archive/tags/Inside+SQL+Server/default.aspx">Inside SQL Server</category><category domain="http://www2.sqlblog.com/blogs/kalen_delaney/archive/tags/internals/default.aspx">internals</category><category domain="http://www2.sqlblog.com/blogs/kalen_delaney/archive/tags/snapshot+isolation/default.aspx">snapshot isolation</category><category domain="http://www2.sqlblog.com/blogs/kalen_delaney/archive/tags/Transactions/default.aspx">Transactions</category></item><item><title>Geek City: Accessing auxiliary tables during Data Modification</title><link>http://www2.sqlblog.com/blogs/kalen_delaney/archive/2007/05/22/geek-city-accessing-auxiliary-tables-during-data-modification.aspx</link><pubDate>Tue, 22 May 2007 16:59:00 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:1271</guid><dc:creator>Kalen Delaney</dc:creator><slash:comments>8</slash:comments><comments>http://www2.sqlblog.com/blogs/kalen_delaney/comments/1271.aspx</comments><wfw:commentRss>http://www2.sqlblog.com/blogs/kalen_delaney/commentrss.aspx?PostID=1271</wfw:commentRss><description>&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;FONT face="Times New Roman" size=3&gt;After reading &lt;/FONT&gt;&lt;A href="http://sqlblog.com/blogs/hugo_kornelis/archive/2006/07/21/Snapshot-and-integrity-part-1.aspx"&gt;&lt;FONT face="Times New Roman" color=#800080 size=3&gt;Hugo’s post about when snapshot isolation doesn’t really live up to its promise&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face="Times New Roman" size=3&gt;, I decided to do some research of my own. I met with Stefano Stefani, one of the engineers at Microsoft on the storage engine team and we talked about what kinds of locks are taken during the data modification operations. We know that when a row is actually updated, SQL Server will take an Exclusive (X) lock, but there’s a lot more to the story than that. &lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;FONT face="Times New Roman" size=3&gt;First of all, you need to be aware of the fact that almost every data modification operation has to do some read operations in order to find the rows to be modified. So what kinds of locks are taken on the data while we’re reading it and checking to see if it is the data that needs to be updated? &lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;FONT face="Times New Roman" size=3&gt;In addition, reads may need to be performed on other tables, other than the table being modified. These ‘auxiliary’ tables can need to be referenced for two different reasons. First, if your query explicitly mentions additional tables in the FROM clause of your data modification statement, these tables are referred to as explicit auxiliary tables. There may be other tables that need to be referenced because of a need to validate foreign key constraints. The tables that need to be accessed to validate referential integrity as called implicit auxiliary tables. What kinds of locks need to be taken on these auxiliary tables?&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;FONT face="Times New Roman" size=3&gt;There are a couple of additional terms I need to mention that relate to how an operator in a query plan is processed in an execution plan. An operator in a SQL Server execution plan (e.g. scan, seek, join, etc) consumes input rows and produces output rows. For example, a seek consumes rows from an index on a particular column, and produces rows that that can meet certain conditions in the indexed columns. A join consumes rows from two different input sources and produces output rows that match either other on the join condition. Every operator can be classified as either blocking or non-blocking. An operator that consumes the input rows and produces output rows at the same time is referred to as non-blocking, or flow-through. Other operators need to consume all input rows before producing any output rows and are referred to as blocking operators, or stop-and-go operators. A common example of a blocking operator is sort, which has to ‘stop’ to sort all the input rows before it produces any output. A loop join operator on the other hand is non blocking, because for every pair of row it consumes from the two input, it determines whether there is an output row to be returned, or whether it should just go on and get the next row. You can get more details and examples about blocking and non-blocking operators in Craig Freedman’s excellent blog here:&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;A href="http://blogs.msdn.com/craigfr/archive/2006/06/19/637048.aspx"&gt;&lt;FONT face="Times New Roman" color=#800080 size=3&gt;http://blogs.msdn.com/craigfr/archive/2006/06/19/637048.aspx&lt;/FONT&gt;&lt;/A&gt;&lt;FONT face="Times New Roman" size=3&gt; &lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoPlainText style="MARGIN:0in 0in 0pt;"&gt;&lt;SPAN style="FONT-SIZE:12pt;FONT-FAMILY:'Times New Roman','serif';mso-fareast-font-family:'Times New Roman';"&gt;All data modification query plans can be thought of as broken into two parts: what comes before the actual modification of the target table and what comes after. In a graphical plan, the before part is to the right of the table or clustered index modification. And the after part is to the left.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoPlainText style="MARGIN:0in 0in 0pt;"&gt;&lt;SPAN style="FONT-SIZE:12pt;FONT-FAMILY:'Times New Roman','serif';mso-fareast-font-family:'Times New Roman';"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoPlainText style="MARGIN:0in 0in 0pt;"&gt;&lt;SPAN style="FONT-SIZE:12pt;FONT-FAMILY:'Times New Roman','serif';mso-fareast-font-family:'Times New Roman';"&gt;Read operations performed during the part of the plan before the actual target table modification will lock any auxiliary tables under the user requested isolation level of the session or query, and the target table will take U locks. User requested tables will be those that occur in FROM clause of the operation, i.e. explicitly referenced by the user. Here is an example from the &lt;I style="mso-bidi-font-style:normal;"&gt;pubs&lt;/I&gt; database, which you can download from &lt;A href="http://www.microsoft.com/downloads/details.aspx?familyid=06616212-0356-46a0-8da2-eebc53a68034&amp;amp;displaylang=en"&gt;&lt;FONT color=#800080&gt;here&lt;/FONT&gt;&lt;/A&gt;. &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoPlainText style="MARGIN:0in 0in 0pt;"&gt;&lt;SPAN style="FONT-SIZE:12pt;FONT-FAMILY:'Times New Roman','serif';mso-fareast-font-family:'Times New Roman';"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoPlainText style="MARGIN:0in 0in 0pt;"&gt;&lt;SPAN style="FONT-SIZE:12pt;FONT-FAMILY:'Times New Roman','serif';mso-fareast-font-family:'Times New Roman';"&gt;First create copies of the &lt;I style="mso-bidi-font-style:normal;"&gt;publishers&lt;/I&gt; and &lt;I style="mso-bidi-font-style:normal;"&gt;titles&lt;/I&gt; tables:&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoPlainText style="MARGIN:0in 0in 0pt;"&gt;&lt;SPAN style="FONT-SIZE:12pt;FONT-FAMILY:'Times New Roman','serif';mso-fareast-font-family:'Times New Roman';"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;mso-layout-grid-align:none;"&gt;&lt;SPAN style="COLOR:navy;FONT-FAMILY:'Courier New';mso-no-proof:yes;mso-bidi-font-family:'Times New Roman';mso-bidi-font-size:16.0pt;"&gt;&lt;FONT size=3&gt;USE pubs&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;mso-layout-grid-align:none;"&gt;&lt;SPAN style="COLOR:navy;FONT-FAMILY:'Courier New';mso-no-proof:yes;mso-bidi-font-family:'Times New Roman';mso-bidi-font-size:16.0pt;"&gt;&lt;FONT size=3&gt;GO&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;mso-layout-grid-align:none;"&gt;&lt;SPAN style="COLOR:navy;FONT-FAMILY:'Courier New';mso-no-proof:yes;mso-bidi-font-family:'Times New Roman';mso-bidi-font-size:16.0pt;"&gt;&lt;FONT size=3&gt;SELECT * INTO newpublishers&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;mso-layout-grid-align:none;"&gt;&lt;SPAN style="COLOR:navy;FONT-FAMILY:'Courier New';mso-no-proof:yes;mso-bidi-font-family:'Times New Roman';mso-bidi-font-size:16.0pt;"&gt;&lt;FONT size=3&gt;FROM publishers&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;mso-layout-grid-align:none;"&gt;&lt;SPAN style="COLOR:navy;FONT-FAMILY:'Courier New';mso-no-proof:yes;mso-bidi-font-family:'Times New Roman';mso-bidi-font-size:16.0pt;"&gt;&lt;FONT size=3&gt;GO&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;mso-layout-grid-align:none;"&gt;&lt;SPAN style="COLOR:navy;FONT-FAMILY:'Courier New';mso-no-proof:yes;mso-bidi-font-family:'Times New Roman';mso-bidi-font-size:16.0pt;"&gt;&lt;FONT size=3&gt;SELECT * INTO newtitles&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;mso-layout-grid-align:none;"&gt;&lt;SPAN style="COLOR:navy;FONT-FAMILY:'Courier New';mso-no-proof:yes;mso-bidi-font-family:'Times New Roman';mso-bidi-font-size:16.0pt;"&gt;&lt;FONT size=3&gt;FROM titles&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;mso-layout-grid-align:none;"&gt;&lt;SPAN style="COLOR:navy;FONT-FAMILY:'Courier New';mso-no-proof:yes;mso-bidi-font-family:'Times New Roman';mso-bidi-font-size:16.0pt;"&gt;&lt;FONT size=3&gt;GO&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;mso-layout-grid-align:none;"&gt;&lt;SPAN style="COLOR:navy;FONT-FAMILY:'Courier New';mso-no-proof:yes;mso-bidi-font-family:'Times New Roman';mso-bidi-font-size:16.0pt;"&gt;&lt;o:p&gt;&lt;FONT size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;mso-layout-grid-align:none;"&gt;&lt;SPAN style="COLOR:navy;FONT-FAMILY:'Courier New';mso-no-proof:yes;mso-bidi-font-family:'Times New Roman';mso-bidi-font-size:16.0pt;"&gt;&lt;FONT size=3&gt;ALTER TABLE newpublishers ADD&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp; &lt;/SPAN&gt;CONSTRAINT UPKCL_newpubind PRIMARY KEY CLUSTERED &lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;mso-layout-grid-align:none;"&gt;&lt;SPAN style="COLOR:navy;FONT-FAMILY:'Courier New';mso-no-proof:yes;mso-bidi-font-family:'Times New Roman';mso-bidi-font-size:16.0pt;"&gt;&lt;FONT size=3&gt;(pub_id ASC)&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;mso-layout-grid-align:none;"&gt;&lt;SPAN style="COLOR:navy;FONT-FAMILY:'Courier New';mso-no-proof:yes;mso-bidi-font-family:'Times New Roman';mso-bidi-font-size:16.0pt;"&gt;&lt;FONT size=3&gt;GO&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;mso-layout-grid-align:none;"&gt;&lt;SPAN style="COLOR:navy;FONT-FAMILY:'Courier New';mso-no-proof:yes;mso-bidi-font-family:'Times New Roman';mso-bidi-font-size:16.0pt;"&gt;&lt;FONT size=3&gt;ALTER TABLE newtitles ADD&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp; &lt;/SPAN&gt;CONSTRAINT UPKCL_newtitleidind PRIMARY KEY CLUSTERED &lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;mso-layout-grid-align:none;"&gt;&lt;SPAN style="COLOR:navy;FONT-FAMILY:'Courier New';mso-no-proof:yes;mso-bidi-font-family:'Times New Roman';mso-bidi-font-size:16.0pt;"&gt;&lt;FONT size=3&gt;(title_id)&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;mso-layout-grid-align:none;"&gt;&lt;SPAN style="COLOR:navy;FONT-FAMILY:'Courier New';mso-no-proof:yes;mso-bidi-font-family:'Times New Roman';mso-bidi-font-size:16.0pt;"&gt;&lt;FONT size=3&gt;GO&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;mso-layout-grid-align:none;"&gt;&lt;SPAN style="COLOR:navy;FONT-FAMILY:'Courier New';mso-no-proof:yes;mso-bidi-font-family:'Times New Roman';mso-bidi-font-size:16.0pt;"&gt;&lt;FONT size=3&gt;ALTER TABLE newtitles&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp; &lt;/SPAN&gt;WITH CHECK ADD FOREIGN KEY(pub_id)&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;mso-layout-grid-align:none;"&gt;&lt;SPAN style="COLOR:navy;FONT-FAMILY:'Courier New';mso-no-proof:yes;mso-bidi-font-family:'Times New Roman';mso-bidi-font-size:16.0pt;"&gt;&lt;FONT size=3&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;REFERENCES newpublishers([pub_id])&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoPlainText style="MARGIN:0in 0in 0pt;"&gt;&lt;SPAN style="FONT-SIZE:12pt;COLOR:navy;FONT-FAMILY:'Courier New';mso-no-proof:yes;mso-bidi-font-family:'Times New Roman';mso-bidi-font-size:16.0pt;"&gt;GO&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:12pt;COLOR:navy;FONT-FAMILY:'Courier New';mso-fareast-font-family:'Times New Roman';mso-bidi-font-family:'Times New Roman';"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoPlainText style="MARGIN:0in 0in 0pt;"&gt;&lt;SPAN style="FONT-SIZE:12pt;FONT-FAMILY:'Times New Roman','serif';mso-fareast-font-family:'Times New Roman';"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoPlainText style="MARGIN:0in 0in 0pt;"&gt;&lt;SPAN style="FONT-SIZE:12pt;FONT-FAMILY:'Times New Roman','serif';mso-fareast-font-family:'Times New Roman';"&gt;Here is a SELECT that uses an explicitly referenced auxiliary table, followed by the graphical query plan. The target table is &lt;I style="mso-bidi-font-style:normal;"&gt;newtitles&lt;/I&gt; and the auxiliary table is &lt;I style="mso-bidi-font-style:normal;"&gt;newpublishers&lt;/I&gt;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoPlainText style="MARGIN:0in 0in 0pt;"&gt;&lt;SPAN style="FONT-SIZE:12pt;FONT-FAMILY:'Times New Roman','serif';mso-fareast-font-family:'Times New Roman';"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;mso-layout-grid-align:none;"&gt;&lt;SPAN style="COLOR:navy;FONT-FAMILY:'Courier New';mso-no-proof:yes;mso-bidi-font-family:'Times New Roman';mso-bidi-font-size:16.0pt;"&gt;&lt;FONT size=3&gt;-- explicit &lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;mso-layout-grid-align:none;"&gt;&lt;SPAN style="COLOR:navy;FONT-FAMILY:'Courier New';mso-no-proof:yes;mso-bidi-font-family:'Times New Roman';mso-bidi-font-size:16.0pt;"&gt;&lt;FONT size=3&gt;UPDATE newtitles&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;mso-layout-grid-align:none;"&gt;&lt;SPAN style="COLOR:navy;FONT-FAMILY:'Courier New';mso-no-proof:yes;mso-bidi-font-family:'Times New Roman';mso-bidi-font-size:16.0pt;"&gt;&lt;FONT size=3&gt;SET price = price * 1.1&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;mso-layout-grid-align:none;"&gt;&lt;SPAN style="COLOR:navy;FONT-FAMILY:'Courier New';mso-no-proof:yes;mso-bidi-font-family:'Times New Roman';mso-bidi-font-size:16.0pt;"&gt;&lt;FONT size=3&gt;FROM newtitles nt JOIN newpublishers np&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;mso-layout-grid-align:none;"&gt;&lt;SPAN style="COLOR:navy;FONT-FAMILY:'Courier New';mso-no-proof:yes;mso-bidi-font-family:'Times New Roman';mso-bidi-font-size:16.0pt;"&gt;&lt;FONT size=3&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;ON nt.pub_id = np.pub_id&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;mso-layout-grid-align:none;"&gt;&lt;SPAN style="COLOR:navy;FONT-FAMILY:'Courier New';mso-no-proof:yes;mso-bidi-font-family:'Times New Roman';mso-bidi-font-size:16.0pt;"&gt;&lt;FONT size=3&gt;WHERE state = 'CA'&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;mso-layout-grid-align:none;"&gt;&lt;SPAN style="COLOR:navy;FONT-FAMILY:'Courier New';mso-no-proof:yes;mso-bidi-font-family:'Times New Roman';mso-bidi-font-size:16.0pt;"&gt;&lt;FONT size=3&gt;GO&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoPlainText style="MARGIN:0in 0in 0pt;"&gt;&lt;SPAN style="FONT-SIZE:12pt;FONT-FAMILY:'Times New Roman','serif';mso-fareast-font-family:'Times New Roman';"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;SPAN style="COLOR:navy;FONT-FAMILY:'Courier New';mso-no-proof:yes;"&gt;&lt;SPAN style="FONT-SIZE:12pt;COLOR:navy;FONT-FAMILY:'Courier New';mso-fareast-font-family:'Times New Roman';mso-no-proof:yes;mso-ansi-language:en-us;mso-fareast-language:en-us;mso-bidi-language:ar-sa;"&gt;&lt;SPAN style="FONT-SIZE:12pt;COLOR:navy;FONT-FAMILY:'Courier New';mso-fareast-font-family:'Times New Roman';mso-no-proof:yes;mso-ansi-language:en-us;mso-fareast-language:en-us;mso-bidi-language:ar-sa;"&gt; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoPlainText style="MARGIN:0in 0in 0pt;"&gt;&lt;SPAN style="FONT-SIZE:12pt;FONT-FAMILY:'Times New Roman','serif';mso-fareast-font-family:'Times New Roman';"&gt;&lt;o:p&gt;&amp;nbsp;&lt;A href="http://sqlblog.com/blogs/kalen_delaney/WindowsLiveWriter/GeekCityAccessingauxiliarytablesduringDa_AFA6/update%20with%20explicit%20auxiliary%20table%5B6%5D.jpg"&gt;&lt;IMG style="BORDER-RIGHT:0px;BORDER-TOP:0px;BORDER-LEFT:0px;BORDER-BOTTOM:0px;" height=202 src="http://sqlblog.com/blogs/kalen_delaney/WindowsLiveWriter/GeekCityAccessingauxiliarytablesduringDa_AFA6/update%20with%20explicit%20auxiliary%20table_thumb%5B4%5D.jpg" width=784 border=0&gt;&lt;/A&gt; &lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoPlainText style="MARGIN:0in 0in 0pt;"&gt;&lt;SPAN style="FONT-SIZE:12pt;FONT-FAMILY:'Times New Roman','serif';mso-fareast-font-family:'Times New Roman';"&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoPlainText style="MARGIN:0in 0in 0pt;"&gt;&lt;SPAN style="FONT-SIZE:12pt;FONT-FAMILY:'Times New Roman','serif';mso-fareast-font-family:'Times New Roman';"&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoPlainText style="MARGIN:0in 0in 0pt;"&gt;&lt;SPAN style="FONT-SIZE:12pt;FONT-FAMILY:'Times New Roman','serif';mso-fareast-font-family:'Times New Roman';"&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoPlainText style="MARGIN:0in 0in 0pt;"&gt;&lt;SPAN style="FONT-SIZE:12pt;FONT-FAMILY:'Times New Roman','serif';mso-fareast-font-family:'Times New Roman';"&gt;I have circled the update to the &lt;I style="mso-bidi-font-style:normal;"&gt;newtitles&lt;/I&gt; table itself. The lookup into the &lt;I style="mso-bidi-font-style:normal;"&gt;newpublishers&lt;/I&gt; table is performed before (to the right of) the update to the &lt;I style="mso-bidi-font-style:normal;"&gt;newtitles&lt;/I&gt; table. I realize the details in the plan might be too small to read, but the point is not the details here, but rather to show you the ‘shape’ of the plan, with auxiliary table referenced before the target table. If you want the details, you can run the query yourself, and observe the graphical showplan on your own system. &lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoPlainText style="MARGIN:0in 0in 0pt;"&gt;&lt;SPAN style="FONT-SIZE:12pt;FONT-FAMILY:'Times New Roman','serif';mso-fareast-font-family:'Times New Roman';"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoPlainText style="MARGIN:0in 0in 0pt;"&gt;&lt;SPAN style="FONT-SIZE:12pt;FONT-FAMILY:'Times New Roman','serif';mso-fareast-font-family:'Times New Roman';"&gt;The part of the plan after the actual target table modification can involve additional tables not mentioned explicitly by the user. These are primarily tables used for PK/FK constraint validation. For these implicit auxiliary tables, the isolation level set in the session or by hints in the query is ignored; each implicit auxiliary table is accessed under read committed isolation and will acquire either U or S locks, and with different granularity (usually either row/key locks or range locks) based on the available indexes. The goal of the query processor is to prevent data corruption. &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoPlainText style="MARGIN:0in 0in 0pt;"&gt;&lt;SPAN style="FONT-SIZE:12pt;FONT-FAMILY:'Times New Roman','serif';mso-fareast-font-family:'Times New Roman';"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoPlainText style="MARGIN:0in 0in 0pt;"&gt;&lt;SPAN style="FONT-SIZE:12pt;FONT-FAMILY:'Times New Roman','serif';mso-fareast-font-family:'Times New Roman';"&gt;Here is a SELECT that uses an implicitly referenced auxiliary table, followed by the graphical query plan. The target table is again &lt;I style="mso-bidi-font-style:normal;"&gt;newtitles&lt;/I&gt; and the auxiliary table is again &lt;I style="mso-bidi-font-style:normal;"&gt;newpublishers&lt;/I&gt;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoPlainText style="MARGIN:0in 0in 0pt;"&gt;&lt;SPAN style="FONT-SIZE:12pt;FONT-FAMILY:'Times New Roman','serif';mso-fareast-font-family:'Times New Roman';"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;mso-layout-grid-align:none;"&gt;&lt;SPAN style="COLOR:navy;FONT-FAMILY:'Courier New';mso-no-proof:yes;mso-bidi-font-family:'Times New Roman';mso-bidi-font-size:16.0pt;"&gt;&lt;FONT size=3&gt;-- implicit&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;mso-layout-grid-align:none;"&gt;&lt;SPAN style="COLOR:navy;FONT-FAMILY:'Courier New';mso-no-proof:yes;mso-bidi-font-family:'Times New Roman';mso-bidi-font-size:16.0pt;"&gt;&lt;FONT size=3&gt;UPDATE newtitles&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;mso-layout-grid-align:none;"&gt;&lt;SPAN style="COLOR:navy;FONT-FAMILY:'Courier New';mso-no-proof:yes;mso-bidi-font-family:'Times New Roman';mso-bidi-font-size:16.0pt;"&gt;&lt;FONT size=3&gt;SET title_id = title_id + '_$'&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoPlainText style="MARGIN:0in 0in 0pt;"&gt;&lt;SPAN style="FONT-SIZE:12pt;COLOR:navy;FONT-FAMILY:'Courier New';mso-fareast-font-family:'Times New Roman';mso-no-proof:yes;mso-bidi-font-family:'Times New Roman';mso-bidi-font-size:16.0pt;"&gt;WHERE price &amp;gt; 20&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoPlainText style="MARGIN:0in 0in 0pt;"&gt;&lt;SPAN style="FONT-SIZE:16pt;FONT-FAMILY:'Lucida Console';mso-no-proof:yes;"&gt;&lt;o:p&gt;&amp;nbsp;&lt;A href="http://sqlblog.com/blogs/kalen_delaney/WindowsLiveWriter/GeekCityAccessingauxiliarytablesduringDa_AFA6/update%20with%20implicit%20auxiliary%20table%5B4%5D.jpg"&gt;&lt;IMG style="BORDER-RIGHT:0px;BORDER-TOP:0px;BORDER-LEFT:0px;BORDER-BOTTOM:0px;" height=175 src="http://sqlblog.com/blogs/kalen_delaney/WindowsLiveWriter/GeekCityAccessingauxiliarytablesduringDa_AFA6/update%20with%20implicit%20auxiliary%20table_thumb%5B2%5D.jpg" width=754 border=0&gt;&lt;/A&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoPlainText style="MARGIN:0in 0in 0pt;"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoPlainText style="MARGIN:0in 0in 0pt;"&gt;&lt;SPAN style="COLOR:navy;FONT-FAMILY:'Courier New';mso-no-proof:yes;"&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:16pt;FONT-FAMILY:'Lucida Console';mso-no-proof:yes;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoPlainText style="MARGIN:0in 0in 0pt;"&gt;&lt;SPAN style="FONT-SIZE:12pt;FONT-FAMILY:'Times New Roman','serif';mso-fareast-font-family:'Times New Roman';"&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoPlainText style="MARGIN:0in 0in 0pt;"&gt;&lt;SPAN style="FONT-SIZE:12pt;FONT-FAMILY:'Times New Roman','serif';mso-fareast-font-family:'Times New Roman';"&gt;For this query plan, note that the seek into the auxiliary table happens after (to the left of) the update of the target table. (Also note that you can’t actually execute this query, as it will fail due to string truncation.)&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoPlainText style="MARGIN:0in 0in 0pt;"&gt;&lt;SPAN style="FONT-SIZE:12pt;FONT-FAMILY:'Times New Roman','serif';mso-fareast-font-family:'Times New Roman';"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoPlainText style="MARGIN:0in 0in 0pt;"&gt;&lt;SPAN style="FONT-SIZE:12pt;FONT-FAMILY:'Times New Roman','serif';mso-fareast-font-family:'Times New Roman';"&gt;The internal locks for the extra scans required for these implicit tables are kept for the duration of the scan if the operator is a stop-and-go operator, like sort or hash where all the rows must be read before processing can begin. For non stop-and-go (i.e. leaf level operators or flow-through), the lifetime of the lock is like a normal read committed shared lock, with which the lock is released as soon as the data has been read.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoPlainText style="MARGIN:0in 0in 0pt;"&gt;&lt;SPAN style="FONT-SIZE:12pt;FONT-FAMILY:'Times New Roman','serif';mso-fareast-font-family:'Times New Roman';"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoPlainText style="MARGIN:0in 0in 0pt;"&gt;&lt;SPAN style="FONT-SIZE:12pt;FONT-FAMILY:'Times New Roman','serif';mso-fareast-font-family:'Times New Roman';"&gt;If the isolation level is SNAPSHOT, normally these locks on the implicit tables will not cause blocking or be blocked. But SQL Server can detect if relevant rows have changed since the transaction started, and will then block. This gets back to the subject of Hugo’s post, referenced at the beginning of my post. &lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoPlainText style="MARGIN:0in 0in 0pt;"&gt;&lt;SPAN style="FONT-SIZE:12pt;FONT-FAMILY:'Times New Roman','serif';mso-fareast-font-family:'Times New Roman';"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoPlainText style="MARGIN:0in 0in 0pt;"&gt;&lt;SPAN style="FONT-SIZE:12pt;FONT-FAMILY:'Times New Roman','serif';mso-fareast-font-family:'Times New Roman';"&gt;You can probably guess that you can have both implicit and explicit auxiliary tables in the same plan. Here is a query and a graphical plan that illustrates this. &lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoPlainText style="MARGIN:0in 0in 0pt;"&gt;&lt;SPAN style="FONT-SIZE:12pt;FONT-FAMILY:'Times New Roman','serif';mso-fareast-font-family:'Times New Roman';"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoPlainText style="MARGIN:0in 0in 0pt;"&gt;&lt;SPAN style="FONT-SIZE:12pt;FONT-FAMILY:'Times New Roman','serif';mso-fareast-font-family:'Times New Roman';"&gt;So this final SELECT uses both an implicitly referenced auxiliary table and an explicitly referenced auxiliary table, followed by the graphical query plan. The target table is again &lt;I style="mso-bidi-font-style:normal;"&gt;newtitles&lt;/I&gt; and the auxiliary tables are &lt;I style="mso-bidi-font-style:normal;"&gt;newpublishers&lt;/I&gt;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoPlainText style="MARGIN:0in 0in 0pt;"&gt;&lt;SPAN style="FONT-SIZE:12pt;FONT-FAMILY:'Times New Roman','serif';mso-fareast-font-family:'Times New Roman';"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;mso-layout-grid-align:none;"&gt;&lt;SPAN style="COLOR:navy;FONT-FAMILY:'Courier New';mso-no-proof:yes;mso-bidi-font-family:'Times New Roman';mso-bidi-font-size:16.0pt;"&gt;&lt;FONT size=3&gt;-- explicit and implicit&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;mso-layout-grid-align:none;"&gt;&lt;SPAN style="COLOR:navy;FONT-FAMILY:'Courier New';mso-no-proof:yes;mso-bidi-font-family:'Times New Roman';mso-bidi-font-size:16.0pt;"&gt;&lt;FONT size=3&gt;UPDATE newtitles&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;mso-layout-grid-align:none;"&gt;&lt;SPAN style="COLOR:navy;FONT-FAMILY:'Courier New';mso-no-proof:yes;mso-bidi-font-family:'Times New Roman';mso-bidi-font-size:16.0pt;"&gt;&lt;FONT size=3&gt;SET title_id = title_id + 'CA'&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;mso-layout-grid-align:none;"&gt;&lt;SPAN style="COLOR:navy;FONT-FAMILY:'Courier New';mso-no-proof:yes;mso-bidi-font-family:'Times New Roman';mso-bidi-font-size:16.0pt;"&gt;&lt;FONT size=3&gt;FROM newtitles nt JOIN newpublishers np&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;mso-layout-grid-align:none;"&gt;&lt;SPAN style="COLOR:navy;FONT-FAMILY:'Courier New';mso-no-proof:yes;mso-bidi-font-family:'Times New Roman';mso-bidi-font-size:16.0pt;"&gt;&lt;FONT size=3&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;ON nt.pub_id = np.pub_id&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoPlainText style="MARGIN:0in 0in 0pt;"&gt;&lt;SPAN style="FONT-SIZE:12pt;COLOR:navy;FONT-FAMILY:'Courier New';mso-fareast-font-family:'Times New Roman';mso-no-proof:yes;mso-bidi-font-family:'Times New Roman';mso-bidi-font-size:16.0pt;"&gt;WHERE state = 'CA'&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoPlainText style="MARGIN:0in 0in 0pt;"&gt;&lt;SPAN style="FONT-SIZE:12pt;FONT-FAMILY:'Times New Roman','serif';mso-fareast-font-family:'Times New Roman';"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoPlainText style="MARGIN:0in 0in 0pt;"&gt;&lt;SPAN style="COLOR:navy;FONT-FAMILY:'Courier New';mso-no-proof:yes;"&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:12pt;FONT-FAMILY:'Times New Roman','serif';mso-fareast-font-family:'Times New Roman';"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoPlainText style="MARGIN:0in 0in 0pt;"&gt;&lt;SPAN style="FONT-SIZE:12pt;FONT-FAMILY:'Times New Roman','serif';mso-fareast-font-family:'Times New Roman';"&gt;&lt;o:p&gt;&amp;nbsp;&lt;A href="http://sqlblog.com/blogs/kalen_delaney/WindowsLiveWriter/GeekCityAccessingauxiliarytablesduringDa_AFA6/update%20with%20both%20kinds%20of%20auxiliary%20table%5B4%5D.jpg"&gt;&lt;IMG style="BORDER-RIGHT:0px;BORDER-TOP:0px;BORDER-LEFT:0px;BORDER-BOTTOM:0px;" height=175 src="http://sqlblog.com/blogs/kalen_delaney/WindowsLiveWriter/GeekCityAccessingauxiliarytablesduringDa_AFA6/update%20with%20both%20kinds%20of%20auxiliary%20table_thumb%5B2%5D.jpg" width=776 border=0&gt;&lt;/A&gt; &lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoPlainText style="MARGIN:0in 0in 0pt;"&gt;&lt;SPAN style="FONT-SIZE:12pt;FONT-FAMILY:'Times New Roman','serif';mso-fareast-font-family:'Times New Roman';"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;FONT face="Times New Roman" size=3&gt;In my next post, I’ll give you some query examples to illustrate SQL Server detecting changed data under SNAPSHOT isolation.&lt;/FONT&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;o:p&gt;&lt;FONT face="Times New Roman" size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;SPAN style="mso-spacerun:yes;"&gt;&lt;FONT face="Times New Roman" size=3&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;"&gt;&lt;SPAN style="COLOR:purple;"&gt;&lt;FONT size=3&gt;&lt;FONT face="Times New Roman"&gt;-- Kalen &lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;mso-layout-grid-align:none;"&gt;&lt;SPAN style="COLOR:navy;FONT-FAMILY:'Courier New';mso-no-proof:yes;"&gt;&lt;o:p&gt;&lt;FONT size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;mso-layout-grid-align:none;"&gt;&lt;SPAN style="COLOR:navy;FONT-FAMILY:'Courier New';mso-no-proof:yes;"&gt;&lt;o:p&gt;&lt;FONT size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;mso-layout-grid-align:none;"&gt;&lt;SPAN style="COLOR:navy;FONT-FAMILY:'Courier New';mso-no-proof:yes;"&gt;&lt;o:p&gt;&lt;FONT size=3&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;img src="http://www2.sqlblog.com/aggbug.aspx?PostID=1271" width="1" height="1"&gt;</description><enclosure url="http://www2.sqlblog.com/blogs/kalen_delaney/attachment/1271.ashx" length="12321" type="image/jpeg" /><category domain="http://www2.sqlblog.com/blogs/kalen_delaney/archive/tags/locking/default.aspx">locking</category><category domain="http://www2.sqlblog.com/blogs/kalen_delaney/archive/tags/snapshot+isolation/default.aspx">snapshot isolation</category></item></channel></rss>