<?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; Concurrency Problems and their Relationship with Isolation Level</title>
	<atom:link href="http://blog.sqlauthority.com/2011/03/04/sql-server-concurrancy-problems-and-their-relationship-with-isolation-level/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.sqlauthority.com/2011/03/04/sql-server-concurrancy-problems-and-their-relationship-with-isolation-level/</link>
	<description>SQL, SQL Server, MySQL, Big Data and NoSQL</description>
	<lastBuildDate>Tue, 18 Jun 2013 06:30:30 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
	<item>
		<title>By: SQL SERVER &#8211; Weekly Series &#8211; Memory Lane &#8211; #019 &#124; SQL Server Journey with SQL Authority</title>
		<link>http://blog.sqlauthority.com/2011/03/04/sql-server-concurrancy-problems-and-their-relationship-with-isolation-level/#comment-434139</link>
		<dc:creator><![CDATA[SQL SERVER &#8211; Weekly Series &#8211; Memory Lane &#8211; #019 &#124; SQL Server Journey with SQL Authority]]></dc:creator>
		<pubDate>Sat, 09 Mar 2013 01:31:58 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=12115#comment-434139</guid>
		<description><![CDATA[[...] Concurrency Problems and their Relationship with Isolation Level Concurrency is simply put capability of the machine to support two or more transactions working with the same data at the same time. This usually comes up with data is being modified, as during the retrieval of the data this is not the issue. Most of the concurrency problems can be avoided by SQL Locks. There are four types of concurrency problems visible in the normal programming. [...]]]></description>
		<content:encoded><![CDATA[<p>[...] Concurrency Problems and their Relationship with Isolation Level Concurrency is simply put capability of the machine to support two or more transactions working with the same data at the same time. This usually comes up with data is being modified, as during the retrieval of the data this is not the issue. Most of the concurrency problems can be avoided by SQL Locks. There are four types of concurrency problems visible in the normal programming. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: SQL SERVER &#8211; Importance of ANSI ISOLATION Levels in SQL Server Database &#8211; Quiz &#8211; Puzzle &#8211; 1 of 31 &#171; SQL Server Journey with SQLAuthority</title>
		<link>http://blog.sqlauthority.com/2011/03/04/sql-server-concurrancy-problems-and-their-relationship-with-isolation-level/#comment-229782</link>
		<dc:creator><![CDATA[SQL SERVER &#8211; Importance of ANSI ISOLATION Levels in SQL Server Database &#8211; Quiz &#8211; Puzzle &#8211; 1 of 31 &#171; SQL Server Journey with SQLAuthority]]></dc:creator>
		<pubDate>Mon, 02 Jan 2012 01:31:05 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=12115#comment-229782</guid>
		<description><![CDATA[[...] Server Interview Questions and Answers ISBN: 1466405643 Page#20-21 Concurrency Problems and their Relationship with Isolation Level Check the Isolation Level with DBCC useroptions Applying NOLOCK Hint at Query Level – NOLOCK [...]]]></description>
		<content:encoded><![CDATA[<p>[...] Server Interview Questions and Answers ISBN: 1466405643 Page#20-21 Concurrency Problems and their Relationship with Isolation Level Check the Isolation Level with DBCC useroptions Applying NOLOCK Hint at Query Level – NOLOCK [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: cloud computing</title>
		<link>http://blog.sqlauthority.com/2011/03/04/sql-server-concurrancy-problems-and-their-relationship-with-isolation-level/#comment-151311</link>
		<dc:creator><![CDATA[cloud computing]]></dc:creator>
		<pubDate>Thu, 28 Jul 2011 12:38:30 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=12115#comment-151311</guid>
		<description><![CDATA[Putting NOLOCK everywhere they see is one the biggest mistakes of novice DBAs. Concurrency is not such a simple task to achieve and every responsible DBA should investigate all Isolation levels deeply for optimized production server performance.]]></description>
		<content:encoded><![CDATA[<p>Putting NOLOCK everywhere they see is one the biggest mistakes of novice DBAs. Concurrency is not such a simple task to achieve and every responsible DBA should investigate all Isolation levels deeply for optimized production server performance.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rajan</title>
		<link>http://blog.sqlauthority.com/2011/03/04/sql-server-concurrancy-problems-and-their-relationship-with-isolation-level/#comment-142688</link>
		<dc:creator><![CDATA[Rajan]]></dc:creator>
		<pubDate>Tue, 21 Jun 2011 08:11:55 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=12115#comment-142688</guid>
		<description><![CDATA[Hi Penal,

Process 1 :

Begin Transaction

 Table 1 - Reading No

 Table 2 - Inserting No with details
.
.
.
.
Commit Transaction

Process 2:

Meantime outside of transaction 

 Table 1 - Reading No
 Table 2 - Inserting No with details
.
.
.

Process1 affects process 2 because of the Read Committed transaction.
Actually it locks(IX) entire table. Not even select the old data.

pls help how to view / Insert  the data when process1 running.]]></description>
		<content:encoded><![CDATA[<p>Hi Penal,</p>
<p>Process 1 :</p>
<p>Begin Transaction</p>
<p> Table 1 &#8211; Reading No</p>
<p> Table 2 &#8211; Inserting No with details<br />
.<br />
.<br />
.<br />
.<br />
Commit Transaction</p>
<p>Process 2:</p>
<p>Meantime outside of transaction </p>
<p> Table 1 &#8211; Reading No<br />
 Table 2 &#8211; Inserting No with details<br />
.<br />
.<br />
.</p>
<p>Process1 affects process 2 because of the Read Committed transaction.<br />
Actually it locks(IX) entire table. Not even select the old data.</p>
<p>pls help how to view / Insert  the data when process1 running.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Narendra Kotha</title>
		<link>http://blog.sqlauthority.com/2011/03/04/sql-server-concurrancy-problems-and-their-relationship-with-isolation-level/#comment-122140</link>
		<dc:creator><![CDATA[Narendra Kotha]]></dc:creator>
		<pubDate>Sun, 06 Mar 2011 17:12:57 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=12115#comment-122140</guid>
		<description><![CDATA[hi pinal sir,

i am great fan of you &amp; your blogs.
Recently i came across your 109th blog.

when i run the script in my SSMS, it is giving error.

so that i have modified the script

/* FUNCTION TO GET WEEKDAYS FROM TWO GIVEN DAYS */
IF EXISTS(SELECT * FROM sys.objects WHERE TYPE = &#039;FN&#039; AND name = &#039;Fn_GetWeekDays&#039;)
	DROP FUNCTION Fn_GetWeekDays
GO
CREATE FUNCTION  Fn_GetWeekDays
( @StartDate DATETIME,
@EndDate DATETIME )
RETURNS INT
AS
BEGIN
DECLARE @FirstPart INT
DECLARE @TotalDays INT
DECLARE @LastPart INT 

SET @FirstPart = 0
SET @LastPart = 0
IF (DATEDIFF(DAY, @StartDate, @EndDate)&gt;0) 
BEGIN
	WHILE (@StartDate &lt;= @EndDate) 
	BEGIN
		IF (SUBSTRING(DATENAME(DW,@StartDate),1,3) IN (&#039;MON&#039;,&#039;TUE&#039;,&#039;WED&#039;,&#039;THU&#039;,&#039;FRI&#039;,&#039;SUN&#039;))
		BEGIN
			SET @FirstPart = @FirstPart + 1
		END
		SET @StartDate = @StartDate + 1
	END
	
	SET @TotalDays = @FirstPart 
END
ELSE 

SET @TotalDays = 0

RETURN @TotalDays

END
GO
		 
		 
SELECT DBO.Fn_GetWeekDays(&#039;03/01/2011&#039;,&#039;03/06/2011&#039;)



Please forgive me if i am wrong.



Thanks,
Naren]]></description>
		<content:encoded><![CDATA[<p>hi pinal sir,</p>
<p>i am great fan of you &amp; your blogs.<br />
Recently i came across your 109th blog.</p>
<p>when i run the script in my SSMS, it is giving error.</p>
<p>so that i have modified the script</p>
<p>/* FUNCTION TO GET WEEKDAYS FROM TWO GIVEN DAYS */<br />
IF EXISTS(SELECT * FROM sys.objects WHERE TYPE = &#8216;FN&#8217; AND name = &#8216;Fn_GetWeekDays&#8217;)<br />
	DROP FUNCTION Fn_GetWeekDays<br />
GO<br />
CREATE FUNCTION  Fn_GetWeekDays<br />
( @StartDate DATETIME,<br />
@EndDate DATETIME )<br />
RETURNS INT<br />
AS<br />
BEGIN<br />
DECLARE @FirstPart INT<br />
DECLARE @TotalDays INT<br />
DECLARE @LastPart INT </p>
<p>SET @FirstPart = 0<br />
SET @LastPart = 0<br />
IF (DATEDIFF(DAY, @StartDate, @EndDate)&gt;0)<br />
BEGIN<br />
	WHILE (@StartDate &lt;= @EndDate)<br />
	BEGIN<br />
		IF (SUBSTRING(DATENAME(DW,@StartDate),1,3) IN (&#039;MON&#039;,&#039;TUE&#039;,&#039;WED&#039;,&#039;THU&#039;,&#039;FRI&#039;,&#039;SUN&#039;))<br />
		BEGIN<br />
			SET @FirstPart = @FirstPart + 1<br />
		END<br />
		SET @StartDate = @StartDate + 1<br />
	END</p>
<p>	SET @TotalDays = @FirstPart<br />
END<br />
ELSE </p>
<p>SET @TotalDays = 0</p>
<p>RETURN @TotalDays</p>
<p>END<br />
GO</p>
<p>SELECT DBO.Fn_GetWeekDays(&#039;03/01/2011&#039;,&#039;03/06/2011&#039;)</p>
<p>Please forgive me if i am wrong.</p>
<p>Thanks,<br />
Naren</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sonia</title>
		<link>http://blog.sqlauthority.com/2011/03/04/sql-server-concurrancy-problems-and-their-relationship-with-isolation-level/#comment-122033</link>
		<dc:creator><![CDATA[Sonia]]></dc:creator>
		<pubDate>Sat, 05 Mar 2011 18:27:09 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=12115#comment-122033</guid>
		<description><![CDATA[Superb Post Pinal.

Till date I was never able to understand the difference between these 4 terms explicitely.

I am sure this post is going to help all the sql server knowledge seekers like me.]]></description>
		<content:encoded><![CDATA[<p>Superb Post Pinal.</p>
<p>Till date I was never able to understand the difference between these 4 terms explicitely.</p>
<p>I am sure this post is going to help all the sql server knowledge seekers like me.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nakul Vachhrajani</title>
		<link>http://blog.sqlauthority.com/2011/03/04/sql-server-concurrancy-problems-and-their-relationship-with-isolation-level/#comment-121972</link>
		<dc:creator><![CDATA[Nakul Vachhrajani]]></dc:creator>
		<pubDate>Sat, 05 Mar 2011 08:05:46 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=12115#comment-121972</guid>
		<description><![CDATA[Hello!
With the misconception that using (NOLOCK) will eliminate locking in a database, I have seen many databases suffer from the problem of dirty and non-repeatable reads.
My suggestion is to acquire locks for as brief a period as possible, and then implement optimistic concurrency (I wrote about this one in one of my posts - http://beyondrelational.com/blogs/nakul/archive/2010/12/21/optimistic-concurrency-a-conceptual-introduction.aspx).

(NOLOCK) when used judiciously is good, but when used in excess, might cause unpredictable application behaviour.

Be courteous. Drive repsonsibly,
http://beyondrelational.com/blogs/nakul/default.aspx]]></description>
		<content:encoded><![CDATA[<p>Hello!<br />
With the misconception that using (NOLOCK) will eliminate locking in a database, I have seen many databases suffer from the problem of dirty and non-repeatable reads.<br />
My suggestion is to acquire locks for as brief a period as possible, and then implement optimistic concurrency (I wrote about this one in one of my posts &#8211; <a href="http://beyondrelational.com/blogs/nakul/archive/2010/12/21/optimistic-concurrency-a-conceptual-introduction.aspx" rel="nofollow">http://beyondrelational.com/blogs/nakul/archive/2010/12/21/optimistic-concurrency-a-conceptual-introduction.aspx</a>).</p>
<p>(NOLOCK) when used judiciously is good, but when used in excess, might cause unpredictable application behaviour.</p>
<p>Be courteous. Drive repsonsibly,<br />
<a href="http://beyondrelational.com/blogs/nakul/default.aspx" rel="nofollow">http://beyondrelational.com/blogs/nakul/default.aspx</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: weicco</title>
		<link>http://blog.sqlauthority.com/2011/03/04/sql-server-concurrancy-problems-and-their-relationship-with-isolation-level/#comment-121953</link>
		<dc:creator><![CDATA[weicco]]></dc:creator>
		<pubDate>Sat, 05 Mar 2011 05:32:57 +0000</pubDate>
		<guid isPermaLink="false">http://blog.sqlauthority.com/?p=12115#comment-121953</guid>
		<description><![CDATA[I&#039;ve been checking one of our production guidance system&#039;s database lately. It&#039;s been running really slow in some operations and the vendor seems to be unable to fix it. 

So first I checked top 10 slowest queries. I quickly found out that the reason is missing indexes. Some tables didn&#039;t even have clustered index. I wrote a report that tables needs indexing badly and also there was quite horrific queries that needs to be rethought.

Then began the horror. I realized that every SQL query was filled with NOLOCK hints! Every stored procedure started with SET TRANSACTION ISOLATION LEVEL READ UNCOMMITED. So instead of implementing proper indexing scheme the vendor was trying to fix performance problems by avoiding locks totally!

We are talking about elementary system to our business. A simple hickup could cost tens of thousands of euros. A major hickup halts the production completely. I&#039;m stunned that someone does so slobby work in such important system.

Luckily this won&#039;t be my headache anymore since I&#039;ll be switching jobs soon. I just wanted to write about this to tell you that there are things that you simply must not do, like enabling dirty reads in a case like this. Maybe there are situations where dirty reads are acceptable but I&#039;ve yet to see one. If you are in doubt like what&#039;s causing the performance problems, please ask someone more experienced in the field. There&#039;s no shame in asking. No-one can know everything about everything. That&#039;s why we create our social networks so we can help each others out.

BR,
-Marko]]></description>
		<content:encoded><![CDATA[<p>I&#8217;ve been checking one of our production guidance system&#8217;s database lately. It&#8217;s been running really slow in some operations and the vendor seems to be unable to fix it. </p>
<p>So first I checked top 10 slowest queries. I quickly found out that the reason is missing indexes. Some tables didn&#8217;t even have clustered index. I wrote a report that tables needs indexing badly and also there was quite horrific queries that needs to be rethought.</p>
<p>Then began the horror. I realized that every SQL query was filled with NOLOCK hints! Every stored procedure started with SET TRANSACTION ISOLATION LEVEL READ UNCOMMITED. So instead of implementing proper indexing scheme the vendor was trying to fix performance problems by avoiding locks totally!</p>
<p>We are talking about elementary system to our business. A simple hickup could cost tens of thousands of euros. A major hickup halts the production completely. I&#8217;m stunned that someone does so slobby work in such important system.</p>
<p>Luckily this won&#8217;t be my headache anymore since I&#8217;ll be switching jobs soon. I just wanted to write about this to tell you that there are things that you simply must not do, like enabling dirty reads in a case like this. Maybe there are situations where dirty reads are acceptable but I&#8217;ve yet to see one. If you are in doubt like what&#8217;s causing the performance problems, please ask someone more experienced in the field. There&#8217;s no shame in asking. No-one can know everything about everything. That&#8217;s why we create our social networks so we can help each others out.</p>
<p>BR,<br />
-Marko</p>
]]></content:encoded>
	</item>
</channel>
</rss>
