<?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>Demos - TechEd DAT305 - Best Practices for Exception Handling and Defensive Programming in Microsoft SQL Server</title><link>http://www2.sqlblog.com/blogs/adam_machanic/archive/2009/05/13/demos-teched-dat305-best-practices-for-exception-handling-and-defensive-programming-in-microsoft-sql-server.aspx</link><description>A huge thank you to everyone who attended today's session on exception handling! I had a great time and got some very good, on-point questions from the audience. As promised, the demos are attached to this blog post. Please let me know in the comments</description><dc:language>en</dc:language><generator>CommunityServer 2.1 SP2 (Build: 61129.1)</generator><item><title>re: Demos - TechEd DAT305 - Best Practices for Exception Handling and Defensive Programming in Microsoft SQL Server</title><link>http://www2.sqlblog.com/blogs/adam_machanic/archive/2009/05/13/demos-teched-dat305-best-practices-for-exception-handling-and-defensive-programming-in-microsoft-sql-server.aspx#14035</link><pubDate>Thu, 14 May 2009 07:24:46 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:14035</guid><dc:creator>Vadivel</dc:creator><description>&lt;p&gt;Adam,&lt;/p&gt;
&lt;p&gt;Is there few ways by which we can avoid deadlocking on your SQL Server. Like, ensuring that our DB design is properly normalized, application access server objects in the same order each time etc., etc.,&lt;/p&gt;
&lt;p&gt;That being the case do you really you need to promote a code block like &amp;nbsp;/*Put deadlock-prone code here*/ ?&lt;/p&gt;
&lt;p&gt;Regards&lt;/p&gt;
&lt;p&gt;Vadivel&lt;/p&gt;
</description></item><item><title>re: Demos - TechEd DAT305 - Best Practices for Exception Handling and Defensive Programming in Microsoft SQL Server</title><link>http://www2.sqlblog.com/blogs/adam_machanic/archive/2009/05/13/demos-teched-dat305-best-practices-for-exception-handling-and-defensive-programming-in-microsoft-sql-server.aspx#14038</link><pubDate>Thu, 14 May 2009 07:38:29 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:14038</guid><dc:creator>Vadivel</dc:creator><description>&lt;p&gt;pls ignore my typos .... I guess its too late and i need to hit the bed right away :)&lt;/p&gt;
</description></item><item><title>re: Demos - TechEd DAT305 - Best Practices for Exception Handling and Defensive Programming in Microsoft SQL Server</title><link>http://www2.sqlblog.com/blogs/adam_machanic/archive/2009/05/13/demos-teched-dat305-best-practices-for-exception-handling-and-defensive-programming-in-microsoft-sql-server.aspx#14143</link><pubDate>Mon, 18 May 2009 16:00:23 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:14143</guid><dc:creator>Adam Machanic</dc:creator><description>&lt;p&gt;Hi Vadivel,&lt;/p&gt;
&lt;p&gt;Avoiding deadlocks altogether is probably not possible, but it depends on the nature of your system. &amp;nbsp;For example, data warehouses that do only nightly loads are unlikely to suffer from deadlocking issues, whereas active OLTP systems can be extremely deadlock prone. &amp;nbsp;In SQL Server 2005/2008, the SNAPSHOT isolation levels can help a lot with many deadlock cases. &amp;nbsp;You might also want to look at some of Alex Kuznetsov's posts on the topic.&lt;/p&gt;
&lt;p&gt;I'm not sure what you mean about &amp;quot;promoting&amp;quot; the code block. &amp;nbsp;Were you in the session at TechEd? &amp;nbsp;That particular sample shows how to deal with deadlocks as a temporary stopgap while debugging. &amp;nbsp;Some deadlocks can take quite a while to get to the bottom of and it's better to keep the system running if possible. &amp;nbsp;That example is not intended to be a permanent fix or something that you would use without very good reason.&lt;/p&gt;
</description></item></channel></rss>