<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://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>Michael Zilberstein</title><link>http://sqlblog.com/blogs/michael_zilberstein/default.aspx</link><description /><dc:language>en</dc:language><generator>CommunityServer 2.1 SP2 (Build: 61129.1)</generator><item><title>Israeli SQL Server Usergroup: Locking &amp;amp; Blocking in active environment</title><link>http://sqlblog.com/blogs/michael_zilberstein/archive/2013/05/13/49047.aspx</link><pubDate>Mon, 13 May 2013 13:38:47 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:49047</guid><dc:creator>Michael Zilberstein</dc:creator><slash:comments>0</slash:comments><comments>http://sqlblog.com/blogs/michael_zilberstein/comments/49047.aspx</comments><wfw:commentRss>http://sqlblog.com/blogs/michael_zilberstein/commentrss.aspx?PostID=49047</wfw:commentRss><description>A week ago I gave my session on the subject. It is only first part of the two – second will be next time when there is an open slot. Demos from my session are available here ....(&lt;a href="http://sqlblog.com/blogs/michael_zilberstein/archive/2013/05/13/49047.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://sqlblog.com/aggbug.aspx?PostID=49047" width="1" height="1"&gt;</description><category domain="http://sqlblog.com/blogs/michael_zilberstein/archive/tags/Performance/default.aspx">Performance</category><category domain="http://sqlblog.com/blogs/michael_zilberstein/archive/tags/Locks/default.aspx">Locks</category></item><item><title>Corruption case</title><link>http://sqlblog.com/blogs/michael_zilberstein/archive/2013/03/22/48339.aspx</link><pubDate>Thu, 21 Mar 2013 23:49:32 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:48339</guid><dc:creator>Michael Zilberstein</dc:creator><slash:comments>8</slash:comments><comments>http://sqlblog.com/blogs/michael_zilberstein/comments/48339.aspx</comments><wfw:commentRss>http://sqlblog.com/blogs/michael_zilberstein/commentrss.aspx?PostID=48339</wfw:commentRss><description>Recently I had to take care of the most interesting corruption case I’ve even seen, so decided to share this experience with you. We’re talking about small accounting program which keeps its data in SQL Server Express – in this particular case in SQL...(&lt;a href="http://sqlblog.com/blogs/michael_zilberstein/archive/2013/03/22/48339.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://sqlblog.com/aggbug.aspx?PostID=48339" width="1" height="1"&gt;</description><category domain="http://sqlblog.com/blogs/michael_zilberstein/archive/tags/Internals/default.aspx">Internals</category><category domain="http://sqlblog.com/blogs/michael_zilberstein/archive/tags/SQL2005/default.aspx">SQL2005</category><category domain="http://sqlblog.com/blogs/michael_zilberstein/archive/tags/Corruptions/default.aspx">Corruptions</category></item><item><title>Beware of SQL Server and PerfMon differences in disk latency calculation</title><link>http://sqlblog.com/blogs/michael_zilberstein/archive/2012/11/28/46419.aspx</link><pubDate>Wed, 28 Nov 2012 01:20:00 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:46419</guid><dc:creator>Michael Zilberstein</dc:creator><slash:comments>8</slash:comments><comments>http://sqlblog.com/blogs/michael_zilberstein/comments/46419.aspx</comments><wfw:commentRss>http://sqlblog.com/blogs/michael_zilberstein/commentrss.aspx?PostID=46419</wfw:commentRss><description>Recently sp_blitz procedure on one of my OLTP servers returned alarming notification about high latency on one of the disks (more than 100ms per IO). Our chief storage guy didn’t understand what I was talking about – according to his measures, average...(&lt;a href="http://sqlblog.com/blogs/michael_zilberstein/archive/2012/11/28/46419.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://sqlblog.com/aggbug.aspx?PostID=46419" width="1" height="1"&gt;</description><category domain="http://sqlblog.com/blogs/michael_zilberstein/archive/tags/Internals/default.aspx">Internals</category><category domain="http://sqlblog.com/blogs/michael_zilberstein/archive/tags/Performance/default.aspx">Performance</category></item><item><title>LAG function – practical use and comparison to old syntax</title><link>http://sqlblog.com/blogs/michael_zilberstein/archive/2012/03/14/42332.aspx</link><pubDate>Wed, 14 Mar 2012 06:33:24 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:42332</guid><dc:creator>Michael Zilberstein</dc:creator><slash:comments>0</slash:comments><comments>http://sqlblog.com/blogs/michael_zilberstein/comments/42332.aspx</comments><wfw:commentRss>http://sqlblog.com/blogs/michael_zilberstein/commentrss.aspx?PostID=42332</wfw:commentRss><description>Recently I had to analyze huge trace – 46GB of trc files. Looping over files I loaded them into trace table using fn_trace_gettable function and filters I could use in order to filter out irrelevant data. I ended up with 6.5 million rows table, total...(&lt;a href="http://sqlblog.com/blogs/michael_zilberstein/archive/2012/03/14/42332.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://sqlblog.com/aggbug.aspx?PostID=42332" width="1" height="1"&gt;</description></item><item><title>Reading temporary table from another session</title><link>http://sqlblog.com/blogs/michael_zilberstein/archive/2012/03/01/42048.aspx</link><pubDate>Thu, 01 Mar 2012 17:30:57 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:42048</guid><dc:creator>Michael Zilberstein</dc:creator><slash:comments>0</slash:comments><comments>http://sqlblog.com/blogs/michael_zilberstein/comments/42048.aspx</comments><wfw:commentRss>http://sqlblog.com/blogs/michael_zilberstein/commentrss.aspx?PostID=42048</wfw:commentRss><description>It happens to me at least once a week – I want to check progress of some heavy script that runs in chunks over big dataset and find out that it writes intermediate data to temporary table only. Last time it happened 3 days ago when I wanted to analyze...(&lt;a href="http://sqlblog.com/blogs/michael_zilberstein/archive/2012/03/01/42048.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://sqlblog.com/aggbug.aspx?PostID=42048" width="1" height="1"&gt;</description><category domain="http://sqlblog.com/blogs/michael_zilberstein/archive/tags/Scripts/default.aspx">Scripts</category><category domain="http://sqlblog.com/blogs/michael_zilberstein/archive/tags/Internals/default.aspx">Internals</category></item><item><title>Page splits, extended events, index page allocation and all the fish</title><link>http://sqlblog.com/blogs/michael_zilberstein/archive/2011/04/25/35175.aspx</link><pubDate>Mon, 25 Apr 2011 19:49:45 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:35175</guid><dc:creator>Michael Zilberstein</dc:creator><slash:comments>12</slash:comments><comments>http://sqlblog.com/blogs/michael_zilberstein/comments/35175.aspx</comments><wfw:commentRss>http://sqlblog.com/blogs/michael_zilberstein/commentrss.aspx?PostID=35175</wfw:commentRss><description>2 years ago I wrote about monitoring page splits with Extended Events . Only 2 bloggers explored Extended Events feature at that time, so my post was more of a learning than for any practical matter. Yet one question remained open: according to straightforward...(&lt;a href="http://sqlblog.com/blogs/michael_zilberstein/archive/2011/04/25/35175.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://sqlblog.com/aggbug.aspx?PostID=35175" width="1" height="1"&gt;</description><category domain="http://sqlblog.com/blogs/michael_zilberstein/archive/tags/Internals/default.aspx">Internals</category><category domain="http://sqlblog.com/blogs/michael_zilberstein/archive/tags/ExtendedEvents/default.aspx">ExtendedEvents</category><category domain="http://sqlblog.com/blogs/michael_zilberstein/archive/tags/Transaction+Log/default.aspx">Transaction Log</category></item><item><title>Read Committed isolation level, indexed views and locking behavior</title><link>http://sqlblog.com/blogs/michael_zilberstein/archive/2011/03/15/34152.aspx</link><pubDate>Tue, 15 Mar 2011 14:31:43 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:34152</guid><dc:creator>Michael Zilberstein</dc:creator><slash:comments>0</slash:comments><comments>http://sqlblog.com/blogs/michael_zilberstein/comments/34152.aspx</comments><wfw:commentRss>http://sqlblog.com/blogs/michael_zilberstein/commentrss.aspx?PostID=34152</wfw:commentRss><description>From BOL, &amp;quot; Key-Range Locking &amp;quot; article: Key-range locks protect a range of rows implicitly included in a record set being read by a Transact-SQL statement while using the serializable transaction isolation level . The serializable isolation...(&lt;a href="http://sqlblog.com/blogs/michael_zilberstein/archive/2011/03/15/34152.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://sqlblog.com/aggbug.aspx?PostID=34152" width="1" height="1"&gt;</description><category domain="http://sqlblog.com/blogs/michael_zilberstein/archive/tags/Internals/default.aspx">Internals</category><category domain="http://sqlblog.com/blogs/michael_zilberstein/archive/tags/Performance/default.aspx">Performance</category><category domain="http://sqlblog.com/blogs/michael_zilberstein/archive/tags/Locks/default.aspx">Locks</category></item><item><title>Old error in active locks detection script</title><link>http://sqlblog.com/blogs/michael_zilberstein/archive/2010/08/04/27596.aspx</link><pubDate>Wed, 04 Aug 2010 09:14:40 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:27596</guid><dc:creator>Michael Zilberstein</dc:creator><slash:comments>0</slash:comments><comments>http://sqlblog.com/blogs/michael_zilberstein/comments/27596.aspx</comments><wfw:commentRss>http://sqlblog.com/blogs/michael_zilberstein/commentrss.aspx?PostID=27596</wfw:commentRss><description>Almost every applicative DBA has scripts for locking and blocking issues detection. Some, like me, wrote the script themselves in order to become familiar with underlying DMVs, others downloaded one of the huge number of versions available in the net....(&lt;a href="http://sqlblog.com/blogs/michael_zilberstein/archive/2010/08/04/27596.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://sqlblog.com/aggbug.aspx?PostID=27596" width="1" height="1"&gt;</description></item><item><title>T-SQL Tuesday #006: LOB, row-overflow and locking behavior</title><link>http://sqlblog.com/blogs/michael_zilberstein/archive/2010/05/11/24999.aspx</link><pubDate>Tue, 11 May 2010 03:51:00 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:24999</guid><dc:creator>Michael Zilberstein</dc:creator><slash:comments>3</slash:comments><comments>http://sqlblog.com/blogs/michael_zilberstein/comments/24999.aspx</comments><wfw:commentRss>http://sqlblog.com/blogs/michael_zilberstein/commentrss.aspx?PostID=24999</wfw:commentRss><description>This post is my contribution to T-SQL Tuesday #006 , hosted this time by Michael Coles . Actually this post was born last Thursday when I attended Kalen Delaney's "Deep dive into SQL Server Internals" seminar in Tel-Aviv. I asked question, Kalen didn't...(&lt;a href="http://sqlblog.com/blogs/michael_zilberstein/archive/2010/05/11/24999.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://sqlblog.com/aggbug.aspx?PostID=24999" width="1" height="1"&gt;</description><category domain="http://sqlblog.com/blogs/michael_zilberstein/archive/tags/Internals/default.aspx">Internals</category><category domain="http://sqlblog.com/blogs/michael_zilberstein/archive/tags/Locks/default.aspx">Locks</category></item><item><title>Parsing Extended Events xml_deadlock_report</title><link>http://sqlblog.com/blogs/michael_zilberstein/archive/2010/05/10/24970.aspx</link><pubDate>Mon, 10 May 2010 01:31:00 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:24970</guid><dc:creator>Michael Zilberstein</dc:creator><slash:comments>15</slash:comments><comments>http://sqlblog.com/blogs/michael_zilberstein/comments/24970.aspx</comments><wfw:commentRss>http://sqlblog.com/blogs/michael_zilberstein/commentrss.aspx?PostID=24970</wfw:commentRss><description>Jonathan Kehayias and Paul Randall posted more than a year ago great articles on how to monitor historical deadlocks using Extended Events system_health default trace. Both tried to fix on the fly bug in xml output that caused failures in xml validation....(&lt;a href="http://sqlblog.com/blogs/michael_zilberstein/archive/2010/05/10/24970.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://sqlblog.com/aggbug.aspx?PostID=24970" width="1" height="1"&gt;</description><category domain="http://sqlblog.com/blogs/michael_zilberstein/archive/tags/SQL2008/default.aspx">SQL2008</category><category domain="http://sqlblog.com/blogs/michael_zilberstein/archive/tags/ExtendedEvents/default.aspx">ExtendedEvents</category></item><item><title>T-SQL Tuesday - IO capacity planning</title><link>http://sqlblog.com/blogs/michael_zilberstein/archive/2010/03/09/23065.aspx</link><pubDate>Tue, 09 Mar 2010 20:52:32 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:23065</guid><dc:creator>Michael Zilberstein</dc:creator><slash:comments>3</slash:comments><comments>http://sqlblog.com/blogs/michael_zilberstein/comments/23065.aspx</comments><wfw:commentRss>http://sqlblog.com/blogs/michael_zilberstein/commentrss.aspx?PostID=23065</wfw:commentRss><description>This post is my contribution to Adam Machanic's T-SQL Tuesday #004 , hosted this time by Mike Walsh . Being applicative DBA, I usually don't take part in discussions which storage to buy or how to configure it. My interaction with IO is usually via PerfMon....(&lt;a href="http://sqlblog.com/blogs/michael_zilberstein/archive/2010/03/09/23065.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://sqlblog.com/aggbug.aspx?PostID=23065" width="1" height="1"&gt;</description></item><item><title>For want of a nail</title><link>http://sqlblog.com/blogs/michael_zilberstein/archive/2009/12/08/19582.aspx</link><pubDate>Tue, 08 Dec 2009 00:55:55 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:19582</guid><dc:creator>Michael Zilberstein</dc:creator><slash:comments>13</slash:comments><comments>http://sqlblog.com/blogs/michael_zilberstein/comments/19582.aspx</comments><wfw:commentRss>http://sqlblog.com/blogs/michael_zilberstein/commentrss.aspx?PostID=19582</wfw:commentRss><description>For want of a nail the shoe was lost. For want of a shoe the horse was lost. For want of a horse the rider was lost. For want of a rider the battle was lost. For want of a battle the kingdom was lost. And all for the want of a horseshoe nail. &amp;#160; I'm...(&lt;a href="http://sqlblog.com/blogs/michael_zilberstein/archive/2009/12/08/19582.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://sqlblog.com/aggbug.aspx?PostID=19582" width="1" height="1"&gt;</description><category domain="http://sqlblog.com/blogs/michael_zilberstein/archive/tags/Statistics/default.aspx">Statistics</category><category domain="http://sqlblog.com/blogs/michael_zilberstein/archive/tags/Internals/default.aspx">Internals</category><category domain="http://sqlblog.com/blogs/michael_zilberstein/archive/tags/Performance/default.aspx">Performance</category></item><item><title>Partition Details Custom Report - enhanced</title><link>http://sqlblog.com/blogs/michael_zilberstein/archive/2009/07/07/15129.aspx</link><pubDate>Tue, 07 Jul 2009 13:02:06 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:15129</guid><dc:creator>Michael Zilberstein</dc:creator><slash:comments>1</slash:comments><comments>http://sqlblog.com/blogs/michael_zilberstein/comments/15129.aspx</comments><wfw:commentRss>http://sqlblog.com/blogs/michael_zilberstein/commentrss.aspx?PostID=15129</wfw:commentRss><description>Recently my fellow friend and colleague Yoni Nakache drew my attention to the nice custom report which can save valuable time to any DBA - it returns number of rows per partition along with partition boundaries and filegroup data. The rdl can be found...(&lt;a href="http://sqlblog.com/blogs/michael_zilberstein/archive/2009/07/07/15129.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://sqlblog.com/aggbug.aspx?PostID=15129" width="1" height="1"&gt;</description><category domain="http://sqlblog.com/blogs/michael_zilberstein/archive/tags/Scripts/default.aspx">Scripts</category><category domain="http://sqlblog.com/blogs/michael_zilberstein/archive/tags/Custom+Reports/default.aspx">Custom Reports</category><category domain="http://sqlblog.com/blogs/michael_zilberstein/archive/tags/Tools/default.aspx">Tools</category></item><item><title>NHibernate wonders</title><link>http://sqlblog.com/blogs/michael_zilberstein/archive/2009/02/17/11934.aspx</link><pubDate>Mon, 16 Feb 2009 21:06:11 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:11934</guid><dc:creator>Michael Zilberstein</dc:creator><slash:comments>7</slash:comments><comments>http://sqlblog.com/blogs/michael_zilberstein/comments/11934.aspx</comments><wfw:commentRss>http://sqlblog.com/blogs/michael_zilberstein/commentrss.aspx?PostID=11934</wfw:commentRss><description>&lt;p&gt;This ORM piece of tool just can't stop to surprise. A week ago I've found out that although NHibernate can execute stored procedure, it doesn't support output parameters - when procedure returns one, it causes failure. Today I've found another pearl. Imagine following scenario: 2 entities with many-to-many relationship between them. For example, projects and employees - project contains many employees, employee can participate in several projects. So we have ProjectsEmployees table that maps employees to projects. Done with a foreword, now the scenario itself. Project X contains 9 employees already mapped to it in the ProjectsEmployees table. We want to add another employee to the project. Just a simple INSERT operation, right? NHibernate doesn't look for easy ways. It performs the following operations:&lt;/p&gt;  &lt;p&gt;1. DELETE FROM ProjectsEmployees WHERE ProjectID = X&lt;/p&gt;  &lt;p&gt;2-11. INSERT INTO ProjectsEmployees VALUES()...&lt;/p&gt;  &lt;p&gt;Instead of single INSERT we have 11 operations here. Besides unnecessary pressure on IO system and possible locks, we have much more serious consistency issue - if HR department queries table after DELETE operation but before all the INSERTs have been completed, it would receive project status that never occurred in real life - 3 employees for example. But that's the way NHibernate works - &amp;quot;just in case&amp;quot; overwrites the entire projects object.&lt;/p&gt;  &lt;p&gt;Ah, and how did I find out? Noticed that after mapping new employee to project trigger on delete fires. WEB team developers (those actually programming with NHibernate) keep log of commands NHibernate executes in development environment. There I have seen it plain and simple.&lt;/p&gt;&lt;img src="http://sqlblog.com/aggbug.aspx?PostID=11934" width="1" height="1"&gt;</description><category domain="http://sqlblog.com/blogs/michael_zilberstein/archive/tags/Misc/default.aspx">Misc</category><category domain="http://sqlblog.com/blogs/michael_zilberstein/archive/tags/ORM/default.aspx">ORM</category></item><item><title>Monitoring page splits with Extended Events</title><link>http://sqlblog.com/blogs/michael_zilberstein/archive/2009/02/05/11734.aspx</link><pubDate>Thu, 05 Feb 2009 15:05:12 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:11734</guid><dc:creator>Michael Zilberstein</dc:creator><slash:comments>20</slash:comments><comments>http://sqlblog.com/blogs/michael_zilberstein/comments/11734.aspx</comments><wfw:commentRss>http://sqlblog.com/blogs/michael_zilberstein/commentrss.aspx?PostID=11734</wfw:commentRss><description>After reading Kalen Delaney's post about single insert causing 10 page splits, I wanted to see those splits in detail - their order at first place. And in SQL Server 2008 there is a way to trace splits - using new Extended Events infrastructure. Here...(&lt;a href="http://sqlblog.com/blogs/michael_zilberstein/archive/2009/02/05/11734.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://sqlblog.com/aggbug.aspx?PostID=11734" width="1" height="1"&gt;</description><category domain="http://sqlblog.com/blogs/michael_zilberstein/archive/tags/Internals/default.aspx">Internals</category><category domain="http://sqlblog.com/blogs/michael_zilberstein/archive/tags/SQL2008/default.aspx">SQL2008</category><category domain="http://sqlblog.com/blogs/michael_zilberstein/archive/tags/ExtendedEvents/default.aspx">ExtendedEvents</category></item></channel></rss>