<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments on: SQL SERVER &#8211; Difference Between Update Lock and Exclusive Lock</title>
	<atom:link href="http://blog.sqlauthority.com/2010/02/15/sql-server-difference-between-update-lock-and-exclusive-lock/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.sqlauthority.com/2010/02/15/sql-server-difference-between-update-lock-and-exclusive-lock/</link>
	<description>Personal Notes of Pinal Dave</description>
	<lastBuildDate>Fri, 17 May 2013 15:26:57 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
	<item>
		<title>By: SQLG</title>
		<link>http://blog.sqlauthority.com/2010/02/15/sql-server-difference-between-update-lock-and-exclusive-lock/#comment-429850</link>
		<dc:creator><![CDATA[SQLG]]></dc:creator>
		<pubDate>Fri, 01 Mar 2013 17:39:55 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=7994#comment-429850</guid>
		<description><![CDATA[Here is better explanation for same,
http://sqlblog.com/blogs/kalen_delaney/archive/2009/11/13/update-locks.aspx]]></description>
		<content:encoded><![CDATA[<p>Here is better explanation for same,<br />
<a href="http://sqlblog.com/blogs/kalen_delaney/archive/2009/11/13/update-locks.aspx" rel="nofollow">http://sqlblog.com/blogs/kalen_delaney/archive/2009/11/13/update-locks.aspx</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: SQL SERVER &#8211; Weekly Series &#8211; Memory Lane &#8211; #016 &#171; SQL Server Journey with SQL Authority</title>
		<link>http://blog.sqlauthority.com/2010/02/15/sql-server-difference-between-update-lock-and-exclusive-lock/#comment-422302</link>
		<dc:creator><![CDATA[SQL SERVER &#8211; Weekly Series &#8211; Memory Lane &#8211; #016 &#171; SQL Server Journey with SQL Authority]]></dc:creator>
		<pubDate>Sat, 16 Feb 2013 01:31:33 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=7994#comment-422302</guid>
		<description><![CDATA[[...] Difference Between Update Lock and Exclusive Lock I have often received this question on this blog as well in different SQL Training. [...]]]></description>
		<content:encoded><![CDATA[<p>[...] Difference Between Update Lock and Exclusive Lock I have often received this question on this blog as well in different SQL Training. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Naresh</title>
		<link>http://blog.sqlauthority.com/2010/02/15/sql-server-difference-between-update-lock-and-exclusive-lock/#comment-297376</link>
		<dc:creator><![CDATA[Naresh]]></dc:creator>
		<pubDate>Fri, 08 Jun 2012 10:02:00 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=7994#comment-297376</guid>
		<description><![CDATA[Hi Pinal,
First of all a big thankyou.....for your articles...
Can you please write an article on all kinds of locks...starting from basics....]]></description>
		<content:encoded><![CDATA[<p>Hi Pinal,<br />
First of all a big thankyou&#8230;..for your articles&#8230;<br />
Can you please write an article on all kinds of locks&#8230;starting from basics&#8230;.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Prudhvi</title>
		<link>http://blog.sqlauthority.com/2010/02/15/sql-server-difference-between-update-lock-and-exclusive-lock/#comment-173280</link>
		<dc:creator><![CDATA[Prudhvi]]></dc:creator>
		<pubDate>Thu, 29 Sep 2011 19:22:31 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=7994#comment-173280</guid>
		<description><![CDATA[Lets assume 5 process wants to access some data in a particular table. 

A shared lock is issued when you want to allow all the process to read concurrently. Shared lock in other words can be called read only mode. No updates/changes to the existing data is allowed when shared lock is on.

Now assume one or more of the above process wants to update a particular row, they cannot update readily because the shared lock is on. One has to internally obtain a exclusive lock before it can go a head and update. So it places a request to the server to issue a exclusive lock. This is what is called &quot;Update lock&quot; stage.

Update lock is a internal locking done to avoid deadlock stage i.e for suppose assume 3 process among 5 want to update the data. These three process request the server to issue a exclusive lock which the server cannot issue readily because the other 2 process are still reading the data and shared lock is still on.

Now the point here is that when the 2 other process finishes reading the document and shared lock is removed which process has to get the exclusive lock first and perform the update operation?(Note that only one lock can exist at a single point of time just similar to a person cannot be at 2 different places at the same time. So to issue exclusive lock to one process shared lock has to be removed first. Also only one process can be allowed to update the date on the table by issuing it a exclusive lock to avoid concurrency problems. For more info on concurrency problems refer - http://msdn.microsoft.com/en-us/library/aa213029(v=sql.80).aspx)

To solve this confusion update lock is used. The system issues update lock to one of the process that requested for the exclusive lock depending on preference type set which can be either first in first out, top priority first etc (For more info on how tasks are scheduled refer to: http://en.wikipedia.org/wiki/Scheduling_(computing)#Scheduling_disciplines)

Once a update lock is issued to one of the above 3 process, it obtains exclusive lock immediately after 2 other process exit reading there by removing the shared lock placed on the data. 

P.S- I&#039;m not a professional in SQL but this is what I understood from my research]]></description>
		<content:encoded><![CDATA[<p>Lets assume 5 process wants to access some data in a particular table. </p>
<p>A shared lock is issued when you want to allow all the process to read concurrently. Shared lock in other words can be called read only mode. No updates/changes to the existing data is allowed when shared lock is on.</p>
<p>Now assume one or more of the above process wants to update a particular row, they cannot update readily because the shared lock is on. One has to internally obtain a exclusive lock before it can go a head and update. So it places a request to the server to issue a exclusive lock. This is what is called &#8220;Update lock&#8221; stage.</p>
<p>Update lock is a internal locking done to avoid deadlock stage i.e for suppose assume 3 process among 5 want to update the data. These three process request the server to issue a exclusive lock which the server cannot issue readily because the other 2 process are still reading the data and shared lock is still on.</p>
<p>Now the point here is that when the 2 other process finishes reading the document and shared lock is removed which process has to get the exclusive lock first and perform the update operation?(Note that only one lock can exist at a single point of time just similar to a person cannot be at 2 different places at the same time. So to issue exclusive lock to one process shared lock has to be removed first. Also only one process can be allowed to update the date on the table by issuing it a exclusive lock to avoid concurrency problems. For more info on concurrency problems refer &#8211; <a href="http://msdn.microsoft.com/en-us/library/aa213029(v=sql.80)" rel="nofollow">http://msdn.microsoft.com/en-us/library/aa213029(v=sql.80)</a>.aspx)</p>
<p>To solve this confusion update lock is used. The system issues update lock to one of the process that requested for the exclusive lock depending on preference type set which can be either first in first out, top priority first etc (For more info on how tasks are scheduled refer to: <a href="http://en.wikipedia.org/wiki/Scheduling_(computing)#Scheduling_disciplines" rel="nofollow">http://en.wikipedia.org/wiki/Scheduling_(computing)#Scheduling_disciplines</a>)</p>
<p>Once a update lock is issued to one of the above 3 process, it obtains exclusive lock immediately after 2 other process exit reading there by removing the shared lock placed on the data. </p>
<p>P.S- I&#8217;m not a professional in SQL but this is what I understood from my research</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: SQL SERVER – Interview Questions and Answers – Frequently Asked Questions – Day 16 of 31 Journey to SQLAuthority</title>
		<link>http://blog.sqlauthority.com/2010/02/15/sql-server-difference-between-update-lock-and-exclusive-lock/#comment-148619</link>
		<dc:creator><![CDATA[SQL SERVER – Interview Questions and Answers – Frequently Asked Questions – Day 16 of 31 Journey to SQLAuthority]]></dc:creator>
		<pubDate>Sat, 16 Jul 2011 01:31:54 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=7994#comment-148619</guid>
		<description><![CDATA[[...] Update Lock is a type of Exclusive Lock, except that it can be placed on the row which already has Shared Lock on it. Update Lock reads the data of the row which has the Shared Lock as soon as the Update Lock is ready to change the data it converts itself to the Exclusive Lock. (Read more here) [...]]]></description>
		<content:encoded><![CDATA[<p>[...] Update Lock is a type of Exclusive Lock, except that it can be placed on the row which already has Shared Lock on it. Update Lock reads the data of the row which has the Shared Lock as soon as the Update Lock is ready to change the data it converts itself to the Exclusive Lock. (Read more here) [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ali2</title>
		<link>http://blog.sqlauthority.com/2010/02/15/sql-server-difference-between-update-lock-and-exclusive-lock/#comment-73032</link>
		<dc:creator><![CDATA[Ali2]]></dc:creator>
		<pubDate>Tue, 25 May 2010 11:40:05 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=7994#comment-73032</guid>
		<description><![CDATA[a question]]></description>
		<content:encoded><![CDATA[<p>a question</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ali</title>
		<link>http://blog.sqlauthority.com/2010/02/15/sql-server-difference-between-update-lock-and-exclusive-lock/#comment-73031</link>
		<dc:creator><![CDATA[Ali]]></dc:creator>
		<pubDate>Tue, 25 May 2010 11:38:26 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=7994#comment-73031</guid>
		<description><![CDATA[please i have  a question 
 is this correcct 

Xl1(X) r1(x) SL2(x) r2(x) w1(x) UL1(x)]]></description>
		<content:encoded><![CDATA[<p>please i have  a question<br />
 is this correcct </p>
<p>Xl1(X) r1(x) SL2(x) r2(x) w1(x) UL1(x)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Pinal Dave</title>
		<link>http://blog.sqlauthority.com/2010/02/15/sql-server-difference-between-update-lock-and-exclusive-lock/#comment-61298</link>
		<dc:creator><![CDATA[Pinal Dave]]></dc:creator>
		<pubDate>Wed, 17 Feb 2010 03:12:32 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=7994#comment-61298</guid>
		<description><![CDATA[Hello Nakul,

You are correct in saying that data is not updated until an Exclusive lick is not obtained. Any modifiction to a row can be implemented using Exclusive lock only. But Update lock is not Intent Exclusive lock as intent locks are implemented at higher levels (like page, table or database). We can understand update lock as future intent exclusive lock.

Regards,
Pinal Dave]]></description>
		<content:encoded><![CDATA[<p>Hello Nakul,</p>
<p>You are correct in saying that data is not updated until an Exclusive lick is not obtained. Any modifiction to a row can be implemented using Exclusive lock only. But Update lock is not Intent Exclusive lock as intent locks are implemented at higher levels (like page, table or database). We can understand update lock as future intent exclusive lock.</p>
<p>Regards,<br />
Pinal Dave</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nakul Vachhrajani</title>
		<link>http://blog.sqlauthority.com/2010/02/15/sql-server-difference-between-update-lock-and-exclusive-lock/#comment-61281</link>
		<dc:creator><![CDATA[Nakul Vachhrajani]]></dc:creator>
		<pubDate>Tue, 16 Feb 2010 17:20:09 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=7994#comment-61281</guid>
		<description><![CDATA[Hello!

I believe the key would be to understand that data is not updated untill an Exclusive lock is actually obtained. Pinal, please correct me if I am wrong, but an Update lock is actually an Intent Exclusive lock (IX). Am I understanding this concept correctly?

Thank-you, and have a great day!]]></description>
		<content:encoded><![CDATA[<p>Hello!</p>
<p>I believe the key would be to understand that data is not updated untill an Exclusive lock is actually obtained. Pinal, please correct me if I am wrong, but an Update lock is actually an Intent Exclusive lock (IX). Am I understanding this concept correctly?</p>
<p>Thank-you, and have a great day!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Adam Haines</title>
		<link>http://blog.sqlauthority.com/2010/02/15/sql-server-difference-between-update-lock-and-exclusive-lock/#comment-61205</link>
		<dc:creator><![CDATA[Adam Haines]]></dc:creator>
		<pubDate>Mon, 15 Feb 2010 21:34:15 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=7994#comment-61205</guid>
		<description><![CDATA[Hi Marko,

An UPDATE lock cannot be obtained on the resource until the other UPDATE lock has been released.  Ultimately, you can only have one UPDATE lock on a resource at any given time.  An UPDATE lock is a lot like a shared lock only it has to make sure it can escalate to an exclusive lock..   To prevent a shared lock/dead lock scenario, only one transaction at a time can obtain an UPDATE lock on the resource.]]></description>
		<content:encoded><![CDATA[<p>Hi Marko,</p>
<p>An UPDATE lock cannot be obtained on the resource until the other UPDATE lock has been released.  Ultimately, you can only have one UPDATE lock on a resource at any given time.  An UPDATE lock is a lot like a shared lock only it has to make sure it can escalate to an exclusive lock..   To prevent a shared lock/dead lock scenario, only one transaction at a time can obtain an UPDATE lock on the resource.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sujit deshmukh</title>
		<link>http://blog.sqlauthority.com/2010/02/15/sql-server-difference-between-update-lock-and-exclusive-lock/#comment-61195</link>
		<dc:creator><![CDATA[sujit deshmukh]]></dc:creator>
		<pubDate>Mon, 15 Feb 2010 16:33:40 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=7994#comment-61195</guid>
		<description><![CDATA[Sir
this explanation does not satisfy my requirement please
give me detailed explanation]]></description>
		<content:encoded><![CDATA[<p>Sir<br />
this explanation does not satisfy my requirement please<br />
give me detailed explanation</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Marko Parkkola</title>
		<link>http://blog.sqlauthority.com/2010/02/15/sql-server-difference-between-update-lock-and-exclusive-lock/#comment-61144</link>
		<dc:creator><![CDATA[Marko Parkkola]]></dc:creator>
		<pubDate>Mon, 15 Feb 2010 06:24:01 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=7994#comment-61144</guid>
		<description><![CDATA[Hi,

I think I got it but just one thing: If update lock is already placed on a row can subsequent shared or update locks be placed on the same row?]]></description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>I think I got it but just one thing: If update lock is already placed on a row can subsequent shared or update locks be placed on the same row?</p>
]]></content:encoded>
	</item>
</channel>
</rss>
