<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://sqlcat.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/" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd"><channel><title>SQL Server Customer Advisory Team - SQL Server Best Practices</title><link>http://sqlcat.com/sqlCat/b/default.aspx</link><description>sqlCat</description><dc:language>en-US</dc:language><generator>Telligent Community 5.6.583.21914 (Build: 5.6.583.21914)</generator><item><title>Maximizing Throughput with TVPs</title><link>http://sqlcat.com/sqlCat/b/technicalnotes/archive/2013/06/13/maximizing-throughput-with-tvps.aspx</link><pubDate>Thu, 13 Jun 2013 18:01:00 GMT</pubDate><guid isPermaLink="false">e9619797-5f48-4d02-a1a8-7f300d09be66:2828</guid><dc:creator>sthoward</dc:creator><slash:comments>0</slash:comments><description>&lt;font style="font-size:12pt;"&gt;&lt;/font&gt;  &lt;p class="MsoTitle" style="margin:0in 0in 0pt;letter-spacing:-0.5pt;"&gt;&lt;b&gt;&lt;font style="font-size:11pt;"&gt;Author: &lt;/font&gt;&lt;/b&gt;&lt;font style="font-size:11pt;" face="Calibri"&gt;Steve Howard&lt;/font&gt;&lt;/p&gt;  &lt;p class="MsoTitle" style="margin:0in 0in 0pt;letter-spacing:-0.5pt;"&gt;&amp;#160;&lt;/p&gt; &lt;font style="font-size:12pt;"&gt;&lt;/font&gt;  &lt;div style="margin:0in 0in 8pt;line-height:12pt;"&gt;&lt;b&gt;&lt;font style="font-size:11pt;"&gt;Technical Reviewers: &lt;/font&gt;&lt;/b&gt;&lt;font style="font-size:11pt;" face="Calibri"&gt;Silvano Coriani, Sanjay Mishra, James Podgorski, Mark Simms&lt;/font&gt;&lt;/div&gt; &lt;font style="font-size:12pt;"&gt;&lt;/font&gt;&lt;font style="font-size:12pt;"&gt;&lt;/font&gt;  &lt;h1 style="margin:12pt 0in 0pt;line-height:17pt;"&gt;&lt;b&gt;&lt;font style="font-size:16pt;" color="#2e74b5"&gt;Introduction&lt;/font&gt;&lt;/b&gt;&lt;/h1&gt; &lt;font style="font-size:12pt;"&gt;&lt;/font&gt;&lt;font style="font-size:12pt;"&gt;&lt;/font&gt;  &lt;div style="margin:0in 0in 8pt;line-height:12pt;"&gt;&lt;font style="font-size:11pt;" face="Calibri"&gt;This technical note looks at considerations of whether to use the SqlBulkCopy, or Table Valued Parameters (TVPs) in a customer scenario encountered as part of a CAT engagement. The decision of which is better depends on several considerations which will be discussed. TVPs offer several performance optimization possibilities that other bulk operations do not allow, and these operations may allow for TVP performance to exceed other bulk operations by an order of magnitude, especially for a pattern where subsets of the data are frequently updated.&lt;/font&gt;&lt;/div&gt; &lt;font style="font-size:12pt;"&gt;&lt;/font&gt;  &lt;h1 style="margin:12pt 0in 0pt;line-height:17pt;"&gt;&lt;b&gt;&lt;font style="font-size:16pt;" color="#2e74b5"&gt;Executive Summary&lt;/font&gt;&lt;/b&gt;&lt;/h1&gt; &lt;font style="font-size:12pt;"&gt;&lt;/font&gt;  &lt;div style="margin:0in 0in 8pt;line-height:12pt;"&gt;&lt;font style="font-size:11pt;" face="Calibri"&gt;TVPs and MERGE operations make a powerful combination to minimize round trips and batch insert and update data with high throughput. Parallel operation on naturally defined independent sets of data can be performed efficiently like this. The TVP makes optimizations possible that are not possible with bulk insert or other operations types. To get the most out of the operation, you must optimize your underlying table as well as your method for inserting and updating the data. The principles followed in this case emphasize these points:&lt;/font&gt;&lt;/div&gt; &lt;font face="Calibri"&gt;&lt;font style="font-size:12pt;"&gt;&lt;/font&gt;&lt;/font&gt;  &lt;p class="CxSpFirst" style="margin:0in 0in 0pt 0.5in;line-height:12pt;text-indent:-0.25in;margin:0 0 .0001pt .5in;"&gt;&lt;font face="Calibri"&gt;&lt;span&gt;&lt;span&gt;&lt;font style="font-size:11pt;"&gt;·&lt;/font&gt;&lt;span style="line-height:normal;"&gt;&lt;font style="font-size:7pt;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;font style="font-size:11pt;"&gt;Do not create artificial keys with IDENTITY when it is not necessary. This creates a point of contention on heavy, parallel insert operations.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; &lt;font face="Calibri"&gt;&lt;font style="font-size:12pt;"&gt;&lt;/font&gt;&lt;/font&gt;  &lt;p class="CxSpMiddle" style="margin:0in 0in 0pt 0.5in;line-height:12pt;text-indent:-0.25in;margin:0 0 .0001pt .5in;"&gt;&lt;font face="Calibri"&gt;&lt;span&gt;&lt;span&gt;&lt;font style="font-size:11pt;"&gt;·&lt;/font&gt;&lt;span style="line-height:normal;"&gt;&lt;font style="font-size:7pt;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;font style="font-size:11pt;"&gt;If old data key values will not expire, use a MERGE operation instead of DELETE and INSERT. This minimizes data operations; rebalancing and page splits, and the amount of data that must be replicated. If old data key values will expire, then test two operations of MERGE followed by a deletion of only the expired keys rather than a DELETE and INSERT of the full data set.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; &lt;font face="Calibri"&gt;&lt;font style="font-size:12pt;"&gt;&lt;/font&gt;&lt;/font&gt;  &lt;p class="CxSpLast" style="margin:0in 0in 8pt 0.5in;line-height:12pt;text-indent:-0.25in;margin:0 0 .0001pt .5in;"&gt;&lt;font face="Calibri"&gt;&lt;span&gt;&lt;span&gt;&lt;font style="font-size:11pt;"&gt;·&lt;/font&gt;&lt;span style="line-height:normal;"&gt;&lt;font style="font-size:7pt;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;font style="font-size:11pt;"&gt;If not all the data will be changed, modify the “WHEN MATCHED” portion of the MERGE statement to also check that the data that &lt;i&gt;may&lt;/i&gt; change &lt;i&gt;has&lt;/i&gt; changed, and only update the data that is actually changed. This minimizes the number of rows of data that are actually modified, and thus minimizes the amount of data that must be replicated to secondaries in Windows Azure SQL Database environments. &lt;/font&gt;&lt;/font&gt;&lt;/p&gt; &lt;font face="Calibri"&gt;&lt;font style="font-size:12pt;"&gt;&lt;/font&gt;&lt;/font&gt;  &lt;div style="margin:0in 0in 8pt;line-height:12pt;"&gt;&lt;font style="font-size:11pt;" face="Calibri"&gt;Although these are best practices in any environment they become increasingly important in a shared environment such as Windows Azure SQL Database.&lt;/font&gt;&lt;/div&gt; &lt;font style="font-size:12pt;"&gt;&lt;/font&gt;  &lt;h1 style="margin:12pt 0in 0pt;line-height:17pt;"&gt;&lt;font style="font-size:16pt;" color="#2e74b5"&gt;Scenario&lt;/font&gt;&lt;/h1&gt; &lt;font style="font-size:12pt;"&gt;&lt;/font&gt;  &lt;div style="margin:0in 0in 8pt;line-height:12pt;"&gt;&lt;font style="font-size:11pt;" face="Calibri"&gt;In a recent engagement, a problem was encountered in performance of inserting and updating data in Windows Azure SQL Database. The scenario was:&lt;/font&gt;&lt;/div&gt; &lt;font face="Calibri"&gt;&lt;font style="font-size:12pt;"&gt;&lt;/font&gt;&lt;/font&gt;  &lt;p class="CxSpFirst" style="margin:0in 0in 0pt 0.5in;line-height:12pt;text-indent:-0.25in;margin:0 0 .0001pt .5in;"&gt;&lt;font face="Calibri"&gt;&lt;span&gt;&lt;span&gt;&lt;font style="font-size:11pt;"&gt;·&lt;/font&gt;&lt;span style="line-height:normal;"&gt;&lt;font style="font-size:7pt;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;font style="font-size:11pt;"&gt;Data from hundreds of thousands of devices needs to be stored in Windows Azure SQL Database&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; &lt;font face="Calibri"&gt;&lt;font style="font-size:12pt;"&gt;&lt;/font&gt;&lt;/font&gt;  &lt;p class="CxSpMiddle" style="margin:0in 0in 0pt 0.5in;line-height:12pt;text-indent:-0.25in;margin:0 0 .0001pt .5in;"&gt;&lt;font face="Calibri"&gt;&lt;span&gt;&lt;span&gt;&lt;font style="font-size:11pt;"&gt;·&lt;/font&gt;&lt;span style="line-height:normal;"&gt;&lt;font style="font-size:7pt;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;font style="font-size:11pt;"&gt;Each device stores approximately 8000 rows of configuration data across three tables in the database &lt;/font&gt;&lt;/font&gt;&lt;/p&gt; &lt;font face="Calibri"&gt;&lt;font style="font-size:12pt;"&gt;&lt;/font&gt;&lt;/font&gt;  &lt;p class="CxSpMiddle" style="margin:0in 0in 0pt 0.5in;line-height:12pt;text-indent:-0.25in;margin:0 0 .0001pt .5in;"&gt;&lt;font face="Calibri"&gt;&lt;span&gt;&lt;span&gt;&lt;font style="font-size:11pt;"&gt;·&lt;/font&gt;&lt;span style="line-height:normal;"&gt;&lt;font style="font-size:7pt;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;font style="font-size:11pt;"&gt;Data for each device is updated approximately once per day&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; &lt;font face="Calibri"&gt;&lt;font style="font-size:12pt;"&gt;&lt;/font&gt;&lt;/font&gt;  &lt;p class="CxSpMiddle" style="margin:0in 0in 0pt 0.5in;line-height:12pt;text-indent:-0.25in;margin:0 0 .0001pt .5in;"&gt;&lt;font face="Calibri"&gt;&lt;span&gt;&lt;span&gt;&lt;font style="font-size:11pt;"&gt;·&lt;/font&gt;&lt;span style="line-height:normal;"&gt;&lt;font style="font-size:7pt;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;font style="font-size:11pt;"&gt;Only the most current data is stored in Windows Azure SQL Database&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; &lt;font face="Calibri"&gt;&lt;font style="font-size:12pt;"&gt;&lt;/font&gt;&lt;/font&gt;  &lt;p class="CxSpLast" style="margin:0in 0in 8pt 0.5in;line-height:12pt;text-indent:-0.25in;margin:0 0 .0001pt .5in;"&gt;&lt;font face="Calibri"&gt;&lt;span&gt;&lt;span&gt;&lt;font style="font-size:11pt;"&gt;·&lt;/font&gt;&lt;span style="line-height:normal;"&gt;&lt;font style="font-size:7pt;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;font style="font-size:11pt;"&gt;The data must be processed at a sustained rate of six devices per second (Approximately 48,000 rows per second)&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; &lt;font face="Calibri"&gt;&lt;font style="font-size:12pt;"&gt;&lt;/font&gt;&lt;/font&gt;  &lt;div style="margin:0in 0in 8pt;line-height:12pt;"&gt;&lt;font style="font-size:11pt;" face="Calibri"&gt;The first concept tried was to delete the data for each device first, then use the BulkCopy API to insert the new rows. Several worker role instances were used to scale out the processing of the data into the database. However; when running this against an Azure SQL Database, this did not give the performance the scenario demanded. &lt;/font&gt;&lt;/div&gt; &lt;font face="Calibri"&gt;&lt;font style="font-size:12pt;"&gt;&lt;/font&gt;&lt;/font&gt;  &lt;div style="margin:0in 0in 8pt;line-height:12pt;"&gt;&lt;font style="font-size:11pt;" face="Calibri"&gt;The second approach was to use Table Valued Parameters (TVPs) with stored procedures to do the processing. In the stored procedures, the data was validated first. Next, all existing records were deleted for the device being processed, and then the new data was inserted. This did not perform better than the previous bulk insert option.&lt;/font&gt;&lt;/div&gt; &lt;font face="Calibri"&gt;&lt;font style="font-size:12pt;"&gt;&lt;/font&gt;&lt;/font&gt;  &lt;div style="margin:0in 0in 8pt;line-height:12pt;"&gt;&lt;font style="font-size:11pt;" face="Calibri"&gt;We were able to improve the process to meet the performance demands by making optimizations to the tables themselves, and to the stored procedures in order to minimize the lock, latch, and Windows Azure SQL Database specific contention the process initially encountered.&lt;/font&gt;&lt;/div&gt; &lt;font style="font-size:12pt;"&gt;&lt;/font&gt;  &lt;h1 style="margin:12pt 0in 0pt;line-height:17pt;"&gt;&lt;font style="font-size:16pt;" color="#2e74b5"&gt;Optimizing the Process&lt;/font&gt;&lt;/h1&gt; &lt;font style="font-size:12pt;"&gt;&lt;/font&gt;  &lt;div style="margin:0in 0in 8pt;line-height:12pt;"&gt;&lt;font style="font-size:11pt;" face="Calibri"&gt;Several optimizations were made to this process.&lt;/font&gt;&lt;/div&gt; &lt;font face="Calibri"&gt;&lt;font style="font-size:12pt;"&gt;&lt;/font&gt;&lt;/font&gt;  &lt;div style="margin:0in 0in 8pt;line-height:12pt;"&gt;&lt;font style="font-size:11pt;" face="Calibri"&gt;First, the underlying tables contained identity columns, and data needed to be inserted in sets from several different processes. This created both latch, and lock contention. Latch contention was created because each insert is performed only on the last page of the index, and several processes were trying to insert to the last page simultaneously. Lock contention is created because the identity column was the primary key and clustered index key, so all processes had to go through the process of having the identity value created, then only one at a time could insert. To remedy this type of contention, other values within the data were used as a primary key. In our example, we found composite keys of DeviceID and SubCondition in one table, and a combination of three columns in the second that third tables that could be used to maintain entity integrity. Since the IDENTITY column was not really necessary, it was dropped. &lt;/font&gt;&lt;/div&gt; &lt;font face="Calibri"&gt;&lt;font style="font-size:12pt;"&gt;&lt;/font&gt;&lt;/font&gt;  &lt;div style="margin:0in 0in 8pt;line-height:12pt;"&gt;&lt;font style="font-size:11pt;" face="Calibri"&gt;An example of the optimization of the table is&lt;/font&gt;&lt;/div&gt; &lt;font style="font-size:12pt;"&gt;&lt;/font&gt;  &lt;div style="margin:0in 0in 8pt;line-height:12pt;"&gt;&lt;b&gt;&lt;font style="font-size:11pt;"&gt;Original Table Definition:&lt;/font&gt;&lt;/b&gt;&lt;/div&gt; &lt;font style="font-size:12pt;"&gt;&lt;/font&gt;  &lt;div style="margin:0in 0in 0pt;line-height:normal;"&gt;&lt;font face="Consolas"&gt;&lt;font size="2"&gt;&lt;span&gt;&lt;font color="#0000ff"&gt;CREATE&lt;/font&gt;&lt;/span&gt;&lt;span&gt;&lt;font color="#0000ff"&gt; &lt;span&gt;TABLE&lt;/span&gt;&lt;/font&gt; &lt;font color="#008080"&gt;&lt;span&gt;dbo&lt;/span&gt;&lt;span&gt;.&lt;/span&gt;&lt;span&gt;Table1&lt;/span&gt;&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;/div&gt; &lt;font size="2" face="Consolas"&gt;&lt;/font&gt;  &lt;div style="margin:0in 0in 0pt;line-height:normal;"&gt;&lt;span&gt;&lt;font color="#808080" size="2" face="Consolas"&gt;(&lt;/font&gt;&lt;/span&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt; &lt;font size="2" face="Consolas"&gt;&lt;/font&gt;  &lt;div style="margin:0in 0in 0pt;line-height:normal;"&gt;&lt;span&gt;&lt;font face="Consolas"&gt;&lt;font size="2"&gt;&lt;span&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span&gt;&lt;font color="#008080"&gt;RecordID&lt;/font&gt;&lt;/span&gt;&lt;span&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span&gt;&lt;font color="#0000ff"&gt;BIGINT&lt;/font&gt;&lt;/span&gt;&lt;span&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;font color="#808080"&gt;&lt;span&gt;NOT&lt;/span&gt; &lt;span&gt;NULL&lt;/span&gt;&lt;/font&gt;&lt;span&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span&gt;&lt;font color="#0000ff"&gt;IDENTITY&lt;/font&gt;&lt;/span&gt;&lt;span&gt;&lt;font color="#808080"&gt;(&lt;/font&gt;&lt;/span&gt;1&lt;span&gt;&lt;font color="#808080"&gt;,&lt;/font&gt;&lt;/span&gt; 1&lt;span&gt;&lt;font color="#808080"&gt;),&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/div&gt; &lt;font size="2" face="Consolas"&gt;&lt;/font&gt;  &lt;div style="margin:0in 0in 0pt;line-height:normal;"&gt;&lt;span&gt;&lt;font face="Consolas"&gt;&lt;font size="2"&gt;&lt;span&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span&gt;&lt;font color="#008080"&gt;DeviceID&lt;/font&gt;&lt;/span&gt;&lt;span&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span&gt;&lt;font color="#0000ff"&gt;BIGINT&lt;/font&gt; &lt;/span&gt;&lt;span&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;font color="#808080"&gt;&lt;span&gt;NOT&lt;/span&gt; &lt;span&gt;NULL,&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/div&gt; &lt;font size="2" face="Consolas"&gt;&lt;/font&gt;  &lt;div style="margin:0in 0in 0pt;line-height:normal;"&gt;&lt;span&gt;&lt;font face="Consolas"&gt;&lt;font size="2"&gt;&lt;span&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span&gt;&lt;font color="#008080"&gt;SubCondition&lt;/font&gt;&lt;/span&gt;&lt;span&gt;&amp;#160;&lt;/span&gt;&lt;span&gt;&lt;font color="#0000ff"&gt;NVARCHAR&lt;/font&gt;&lt;/span&gt;&lt;span&gt;&lt;font color="#808080"&gt;(&lt;/font&gt;&lt;/span&gt;4000&lt;font color="#808080"&gt;&lt;span&gt;)&lt;/span&gt;&lt;span&gt;&amp;#160;&lt;/span&gt;&lt;span&gt;NOT&lt;/span&gt; &lt;span&gt;NULL,&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/div&gt; &lt;font size="2" face="Consolas"&gt;&lt;/font&gt;  &lt;div style="margin:0in 0in 0pt;line-height:normal;"&gt;&lt;span&gt;&lt;font face="Consolas"&gt;&lt;font size="2"&gt;&lt;span&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span&gt;&lt;font color="#008080"&gt;Value&lt;/font&gt;&lt;/span&gt;&lt;span&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span&gt;&lt;font color="#0000ff"&gt;NVARCHAR&lt;/font&gt;&lt;/span&gt;&lt;span&gt;&lt;font color="#808080"&gt;(&lt;/font&gt;&lt;/span&gt;&lt;font color="#ff00ff"&gt;&lt;span&gt;MAX&lt;/span&gt;&lt;/font&gt;&lt;span&gt;&lt;font color="#808080"&gt;)&lt;/font&gt;&lt;/span&gt;&lt;font color="#808080"&gt;&lt;span&gt;&amp;#160; &lt;/span&gt;&lt;span&gt;NOT&lt;/span&gt; &lt;span&gt;NULL,&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/div&gt; &lt;font size="2" face="Consolas"&gt;&lt;/font&gt;  &lt;div style="margin:0in 0in 0pt;line-height:normal;"&gt;&lt;span&gt;&lt;font face="Consolas"&gt;&lt;font size="2"&gt;&lt;span&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span&gt;&lt;font color="#008080"&gt;SubValue&lt;/font&gt;&lt;/span&gt;&lt;span&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span&gt;&lt;font color="#0000ff"&gt;TINYINT&lt;/font&gt;&lt;/span&gt;&lt;span&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;font color="#808080"&gt;&lt;span&gt;NOT&lt;/span&gt; &lt;span&gt;NULL,&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/div&gt; &lt;font size="2" face="Consolas"&gt;&lt;/font&gt;  &lt;div style="margin:0in 0in 0pt;line-height:normal;"&gt;&lt;span&gt;&lt;font face="Consolas"&gt;&lt;font size="2"&gt;&lt;span&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span&gt;&lt;font color="#0000ff"&gt;CONSTRAINT&lt;/font&gt;&lt;/span&gt; &lt;span&gt;&lt;font color="#008080"&gt;[pk_Table1]&lt;/font&gt;&lt;/span&gt; &lt;font color="#0000ff"&gt;&lt;span&gt;PRIMARY&lt;/span&gt; &lt;span&gt;KEY&lt;/span&gt; &lt;span&gt;CLUSTERED&lt;/span&gt;&lt;/font&gt; &lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/div&gt; &lt;font size="2" face="Consolas"&gt;&lt;/font&gt;  &lt;div style="margin:0in 0in 0pt;line-height:normal;"&gt;&lt;font face="Consolas"&gt;&lt;font size="2"&gt;&lt;span&gt;&lt;span&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;/span&gt;&lt;font color="#808080"&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/div&gt; &lt;font size="2" face="Consolas"&gt;&lt;/font&gt;  &lt;div style="margin:0in 0in 0pt;line-height:normal;"&gt;&lt;span&gt;&lt;font face="Consolas"&gt;&lt;font size="2"&gt;&lt;span&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span&gt;&lt;font color="#008080"&gt;RecordID&lt;/font&gt;&lt;/span&gt; &lt;span&gt;&lt;font color="#0000ff"&gt;ASC&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/div&gt; &lt;font size="2" face="Consolas"&gt;&lt;/font&gt;  &lt;div style="margin:0in 0in 0pt;line-height:normal;"&gt;&lt;span&gt;&lt;span&gt;&lt;font size="2" face="Consolas"&gt;&amp;#160;&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt; &lt;font size="2" face="Consolas"&gt;&lt;/font&gt;  &lt;div style="margin:0in 0in 0pt;line-height:normal;"&gt;&lt;span&gt;&lt;font face="Consolas"&gt;&lt;font size="2"&gt;&lt;span&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span&gt;&lt;font color="#808080"&gt;)&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/div&gt; &lt;font color="#808080" size="2" face="Consolas"&gt;&lt;/font&gt;  &lt;div style="margin:0in 0in 0pt;line-height:normal;"&gt;&lt;span&gt;&lt;font color="#808080" size="2" face="Consolas"&gt;)&lt;/font&gt;&lt;/span&gt;&lt;/div&gt; &lt;font style="font-size:12pt;"&gt;&lt;/font&gt;  &lt;div style="margin:0in 0in 8pt;line-height:12pt;"&gt;&lt;font style="font-size:11pt;"&gt;&amp;#160;&lt;/font&gt;&lt;/div&gt; &lt;font style="font-size:12pt;"&gt;&lt;/font&gt;  &lt;div style="margin:0in 0in 8pt;line-height:12pt;"&gt;&lt;b&gt;&lt;font style="font-size:11pt;"&gt;Optimized Table Definition:&lt;/font&gt;&lt;/b&gt;&lt;/div&gt; &lt;font style="font-size:12pt;"&gt;&lt;/font&gt;  &lt;div style="margin:0in 0in 0pt;line-height:normal;"&gt;&lt;font face="Consolas"&gt;&lt;font size="2"&gt;&lt;span&gt;&lt;font color="#0000ff"&gt;CREATE&lt;/font&gt;&lt;/span&gt;&lt;span&gt;&lt;font color="#0000ff"&gt; &lt;span&gt;TABLE&lt;/span&gt;&lt;/font&gt; &lt;font color="#008080"&gt;&lt;span&gt;dbo&lt;/span&gt;&lt;span&gt;.&lt;/span&gt;&lt;span&gt;Table1&lt;/span&gt;&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;/div&gt; &lt;font size="2" face="Consolas"&gt;&lt;/font&gt;  &lt;div style="margin:0in 0in 0pt;line-height:normal;"&gt;&lt;span&gt;&lt;font color="#808080" size="2" face="Consolas"&gt;(&lt;/font&gt;&lt;/span&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt; &lt;font size="2" face="Consolas"&gt;&lt;/font&gt;  &lt;div style="margin:0in 0in 0pt;line-height:normal;"&gt;&lt;span&gt;&lt;font face="Consolas"&gt;&lt;font size="2"&gt;&lt;span&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span&gt;&lt;font color="#008080"&gt;DeviceID&lt;/font&gt;&lt;/span&gt;&lt;span&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span&gt;&lt;font color="#0000ff"&gt;BIGINT&lt;/font&gt;&lt;/span&gt;&lt;span&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;font color="#808080"&gt;&lt;span&gt;NOT&lt;/span&gt; &lt;span&gt;NULL,&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/div&gt; &lt;font size="2" face="Consolas"&gt;&lt;/font&gt;  &lt;div style="margin:0in 0in 0pt;line-height:normal;"&gt;&lt;span&gt;&lt;font face="Consolas"&gt;&lt;font size="2"&gt;&lt;span&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span&gt;&lt;font color="#008080"&gt;SubCondition&lt;/font&gt;&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;&lt;font color="#0000ff"&gt;NVARCHAR&lt;/font&gt;&lt;/span&gt;&lt;span&gt;&lt;font color="#808080"&gt;(&lt;/font&gt;&lt;/span&gt;4000&lt;font color="#808080"&gt;&lt;span&gt;)&lt;/span&gt;&lt;span&gt;&amp;#160;&lt;/span&gt;&lt;span&gt;NOT&lt;/span&gt; &lt;span&gt;NULL,&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/div&gt; &lt;font size="2" face="Consolas"&gt;&lt;/font&gt;  &lt;div style="margin:0in 0in 0pt;line-height:normal;"&gt;&lt;span&gt;&lt;font face="Consolas"&gt;&lt;font size="2"&gt;&lt;span&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span&gt;&lt;font color="#008080"&gt;Value&lt;/font&gt;&lt;/span&gt;&lt;span&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span&gt;&lt;font color="#0000ff"&gt;NVARCHAR&lt;/font&gt;&lt;/span&gt;&lt;span&gt;&lt;font color="#808080"&gt;(&lt;/font&gt;&lt;/span&gt;&lt;font color="#ff00ff"&gt;&lt;span&gt;MAX&lt;/span&gt;&lt;/font&gt;&lt;span&gt;&lt;font color="#808080"&gt;)&lt;/font&gt;&lt;/span&gt;&lt;font color="#808080"&gt;&lt;span&gt;&amp;#160; &lt;/span&gt;&lt;span&gt;NOT&lt;/span&gt; &lt;span&gt;NULL,&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/div&gt; &lt;font size="2" face="Consolas"&gt;&lt;/font&gt;  &lt;div style="margin:0in 0in 0pt;line-height:normal;"&gt;&lt;span&gt;&lt;font face="Consolas"&gt;&lt;font size="2"&gt;&lt;span&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span&gt;&lt;font color="#008080"&gt;SubValue&lt;/font&gt;&lt;/span&gt;&lt;span&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span&gt;&lt;font color="#0000ff"&gt;TINYINT&lt;/font&gt;&lt;/span&gt;&lt;span&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;font color="#808080"&gt;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;font color="#808080"&gt;&lt;span&gt;NOT&lt;/span&gt; &lt;span&gt;NULL,&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/div&gt; &lt;font size="2" face="Consolas"&gt;&lt;/font&gt;  &lt;div style="margin:0in 0in 0pt;line-height:normal;"&gt;&lt;span&gt;&lt;font face="Consolas"&gt;&lt;font size="2"&gt;&lt;span&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span&gt;&lt;font color="#0000ff"&gt;CONSTRAINT&lt;/font&gt;&lt;/span&gt; &lt;span&gt;&lt;font color="#008080"&gt;[pk_Table1]&lt;/font&gt;&lt;/span&gt; &lt;font color="#0000ff"&gt;&lt;span&gt;PRIMARY&lt;/span&gt; &lt;span&gt;KEY&lt;/span&gt; &lt;span&gt;CLUSTERED&lt;/span&gt;&lt;/font&gt; &lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/div&gt; &lt;font size="2" face="Consolas"&gt;&lt;/font&gt;  &lt;div style="margin:0in 0in 0pt;line-height:normal;"&gt;&lt;font face="Consolas"&gt;&lt;font size="2"&gt;&lt;span&gt;&lt;span&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;/span&gt;&lt;font color="#808080"&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/div&gt; &lt;font size="2" face="Consolas"&gt;&lt;/font&gt;  &lt;div style="margin:0in 0in 0pt;line-height:normal;"&gt;&lt;span&gt;&lt;font face="Consolas"&gt;&lt;font size="2"&gt;&lt;span&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span&gt;&lt;font color="#008080"&gt;DeviceID&lt;/font&gt;&lt;/span&gt; &lt;span&gt;&lt;font color="#0000ff"&gt;ASC&lt;/font&gt;&lt;/span&gt;&lt;span&gt;&lt;font color="#808080"&gt;,&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/div&gt; &lt;font size="2" face="Consolas"&gt;&lt;/font&gt;  &lt;div style="margin:0in 0in 0pt;line-height:normal;"&gt;&lt;span&gt;&lt;font face="Consolas"&gt;&lt;font size="2"&gt;&lt;span&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span&gt;&lt;font color="#008080"&gt;SubCondition&lt;/font&gt;&lt;/span&gt; &lt;span&gt;&lt;font color="#0000ff"&gt;ASC&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/div&gt; &lt;font size="2" face="Consolas"&gt;&lt;/font&gt;  &lt;div style="margin:0in 0in 0pt;line-height:normal;"&gt;&lt;span&gt;&lt;font face="Consolas"&gt;&lt;font size="2"&gt;&lt;span&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span&gt;&lt;font color="#808080"&gt;)&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/div&gt; &lt;font color="#808080" size="2" face="Consolas"&gt;&lt;/font&gt;  &lt;div style="margin:0in 0in 0pt;line-height:normal;"&gt;&lt;span&gt;&lt;font color="#808080" size="2" face="Consolas"&gt;)&lt;/font&gt;&lt;/span&gt;&lt;/div&gt; &lt;font style="font-size:12pt;"&gt;&lt;/font&gt;  &lt;div style="margin:0in 0in 8pt;line-height:12pt;"&gt;&lt;font style="font-size:11pt;"&gt;&amp;#160;&lt;/font&gt;&lt;/div&gt; &lt;font style="font-size:12pt;"&gt;&lt;/font&gt;  &lt;div style="margin:0in 0in 8pt;line-height:12pt;"&gt;&lt;font style="font-size:11pt;" face="Calibri"&gt;The second suboptimal part of the described process is that the stored procedure deleted the old data for a device first, then re-inserted the new data for the device. This is additional maintenance of a data structure as deletes can trigger re-balancing operations on an index, and inserts can result in page splits as pages are filled. Making two data modifications, each with implicit maintenance work that must be done, should be avoided when the data operation can be done with one operation. A “MERGE” operation can be used in place of a DELETE then INSERT provided the updated set of data will not omit previous rows of data. In other words, this works if no SubConditions for any DeviceID in the example table will expire.&lt;/font&gt;&lt;/div&gt; &lt;font face="Calibri"&gt;&lt;font style="font-size:12pt;"&gt;&lt;/font&gt;&lt;/font&gt;  &lt;div style="margin:0in 0in 8pt;line-height:12pt;"&gt;&lt;font style="font-size:11pt;" face="Calibri"&gt;Any time data is modified in Windows Azure SQL Database, it must be replicated to two replicas. The DELETE then INSERT method was inefficient in this as well since both the delete and the insert operation must be replicated to the Azure SQL Database replicas. Using a MERGE with only the WHEN MATCHED and WHEN NOT MATCHED conditions will eliminate this double operation, and thus eliminates half of the data replication, but it still modifies every row of data. In the case of this scenario, at most, 10% of the incoming data would actually be different from existing data. By adding an additional condition to the MATCHED condition so that it reads “WHEN MATCHED AND (source.data &amp;lt;&amp;gt; target.data)” only the rows that contained actual data differences were modified, which means that only the data that was actually changed in the incoming data needed to be replicated to secondaries. Making this modification minimized SE_REPL_SLOW_SECONDARY_THROTTLE, SE_REPL_ACK, and other SE_REPL_* wait types. &lt;/font&gt;&lt;/div&gt; &lt;font face="Calibri"&gt;&lt;font style="font-size:12pt;"&gt;&lt;/font&gt;&lt;/font&gt;  &lt;div style="margin:0in 0in 8pt;line-height:12pt;"&gt;&lt;font style="font-size:11pt;" face="Calibri"&gt;The last area of optimization we took was to ensure efficient joining with minimal chance for contention among processes. This action was taken because the optimizer tended to want to scan both source and target tables to perform a merge join when processing the MERGE operation. This was not only inefficient, but caused significant lock contention. To eliminate this contention, the query was hinted with “OPTION (LOOP JOIN)”. &lt;/font&gt;&lt;/div&gt; &lt;font face="Calibri"&gt;&lt;font style="font-size:12pt;"&gt;&lt;/font&gt;&lt;/font&gt;  &lt;div style="margin:0in 0in 8pt;line-height:12pt;"&gt;&lt;font style="font-size:11pt;" face="Calibri"&gt;An example of the MERGE written to minimize the amount of data that must be processed into the tables is:&lt;/font&gt;&lt;/div&gt; &lt;font style="font-size:12pt;"&gt;&lt;/font&gt;  &lt;div style="margin:0in 0in 0pt;line-height:normal;"&gt;&lt;font face="Consolas"&gt;&lt;span&gt;&lt;font style="font-size:9.5pt;" color="#0000ff"&gt;CREATE&lt;/font&gt;&lt;/span&gt;&lt;span&gt;&lt;font style="font-size:9.5pt;"&gt;&lt;font color="#0000ff"&gt; &lt;span&gt;PROCEDURE&lt;/span&gt;&lt;/font&gt; &lt;font color="#008080"&gt;&lt;span&gt;[dbo]&lt;/span&gt;&lt;span&gt;.&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;span&gt;&lt;font style="font-size:9.5pt;" color="#008080"&gt;[TVPInsert_test]&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;/font&gt;&lt;/div&gt; &lt;font face="Consolas"&gt;&lt;font style="font-size:12pt;"&gt;&lt;/font&gt;&lt;/font&gt;  &lt;div style="margin:0in 0in 0pt;line-height:normal;"&gt;&lt;span&gt;&lt;font face="Consolas"&gt;&lt;span&gt;&lt;font style="font-size:9.5pt;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;font color="#008080"&gt; &lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;font style="font-size:9.5pt;"&gt;&lt;font color="#008080"&gt;&lt;span&gt;@TableParam&lt;/span&gt;&lt;span&gt;&amp;#160; &lt;/span&gt;&lt;span&gt;TVPInsertType_test&lt;/span&gt;&lt;/font&gt; &lt;/font&gt;&lt;span&gt;&lt;font style="font-size:9.5pt;" color="#0000ff"&gt;READONLY&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/span&gt;&lt;/div&gt; &lt;font face="Consolas"&gt;&lt;font style="font-size:12pt;"&gt;&lt;/font&gt;&lt;/font&gt;  &lt;div style="margin:0in 0in 0pt;line-height:normal;"&gt;&lt;span&gt;&lt;font style="font-size:9.5pt;" color="#0000ff" face="Consolas"&gt;AS&lt;/font&gt;&lt;/span&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt; &lt;font color="#0000ff" face="Consolas"&gt;&lt;font style="font-size:12pt;"&gt;&lt;/font&gt;&lt;/font&gt;  &lt;div style="margin:0in 0in 0pt;line-height:normal;"&gt;&lt;span&gt;&lt;font style="font-size:9.5pt;" color="#0000ff" face="Consolas"&gt;BEGIN&lt;/font&gt;&lt;/span&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt; &lt;font color="#0000ff" face="Consolas"&gt;&lt;font style="font-size:12pt;"&gt;&lt;/font&gt;&lt;/font&gt;  &lt;div style="margin:0in 0in 0pt;line-height:normal;"&gt;&lt;span&gt;&lt;font style="font-size:9.5pt;" color="#0000ff" face="Consolas"&gt;&amp;#160;&lt;/font&gt;&lt;/span&gt;&lt;/div&gt; &lt;font color="#0000ff" face="Consolas"&gt;&lt;font style="font-size:12pt;"&gt;&lt;/font&gt;&lt;/font&gt;  &lt;div style="margin:0in 0in 0pt;line-height:normal;"&gt;&lt;span&gt;&lt;font style="font-size:9.5pt;" color="#0000ff" face="Consolas"&gt;&amp;#160;&lt;/font&gt;&lt;/span&gt;&lt;/div&gt; &lt;font color="#0000ff" face="Consolas"&gt;&lt;font style="font-size:12pt;"&gt;&lt;/font&gt;&lt;/font&gt;  &lt;div style="margin:0in 0in 0pt;line-height:normal;"&gt;&lt;span&gt;&lt;font face="Consolas"&gt;&lt;span&gt;&lt;font style="font-size:9.5pt;" color="#0000ff"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;font style="font-size:9.5pt;"&gt;&lt;span&gt;&lt;font color="#0000ff"&gt;MERGE&lt;/font&gt;&lt;/span&gt; &lt;font color="#008080"&gt;&lt;span&gt;dbo&lt;/span&gt;&lt;span&gt;.&lt;/span&gt;&lt;span&gt;Table1&lt;/span&gt;&lt;/font&gt; &lt;font color="#0000ff"&gt;&lt;span&gt;AS&lt;/span&gt; &lt;/font&gt;&lt;/font&gt;&lt;span&gt;&lt;font style="font-size:9.5pt;" color="#0000ff"&gt;target&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/span&gt;&lt;/div&gt; &lt;font face="Consolas"&gt;&lt;font style="font-size:12pt;"&gt;&lt;/font&gt;&lt;/font&gt;  &lt;div style="margin:0in 0in 0pt;line-height:normal;"&gt;&lt;span&gt;&lt;font face="Consolas"&gt;&lt;span&gt;&lt;font style="font-size:9.5pt;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;font style="font-size:9.5pt;"&gt;&lt;span&gt;&lt;font color="#0000ff"&gt;USING&lt;/font&gt;&lt;/span&gt; &lt;span&gt;&lt;font color="#008080"&gt;@TableParam&lt;/font&gt;&lt;/span&gt; &lt;font color="#0000ff"&gt;&lt;span&gt;AS&lt;/span&gt; &lt;/font&gt;&lt;/font&gt;&lt;span&gt;&lt;font style="font-size:9.5pt;" color="#808080"&gt;source&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/span&gt;&lt;/div&gt; &lt;font face="Consolas"&gt;&lt;font style="font-size:12pt;"&gt;&lt;/font&gt;&lt;/font&gt;  &lt;div style="margin:0in 0in 0pt;line-height:normal;"&gt;&lt;span&gt;&lt;font face="Consolas"&gt;&lt;span&gt;&lt;font style="font-size:9.5pt;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;font style="font-size:9.5pt;"&gt;&lt;font color="#0000ff"&gt;&lt;span&gt;ON&lt;/span&gt; &lt;span&gt;target&lt;/span&gt;&lt;/font&gt;&lt;span&gt;&lt;font color="#808080"&gt;.&lt;/font&gt;&lt;/span&gt;&lt;span&gt;&lt;font color="#008080"&gt;DeviceID&lt;/font&gt;&lt;/span&gt; &lt;font color="#808080"&gt;&lt;span&gt;=&lt;/span&gt; &lt;span&gt;source.&lt;/span&gt;&lt;/font&gt;&lt;span&gt;&lt;font color="#008080"&gt;DeviceID&lt;/font&gt;&lt;/span&gt; &lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/div&gt; &lt;font face="Consolas"&gt;&lt;font style="font-size:12pt;"&gt;&lt;/font&gt;&lt;/font&gt;  &lt;div style="margin:0in 0in 0pt;line-height:normal;"&gt;&lt;span&gt;&lt;font face="Consolas"&gt;&lt;span&gt;&lt;font style="font-size:9.5pt;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;font color="#808080"&gt;&lt;font style="font-size:9.5pt;"&gt;&lt;span&gt;and&lt;/span&gt; &lt;span&gt;&lt;font color="#0000ff"&gt;target&lt;/font&gt;&lt;/span&gt;&lt;span&gt;.&lt;/span&gt;&lt;span&gt;&lt;font color="#008080"&gt;SubCondition&lt;/font&gt;&lt;/span&gt; &lt;span&gt;=&lt;/span&gt; &lt;span&gt;source.&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;span&gt;&lt;font style="font-size:9.5pt;" color="#008080"&gt;SubCondition&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/span&gt;&lt;/div&gt; &lt;font face="Consolas"&gt;&lt;font style="font-size:12pt;"&gt;&lt;/font&gt;&lt;/font&gt;  &lt;div style="margin:0in 0in 0pt;line-height:normal;"&gt;&lt;span&gt;&lt;font face="Consolas"&gt;&lt;span&gt;&lt;font style="font-size:9.5pt;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;font style="font-size:9.5pt;"&gt;&lt;font&gt;&lt;span&gt;&lt;font color="#0000ff"&gt;WHEN&lt;/font&gt;&lt;/span&gt; &lt;font color="#808080"&gt;&lt;span&gt;MATCHED&lt;/span&gt; &lt;span style="background-image:none;background-attachment:scroll;background-repeat:repeat;"&gt;AND&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;span style="background-image:none;background-attachment:scroll;background-repeat:repeat;"&gt;&lt;font style="font-size:9.5pt;" color="#808080"&gt; &lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/span&gt;&lt;/div&gt; &lt;font color="#808080" face="Consolas"&gt;&lt;font style="font-size:12pt;"&gt;&lt;/font&gt;&lt;/font&gt;  &lt;div style="margin:0in 0in 0pt;line-height:normal;"&gt;&lt;font face="Consolas"&gt;&lt;font color="#808080"&gt;&lt;span style="background-image:none;background-attachment:scroll;background-repeat:repeat;"&gt;&lt;span&gt;&lt;font style="font-size:9.5pt;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;font style="font-size:9.5pt;"&gt;&lt;font&gt;&lt;span style="background-image:none;background-attachment:scroll;background-repeat:repeat;"&gt;(Source.&lt;/span&gt;&lt;span style="background-image:none;background-attachment:scroll;background-repeat:repeat;"&gt;&lt;font color="#008080"&gt;Value&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;span style="background-image:none;background-attachment:scroll;background-repeat:repeat;"&gt;&lt;font style="font-size:9.5pt;"&gt;&lt;font&gt; &lt;span&gt;!=&lt;/span&gt; &lt;font color="#0000ff"&gt;t&lt;span&gt;arget&lt;/span&gt;&lt;/font&gt;&lt;span&gt;.&lt;/span&gt;&lt;span&gt;&lt;font color="#008080"&gt;Value&lt;/font&gt;&lt;/span&gt;&lt;/font&gt; &lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;/div&gt; &lt;font color="#808080" face="Consolas"&gt;&lt;font style="font-size:12pt;"&gt;&lt;/font&gt;&lt;/font&gt;  &lt;div style="margin:0in 0in 0pt;line-height:normal;"&gt;&lt;font face="Consolas"&gt;&lt;span style="background-image:none;background-attachment:scroll;background-repeat:repeat;"&gt;&lt;font color="#808080"&gt;&lt;span&gt;&lt;font style="font-size:9.5pt;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;font style="font-size:9.5pt;"&gt;&lt;font&gt;&lt;span&gt;OR&lt;/span&gt; &lt;span&gt;Source.&lt;/span&gt;&lt;span&gt;&lt;font color="#008080"&gt;SubValue&lt;/font&gt;&lt;/span&gt; &lt;span&gt;!=&lt;/span&gt; &lt;span&gt;Target&lt;/span&gt;&lt;span&gt;.&lt;/span&gt;&lt;span&gt;&lt;font color="#008080"&gt;SubValue&lt;/font&gt;&lt;/span&gt;&lt;span&gt;)&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;span&gt;&lt;font style="font-size:9.5pt;"&gt; &lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/div&gt; &lt;font face="Consolas"&gt;&lt;font style="font-size:12pt;"&gt;&lt;/font&gt;&lt;/font&gt;  &lt;div style="margin:0in 0in 0pt;line-height:normal;"&gt;&lt;span&gt;&lt;font face="Consolas"&gt;&lt;span&gt;&lt;font style="font-size:9.5pt;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;span&gt;&lt;font style="font-size:9.5pt;" color="#0000ff"&gt;THEN&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/span&gt;&lt;/div&gt; &lt;font face="Consolas"&gt;&lt;font style="font-size:12pt;"&gt;&lt;/font&gt;&lt;/font&gt;  &lt;div style="margin:0in 0in 0pt;line-height:normal;"&gt;&lt;span&gt;&lt;font face="Consolas"&gt;&lt;span&gt;&lt;font style="font-size:9.5pt;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;font style="font-size:9.5pt;"&gt;&lt;span&gt;&lt;font color="#ff00ff"&gt;UPDATE&lt;/font&gt;&lt;/span&gt; &lt;span&gt;&lt;font color="#0000ff"&gt;SET&lt;/font&gt;&lt;/span&gt; &lt;font color="#808080"&gt;&lt;span&gt;&lt;font color="#008080"&gt;Value&lt;/font&gt;&lt;/span&gt; &lt;span&gt;=&lt;/span&gt; &lt;span&gt;Source.&lt;/span&gt;&lt;span&gt;&lt;font color="#008080"&gt;Value&lt;/font&gt;&lt;/span&gt;&lt;span&gt;,&lt;/span&gt; &lt;span&gt;&lt;font color="#008080"&gt;SubValue&lt;/font&gt;&lt;/span&gt; &lt;span&gt;=&lt;/span&gt; &lt;span&gt;Source.&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;span&gt;&lt;font style="font-size:9.5pt;" color="#008080"&gt;SubValue&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/span&gt;&lt;/div&gt; &lt;font face="Consolas"&gt;&lt;font style="font-size:12pt;"&gt;&lt;/font&gt;&lt;/font&gt;  &lt;div style="margin:0in 0in 0pt;line-height:normal;"&gt;&lt;span&gt;&lt;font face="Consolas"&gt;&lt;span&gt;&lt;font style="font-size:9.5pt;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;font style="font-size:9.5pt;"&gt;&lt;span&gt;&lt;font color="#0000ff"&gt;WHEN&lt;/font&gt;&lt;/span&gt; &lt;font color="#808080"&gt;&lt;span&gt;NOT&lt;/span&gt; &lt;span&gt;MATCHED&lt;/span&gt;&lt;/font&gt; &lt;/font&gt;&lt;span&gt;&lt;font style="font-size:9.5pt;" color="#0000ff"&gt;THEN&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/span&gt;&lt;/div&gt; &lt;font face="Consolas"&gt;&lt;font style="font-size:12pt;"&gt;&lt;/font&gt;&lt;/font&gt;  &lt;div style="margin:0in 0in 0pt;line-height:normal;"&gt;&lt;span&gt;&lt;font face="Consolas"&gt;&lt;span&gt;&lt;font style="font-size:9.5pt;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;font style="font-size:9.5pt;"&gt;&lt;span&gt;&lt;font color="#0000ff"&gt;INSERT&lt;/font&gt; &lt;/span&gt;&lt;font color="#808080"&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;&lt;font color="#008080"&gt;DeviceID&lt;/font&gt;&lt;/span&gt;&lt;span&gt;,&lt;/span&gt; &lt;span&gt;&lt;font color="#008080"&gt;SubCondition&lt;/font&gt;&lt;/span&gt;&lt;span&gt;,&lt;/span&gt; &lt;span&gt;&lt;font color="#008080"&gt;Value&lt;/font&gt;&lt;/span&gt;&lt;span&gt;,&lt;/span&gt; &lt;span&gt;&lt;font color="#008080"&gt;SubValue&lt;/font&gt;&lt;/span&gt;&lt;span&gt;)&lt;/span&gt;&lt;/font&gt; &lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/div&gt; &lt;font face="Consolas"&gt;&lt;font style="font-size:12pt;"&gt;&lt;/font&gt;&lt;/font&gt;  &lt;div style="margin:0in 0in 0pt;line-height:normal;"&gt;&lt;span&gt;&lt;font face="Consolas"&gt;&lt;span&gt;&lt;font style="font-size:9.5pt;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;font style="font-size:9.5pt;"&gt;&lt;span&gt;&lt;font color="#0000ff"&gt;VALUES&lt;/font&gt; &lt;/span&gt;&lt;font color="#808080"&gt;&lt;span&gt;(Source.&lt;/span&gt;&lt;span&gt;&lt;font color="#008080"&gt;DeviceID&lt;/font&gt;&lt;/span&gt;&lt;span&gt;,&lt;/span&gt; &lt;span&gt;Source.&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;span&gt;&lt;font style="font-size:9.5pt;" color="#008080"&gt;SubCondition&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/span&gt;&lt;/div&gt; &lt;font color="#808080" face="Consolas"&gt;&lt;font style="font-size:12pt;"&gt;&lt;/font&gt;&lt;/font&gt;  &lt;div style="margin:0in 0in 0pt;line-height:normal;"&gt;&lt;span&gt;&lt;font face="Consolas"&gt;&lt;font color="#808080"&gt;&lt;span&gt;&lt;font style="font-size:9.5pt;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;font style="font-size:9.5pt;"&gt;&lt;span&gt;,&lt;/span&gt; &lt;span&gt;Source.&lt;/span&gt;&lt;span&gt;&lt;font color="#008080"&gt;Value&lt;/font&gt;&lt;/span&gt;&lt;span&gt;,&lt;/span&gt; &lt;span&gt;Source.&lt;/span&gt;&lt;span&gt;&lt;font color="#008080"&gt;SubValue&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span&gt;&lt;font style="font-size:9.5pt;"&gt;)&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/div&gt; &lt;font face="Consolas"&gt;&lt;font style="font-size:12pt;"&gt;&lt;/font&gt;&lt;/font&gt;  &lt;div style="margin:0in 0in 0pt;line-height:normal;"&gt;&lt;span&gt;&lt;font face="Consolas"&gt;&lt;span&gt;&lt;font style="font-size:9.5pt;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;font style="font-size:9.5pt;"&gt;&lt;span style="background-image:none;background-attachment:scroll;background-repeat:repeat;"&gt;&lt;font color="#0000ff"&gt;OPTION&lt;/font&gt; &lt;/span&gt;&lt;span style="background-image:none;background-attachment:scroll;background-repeat:repeat;"&gt;&lt;font color="#808080"&gt;(&lt;/font&gt;&lt;/span&gt;&lt;span style="background-image:none;background-attachment:scroll;background-repeat:repeat;"&gt;&lt;font color="#0000ff"&gt;LOOP&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span style="background-image:none;background-attachment:scroll;background-repeat:repeat;"&gt;&lt;font style="font-size:9.5pt;"&gt; &lt;/font&gt;&lt;span&gt;&lt;font style="font-size:9.5pt;" color="#808080"&gt;JOIN)&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;/font&gt;&lt;/span&gt;&lt;/div&gt; &lt;font face="Consolas"&gt;&lt;font style="font-size:12pt;"&gt;&lt;/font&gt;&lt;/font&gt;  &lt;div style="margin:0in 0in 0pt;line-height:normal;"&gt;&lt;span&gt;&lt;font style="font-size:9.5pt;" face="Consolas"&gt;&amp;#160;&lt;/font&gt;&lt;/span&gt;&lt;/div&gt; &lt;font face="Consolas"&gt;&lt;font style="font-size:12pt;"&gt;&lt;/font&gt;&lt;/font&gt;  &lt;div style="margin:0in 0in 0pt;line-height:normal;"&gt;&lt;span&gt;&lt;font style="font-size:9.5pt;" color="#0000ff" face="Consolas"&gt;END&lt;/font&gt;&lt;/span&gt;&lt;/div&gt; &lt;font style="font-size:12pt;"&gt;&lt;/font&gt;  &lt;div style="margin:0in 0in 8pt;line-height:12pt;"&gt;&lt;font style="font-size:11pt;"&gt;The Table Value Type definition created for use with this stored procedure:&lt;/font&gt;&lt;/div&gt; &lt;font style="font-size:12pt;"&gt;&lt;/font&gt;  &lt;div style="margin:0in 0in 0pt;line-height:normal;"&gt;&lt;font face="Consolas"&gt;&lt;span&gt;&lt;font style="font-size:9.5pt;" color="#0000ff"&gt;CREATE&lt;/font&gt;&lt;/span&gt;&lt;span&gt;&lt;font style="font-size:9.5pt;"&gt;&lt;font color="#0000ff"&gt; &lt;span&gt;TYPE&lt;/span&gt;&lt;/font&gt; &lt;font color="#008080"&gt;&lt;span&gt;dbo&lt;/span&gt;&lt;span&gt;.&lt;/span&gt;&lt;span&gt;TVPInsertType_test&lt;/span&gt;&lt;/font&gt; &lt;font color="#0000ff"&gt;&lt;span&gt;AS&lt;/span&gt; &lt;/font&gt;&lt;/font&gt;&lt;span&gt;&lt;font style="font-size:9.5pt;" color="#0000ff"&gt;TABLE&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;/font&gt;&lt;/div&gt; &lt;font face="Consolas"&gt;&lt;font style="font-size:12pt;"&gt;&lt;/font&gt;&lt;/font&gt;  &lt;div style="margin:0in 0in 0pt;line-height:normal;"&gt;&lt;span&gt;&lt;font style="font-size:9.5pt;" color="#808080" face="Consolas"&gt;(&lt;/font&gt;&lt;/span&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt; &lt;font face="Consolas"&gt;&lt;font style="font-size:12pt;"&gt;&lt;/font&gt;&lt;/font&gt;  &lt;div style="margin:0in 0in 0pt;line-height:normal;"&gt;&lt;span&gt;&lt;font face="Consolas"&gt;&lt;span&gt;&lt;font style="font-size:9.5pt;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;font style="font-size:9.5pt;"&gt;&lt;span&gt;&lt;font color="#008080"&gt;DeviceID&lt;/font&gt;&lt;/span&gt;&lt;span&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span&gt;&lt;font color="#0000ff"&gt;BIGINT&lt;/font&gt;&lt;/span&gt;&lt;span&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;font color="#808080"&gt; &lt;/font&gt;&lt;/span&gt;&lt;font color="#808080"&gt;&lt;span&gt;NOT&lt;/span&gt; &lt;/font&gt;&lt;/font&gt;&lt;span&gt;&lt;font style="font-size:9.5pt;" color="#808080"&gt;NULL,&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/span&gt;&lt;/div&gt; &lt;font face="Consolas"&gt;&lt;font style="font-size:12pt;"&gt;&lt;/font&gt;&lt;/font&gt;  &lt;div style="margin:0in 0in 0pt;line-height:normal;"&gt;&lt;span&gt;&lt;font face="Consolas"&gt;&lt;span&gt;&lt;font style="font-size:9.5pt;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;font style="font-size:9.5pt;"&gt;&lt;span&gt;&lt;font color="#008080"&gt;SubCondition&lt;/font&gt;&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;&lt;font color="#0000ff"&gt;NVARCHAR&lt;/font&gt;&lt;/span&gt;&lt;span&gt;&lt;font color="#808080"&gt;(&lt;/font&gt;&lt;/span&gt;4000&lt;font color="#808080"&gt;&lt;span&gt;)&lt;/span&gt;&lt;span&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span&gt;NOT&lt;/span&gt; &lt;/font&gt;&lt;/font&gt;&lt;span&gt;&lt;font style="font-size:9.5pt;" color="#808080"&gt;NULL,&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/span&gt;&lt;/div&gt; &lt;font face="Consolas"&gt;&lt;font style="font-size:12pt;"&gt;&lt;/font&gt;&lt;/font&gt;  &lt;div style="margin:0in 0in 0pt;line-height:normal;"&gt;&lt;span&gt;&lt;font face="Consolas"&gt;&lt;span&gt;&lt;font style="font-size:9.5pt;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;font style="font-size:9.5pt;"&gt;&lt;span&gt;&lt;font color="#008080"&gt;Value&lt;/font&gt;&lt;/span&gt;&lt;span&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span&gt;&lt;font color="#0000ff"&gt;NVARCHAR&lt;/font&gt;&lt;/span&gt;&lt;span&gt;&lt;font color="#808080"&gt;(&lt;/font&gt;&lt;/span&gt;&lt;font color="#ff00ff"&gt;&lt;span&gt;MAX&lt;/span&gt;&lt;/font&gt;&lt;span&gt;&lt;font color="#808080"&gt;)&lt;/font&gt;&lt;/span&gt;&lt;font color="#808080"&gt;&lt;span&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span&gt;NOT&lt;/span&gt; &lt;/font&gt;&lt;/font&gt;&lt;span&gt;&lt;font style="font-size:9.5pt;" color="#808080"&gt;NULL,&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/span&gt;&lt;/div&gt; &lt;font face="Consolas"&gt;&lt;font style="font-size:12pt;"&gt;&lt;/font&gt;&lt;/font&gt;  &lt;div style="margin:0in 0in 0pt;line-height:normal;"&gt;&lt;span&gt;&lt;font face="Consolas"&gt;&lt;span&gt;&lt;font style="font-size:9.5pt;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;font style="font-size:9.5pt;"&gt;&lt;span&gt;&lt;font color="#008080"&gt;SubValue&lt;/font&gt;&lt;/span&gt;&lt;span&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span&gt;&lt;font color="#0000ff"&gt;TINYINT&lt;/font&gt;&lt;/span&gt;&lt;span&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;font color="#808080"&gt;&lt;span&gt;NOT&lt;/span&gt; &lt;/font&gt;&lt;/font&gt;&lt;span&gt;&lt;font style="font-size:9.5pt;" color="#808080"&gt;NULL,&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/span&gt;&lt;/div&gt; &lt;font face="Consolas"&gt;&lt;font style="font-size:12pt;"&gt;&lt;/font&gt;&lt;/font&gt;  &lt;div style="margin:0in 0in 0pt;line-height:normal;"&gt;&lt;span&gt;&lt;font face="Consolas"&gt;&lt;span&gt;&lt;font style="font-size:9.5pt;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;font style="font-size:9.5pt;"&gt;&lt;font color="#0000ff"&gt;&lt;span&gt;PRIMARY&lt;/span&gt; &lt;span&gt;KEY&lt;/span&gt; &lt;span&gt;CLUSTERED&lt;/span&gt;&lt;/font&gt; &lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/div&gt; &lt;font face="Consolas"&gt;&lt;font style="font-size:12pt;"&gt;&lt;/font&gt;&lt;/font&gt;  &lt;div style="margin:0in 0in 0pt;line-height:normal;"&gt;&lt;font face="Consolas"&gt;&lt;span&gt;&lt;span&gt;&lt;font style="font-size:9.5pt;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;font style="font-size:9.5pt;" color="#808080"&gt;(&lt;/font&gt;&lt;/span&gt;&lt;span&gt;&lt;/span&gt;&lt;/font&gt;&lt;/div&gt; &lt;font face="Consolas"&gt;&lt;font style="font-size:12pt;"&gt;&lt;/font&gt;&lt;/font&gt;  &lt;div style="margin:0in 0in 0pt;line-height:normal;"&gt;&lt;span&gt;&lt;font face="Consolas"&gt;&lt;span&gt;&lt;font style="font-size:9.5pt;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;font style="font-size:9.5pt;"&gt;&lt;span&gt;&lt;font color="#008080"&gt;DeviceID&lt;/font&gt;&lt;/span&gt; &lt;span&gt;&lt;font color="#0000ff"&gt;ASC&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;span&gt;&lt;font style="font-size:9.5pt;" color="#808080"&gt;,&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/span&gt;&lt;/div&gt; &lt;font face="Consolas"&gt;&lt;font style="font-size:12pt;"&gt;&lt;/font&gt;&lt;/font&gt;  &lt;div style="margin:0in 0in 0pt;line-height:normal;"&gt;&lt;span&gt;&lt;font face="Consolas"&gt;&lt;span&gt;&lt;font style="font-size:9.5pt;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;font style="font-size:9.5pt;"&gt;&lt;span&gt;&lt;font color="#008080"&gt;XPath&lt;/font&gt;&lt;/span&gt; &lt;/font&gt;&lt;span&gt;&lt;font style="font-size:9.5pt;" color="#0000ff"&gt;ASC&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/span&gt;&lt;/div&gt; &lt;font face="Consolas"&gt;&lt;font style="font-size:12pt;"&gt;&lt;/font&gt;&lt;/font&gt;  &lt;div style="margin:0in 0in 0pt;line-height:normal;"&gt;&lt;span&gt;&lt;font face="Consolas"&gt;&lt;span&gt;&lt;font style="font-size:9.5pt;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/span&gt;&lt;span&gt;&lt;font style="font-size:9.5pt;" color="#808080"&gt;)&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/span&gt;&lt;/div&gt; &lt;font color="#808080" face="Consolas"&gt;&lt;font style="font-size:12pt;"&gt;&lt;/font&gt;&lt;/font&gt;  &lt;div style="margin:0in 0in 0pt;line-height:normal;"&gt;&lt;span&gt;&lt;font style="font-size:9.5pt;" color="#808080" face="Consolas"&gt;)&lt;/font&gt;&lt;/span&gt;&lt;/div&gt; &lt;font style="font-size:12pt;"&gt;&lt;/font&gt;  &lt;div style="margin:0in 0in 8pt;line-height:12pt;"&gt;&lt;font style="font-size:11pt;"&gt;&amp;#160;&lt;/font&gt;&lt;/div&gt; &lt;font style="font-size:12pt;"&gt;&lt;/font&gt;  &lt;div style="margin:0in 0in 8pt;line-height:12pt;"&gt;&lt;b&gt;&lt;font style="font-size:11pt;"&gt;NOTE:&lt;/font&gt;&lt;/b&gt;&lt;font style="font-size:11pt;"&gt; &lt;font face="Calibri"&gt;Check the properties of joins before using join hints. Loop joins can explode in cost when scans, including range scans, are performed on the inner table (the table accessed second). However; the join in the MERGE is primary key to primary key. In this case, there is no chance for range scans on the inner table, and therefore, the risk of cost explosion on the loop join is eliminated.&lt;/font&gt; &lt;/font&gt;&lt;/div&gt; &lt;font style="font-size:12pt;"&gt;&lt;/font&gt;  &lt;h1 style="margin:12pt 0in 0pt;line-height:17pt;"&gt;&lt;font style="font-size:16pt;" color="#2e74b5"&gt;Testing the Optimization&lt;/font&gt;&lt;/h1&gt; &lt;font style="font-size:12pt;"&gt;&lt;/font&gt;  &lt;div style="margin:0in 0in 8pt;line-height:12pt;"&gt;&lt;font style="font-size:11pt;" face="Calibri"&gt;Performance was tested by running multiple concurrent processes to process data. Elapsed time was measured as only the time it took to execute the three stored procedures for the in-processing of the new data. In different tests, the amount of data changed in each incoming data set varied so that measurements could be taken with 10%, 18%, 25%, or 100% modified data. Since 10% was determined to be the most that would ever be seen on any particular processing day, the changed percentage of 10% was used as the main indicator of the amount of improvement the optimizations would yield, and other percentages were used to give an indication of what might happen should an exceptional day produce much different data.&lt;/font&gt;&lt;/div&gt; &lt;font face="Calibri"&gt;&lt;font style="font-size:12pt;"&gt;&lt;/font&gt;&lt;/font&gt;  &lt;div style="margin:0in 0in 8pt;line-height:12pt;"&gt;&lt;font style="font-size:11pt;" face="Calibri"&gt;To test headroom, the tests were run with 4, 8, 12, and 16 concurrent processes. 8 was considered to be the number of worker roles that would normally be processing data, so this was the main test of record. Testing with 12 and 16 concurrent processes allowed us to determine if it was likely that adding worker roles improved or hurt throughput, and thus evaluate whether bursts above the normal level of processing could be handled by scaling out the worker role tier. &lt;/font&gt;&lt;/div&gt; &lt;font face="Calibri"&gt;&lt;font style="font-size:12pt;"&gt;&lt;/font&gt;&lt;/font&gt;  &lt;div style="margin:0in 0in 8pt;line-height:12pt;"&gt;&lt;font style="font-size:11pt;" face="Calibri"&gt;In the tests, data was processed with no delay between data sets, and the elapsed time to process the data into the database was recorded. Initially, 8000 tests were run and statistics taken on it to give the indication. However; the number of tests was reduced to 1000 when comparing just the original stored procedures with the optimized stored procedures because the original method produced so much contention that it became obvious with the lower number of tests that the optimizations were worthwhile.&lt;/font&gt;&lt;/div&gt; &lt;font face="Calibri"&gt;&lt;font style="font-size:12pt;"&gt;&lt;/font&gt;&lt;/font&gt;  &lt;div style="margin:0in 0in 8pt;line-height:12pt;"&gt;&lt;font style="font-size:11pt;" face="Calibri"&gt;The comparison between stored procedures with 8 concurrent processes was:&lt;/font&gt;&lt;/div&gt; &lt;font style="font-size:12pt;"&gt;&lt;/font&gt;  &lt;table cellspacing="0" cellpadding="0" border="1"&gt;&lt;tbody&gt;     &lt;tr&gt;       &lt;td valign="top" width="195"&gt;         &lt;p&gt;&lt;strong&gt; Milliseconds&lt;/strong&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td valign="top" width="286"&gt;         &lt;p&gt;&lt;strong&gt; Original Stored Procedures and Tables&lt;/strong&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td valign="top" width="299"&gt;         &lt;p&gt;&lt;strong&gt; Optimized Stored Procedures and Tables&lt;/strong&gt;&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="195"&gt;         &lt;p&gt;&lt;b&gt; AVG&lt;/b&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td valign="top" width="286"&gt;         &lt;p&gt; 13095.27&lt;/p&gt;       &lt;/td&gt;        &lt;td valign="top" width="299"&gt;         &lt;p&gt; 422.91&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="195"&gt;         &lt;p&gt;&lt;b&gt; Median&lt;/b&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td valign="top" width="286"&gt;         &lt;p&gt; 12553.00&lt;/p&gt;       &lt;/td&gt;        &lt;td valign="top" width="299"&gt;         &lt;p&gt; 356.00&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="195"&gt;         &lt;p&gt;&lt;b&gt; Standard Deviation&lt;/b&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td valign="top" width="286"&gt;         &lt;p&gt; 3489.15&lt;/p&gt;       &lt;/td&gt;        &lt;td valign="top" width="299"&gt;         &lt;p&gt; 255.88&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="195"&gt;         &lt;p&gt;&lt;b&gt; Max&lt;/b&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td valign="top" width="286"&gt;         &lt;p&gt; 32306&lt;/p&gt;       &lt;/td&gt;        &lt;td valign="top" width="299"&gt;         &lt;p&gt; 2750&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="195"&gt;         &lt;p&gt;&lt;b&gt; Min&lt;/b&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td valign="top" width="286"&gt;         &lt;p&gt; 4460&lt;/p&gt;       &lt;/td&gt;        &lt;td valign="top" width="299"&gt;         &lt;p&gt; 210&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td valign="top" width="195"&gt;         &lt;p&gt;&lt;b&gt; MS/Device*&lt;/b&gt;&lt;/p&gt;       &lt;/td&gt;        &lt;td valign="top" width="286"&gt;         &lt;p&gt; 1636.91&lt;/p&gt;       &lt;/td&gt;        &lt;td valign="top" width="299"&gt;         &lt;p&gt; 52.86&lt;/p&gt;       &lt;/td&gt;     &lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt; &lt;font style="font-size:12pt;"&gt;&lt;/font&gt;  &lt;div style="margin:0in 0in 8pt;line-height:12pt;"&gt;&lt;font size="1"&gt;&lt;strong&gt;* MS/Device was calculated as the average time/number of concurrent processes. It can be read as “On average, one device was processed every ____ milliseconds.” One device every 53 milliseconds is well within the requirement of 6 devices per second.&lt;/strong&gt;&lt;/font&gt;&lt;/div&gt; &lt;font style="font-size:12pt;"&gt;&lt;/font&gt;  &lt;h1 style="margin:12pt 0in 0pt;line-height:17pt;"&gt;&lt;b&gt;&lt;font style="font-size:16pt;" color="#2e74b5"&gt;Conclusion&lt;/font&gt;&lt;/b&gt;&lt;/h1&gt; &lt;font style="font-size:12pt;"&gt;&lt;/font&gt;  &lt;div style="margin:0in 0in 8pt;line-height:12pt;"&gt;&lt;font style="font-size:11pt;" face="Calibri"&gt;The question of whether to use SqlBulkCopy or TVP is not always a question of which operates faster. When not all the data that is received actually changes data in the table, using a TVP as a parameter for a stored procedure, and optimizing appropriately can lead to very significant performance advantages over other methods that must delete and insert full sets only.&lt;/font&gt;&lt;/div&gt; &lt;font face="Calibri"&gt;&lt;font style="font-size:12pt;"&gt;&lt;/font&gt;&lt;/font&gt;  &lt;div style="margin:0in 0in 8pt;line-height:12pt;"&gt;&lt;font style="font-size:11pt;" face="Calibri"&gt;Additionally, ensuring the underlying tables do not make use of IDENTITY columns or other order-forcing mechanism allows for data modifications to be spread over multiple database pages, thus removing the potential for contention for the single, last-page where ordered writes of new data will be performed.&lt;/font&gt;&lt;/div&gt; &lt;font style="font-size:12pt;"&gt;&lt;/font&gt;  &lt;div style="margin:0in 0in 8pt;line-height:12pt;"&gt;&lt;font style="font-size:11pt;"&gt;&amp;#160;&lt;/font&gt;&lt;/div&gt; &lt;font style="font-size:12pt;"&gt;&lt;/font&gt;  &lt;h1 style="margin:12pt 0in 0pt;line-height:17pt;"&gt;&lt;b&gt;&lt;font style="font-size:16pt;" color="#2e74b5"&gt;Related Reading&lt;/font&gt;&lt;/b&gt;&lt;/h1&gt; &lt;font style="font-size:12pt;"&gt;&lt;/font&gt;  &lt;div style="margin:0in 0in 8pt;line-height:12pt;"&gt;&lt;font style="font-size:11pt;"&gt;&amp;#160;&lt;/font&gt;&lt;/div&gt; &lt;font style="font-size:12pt;"&gt;&lt;/font&gt;  &lt;div style="margin:0in 0in 8pt;line-height:12pt;"&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/windowsazure/dn132615.aspx"&gt;&lt;font style="font-size:11pt;" face="Calibri"&gt;Batching Techniques for SQL Database Applications in Windows Azure&lt;/font&gt;&lt;/a&gt;&lt;/div&gt; &lt;font face="Calibri"&gt;&lt;font style="font-size:12pt;"&gt;&lt;/font&gt;&lt;/font&gt;  &lt;div style="margin:0in 0in 8pt;line-height:12pt;"&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/bb510625.aspx"&gt;&lt;font style="font-size:11pt;" face="Calibri"&gt;Merge (Transact-SQL)&lt;/font&gt;&lt;/a&gt;&lt;/div&gt; &lt;font face="Calibri"&gt;&lt;font style="font-size:12pt;"&gt;&lt;/font&gt;&lt;/font&gt;  &lt;div style="margin:0in 0in 8pt;line-height:12pt;"&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/system.data.sqlclient.sqlbulkcopy.aspx"&gt;&lt;font style="font-size:11pt;" face="Calibri"&gt;SqlBulkCopy Class&lt;/font&gt;&lt;/a&gt;&lt;/div&gt; &lt;font style="font-size:12pt;"&gt;&lt;/font&gt;  &lt;div style="margin:0in 0in 8pt;line-height:12pt;"&gt;&lt;font style="font-size:11pt;"&gt;&amp;#160;&lt;/font&gt;&lt;/div&gt; &lt;font style="font-size:12pt;"&gt;&lt;/font&gt;  &lt;div style="margin:0in 0in 8pt;line-height:12pt;"&gt;&lt;font style="font-size:11pt;"&gt;&amp;#160;&lt;/font&gt;&lt;/div&gt; &lt;font style="font-size:12pt;"&gt;&lt;/font&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://sqlcat.com/aggbug.aspx?PostID=2828" width="1" height="1"&gt;</description><category domain="http://sqlcat.com/sqlCat/b/technicalnotes/archive/tags/Azure+SQL+Database+MERGE+Optimization+Throughput/default.aspx">Azure SQL Database MERGE Optimization Throughput</category></item><item><title>Performance Guidance for SQL Server in Windows Azure Virtual Machines</title><link>http://sqlcat.com/sqlCat/b/whitepapers/archive/2013/05/31/performance-guidance-for-sql-server-in-windows-azure-virtual-machines.aspx</link><pubDate>Sat, 01 Jun 2013 00:41:00 GMT</pubDate><guid isPermaLink="false">e9619797-5f48-4d02-a1a8-7f300d09be66:2819</guid><dc:creator>SanjayMishra</dc:creator><slash:comments>1</slash:comments><description>&lt;p&gt;&lt;span style="font-size:small;"&gt;&lt;strong&gt;Authors&lt;/strong&gt;: Silvano Coriani, Jasraj Dange, Ewan Fairweather, Xin Jin, Alexei Khalyako, Sanjay Mishra, Selcin Turkarslan&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:small;"&gt;&lt;strong&gt;Technical Reviewers&lt;/strong&gt;: Mark Russinovich, Brad Calder, Andrew Edwards, Suraj Puri, Flavio Muratore, Hanuma Kodavalla, Madhan Arumugam Ramakrishnan, Naveen Prakash, Robert Dorr, Roger Doherty, Steve Howard, Yorihito Tada, Kun Cheng, Chris Clayton, Igor Pagliai, Shep Sheppard, Tim Wieman, Greg Low, Juergen Thomas, Guy Bowerman, Evgeny Krivosheev&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:small;"&gt;&lt;strong&gt;Editor&lt;/strong&gt;: Beth Inghram&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:small;"&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/span&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:small;"&gt;&lt;strong&gt;&lt;/strong&gt;&lt;/span&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:small;"&gt;&lt;strong&gt;Summary&lt;/strong&gt;: Developers and IT professionals should be fully knowledgeable about how to optimize the performance of SQL Server workloads running in Windows Azure Infrastructure Services and in more traditional on-premises environments. This technical article discusses the key factors to consider when evaluating performance and planning a migration to SQL Server in Windows Azure Virtual Machines. It also provides certain best practices and techniques for performance tuning and troubleshooting when using SQL Server in Windows Azure Infrastructure Services. &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:small;"&gt;&lt;/span&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:small;"&gt;Read on: &lt;a title="http://download.microsoft.com/download/D/2/0/D20E1C5F-72EA-4505-9F26-FEF9550EFD44/Performance%20Guidance%20for%20SQL%20Server%20in%20Windows%20Azure%20Virtual%20Machines.docx" href="http://download.microsoft.com/download/D/2/0/D20E1C5F-72EA-4505-9F26-FEF9550EFD44/Performance%20Guidance%20for%20SQL%20Server%20in%20Windows%20Azure%20Virtual%20Machines.docx" target="_blank"&gt;Performance Guidance for SQL Server in Windows Azure Virtual Machines&lt;/a&gt;.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://sqlcat.com/aggbug.aspx?PostID=2819" width="1" height="1"&gt;</description><category domain="http://sqlcat.com/sqlCat/b/whitepapers/archive/tags/Performance/default.aspx">Performance</category><category domain="http://sqlcat.com/sqlCat/b/whitepapers/archive/tags/SQL+Server/default.aspx">SQL Server</category><category domain="http://sqlcat.com/sqlCat/b/whitepapers/archive/tags/Azure/default.aspx">Azure</category><category domain="http://sqlcat.com/sqlCat/b/whitepapers/archive/tags/Infrastructure+Services/default.aspx">Infrastructure Services</category><category domain="http://sqlcat.com/sqlCat/b/whitepapers/archive/tags/Virtual+Machines/default.aspx">Virtual Machines</category><category domain="http://sqlcat.com/sqlCat/b/whitepapers/archive/tags/Windows+Azure/default.aspx">Windows Azure</category><category domain="http://sqlcat.com/sqlCat/b/whitepapers/archive/tags/SQL_2F00_IaaS/default.aspx">SQL/IaaS</category><category domain="http://sqlcat.com/sqlCat/b/whitepapers/archive/tags/IaaS/default.aspx">IaaS</category></item><item><title>Building Great Cloud Applications - Decoded</title><link>http://sqlcat.com/sqlCat/b/msdnmirror/archive/2013/05/07/building-great-cloud-applications-decoded.aspx</link><pubDate>Tue, 07 May 2013 23:49:00 GMT</pubDate><guid isPermaLink="false">e9619797-5f48-4d02-a1a8-7f300d09be66:2809</guid><dc:creator>jenlussier</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;The application you write on premise is written to a piece of software purchased, installed and configured on a piece of computer hardware that you privately own.&amp;nbsp; The application you write in the cloud is written to a set of services that are available to you as well as the public to exploit.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogs.msdn.com/b/windowsazure/archive/2013/05/07/writing-a-cloud-application-is-easy-writing-a-good-cloud-application-is-harder.aspx"&gt;Read here&lt;/a&gt; to learn about how they are different.&amp;nbsp; We also provide &lt;a href="http://code.msdn.microsoft.com/Cloud-Fundamentals-in-1a3ab1bd"&gt;Cloud Service fundamentals code on Code Gallery&lt;/a&gt;.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://sqlcat.com/aggbug.aspx?PostID=2809" width="1" height="1"&gt;</description><category domain="http://sqlcat.com/sqlCat/b/msdnmirror/archive/tags/Development+_2600_amp_3B00_+Programming/default.aspx">Development &amp;amp; Programming</category><category domain="http://sqlcat.com/sqlCat/b/msdnmirror/archive/tags/SQL+Azure/default.aspx">SQL Azure</category><category domain="http://sqlcat.com/sqlCat/b/msdnmirror/archive/tags/Development/default.aspx">Development</category><category domain="http://sqlcat.com/sqlCat/b/msdnmirror/archive/tags/Azure/default.aspx">Azure</category><category domain="http://sqlcat.com/sqlCat/b/msdnmirror/archive/tags/design+pattern/default.aspx">design pattern</category><category domain="http://sqlcat.com/sqlCat/b/msdnmirror/archive/tags/architecture/default.aspx">architecture</category><category domain="http://sqlcat.com/sqlCat/b/msdnmirror/archive/tags/Azure+SQL+Database/default.aspx">Azure SQL Database</category><category domain="http://sqlcat.com/sqlCat/b/msdnmirror/archive/tags/PaaS/default.aspx">PaaS</category></item><item><title>Be aware of the difference in isolation levels if porting an application from Windows Azure SQL DB to SQL Server in Windows Azure Virtual Machine</title><link>http://sqlcat.com/sqlCat/b/msdnmirror/archive/2013/04/30/be-aware-of-the-difference-in-isolation-levels-if-porting-an-application-from-windows-azure-sql-db-to-sql-server-in-windows-azure-virtual-machine.aspx</link><pubDate>Wed, 01 May 2013 06:26:00 GMT</pubDate><guid isPermaLink="false">e9619797-5f48-4d02-a1a8-7f300d09be66:2808</guid><dc:creator>SanjayMishra</dc:creator><slash:comments>1</slash:comments><description>&lt;p&gt;&lt;b&gt;Author&lt;/b&gt;: Sanjay Mishra, Tim Wieman&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Technical Reviewers&lt;/b&gt;: Mike Weiner, Shep Sheppard, Prem Mehra, Chuck Heinzelman, James Podgorski, Silvano Coriani, Madhan Arumugam Ramakrishnan, Sunil Agarwal, Guy Bowerman&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/windowsazure/ee336279.aspx"&gt;Windows Azure SQL Database&lt;/a&gt; and &lt;a href="http://msdn.microsoft.com/en-us/library/windowsazure/jj823132.aspx"&gt;SQL Server in Windows Azure Virtual Machine&lt;/a&gt; are two different data storage options and are best suited for slightly different application scenarios. Refer to the published articles on MSDN for a &lt;a href="http://blogs.msdn.com/b/windowsazure/archive/2012/06/26/data-series-sql-server-in-windows-azure-virtual-machine-vs-sql-database.aspx"&gt;comparison&lt;/a&gt;&amp;nbsp;and &lt;a href="http://blogs.msdn.com/b/windowsazure/archive/2013/02/14/choosing-between-sql-server-in-windows-azure-vm-amp-windows-azure-sql-database.aspx"&gt;how to choose&lt;/a&gt; between these options.&lt;/p&gt;
&lt;p&gt;There are certain differences between the two storage options. One important different is the isolation level of the database. Depending upon application design, difference in isolation level can impact the application concurrency, and ultimately, application performance and throughput.&lt;/p&gt;
&lt;p&gt;It is not a common practice to port databases from Windows Azure SQL Database to SQL Server in a Windows Azure VM environment. However, for some&amp;nbsp;specific unique reasons, not covered here, one of our customers performed such a migration and the only change made was to change the connection string.&lt;/p&gt;
&lt;p&gt;During the load test after the porting, we noticed that the performance of the application on SQL Server in Windows Azure VM did not match up to the performance of the application on Windows Azure SQL Database. Upon further investigation, we found much higher volume of&amp;nbsp; lock waits under SQL Server in Windows Azure VM.&lt;/p&gt;
&lt;p&gt;The key difference that impacted the application behavior is the isolation level of the two databases. On Windows Azure SQL Database, the isolation level settings for READ COMMITTED SNAPSHOT and SNAPSHOT ISOLATION are turned on:&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:courier new,courier;"&gt;select name, snapshot_isolation_state, is_read_committed_snapshot_on from sys.databases&lt;/span&gt;&lt;/p&gt;
&lt;table align="left" style="border-width:1px;border-style:solid;width:593px;height:44px;" border="1" frame="border"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;name&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;snapshot_isolation_state&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;is_read_committed_snapshot_on&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;CustomerDB&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;On a SQL Server database (running on Windows Azure VirtualMachine, or on-premises), the isolation level settings for READ COMMITTED SNAPSHOT and SNAPSHOT ISOLATION are turned off, by default:&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:courier new,courier;"&gt;select name, snapshot_isolation_state, is_read_committed_snapshot_on from sys.databases&lt;/span&gt;&lt;/p&gt;
&lt;table align="left" style="border-width:1px;border-style:solid;width:592px;height:44px;" border="1" frame="border"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;name&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;snapshot_isolation_state&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;is_read_committed_snapshot_on&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;CustomerDB&lt;/td&gt;
&lt;td&gt;0&lt;/td&gt;
&lt;td&gt;0&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The customer application was designed and developed on Windows Azure SQL Database and it did make use of READ COMMITTED SNAPSHOT ISOLATION (RCSI).&lt;/p&gt;
&lt;p&gt;The performance comparison of the two data storage options, under default settings:&lt;/p&gt;
&lt;table align="left" style="width:589px;height:88px;" border="1"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Data Platform&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Application Response Time (sec)&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Application Throughput (web pages / sec)&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;span style="color:black;line-height:115%;font-family:&amp;#39;Calibri&amp;#39;,&amp;#39;sans-serif&amp;#39;;font-size:11pt;"&gt;Windows Azure SQL Database&lt;/span&gt;&lt;/td&gt;
&lt;td&gt;&lt;span style="line-height:115%;font-family:&amp;#39;Calibri&amp;#39;,&amp;#39;sans-serif&amp;#39;;font-size:11pt;"&gt;0.83&lt;/span&gt;&lt;/td&gt;
&lt;td&gt;&lt;span style="line-height:115%;font-family:&amp;#39;Calibri&amp;#39;,&amp;#39;sans-serif&amp;#39;;font-size:11pt;"&gt;38&lt;/span&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;span style="color:black;line-height:115%;font-family:&amp;#39;Calibri&amp;#39;,&amp;#39;sans-serif&amp;#39;;font-size:11pt;"&gt;SQL Server in Windows Azure VM (default)&lt;/span&gt;&lt;/td&gt;
&lt;td&gt;&lt;span style="line-height:115%;font-family:&amp;#39;Calibri&amp;#39;,&amp;#39;sans-serif&amp;#39;;font-size:11pt;"&gt;2.94&lt;/span&gt;&lt;/td&gt;
&lt;td&gt;&lt;span style="line-height:115%;font-family:&amp;#39;Calibri&amp;#39;,&amp;#39;sans-serif&amp;#39;;font-size:11pt;"&gt;13.9&lt;/span&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;As you can see, the application throughput for SQL Server in Windows Azure VM was almost one-third of the throughput with the database on Windows Azure SQL Database.&amp;nbsp; One of the important goals of the load testing was to ensure application response time under 2 seconds. For SQL Server in Windows Azure VM, under default settings, the application response time was more than the 2 second threshold the customer had set. Analyzing waitstats perfmon counters (counter &amp;ldquo;Lock Waits&amp;rdquo; under object =&amp;gt; &amp;ldquo;SQL Server:Wait Statistics&amp;rdquo;, instance =&amp;gt; &amp;ldquo;Average wait time (ms)&amp;rdquo;), we observed about 1 sec average wait time for locks.&lt;/p&gt;
&lt;p&gt;With RCSI turned on, the average lock wait time came down to a few milliseconds, application throughput significantly improved, and the application response time significantly improved.&lt;/p&gt;
&lt;table align="left" style="width:590px;height:71px;" border="1"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Data Platform&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Application Response Time (sec)&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;Application Throughput (web pages / sec)&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;span style="color:black;line-height:115%;font-family:&amp;#39;Calibri&amp;#39;,&amp;#39;sans-serif&amp;#39;;font-size:11pt;"&gt;SQL Server in Windows Azure VM (default)&lt;/span&gt;&lt;/td&gt;
&lt;td&gt;2.94&lt;/td&gt;
&lt;td&gt;13.9&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;span style="color:black;line-height:115%;font-family:&amp;#39;Calibri&amp;#39;,&amp;#39;sans-serif&amp;#39;;font-size:11pt;"&gt;SQL Server in Windows Azure VM (with RCSI)&lt;/span&gt;&lt;/td&gt;
&lt;td&gt;&lt;span style="line-height:115%;font-family:&amp;#39;Calibri&amp;#39;,&amp;#39;sans-serif&amp;#39;;font-size:11pt;"&gt;1.14&lt;/span&gt;&lt;/td&gt;
&lt;td&gt;&lt;span style="line-height:115%;font-family:&amp;#39;Calibri&amp;#39;,&amp;#39;sans-serif&amp;#39;;font-size:11pt;"&gt;34.8&lt;/span&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;span style="text-decoration:underline;"&gt;&lt;/span&gt;&lt;/b&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;span style="text-decoration:underline;"&gt;&lt;/span&gt;&lt;/b&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;span style="text-decoration:underline;"&gt;Important Note&lt;/span&gt;:&lt;/b&gt;&amp;nbsp; When turning on &lt;a href="http://msdn.microsoft.com/en-us/library/ms177404(v=sql.105).aspx"&gt;RCSI&lt;/a&gt;, be aware that SQL Server maintains the version store in the TEMPDB database, and you may observe significant activity in TEMPDB.&amp;nbsp; Therefore, appropriate capacity and throughput must be planned for TEMPDB.&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;For example, for this specific scenario, after enabling RCSI, the increased throughput demands of TEMPDB necessitated scaling out TEMPDB data files to multiple data disks.&amp;nbsp; Following is the TEMPDB disk I/O throughput comparison before and after RCSI:&lt;/p&gt;
&lt;table align="center" style="width:581px;height:74px;" border="1"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;b&gt;&lt;span style="color:black;line-height:115%;font-family:&amp;#39;Calibri&amp;#39;,&amp;#39;sans-serif&amp;#39;;font-size:11pt;"&gt;Data Platform&lt;/span&gt;&lt;/b&gt;&lt;/td&gt;
&lt;td&gt;&lt;b&gt;&lt;span style="color:black;line-height:115%;font-family:&amp;#39;Calibri&amp;#39;,&amp;#39;sans-serif&amp;#39;;font-size:11pt;"&gt;Disk Read Bytes / sec&lt;/span&gt;&lt;/b&gt;&lt;/td&gt;
&lt;td&gt;&lt;b&gt;&lt;span style="color:black;line-height:115%;font-family:&amp;#39;Calibri&amp;#39;,&amp;#39;sans-serif&amp;#39;;font-size:11pt;"&gt;Disk Write Bytes / sec&lt;/span&gt;&lt;/b&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;span style="color:black;line-height:115%;font-family:&amp;#39;Calibri&amp;#39;,&amp;#39;sans-serif&amp;#39;;font-size:11pt;"&gt;SQL Server in Windows Azure VM (default)&lt;/span&gt;&lt;/td&gt;
&lt;td&gt;&lt;span style="line-height:115%;font-family:&amp;#39;Calibri&amp;#39;,&amp;#39;sans-serif&amp;#39;;font-size:11pt;"&gt;403,031&lt;/span&gt;&lt;/td&gt;
&lt;td&gt;&lt;span style="line-height:115%;font-family:&amp;#39;Calibri&amp;#39;,&amp;#39;sans-serif&amp;#39;;font-size:11pt;"&gt;1,504,410&lt;/span&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;span style="color:black;line-height:115%;font-family:&amp;#39;Calibri&amp;#39;,&amp;#39;sans-serif&amp;#39;;font-size:11pt;"&gt;SQL Server in Windows Azure VM (with RCSI)&lt;/span&gt;&lt;/td&gt;
&lt;td&gt;&lt;span style="line-height:115%;font-family:&amp;#39;Calibri&amp;#39;,&amp;#39;sans-serif&amp;#39;;font-size:11pt;"&gt;26,570,531&lt;/span&gt;&lt;/td&gt;
&lt;td&gt;&lt;span style="line-height:115%;font-family:&amp;#39;Calibri&amp;#39;,&amp;#39;sans-serif&amp;#39;;font-size:11pt;"&gt;58,219,559&lt;/span&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;span style="text-decoration:underline;"&gt;Further Reading:&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/windowsazure/jj879332.aspx"&gt;Windows Azure SQL Database and SQL Server -- Performance and Scalability Compared and Contrasted&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/ms189122(v=SQL.105).aspx"&gt;Isolation Levels in the Database Engine&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://sqlcat.com/aggbug.aspx?PostID=2808" width="1" height="1"&gt;</description><category domain="http://sqlcat.com/sqlCat/b/msdnmirror/archive/tags/read+committed+snapshot+isolation/default.aspx">read committed snapshot isolation</category><category domain="http://sqlcat.com/sqlCat/b/msdnmirror/archive/tags/RCSI/default.aspx">RCSI</category><category domain="http://sqlcat.com/sqlCat/b/msdnmirror/archive/tags/SQL+Azure/default.aspx">SQL Azure</category><category domain="http://sqlcat.com/sqlCat/b/msdnmirror/archive/tags/Blocking/default.aspx">Blocking</category><category domain="http://sqlcat.com/sqlCat/b/msdnmirror/archive/tags/Isolation+Level/default.aspx">Isolation Level</category><category domain="http://sqlcat.com/sqlCat/b/msdnmirror/archive/tags/Virtual+Machine/default.aspx">Virtual Machine</category><category domain="http://sqlcat.com/sqlCat/b/msdnmirror/archive/tags/Windows+Azure+VM/default.aspx">Windows Azure VM</category><category domain="http://sqlcat.com/sqlCat/b/msdnmirror/archive/tags/SQL_2F00_IaaS/default.aspx">SQL/IaaS</category><category domain="http://sqlcat.com/sqlCat/b/msdnmirror/archive/tags/Azure+SQL+DB/default.aspx">Azure SQL DB</category></item><item><title>Batching Techniques for SQL Database Applications in Windows Azure</title><link>http://sqlcat.com/sqlCat/b/msdnmirror/archive/2013/04/09/batching-techniques-for-sql-database-applications-in-windows-azure.aspx</link><pubDate>Tue, 09 Apr 2013 20:33:00 GMT</pubDate><guid isPermaLink="false">e9619797-5f48-4d02-a1a8-7f300d09be66:2801</guid><dc:creator>Silvano Coriani</dc:creator><slash:comments>1</slash:comments><description>&lt;p&gt;Batching operations to SQL Database significantly improves the performance and scalability of cloud services in Windows Azure. This paper first demonstrates the effectiveness of batching. It then covers the techniques, scenarios, and considerations to help you to use batching successfully in your cloud services. There are fixed processing costs to any interactions with a remote service, such as serialization, network transfer, and deserialization. Packaging many separate transactions into a single batch minimizes these costs.&lt;/p&gt;
&lt;p&gt;In &lt;a title="this" href="http://msdn.microsoft.com/en-us/library/dn132615.aspx"&gt;this&lt;/a&gt; paper, we want to examine various SQL Database batching strategies and scenarios. Although these strategies are also important for on-premises applications that use SQL Server, there are two main reasons for highlighting the use of batching for SQL Database:&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://sqlcat.com/aggbug.aspx?PostID=2801" width="1" height="1"&gt;</description><category domain="http://sqlcat.com/sqlCat/b/msdnmirror/archive/tags/Performance+and+Scalability/default.aspx">Performance and Scalability</category></item><item><title>Windows Azure SQL Database and SQL Server - Performance and Scalability Compared and Contrasted</title><link>http://sqlcat.com/sqlCat/b/msdnmirror/archive/2013/02/08/windows-azure-sql-database-and-sql-server-performance-and-scalability-compared-and-contrasted.aspx</link><pubDate>Fri, 08 Feb 2013 22:03:00 GMT</pubDate><guid isPermaLink="false">e9619797-5f48-4d02-a1a8-7f300d09be66:2790</guid><dc:creator>Silvano Coriani</dc:creator><slash:comments>1</slash:comments><description>&lt;p&gt;Curious about the differences in approaching performance and scalability in SQL Server vs. Windows Azure SQL Database (formerly SQL Azure)? Check out this new paper...&lt;/p&gt;...(&lt;a href="http://sqlcat.com/sqlCat/b/msdnmirror/archive/2013/02/08/windows-azure-sql-database-and-sql-server-performance-and-scalability-compared-and-contrasted.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://sqlcat.com/aggbug.aspx?PostID=2790" width="1" height="1"&gt;</description><category domain="http://sqlcat.com/sqlCat/b/msdnmirror/archive/tags/Performance+and+Scalability/default.aspx">Performance and Scalability</category><category domain="http://sqlcat.com/sqlCat/b/msdnmirror/archive/tags/Data+Warehouse/default.aspx">Data Warehouse</category><category domain="http://sqlcat.com/sqlCat/b/msdnmirror/archive/tags/SQL+Azure/default.aspx">SQL Azure</category><category domain="http://sqlcat.com/sqlCat/b/msdnmirror/archive/tags/Cloud/default.aspx">Cloud</category><category domain="http://sqlcat.com/sqlCat/b/msdnmirror/archive/tags/Business+Intelligence/default.aspx">Business Intelligence</category><category domain="http://sqlcat.com/sqlCat/b/msdnmirror/archive/tags/OLTP/default.aspx">OLTP</category></item><item><title>SSIS Tips Tricks and Best Practices: SSIS Operational and Tuning Guide</title><link>http://sqlcat.com/sqlCat/b/whitepapers/archive/2013/01/02/ssis-tips-tricks-and-best-practices-ssis-operational-and-tuning-guide.aspx</link><pubDate>Wed, 02 Jan 2013 17:39:58 GMT</pubDate><guid isPermaLink="false">e9619797-5f48-4d02-a1a8-7f300d09be66:2778</guid><dc:creator>sthoward</dc:creator><slash:comments>1</slash:comments><description>&lt;p&gt;&lt;img alt=" " src="http://i.msdn.microsoft.com/dynimg/IC596043.jpg" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;SSIS Operational and Tuning Guide&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;SQL Server Technical Article&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Writer:&lt;/strong&gt; Alexei Khalyako, Carla Sabotta, Silvano Coriani, Sreedhar Pelluru, Steve Howard&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Technical Reviewer:&lt;/strong&gt; Cindy Gross, David Pless, Mark Simms, Daniel Sol&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Published:&lt;/strong&gt; December 2012&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Applies to:&lt;/strong&gt; SQL Server 2012; Windows Azure SQL Database&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Summary:&lt;/strong&gt; SQL Server Integration Services (SSIS) can be used effectively as a tool for moving data to and from Windows Azure (WA) SQL Database, as part of the total extract, transform, and load (ETL) solution and as part of the data movement solution. SSIS can be used effectively to move data between sources and destinations in the cloud, and in a hybrid scenario between the cloud and on-premise. This paper outlines SSIS best practices for cloud sources and destinations, discusses project planning for SSIS projects whether the project is all in the cloud or involves hybrid data moves, and walks through an example of maximizing performance on a hybrid move by scaling out the data movement.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;To review the document, please download the &lt;a href="http://download.microsoft.com/download/D/2/0/D20E1C5F-72EA-4505-9F26-FEF9550EFD44/SSIS%20Operational%20and%20Tuning%20Guide.docx"&gt;SSIS Operational and Tuning Guide&lt;/a&gt; Word document.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://sqlcat.com/aggbug.aspx?PostID=2778" width="1" height="1"&gt;</description><category domain="http://sqlcat.com/sqlCat/b/whitepapers/archive/tags/Business+Intelligence/default.aspx">Business Intelligence</category><category domain="http://sqlcat.com/sqlCat/b/whitepapers/archive/tags/Azure/default.aspx">Azure</category><category domain="http://sqlcat.com/sqlCat/b/whitepapers/archive/tags/Data+Movement/default.aspx">Data Movement</category><category domain="http://sqlcat.com/sqlCat/b/whitepapers/archive/tags/SSIS/default.aspx">SSIS</category><category domain="http://sqlcat.com/sqlCat/b/whitepapers/archive/tags/Cloud/default.aspx">Cloud</category></item><item><title>SSIS Tips Tricks and Best Practices: SSIS for Azure and Hybrid Data Movement</title><link>http://sqlcat.com/sqlCat/b/whitepapers/archive/2013/01/02/ssis-tips-tricks-and-best-practices-ssis-for-azure-and-hybrid-data-movement.aspx</link><pubDate>Wed, 02 Jan 2013 17:36:00 GMT</pubDate><guid isPermaLink="false">e9619797-5f48-4d02-a1a8-7f300d09be66:2777</guid><dc:creator>sthoward</dc:creator><slash:comments>1</slash:comments><description>&lt;p&gt;&lt;img alt=" " src="http://i.msdn.microsoft.com/dynimg/IC596043.jpg" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;SSIS for Azure and Hybrid Data Movement&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;SQL Server Technical Article&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Writer:&lt;/strong&gt; Alexei Khalyako, Carla Sabotta, Daniel Sol, Silvano Coriani, Sreedhar Pelluru, Steve Howard&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Technical Reviewer:&lt;/strong&gt; David Pless&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Published:&lt;/strong&gt; December 2012&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Applies to:&lt;/strong&gt; SQL Server 2012&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Summary:&lt;/strong&gt; SQL Server Integration Services (SSIS) can be used effectively as a tool for moving data to and from Windows Azure SQL Database, as part of the total extract, transform, and load (ETL) solution and as part of the data movement solution. SSIS can be used effectively to move data between sources and destinations in the cloud, and in a hybrid scenario between the cloud and on-premise. This paper outlines best practices for using SSIS for cloud sources and destinations and for project planning for SSIS projects to be used with Azure or hybrid data moves, and gives an example of maximizing performance on a hybrid move by scaling out the data movement.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;To review the document, please download the &lt;a href="http://download.microsoft.com/download/D/2/0/D20E1C5F-72EA-4505-9F26-FEF9550EFD44/SSIS%20Hybrid%20and%20Azure.docx"&gt;SSIS for Azure and Hybrid Data Movement&lt;/a&gt; Word document.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://sqlcat.com/aggbug.aspx?PostID=2777" width="1" height="1"&gt;</description><category domain="http://sqlcat.com/sqlCat/b/whitepapers/archive/tags/Azure/default.aspx">Azure</category><category domain="http://sqlcat.com/sqlCat/b/whitepapers/archive/tags/Data+Movement/default.aspx">Data Movement</category><category domain="http://sqlcat.com/sqlCat/b/whitepapers/archive/tags/SSIS/default.aspx">SSIS</category></item><item><title>SQL Clinic at PASS Summit 2012</title><link>http://sqlcat.com/sqlCat/b/msdnmirror/archive/2012/11/02/sql-clinic-at-pass-summit-2012.aspx</link><pubDate>Sat, 03 Nov 2012 00:10:00 GMT</pubDate><guid isPermaLink="false">e9619797-5f48-4d02-a1a8-7f300d09be66:2760</guid><dc:creator>SanjayMishra</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;&lt;span style="font-family:tahoma,arial,helvetica,sans-serif;"&gt;SQLCAT joins hands with CSS to bring you SQL Clinic.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:tahoma,arial,helvetica,sans-serif;"&gt;Bring your design / architecture questions, and real world troubleshooting issues and get expert help.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:tahoma,arial,helvetica,sans-serif;"&gt;Clinic Hours:&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style="font-family:tahoma,arial,helvetica,sans-serif;"&gt;Wednesday&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;ul&gt;
&lt;ul&gt;
&lt;li&gt;07:00 &amp;ndash; 08:00&lt;/li&gt;
&lt;li&gt;10:00 &amp;ndash; 18:15&lt;/li&gt;
&lt;/ul&gt;
&lt;/ul&gt;
&lt;ul&gt;&lt;li&gt;Thursday&lt;/li&gt;
&lt;/ul&gt;&lt;ul&gt;
&lt;ul&gt;
&lt;li&gt;07:00 &amp;ndash; 08:00&lt;/li&gt;
&lt;li&gt;10:00 &amp;ndash; 18:30&lt;/li&gt;
&lt;/ul&gt;
&lt;/ul&gt;
&lt;ul&gt;&lt;li&gt;Friday&lt;/li&gt;
&lt;/ul&gt;&lt;ul&gt;
&lt;ul&gt;
&lt;li&gt;07:00 &amp;ndash; 14:00&lt;/li&gt;
&lt;/ul&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;br /&gt;Note that the Clinic has moved from past years&amp;#39; location to a newer and bigger room.&lt;/p&gt;
&lt;p&gt;It is in Room 4C-3 this year.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;If you are attending PASS Summit, you don&amp;#39;t want to miss out on the SQL Clinic experience.&lt;/p&gt;
&lt;p&gt;See you all there.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://sqlcat.com/aggbug.aspx?PostID=2760" width="1" height="1"&gt;</description></item><item><title>SQLCAT Sessions at PASS Summit 2012</title><link>http://sqlcat.com/sqlCat/b/msdnmirror/archive/2012/11/02/sqlcat-sessions-at-pass-summit-2012.aspx</link><pubDate>Sat, 03 Nov 2012 00:00:43 GMT</pubDate><guid isPermaLink="false">e9619797-5f48-4d02-a1a8-7f300d09be66:2759</guid><dc:creator>SanjayMishra</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;SQLCAT will be deeply involved in the PASS Summit 2012. There wil be several technical sessions providing indepth technical learnings and best practices derived from real-world customer experiences.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;table style="width:922px;height:1197px;" border="0" cellpadding="0"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td colspan="4"&gt;
&lt;p&gt;&lt;b&gt;Wednesday, November 07, 2012&lt;/b&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td width="115"&gt;
&lt;p&gt;10:15 AM - 11:30 AM&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;&lt;a href="http://www.sqlpass.org/summit/2012/Sessions/SessionDetails.aspx?sid=2900" target="_blank"&gt;[AD-307-M] SQLCAT: What Are the Largest SQL Server Projects in the World?&lt;/a&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;[RM:609]&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;&lt;a href="http://www.sqlpass.org/summit/2011/SummitContent/iCalDownload.aspx?dfsid=745" target="_blank"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td width="115"&gt;
&lt;p&gt;10:15 AM - 11:30 AM&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;&lt;a href="http://www.sqlpass.org/summit/2012/Sessions/SessionDetails.aspx?sid=2686" target="_blank"&gt;[BIA-305-A] SQLCAT: Big Data &amp;ndash; All Abuzz About Hive&lt;/a&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;[RM:606-607]&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;&lt;a href="http://www.sqlpass.org/summit/2011/SummitContent/iCalDownload.aspx?dfsid=741" target="_blank"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td width="115"&gt;
&lt;p&gt;10:15 AM - 11:30 AM&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;&lt;a href="http://www.sqlpass.org/summit/2012/Sessions/SessionDetails.aspx?sid=3590" target="_blank"&gt;[CLD-309-A] SQLCAT: Best Practices and Lessons Learned on SQL Server in an Azure VM&lt;/a&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;[RM:613-614]&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;&lt;a href="http://www.sqlpass.org/summit/2011/SummitContent/iCalDownload.aspx?dfsid=779" target="_blank"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td width="115"&gt;
&lt;p&gt;10:15 AM - 11:30 AM&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;&lt;a href="http://www.sqlpass.org/summit/2012/Sessions/SessionDetails.aspx?sid=3599" target="_blank"&gt;[BID-302-M] Mobile Business Intelligence&lt;/a&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;[RM:6E]&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;&lt;a href="http://www.sqlpass.org/summit/2011/SummitContent/iCalDownload.aspx?dfsid=782" target="_blank"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td width="115"&gt;
&lt;p&gt;1:30 PM - 2:45 PM&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;&lt;a href="http://www.sqlpass.org/summit/2012/Sessions/SessionDetails.aspx?sid=3602" target="_blank"&gt;[CLD-302-M] SQLCAT: How Do I Troubleshoot My Database Now that It Is in the Cloud?&lt;/a&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;[RM:305-TCC]&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;&lt;a href="http://www.sqlpass.org/summit/2011/SummitContent/iCalDownload.aspx?dfsid=784" target="_blank"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td width="115"&gt;
&lt;p&gt;1:30 PM - 2:45 PM&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;&lt;a href="http://www.sqlpass.org/summit/2012/Sessions/SessionDetails.aspx?sid=2691" target="_blank"&gt;[DBA-403-M] SQLCAT: SQLOS Memory Manager Changes in SQL Server 2012&lt;/a&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;[RM:301-TCC]&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;&lt;a href="http://www.sqlpass.org/summit/2011/SummitContent/iCalDownload.aspx?dfsid=742" target="_blank"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td width="115"&gt;
&lt;p&gt;1:30 PM - 2:45 PM&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;&lt;a href="http://www.sqlpass.org/summit/2012/Sessions/SessionDetails.aspx?sid=3542" target="_blank"&gt;[DBA-305-M] SQLCAT: Many-Core Processors, SSDs, Large Memory: How to Benefit SQL Server&lt;/a&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;[RM:613-614]&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;&lt;a href="http://www.sqlpass.org/summit/2011/SummitContent/iCalDownload.aspx?dfsid=771" target="_blank"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td width="115"&gt;
&lt;p&gt;3:00 PM - 4:15 PM&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;&lt;a href="http://www.sqlpass.org/summit/2012/Sessions/SessionDetails.aspx?sid=2980" target="_blank"&gt;[DBA-315-A] SQLCAT: AlwaysOn HA/DR Design Patterns, Architectures and Best Practices&lt;/a&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;[RM:609]&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;&lt;a href="http://www.sqlpass.org/summit/2011/SummitContent/iCalDownload.aspx?dfsid=748" target="_blank"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td width="115"&gt;
&lt;p&gt;4:45 PM - 6:00 PM&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;&lt;a href="http://www.sqlpass.org/summit/2012/Sessions/SessionDetails.aspx?sid=3555" target="_blank"&gt;[AD-402-A] SQLCAT: Real-World Case Study of Mission-Critical Active/Active Remote DCs&lt;/a&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;[RM:303-TCC]&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;&lt;a href="http://www.sqlpass.org/summit/2011/SummitContent/iCalDownload.aspx?dfsid=774" target="_blank"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td width="115"&gt;
&lt;p&gt;4:45 PM - 6:00 PM&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;&lt;a href="http://www.sqlpass.org/summit/2012/Sessions/SessionDetails.aspx?sid=2988" target="_blank"&gt;[DBA-314-M] SQLCAT: AlwaysOn Unplugged &amp;ndash; Everything You Want to Know About AlwaysOn&lt;/a&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;[RM:305-TCC]&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;&lt;a href="http://www.sqlpass.org/summit/2011/SummitContent/iCalDownload.aspx?dfsid=750" target="_blank"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td width="115"&gt;
&lt;p&gt;4:45 PM - 6:00 PM&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;&lt;a href="http://www.sqlpass.org/summit/2012/Sessions/SessionDetails.aspx?sid=3543" target="_blank"&gt;[DBA-306-M] SQLCAT: How Does Microsoft Run Its SAP Landscape on Windows and SQL Server?&lt;/a&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;[RM:307-308]&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;&lt;a href="http://www.sqlpass.org/summit/2011/SummitContent/iCalDownload.aspx?dfsid=772" target="_blank"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td width="115"&gt;
&lt;p&gt;4:45 PM - 6:00 PM&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;&lt;a href="http://www.sqlpass.org/summit/2012/Sessions/SessionDetails.aspx?sid=3652" target="_blank"&gt;[BIA-304-M] Configuring Kerberos for SharePoint 2010 BI in 7 Steps&lt;/a&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;[RM:606-607]&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;&lt;a href="http://www.sqlpass.org/summit/2011/SummitContent/iCalDownload.aspx?dfsid=789" target="_blank"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td colspan="4"&gt;
&lt;p&gt;&lt;b&gt;Thursday, November 08, 2012&lt;/b&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td width="115"&gt;
&lt;p&gt;10:15 AM - 11:30 AM&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;&lt;a href="http://www.sqlpass.org/summit/2012/Sessions/SessionDetails.aspx?sid=3500" target="_blank"&gt;[AD-300-M] Bootstrapping Data Warehousing in Azure for Use with Hadoop&lt;/a&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;[RM:612]&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;&lt;a href="http://www.sqlpass.org/summit/2011/SummitContent/iCalDownload.aspx?dfsid=769" target="_blank"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td width="115"&gt;
&lt;p&gt;1:30 PM - 2:45 PM&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;&lt;a href="http://www.sqlpass.org/summit/2012/Sessions/SessionDetails.aspx?sid=3620" target="_blank"&gt;[BID-300-M] Running Reporting Services in SharePoint Integrated Mode: How and Why&lt;/a&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;[RM:608]&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;&lt;a href="http://www.sqlpass.org/summit/2011/SummitContent/iCalDownload.aspx?dfsid=786" target="_blank"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td width="115"&gt;
&lt;p&gt;3:00 PM - 4:15 PM&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;&lt;a href="http://www.sqlpass.org/summit/2012/Sessions/SessionDetails.aspx?sid=3600" target="_blank"&gt;[CLD-300-M] SQLCAT: SQL Azure Design Patterns and Best Practices&lt;/a&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;[RM:609]&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;&lt;a href="http://www.sqlpass.org/summit/2011/SummitContent/iCalDownload.aspx?dfsid=783" target="_blank"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td width="115"&gt;
&lt;p&gt;5:00 PM - 6:15 PM&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;&lt;a href="http://www.sqlpass.org/summit/2012/Sessions/SessionDetails.aspx?sid=2981" target="_blank"&gt;[DBA-323-A] SQLCAT: SQL Server 2012 AlwaysOn HA/DR Customer Panel&lt;/a&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;[RM:608]&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;&lt;a href="http://www.sqlpass.org/summit/2011/SummitContent/iCalDownload.aspx?dfsid=796" target="_blank"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td width="115"&gt;
&lt;p&gt;5:00 PM - 6:15 PM&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;&lt;a href="http://www.sqlpass.org/summit/2012/Sessions/SessionDetails.aspx?sid=3070" target="_blank"&gt;[BIA-206-M] BI Power Hour&lt;/a&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;[RM:602-604]&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;&lt;a href="http://www.sqlpass.org/summit/2011/SummitContent/iCalDownload.aspx?dfsid=757" target="_blank"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td colspan="4"&gt;
&lt;p&gt;&lt;b&gt;Friday, November 09, 2012&lt;/b&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td width="115"&gt;
&lt;p&gt;8:00 AM - 9:15 AM&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;&lt;a href="http://www.sqlpass.org/summit/2012/Sessions/SessionDetails.aspx?sid=2901" target="_blank"&gt;[CLD-303-A] SQLCAT: What Are the Largest Azure Projects in the World?&lt;/a&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;[RM:608]&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;&lt;a href="http://www.sqlpass.org/summit/2011/SummitContent/iCalDownload.aspx?dfsid=746" target="_blank"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td width="115"&gt;
&lt;p&gt;9:45 AM - 11:00 AM&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;&lt;a href="http://www.sqlpass.org/summit/2012/Sessions/SessionDetails.aspx?sid=3571" target="_blank"&gt;[CLD-304-M] SQLCAT: Architecture Patterns and Lessons Learned from Azure ISV Projects&lt;/a&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;[RM:606-607]&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;&lt;a href="http://www.sqlpass.org/summit/2011/SummitContent/iCalDownload.aspx?dfsid=778" target="_blank"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td width="115"&gt;
&lt;p&gt;1:00 PM - 2:15 PM&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;&lt;a href="http://www.sqlpass.org/summit/2012/Sessions/SessionDetails.aspx?sid=3521" target="_blank"&gt;[CLD-308-A] SQLCAT: How SQL Azure Supports Large-Scale Customer Deployments&lt;/a&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;[RM:307-308]&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;&lt;a href="http://www.sqlpass.org/summit/2011/SummitContent/iCalDownload.aspx?dfsid=770" target="_blank"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;&lt;br /&gt;See you all at PASS Summit 2012.&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://sqlcat.com/aggbug.aspx?PostID=2759" width="1" height="1"&gt;</description><category domain="http://sqlcat.com/sqlCat/b/msdnmirror/archive/tags/Data+Warehouse/default.aspx">Data Warehouse</category><category domain="http://sqlcat.com/sqlCat/b/msdnmirror/archive/tags/Cloud/default.aspx">Cloud</category><category domain="http://sqlcat.com/sqlCat/b/msdnmirror/archive/tags/Business+Intelligence/default.aspx">Business Intelligence</category><category domain="http://sqlcat.com/sqlCat/b/msdnmirror/archive/tags/OLTP/default.aspx">OLTP</category></item><item><title>Impact of Adding a Node to a Windows Cluster on the Possible Owners property of existing SQL Server Failover Cluster Instances</title><link>http://sqlcat.com/sqlCat/b/technicalnotes/archive/2012/08/15/impact-of-adding-a-node-to-a-windows-cluster-on-the-possible-owners-property-of-existing-sql-server-failover-cluster-instances.aspx</link><pubDate>Wed, 15 Aug 2012 18:33:00 GMT</pubDate><guid isPermaLink="false">e9619797-5f48-4d02-a1a8-7f300d09be66:2731</guid><dc:creator>SanjayMishra</dc:creator><slash:comments>3</slash:comments><description>&lt;p&gt;&lt;span style="font-size:small;"&gt;&lt;b&gt;Author&lt;/b&gt;: Sanjay Mishra &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:small;"&gt;&lt;b&gt;Contributor&lt;/b&gt;:&lt;b&gt; &lt;/b&gt;David P Smith (ServiceU)&lt;b&gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:small;"&gt;&lt;b&gt;Technical Reviewers&lt;/b&gt;: Charles (Curt) Mathews, James Podgorski, Eric Kang, Prem Mehra, Min He&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:small;"&gt;&lt;span&gt;It is common to have more than one SQL Server Failover Cluster Instance (FCI) within a single Windows Server Failover Cluster (WSFC). It is also fairly common that not all nodes in the WSFC are the possible owners of all the FCIs within that WSFC. One such scenario is when you have a FCI + AG solution (&lt;a href="http://sqlcat.com/sqlcat/b/whitepapers/archive/2012/06/22/alwayson-architecture-guide-building-a-high-availability-and-disaster-recovery-solution-by-using-failover-cluster-instances-and-availability-groups.aspx" target="_blank"&gt;AlwaysOn Architecture Guide: Building a High Availability and Disaster Recovery Solution by Using Failover Cluster Instances and Availability Groups&lt;/a&gt;&lt;/span&gt;&lt;a href="http://download.microsoft.com/download/D/2/0/D20E1C5F-72EA-4505-9F26-FEF9550EFD44/Building_a_HA_and_DR_Solution_using_AlwaysON_SQL_FCIs_and_AGs%20v1.docx)"&gt;&lt;span&gt;)&lt;/span&gt;&lt;/a&gt;&lt;span&gt;, where multiple FCIs reside within a single WSFC, and an availability group is created across the FCIs, as shown in the Figure 1 below:&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://sqlcat.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-00-08-metablogapi/3681.image_5F00_6138E900.png"&gt;&lt;img style="border:0px currentcolor;display:inline;" title="image" border="0" alt="image" src="http://sqlcat.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-00-08-metablogapi/5153.image_5F00_thumb_5F00_55A32BC1.png" width="607" height="233" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;i&gt;Figure 1: An FCI+AG solution across two data centers (FCI being used for HA and AG being used for DR)&lt;/i&gt;&lt;/b&gt;&lt;b&gt;&lt;i&gt;&lt;/i&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:small;"&gt;In this deployment,&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style="font-size:small;"&gt;Possible owners of SMFCI601\SM_FCI_601 = {PE2970-01, PE2970-02}.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size:small;"&gt;Possible owners of SMFCI602\SM_FCI_602 = {R900-03, R900-04}.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span style="font-size:small;"&gt;High level steps to build such a solution are:&lt;/span&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;span style="font-size:small;"&gt;&lt;b&gt;Step 1&lt;/b&gt;: Build the primary site failover cluster instance SMFCI601\SM_FCI_601 on nodes PE2970-01 and PE2970-02.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size:small;"&gt;&lt;b&gt;Step 2&lt;/b&gt;: Add the DR site nodes R900-03 and R900-04, to the same Windows cluster, and then create the secondary failover cluster instance SMFCI602\SM_FCI_602 on R900-03 and R900-04.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size:small;"&gt;&lt;b&gt;Step 3&lt;/b&gt;: Create the AG across the two instances SMFCI601\SM_FCI_601 and SMFCI602\SM_FCI_602.&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;span style="font-size:small;"&gt;After building the primary site failover cluster instance (Step 1 above, shown in Figure 2 below), you will see the possible owners of the resources for the failover cluster instance resource group SMFCI601\SM_FCI_601 as shown in the Figure 3.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://sqlcat.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-00-08-metablogapi/2045.image_5F00_7C050F0C.png"&gt;&lt;img style="border:0px currentcolor;display:inline;" title="image" border="0" alt="image" src="http://sqlcat.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-00-08-metablogapi/4617.image_5F00_thumb_5F00_7B98DC17.png" width="302" height="269" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;i&gt;Figure 2: Topology after Completing Step 1 (2-node FCI created at the primary data center)&lt;/i&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://sqlcat.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-00-08-metablogapi/2465.image_5F00_14287968.png"&gt;&lt;img style="border:0px currentcolor;display:inline;" title="image" border="0" alt="image" src="http://sqlcat.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-00-08-metablogapi/5618.image_5F00_thumb_5F00_3A8A5CB3.png" width="519" height="389" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;i&gt;Figure 3: Possible owners of the FCI network name resource after Completing Step 1 (2-node FCI created at the primary data center)&lt;/i&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:small;"&gt;This is correct, and as expected.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:small;"&gt;During Step 2, the two nodes from the DR site (R900-03 and R900-04) are first added to the WSFC (Figure 4). Once these two nodes are added to the WSFC, you will see that the newly added nodes have been unexpectedly added as possible owners (Figure 5) for all the resources of the previously existing FCI (SMFCI601\SM_FCI_601).&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://sqlcat.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-00-08-metablogapi/5224.image_5F00_1E0D6AD3.png"&gt;&lt;img style="border:0px currentcolor;display:inline;" title="image" border="0" alt="image" src="http://sqlcat.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-00-08-metablogapi/8272.image_5F00_thumb_5F00_1DA137DE.png" width="612" height="240" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;i&gt;Figure 4: Two nodes from the DR site added to the WSFC&lt;/i&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://sqlcat.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-00-08-metablogapi/6253.image_5F00_7D19F82B.png"&gt;&lt;img style="border:0px currentcolor;display:inline;" title="image" border="0" alt="image" src="http://sqlcat.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-00-08-metablogapi/5001.image_5F00_thumb_5F00_237BDB77.png" width="512" height="385" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;i&gt;Figure 5: Possible owners list of the FCI network name resource of the primary FCI, after adding two nodes from the DR site to the WSFC&lt;/i&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:small;"&gt;&lt;b&gt;This is neither intended nor desired&lt;/b&gt;. R900-03 and R900-04 can never be the possible owners of any resources of SMFCI601\SM_FCI_601. So, why does this happen? It is the way SQL Server FCI setup works with Windows clustering. When a node is added to the WSFC, the node is added as a possible owner for all existing FCIs. This works well in some scenarios, but doesn&amp;rsquo;t work well in the scenario we are discussing in this article.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:small;"&gt;The possible owners list must be manually modified each time you add a node to the WSFC. Figure 6 shows corrected possible owners list for one resource (the FCI network name on the primary).&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://sqlcat.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-00-08-metablogapi/8244.image_5F00_5ECF4135.png"&gt;&lt;img style="border:0px currentcolor;display:inline;" title="image" border="0" alt="image" src="http://sqlcat.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-00-08-metablogapi/8168.image_5F00_thumb_5F00_42524F55.png" width="524" height="393" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&lt;i&gt;Figure 6: Possible owners list of the FCI network name resource of the primary FCI, after manually correcting the list&lt;/i&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:small;"&gt;Repeat this for all resources (other than disks, the disk resources don&amp;rsquo;t demonstrate this behavior), such as:&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style="font-size:small;"&gt;FCI network name&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size:small;"&gt;FCI IP address&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size:small;"&gt;SQL instance&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size:small;"&gt;SQL Agent&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size:small;"&gt;Any other resources part of the resource group must be checked for correct possible owners.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span style="font-size:small;"&gt;And repeat this for each FCI in your topology. Note that the possible owners list for the resources in each FCI will differ from other FCIs.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:small;"&gt;The possible owners list must be appropriately modified before proceeding to create the availability group across the FCIs (Step 3 listed above), otherwise AG creation will fail, because there will be overlap between the possible owners of the two instances hosting the AG replicas.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:small;"&gt;&lt;span&gt;This should not be confused with the possible owners list for the availability group resource. You should not alter the possible owners list for the availability group (&lt;a href="http://sqlcat.com/sqlcat/b/msdnmirror/archive/2012/03/30/do-not-use-windows-failover-cluster-manager-to-perform-availability-group-failover.aspx" target="_blank"&gt;DO NOT use Windows Failover Cluster Manager to perform Availability Group Failover&lt;/a&gt;&lt;/span&gt;&lt;span&gt;).&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://sqlcat.com/aggbug.aspx?PostID=2731" width="1" height="1"&gt;</description><category domain="http://sqlcat.com/sqlCat/b/technicalnotes/archive/tags/Availability/default.aspx">Availability</category><category domain="http://sqlcat.com/sqlCat/b/technicalnotes/archive/tags/SQL+Server/default.aspx">SQL Server</category><category domain="http://sqlcat.com/sqlCat/b/technicalnotes/archive/tags/OLTP/default.aspx">OLTP</category><category domain="http://sqlcat.com/sqlCat/b/technicalnotes/archive/tags/Disaster+Recovery/default.aspx">Disaster Recovery</category><category domain="http://sqlcat.com/sqlCat/b/technicalnotes/archive/tags/Database+Mirroring/default.aspx">Database Mirroring</category><category domain="http://sqlcat.com/sqlCat/b/technicalnotes/archive/tags/Planned+Downtime/default.aspx">Planned Downtime</category><category domain="http://sqlcat.com/sqlCat/b/technicalnotes/archive/tags/Denali/default.aspx">Denali</category><category domain="http://sqlcat.com/sqlCat/b/technicalnotes/archive/tags/Availability+Groups/default.aspx">Availability Groups</category><category domain="http://sqlcat.com/sqlCat/b/technicalnotes/archive/tags/Failover+Clustering/default.aspx">Failover Clustering</category><category domain="http://sqlcat.com/sqlCat/b/technicalnotes/archive/tags/HADR/default.aspx">HADR</category><category domain="http://sqlcat.com/sqlCat/b/technicalnotes/archive/tags/sql+server+2012/default.aspx">sql server 2012</category><category domain="http://sqlcat.com/sqlCat/b/technicalnotes/archive/tags/AlwaysOn/default.aspx">AlwaysOn</category><category domain="http://sqlcat.com/sqlCat/b/technicalnotes/archive/tags/Cluster/default.aspx">Cluster</category><category domain="http://sqlcat.com/sqlCat/b/technicalnotes/archive/tags/High+Availability/default.aspx">High Availability</category><category domain="http://sqlcat.com/sqlCat/b/technicalnotes/archive/tags/Failover/default.aspx">Failover</category><category domain="http://sqlcat.com/sqlCat/b/technicalnotes/archive/tags/Unplanned+Downtime/default.aspx">Unplanned Downtime</category><category domain="http://sqlcat.com/sqlCat/b/technicalnotes/archive/tags/GeoCluster/default.aspx">GeoCluster</category><category domain="http://sqlcat.com/sqlCat/b/technicalnotes/archive/tags/Architecture/default.aspx">Architecture</category><category domain="http://sqlcat.com/sqlCat/b/technicalnotes/archive/tags/Failover+Cluster+Instance/default.aspx">Failover Cluster Instance</category></item><item><title>AlwaysOn Architecture Guide: Building a High Availability and Disaster Recovery Solution by Using Failover Cluster Instances and Availability Groups</title><link>http://sqlcat.com/sqlCat/b/whitepapers/archive/2012/06/22/alwayson-architecture-guide-building-a-high-availability-and-disaster-recovery-solution-by-using-failover-cluster-instances-and-availability-groups.aspx</link><pubDate>Sat, 23 Jun 2012 00:42:00 GMT</pubDate><guid isPermaLink="false">e9619797-5f48-4d02-a1a8-7f300d09be66:2712</guid><dc:creator>SanjayMishra</dc:creator><slash:comments>5</slash:comments><description>&lt;p&gt;SQL Server 2012 AlwaysOn Failover Cluster Instances (FCI) and AlwaysOn Availability Groups provide a comprehensive high availability and disaster recovery solution. Prior to SQL Server 2012, many customers used FCIs to provide local high availability within a data center and database mirroring for disaster recovery to a remote data center. With SQL Server 2012, this design pattern can be replaced with an architecture that uses FCIs for high availability and availability groups for disaster recovery business requirements. Availability groups leverage Windows Server Failover Clustering (WSFC) functionality and enable multiple features not available in database mirroring. This paper details the key topology requirements of this specific design pattern, including asymmetric storage considerations, quorum model selection, quorum votes, steps required to build the environment, and a workflow illustrating how to handle a disaster recovery event in the new topology across participating job roles.&lt;/p&gt;...(&lt;a href="http://sqlcat.com/sqlCat/b/whitepapers/archive/2012/06/22/alwayson-architecture-guide-building-a-high-availability-and-disaster-recovery-solution-by-using-failover-cluster-instances-and-availability-groups.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://sqlcat.com/aggbug.aspx?PostID=2712" width="1" height="1"&gt;</description><category domain="http://sqlcat.com/sqlCat/b/whitepapers/archive/tags/Availability/default.aspx">Availability</category><category domain="http://sqlcat.com/sqlCat/b/whitepapers/archive/tags/Failover/default.aspx">Failover</category><category domain="http://sqlcat.com/sqlCat/b/whitepapers/archive/tags/SQL+Server/default.aspx">SQL Server</category><category domain="http://sqlcat.com/sqlCat/b/whitepapers/archive/tags/Architecture/default.aspx">Architecture</category><category domain="http://sqlcat.com/sqlCat/b/whitepapers/archive/tags/OLTP/default.aspx">OLTP</category><category domain="http://sqlcat.com/sqlCat/b/whitepapers/archive/tags/Cluster/default.aspx">Cluster</category><category domain="http://sqlcat.com/sqlCat/b/whitepapers/archive/tags/Failover+Clustering/default.aspx">Failover Clustering</category><category domain="http://sqlcat.com/sqlCat/b/whitepapers/archive/tags/Planned+Downtime/default.aspx">Planned Downtime</category><category domain="http://sqlcat.com/sqlCat/b/whitepapers/archive/tags/HADR/default.aspx">HADR</category><category domain="http://sqlcat.com/sqlCat/b/whitepapers/archive/tags/Disaster+Recovery/default.aspx">Disaster Recovery</category><category domain="http://sqlcat.com/sqlCat/b/whitepapers/archive/tags/Unplanned+Downtime/default.aspx">Unplanned Downtime</category><category domain="http://sqlcat.com/sqlCat/b/whitepapers/archive/tags/High+Availability/default.aspx">High Availability</category><category domain="http://sqlcat.com/sqlCat/b/whitepapers/archive/tags/GeoCluster/default.aspx">GeoCluster</category><category domain="http://sqlcat.com/sqlCat/b/whitepapers/archive/tags/Database+Mirroring/default.aspx">Database Mirroring</category><category domain="http://sqlcat.com/sqlCat/b/whitepapers/archive/tags/Denali/default.aspx">Denali</category><category domain="http://sqlcat.com/sqlCat/b/whitepapers/archive/tags/AlwaysOn/default.aspx">AlwaysOn</category><category domain="http://sqlcat.com/sqlCat/b/whitepapers/archive/tags/sql+server+2012/default.aspx">sql server 2012</category><category domain="http://sqlcat.com/sqlCat/b/whitepapers/archive/tags/Failover+Cluster+Instance/default.aspx">Failover Cluster Instance</category><category domain="http://sqlcat.com/sqlCat/b/whitepapers/archive/tags/Availability+Groups/default.aspx">Availability Groups</category></item><item><title>AlwaysOn Architecture Guide: Building a High Availability and Disaster Recovery Solution by Using AlwaysOn Availability Groups</title><link>http://sqlcat.com/sqlCat/b/whitepapers/archive/2012/06/22/alwayson-architecture-guide-building-a-high-availability-and-disaster-recovery-solution-by-using-alwayson-availability-groups.aspx</link><pubDate>Sat, 23 Jun 2012 00:36:00 GMT</pubDate><guid isPermaLink="false">e9619797-5f48-4d02-a1a8-7f300d09be66:2711</guid><dc:creator>SanjayMishra</dc:creator><slash:comments>4</slash:comments><description>&lt;p&gt;&lt;span style="font-size:small;"&gt;&lt;strong&gt;Authors:&lt;/strong&gt; Joseph Sack (SQLskills.com), Sanjay Mishra (Microsoft)&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:small;"&gt;&lt;strong&gt;Technical Reviewers:&lt;/strong&gt; Lindsey Allen (MS), Juergen Thomas (MS), Mike Weiner (MS), Prem Mehra (MS), Yorihito Tada (MS), Curt Matthews (MS), Amitabh Tamhane (MS), Aditya Samant (MS), Daniel Janik (MS), Jimmy May (MS), David P Smith (ServiceU), Richard Waymire (SolidQ), Brent Ozar (Brent Ozar PLF), Wolfgang Kutschera (bwin.party), Paul S. Randal (SQLskills.com), Gianluca Hotz (SolidQ), Ayad Shammout (Caregroup)&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Content Program Manager&lt;/strong&gt;: Glenn Minch (Microsoft)&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:small;"&gt;&lt;strong&gt;Summary: &lt;/strong&gt;SQL Server 2012 AlwaysOn Availability Groups provides a unified high availability and disaster recovery (HADR) solution that improves upon legacy functionality previously found across disparate features. Prior to SQL Server 2012, several customers used database mirroring to provide local high availability within a data center, and log shipping for disaster recovery across a remote data center. With SQL Server 2012, this common design pattern can be replaced with an architecture that uses availability groups for both high availability and disaster recovery. This paper details the key topology requirements of this specific design pattern, including quorum configuration considerations, steps required to build the environment, and a workflow that shows how to handle a disaster recovery event in the new topology.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:small;"&gt;&lt;strong&gt;Read on: &lt;a href="http://msdn.microsoft.com/en-us/library/jj191711"&gt;http://msdn.microsoft.com/en-us/library/jj191711&lt;/a&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://sqlcat.com/aggbug.aspx?PostID=2711" width="1" height="1"&gt;</description><category domain="http://sqlcat.com/sqlCat/b/whitepapers/archive/tags/Availability/default.aspx">Availability</category><category domain="http://sqlcat.com/sqlCat/b/whitepapers/archive/tags/Architecture/default.aspx">Architecture</category><category domain="http://sqlcat.com/sqlCat/b/whitepapers/archive/tags/OLTP/default.aspx">OLTP</category><category domain="http://sqlcat.com/sqlCat/b/whitepapers/archive/tags/HADR/default.aspx">HADR</category><category domain="http://sqlcat.com/sqlCat/b/whitepapers/archive/tags/Disaster+Recovery/default.aspx">Disaster Recovery</category><category domain="http://sqlcat.com/sqlCat/b/whitepapers/archive/tags/High+Availability/default.aspx">High Availability</category><category domain="http://sqlcat.com/sqlCat/b/whitepapers/archive/tags/Denali/default.aspx">Denali</category><category domain="http://sqlcat.com/sqlCat/b/whitepapers/archive/tags/Data+Warehouse/default.aspx">Data Warehouse</category><category domain="http://sqlcat.com/sqlCat/b/whitepapers/archive/tags/AlwaysOn/default.aspx">AlwaysOn</category><category domain="http://sqlcat.com/sqlCat/b/whitepapers/archive/tags/sql+server+2012/default.aspx">sql server 2012</category><category domain="http://sqlcat.com/sqlCat/b/whitepapers/archive/tags/Availability+Group/default.aspx">Availability Group</category></item><item><title>Running SQL Server in Windows Azure Virtual Machine - Performance Guidelines for Preview</title><link>http://sqlcat.com/sqlCat/b/technicalnotes/archive/2012/06/08/running-sql-server-in-windows-azure-virtual-machine-performance-guidelines-for-preview.aspx</link><pubDate>Sat, 09 Jun 2012 00:36:00 GMT</pubDate><guid isPermaLink="false">e9619797-5f48-4d02-a1a8-7f300d09be66:2704</guid><dc:creator>Lindsey.allen</dc:creator><slash:comments>4</slash:comments><description>&lt;p&gt;&lt;span style="font-size:x-small;"&gt;A Windows Azure Virtual Machine is similar to a virtual machine run on premise except that it runs in Windows Azure, Microsoft&amp;rsquo;s public cloud. Starting with the Windows Azure 2012 Preview release, new Virtual Machine capabilities have been added to the Windows Azure. We support a number of scenarios for SQL Server running in Windows Azure in addition to moving existing SQL Server applications to Windows Azure Virtual Machines. For details on how to migrate your existing SQL Server application, see &lt;/span&gt;&lt;a href="http://go.microsoft.com/fwlink/?LinkID=249158"&gt;&lt;span style="font-size:x-small;"&gt;Migrating with Windows Azure Virtual Machines&lt;/span&gt;&lt;/a&gt;&lt;span style="font-size:x-small;"&gt;.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:x-small;"&gt;The performance of a relational database in Windows Azure Virtual Machine depends on many factors, including the VM size, the number and configuration of disks, the network throughput and latency, the configuration of the database software and the application workload. We encourage users to benchmark their application on several VM sizes and storage configurations in order to select the most appropriate configuration. &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:x-small;"&gt;In order to help customers with the task of characterizing the performance for migrating to Windows Azure Virtual Machine, we are working on extending the Microsoft Assessment and Planning (MAP) Toolkit for SQL Server to have more built-in awareness for Windows Azure VMs.&lt;/span&gt;&lt;/p&gt;
&lt;h2&gt;VM Size&lt;/h2&gt;
&lt;p&gt;&lt;span style="font-size:x-small;"&gt;To improve the performance of your database, you need to understand which of the server&amp;rsquo;s resources is the performance constraint. If your database performance is limited by CPU or memory, users can scale up the compute available to the SQL instance by choosing a larger VM. Follow &lt;a href="http://msdn.microsoft.com/en-us/library/windowsazure/jj152814"&gt;&lt;span style="font-size:x-small;"&gt;Set-AzureVMsize&lt;/span&gt;&lt;/a&gt; for more detail on how to upgrade to a bigger VM size. Please note that this involves taking the VM offline and restarting the VM. &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:x-small;"&gt;Be mindful that this is a cloud environment with a multi-tenant storage and networking infrastructure, so you should expect some variance in performance. In general, for production workloads we recommend running SQL Server on Medium or larger VMs. For best performance use extra-large VMs.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:x-small;"&gt;We recommend the default setting for the SQL configuration option &amp;ldquo;max server memory&amp;rdquo; in order to allow SQL to manage its memory needs dynamically.&lt;/span&gt;&lt;/p&gt;
&lt;h2&gt;Number and configuration of disks&lt;/h2&gt;
&lt;p&gt;&lt;span style="font-size:x-small;"&gt;The number of disks allowed for your Windows Azure VM varies based on the VM size, with each disk up to 1TB. For example, in an extra-large VM, up to 16 disks are supported. For more details, please refer to the table below (source &lt;/span&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/windowsazure/ee814754.aspx"&gt;&lt;span style="font-size:x-small;"&gt;here&lt;/span&gt;&lt;/a&gt;&lt;span style="font-size:x-small;"&gt;).&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://sqlcat.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-00-08-metablogapi/0447.image_5F00_3ACCF07A.png"&gt;&lt;img style="display:inline;" title="image" border="0" alt="image" src="http://sqlcat.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-00-08-metablogapi/3108.image_5F00_thumb_5F00_0149E083.png" width="578" height="339" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:x-small;"&gt;If your performance is strongly disk I/O sensitive, be mindful that a larger VM may be required in order to add enough disks to meet your I/O requirements. For details, please see the &lt;/span&gt;&lt;a href="http://www.windowsazure.com/en-us/manage/windows/how-to-guides/attach-a-disk/"&gt;&lt;span style="font-size:x-small;"&gt;How to attach a data disk to a virtual machine topic&lt;/span&gt;&lt;/a&gt;&amp;nbsp;&lt;span style="font-size:x-small;"&gt;in How to create and configure a virtual machine in Windows Azure.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:x-small;"&gt;Being a shared cloud service, performance of Windows Azure VM, especially the I/O capacity, also depends on concurrent load &amp;ndash; performance will vary, for example, based on the time of day. We recommend users to validate the disk configuration to determine its I/O capacity prior to deploying SQL Server. &lt;/span&gt;&lt;a href="http://www.microsoft.com/en-us/download/details.aspx?id=20163"&gt;&lt;span style="font-size:x-small;"&gt;SQLIO Disk Subsystem Benchmark Tool&lt;/span&gt;&lt;/a&gt;&lt;span style="font-size:x-small;"&gt; is available for performing such tests. &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:x-small;"&gt;In terms of configuration, we recommend placing data and log on separate disks from the OS disk for better performance.&lt;/span&gt;&lt;/p&gt;
&lt;h2&gt;Disk cache settings&lt;/h2&gt;
&lt;p&gt;&lt;span style="font-size:x-small;"&gt;The default cache settings on the OS disk and the data disk are different. &lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style="font-size:x-small;"&gt;On the OS disk, the default is ON for both read and write caching. &lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size:x-small;"&gt;On the data disk, the default is OFF for both read and write caching.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span style="font-size:x-small;"&gt;For running SQL workloads, we recommend keeping the write cache OFF. In case data has to be placed on the OS disk, disable the write caching on the OS disk in the service model. Use Windows Azure Powershell command &lt;/span&gt;&lt;a href="http://msdnstage/en-us/library/jj152847"&gt;&lt;span style="font-size:x-small;"&gt;Set-AzureOSDisk&lt;/span&gt;&lt;/a&gt;&lt;span style="font-size:x-small;"&gt; to disable write caching. Please note that changing the cache settings on the OS disk while running will result in a reboot of the VM.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:x-small;"&gt;Apart from Windows Azure OS disk and data disk, there is also Temporary Storage available in the VM (usually exposed as drive &amp;ldquo;D:\&amp;rdquo;). This temporary storage, however, does not provide data durability as OS disks or data disks do. We recommend users refrain from keeping data that need to be persisted on this drive.&lt;/span&gt;&lt;/p&gt;
&lt;h2&gt;Performance Tuning and Troubleshooting&lt;/h2&gt;
&lt;p&gt;&lt;span style="font-size:x-small;"&gt;In general, users have the same database performance tuning options in the Windows Azure Virtual Machine environment that they would have in a physical server environment, this includes resources such as Windows performance counters, Xperf and SQL Server DMVs. Additionally, for logging and troubleshooting performance of the networked drives, the user can leverage &lt;/span&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/hh343270.aspx"&gt;&lt;span style="font-size:x-small;"&gt;Storage Analytics&lt;/span&gt;&lt;/a&gt;&lt;span style="font-size:x-small;"&gt;, a tool for performance logging and troubleshooting against Windows Azure storage.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;h2&gt;&lt;span style="font-size:x-small;"&gt;Additional Resources&lt;/span&gt;&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style="font-size:x-small;"&gt;&lt;a href="http://www.windowsazure.com/en-us/manage/windows/how-to-guides/"&gt;How to guide for Windows Virtual Machines&lt;/a&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size:x-small;"&gt;&lt;a href="http://support.microsoft.com/kb/956893"&gt;Support policy for Microsoft SQL Server products that are running in a hardware virtualization environment&lt;/a&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size:x-small;"&gt;&lt;a href="https://www.windowsazure.com/en-us/pricing/details/"&gt;Pricing Details&lt;/a&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size:x-small;"&gt;&lt;a href="http://www.windowsazure.com/en-us/pricing/calculator/?scenario=virtual-machines"&gt;Price calculator&lt;/a&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size:x-small;"&gt;&lt;a href="http://www.windowsazure.com/en-us/pricing/free-trial/"&gt;Get Free Trial&lt;/a&gt;&lt;/span&gt;&amp;nbsp;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:x-small;"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://sqlcat.com/aggbug.aspx?PostID=2704" width="1" height="1"&gt;</description><category domain="http://sqlcat.com/sqlCat/b/technicalnotes/archive/tags/Cloud/default.aspx">Cloud</category><category domain="http://sqlcat.com/sqlCat/b/technicalnotes/archive/tags/Azure/default.aspx">Azure</category></item><item><title>Memory Error Recovery in SQL Server 2012</title><link>http://sqlcat.com/sqlCat/b/technicalnotes/archive/2012/06/05/memory-error-recovery-in-sql-server-2012.aspx</link><pubDate>Wed, 06 Jun 2012 00:14:00 GMT</pubDate><guid isPermaLink="false">e9619797-5f48-4d02-a1a8-7f300d09be66:2700</guid><dc:creator>Lindsey.allen</dc:creator><slash:comments>7</slash:comments><description>&lt;p&gt;&lt;span style="color:#0000a0;font-size:x-small;"&gt;&lt;em&gt;Xin Jin; Fabricio Voznika; Madhan Arumugam; Lindsey Allen&lt;/em&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:x-small;"&gt;SQL Server 2012 has many hidden gems, one of them is the capability of recovering from memory corruption error. We will tell you how it works in this article. &lt;/span&gt;&lt;/p&gt;
&lt;h4&gt;&lt;strong&gt;&lt;span style="font-size:x-small;"&gt;Contents&lt;/span&gt;&lt;/strong&gt;&lt;/h4&gt;
&lt;ol&gt;
&lt;li&gt;&lt;span style="font-size:x-small;"&gt;Memory Error Recovery in SQL Server 2012&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size:x-small;"&gt;Hardware errors and taxonomy&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size:x-small;"&gt;Soft error vs. hard error&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size:x-small;"&gt;Corrected error vs. uncorrected error&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size:x-small;"&gt;Fatal error vs. non-fatal error&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size:x-small;"&gt;What is memory scrubbing?&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size:x-small;"&gt;How To: Find if this feature is available&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size:x-small;"&gt;How To: Detect that a page has been repaired&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size:x-small;"&gt;How to: Detect uncorrected hardware memory corruption&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size:x-small;"&gt;How To: Monitor the system&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:x-small;"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:x-small;"&gt;SQL Server is able to recover from memory corruption when hardware support&amp;nbsp; is available. Platforms that support hardware memory scrubber can send notification to applications when memory corruption is detected. SQL Server responds to these notifications and attempts to repair the memory. Clean database pages in buffer pool &lt;/span&gt;&lt;a&gt;&lt;span style="font-size:x-small;"&gt;are &lt;/span&gt;&lt;/a&gt;&lt;span style="font-size:x-small;"&gt; restored by reading the page again from disk. This new feature helps SQL Server to remain running even when there are hardware memory errors&lt;/span&gt;&lt;a&gt;&lt;span style="font-size:x-small;"&gt;.&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:x-small;"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h4&gt;&lt;a name="_Toc323507213"&gt;&lt;/a&gt;&lt;span style="font-size:x-small;"&gt;Hardware errors and taxonomy&lt;/span&gt;&lt;/h4&gt;
&lt;p&gt;&lt;span style="font-size:x-small;"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:x-small;"&gt;Please see the &lt;/span&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/windows/hardware/ff559382(v=vs.85).aspx"&gt;&lt;span style="font-size:x-small;"&gt;Hardware Errors and Error Sources&lt;/span&gt;&lt;/a&gt;&lt;span style="font-size:x-small;"&gt; on MSDN for an overview of hardware errors and their definitions.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:x-small;"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h5&gt;&lt;a name="_Toc323507214"&gt;&lt;/a&gt;&lt;span style="font-size:x-small;"&gt;Soft error vs. hard error&lt;/span&gt;&lt;/h5&gt;
&lt;p&gt;&lt;span style="font-size:x-small;"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:x-small;"&gt;A soft error is an error in a signal or datum which is wrong. After a soft error is observed , there is no implication that the system is any less reliable than before. If detected, a soft error may be corrected by rewriting correct data in place of erroneous data. An example of a soft error is a single bit flip.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:x-small;"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:x-small;"&gt;Unlike soft error, a hard error is an error that occurs because of a physical hardware issue such as a defect, a mistake in design or construction, or a broken component. These errors require that the hardware causing the error be replaced. Rewriting the data does not correct the error.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:x-small;"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h5&gt;&lt;a name="_Toc323507215"&gt;&lt;/a&gt;&lt;span style="font-size:x-small;"&gt;Corrected error vs. uncorrected error&lt;/span&gt;&lt;/h5&gt;
&lt;p&gt;&lt;span style="font-size:x-small;"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:x-small;"&gt;A corrected error is a hardware error condition that has been corrected by the hardware or the firmware by the time that the operating system is notified about the presence of the error condition.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:x-small;"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:x-small;"&gt;An uncorrected error is a hardware error condition that cannot be corrected by the hardware or the firmware. Uncorrected errors are classified as either fatal or nonfatal.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:x-small;"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h5&gt;&lt;a name="_Toc323507216"&gt;&lt;/a&gt;&lt;span style="font-size:x-small;"&gt;Fatal error vs. non-fatal error&lt;/span&gt;&lt;/h5&gt;
&lt;p&gt;&lt;span style="font-size:x-small;"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:x-small;"&gt;A fatal hardware error is an uncorrected or uncontained error condition that is determined to be unrecoverable by the hardware. When a fatal uncorrected error occurs, the operating system generates a bug check to contain the error.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:x-small;"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:x-small;"&gt;A nonfatal hardware error is an uncorrected error condition from which the operating system can attempt recovery by trying to correct the error. If the operating system cannot correct the error, it generates a bug check to contain the error.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:x-small;"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h4&gt;&lt;a name="_Toc323507217"&gt;&lt;/a&gt;&lt;span style="font-size:x-small;"&gt;What is memory scrubbing?&lt;/span&gt;&lt;/h4&gt;
&lt;p&gt;&lt;span style="font-size:x-small;"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://en.wikipedia.org/wiki/Memory_scrubbing"&gt;&lt;span style="font-size:x-small;"&gt;Memory scrubbing&lt;/span&gt;&lt;/a&gt;&lt;span style="font-size:x-small;"&gt; is the process of detecting and correcting bit errors in computer memory by using error-detecting codes like ECC. Memory scrubbing can detect and correct soft, correctable errors. For certain soft, uncorrected non-fatal errors, SQL Server captures of this information and checks whether the corrupted memory is part of a clean database page that is in Buffer Pool. If that is the case, this page is tossed and the memory is de-allocated. If corruption is in another region of memory that can not be repaired, only logging is done to notify of the event and no action is taken. &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:x-small;"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;h4&gt;&lt;a name="_Toc323507218"&gt;&lt;/a&gt;&lt;a&gt;&lt;span style="font-size:x-small;"&gt;How To: Find if this feature is available&lt;/span&gt;&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;&lt;span style="font-size:x-small;"&gt; If the memory error recovery feature is available, you will be able to see the following by looking at SQL errorlog.&lt;/span&gt;&amp;nbsp;&lt;/p&gt;
&lt;table border="0" cellspacing="0" cellpadding="0"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td valign="top" width="869"&gt;
&lt;p&gt;&lt;span style="color:#008000;font-family:Consolas;font-size:x-small;"&gt;Machine supports memory error recovery. SQL memory protection is enabled to recover from memory corruption.&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h4&gt;&lt;a name="_Toc323507219"&gt;&lt;/a&gt;&lt;span style="font-size:x-small;"&gt;How To: Detect that a page has been repaired&lt;/span&gt;&lt;/h4&gt;
&lt;p&gt;&lt;span style="font-size:x-small;"&gt;If the memory corruption is associated with a clean page in Buffer Pool, SQL Server is able to recover from it and the following message will be logged in the &lt;/span&gt;&lt;a&gt;&lt;span style="font-size:x-small;"&gt;errorlog&lt;/span&gt;&lt;/a&gt;&lt;span style="font-size:x-small;"&gt;.&lt;/span&gt;&lt;/p&gt;
&lt;table border="0" cellspacing="0" cellpadding="0"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td valign="top" width="869"&gt;
&lt;p&gt;&lt;span style="color:#008040;font-family:Consolas;font-size:x-small;"&gt;SQL Server has detected hardware memory corruption in database &amp;#39;%ls&amp;#39;, file ID: %u, page ID; %u, memory address: 0x%x and has successfully recovered the page.&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;&lt;span style="font-size:x-small;"&gt;Also you can monitor the detection and repair of the memory corruption with the following Extended Events (XEvents):&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:x-small;"&gt;- bad_memory_detected: corrupted memory has been detected and reported to SQL. The memory may or may not belong to a database page.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:x-small;"&gt;- bad_memory_fixed: memory corruption has been detected and fixed. Fields of then event contain more details regarding the exact page affected&lt;/span&gt;&lt;/p&gt;
&lt;h4&gt;&lt;span style="font-size:x-small;"&gt;How to: Detect uncorrected hardware memory corruption&lt;/span&gt;&lt;/h4&gt;
&lt;p&gt;&lt;span style="font-size:x-small;"&gt;SQL Server is able to recover from memory corruption of clean pages in buffer pool. It cannot recover from memory errors associated with dirty pages or outside Buffer Pool. Upon detection of such uncorrectable hardware errors, the following entry can be observed from errorlog.&lt;/span&gt;&lt;/p&gt;
&lt;table border="0" cellspacing="0" cellpadding="0"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td valign="top" width="869"&gt;
&lt;p&gt;&lt;span style="color:#008040;font-family:Consolas;font-size:x-small;"&gt;Uncorrectable hardware memory corruption detected. Your system may become unstable. Please check the Windows event log for more details.&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h4&gt;&lt;a name="_Toc323507221"&gt;&lt;/a&gt;&lt;span style="font-size:x-small;"&gt;How To: Monitor the system&lt;/span&gt;&lt;/h4&gt;
&lt;p&gt;&lt;span style="font-size:x-small;"&gt;The user can monitor the detection of memory corruption using &lt;strong&gt;sp_server_diagnostics&lt;/strong&gt;. The &lt;em&gt;system&lt;/em&gt; component state will be set to &lt;em&gt;warning&lt;/em&gt; upon detection of a memory corruption. In addition, the &lt;em&gt;data&lt;/em&gt; column logs information about count of bad page detected, count of bad page fixed as well as the virtual address of the bad page last encountered. &lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://sqlcat.com/aggbug.aspx?PostID=2700" width="1" height="1"&gt;</description></item><item><title>Comparing I/O characteristics in AlwaysOn Availability Groups and Database Mirroring</title><link>http://sqlcat.com/sqlCat/b/technicalnotes/archive/2012/06/01/comparing-i-o-characteristics-in-alwayson-availability-groups-and-database-mirroring.aspx</link><pubDate>Fri, 01 Jun 2012 22:19:00 GMT</pubDate><guid isPermaLink="false">e9619797-5f48-4d02-a1a8-7f300d09be66:2693</guid><dc:creator>ytada</dc:creator><slash:comments>1</slash:comments><description>&lt;p&gt;&lt;b&gt;Author&lt;/b&gt;: Yorihito Tada &lt;br /&gt;&lt;br /&gt;&lt;b&gt;Contributors&lt;/b&gt;: Sanjay Mishra, Steve Lindell &lt;br /&gt;&lt;br /&gt;&lt;b&gt;Technical Reviewers&lt;/b&gt;: Prem Mehra, Mike Weiner, Sunil Agarwal&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Microsoft SQL Server 2012 introduces AlwaysOn Availability Groups, which is a high availability and disaster recovery solution. The basic concept of AlwaysOn Availability Groups is similar to Database Mirroring, which was introduced in SQL Server 2005 SP1. AlwaysOn Availability Groups offers improvements over Database Mirroring; for example, with AlwaysOn Availability Groups, you can have multiple databases in one availability group, and you can have up to four secondary replicas for every primary replica. For more information about AlwaysOn Availability Groups, see &lt;a href="http://technet.microsoft.com/en-us/library/ff877884(v=SQL.110).aspx"&gt;Overview of AlwaysOn Availability Groups&lt;/a&gt; (http://technet.microsoft.com/en-us/library/ff877884(v=SQL.110).aspx).&lt;/p&gt;
&lt;p&gt;AlwaysOn Availability Groups not only extends the functionality of Database Mirroring, it also provides performance enhancements. This paper provides some technical details on two of these enhancements:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The I/O efficiency of flushing data pages on the secondary replica&lt;/li&gt;
&lt;li&gt;Throughput improvements by optimized I/O for transaction log file using log pool&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The paper also discusses the results of tests that we performed to demonstrate these features and their effect on performance.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;I/O Efficiency of Flushing Pages on the Secondary&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;One significant change in SQL Server 2012 is the improved I/O efficiency on the secondary replica (also known as the mirror database in Database Mirroring). Database Mirroring does a continual flush of the dirty pages, because to go from a &amp;lsquo;restoring&amp;rsquo; state to an &amp;lsquo;online&amp;rsquo; state (that is, from the mirror database to the principal database), all pages are required to be on disk. To shorten recovery time at failover, Database Mirroring writes dirty data pages to disk continuously. Because databases in AlwaysOn Availability Groups are online in both primary and secondary replicas (regardless of whether they are readable or not) , the flush is not required on a role change. Therefore AlwaysOn Availability Groups does not need to force page flushes except at checkpoints or buffer pool memory pressure. This change significantly reduces I/O for the secondary replica, when there are multiple updates on same page.&lt;/p&gt;
&lt;p&gt;To compare AlwaysOn Availability Groups and Database Mirroring, I used one OLTP-type database and the same workload for AlwaysOn Availability Groups and Database Mirroring. Each database had 12 data files (6 files on each file group) and one transaction log file. The total size was approximately 80&amp;nbsp;GB allocated and 35&amp;nbsp;GB used at the initial state. Both AlwaysOn Availability Groups and Database Mirroring were configured as synchronous replicas or mirrors. The workloads were mixed, with INSERTs, UPDATEs and READs. The concurrent connected user count was 1,000 users. On each node, data files were placed on drive H:(direct attached SSD drive), and transaction log files were on drive E:(SAN storage).&lt;/p&gt;
&lt;p&gt;&lt;a href="http://sqlcat.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-00-08/1362.AGDBMIO_5F00_Figure11.png"&gt;&lt;img border="0" alt=" " src="http://sqlcat.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-00-08/1362.AGDBMIO_5F00_Figure11.png" /&gt;&lt;/a&gt;&lt;a href="http://sqlcat.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-00-08/5415.AGDBMIO_5F00_Figure11.png"&gt;&lt;/a&gt;&lt;a href="http://sqlcat.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-00-08/8176.AGDBMIO_5F00_Figure1.png"&gt;&lt;/a&gt;&lt;a href="http://sqlcat.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-00-08/6177.AGDBMIO_5F00_Figure1.png"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Figure 1: The Data Disk Write Byte /sec counter&lt;/p&gt;
&lt;p&gt;In Figure 1, the red line shows the Disk Write Bytes/sec counter values on the secondary node data disk. It shows that there were approximately 500&amp;nbsp;MB per second of write I/O every minute for AlwaysOn Availability Groups; this write I/O occurred at the checkpoint. There were continuously 200&amp;nbsp;MB per second of write I/O for Database Mirroring. Note: The blue dotted line tracks the Disk Write Bytes/sec counter on the primary replica (in AlwaysOn Availability Groups) or principal database (in Database Mirroring), showing the checkpoint activity, which is a very similar pattern in both technologies. Average Disk Write Bytes/sec is around 63&amp;nbsp;MB per second for AlwaysOn Availability Groups and 205&amp;nbsp;MB per second for Database Mirroring during workload. These test results show that AlwaysOn Availability Groups reduces write I/O on the mirror significantly, compared to Database Mirroring.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Throughput improvements by optimized I/O for transaction log file using the log pool&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;SQL Server 2012 Availability Groups introduces another improvement, the dynamic cache capability of the log pool. This capability increases throughput capacity on the AlwaysOn Availability Groups databases. The log pool is a new common cache mechanism for log records consumers. When a transaction is run on the primary replica, the transaction log records are written to the log cache, and at the same time they are sent to the log pool to be passed along to the secondary replica. Figure 2 shows an example of this with a single secondary replica, although the logic is the same for multiple secondary replicas. If an unsent log is not in cache, AlwaysOn Availability Groups or Database Mirroring log capture threads have to read the log from the file. The log pool serves as a dynamic cache that can grow until unsent log entries fit into the cache, if there is no memory pressure. Then AlwaysOn Availability Groups adds less I/O to the log file for read than Database Mirroring does.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://sqlcat.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-00-08/1732.AGDBMIO_5F00_Figure2.png"&gt;&lt;img border="0" alt=" " src="http://sqlcat.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-00-08/1732.AGDBMIO_5F00_Figure2.png" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Figure 2: Data movement architecture of AlwaysOn Availability Groups&lt;/p&gt;
&lt;p&gt;In Figure 3, the red line shows Batch Requests/sec, the blue line shows Log write waits, and the green line shows Disk Read Bytes/sec for the transaction log. These results are all taken from the primary replica or the principal database.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://sqlcat.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-00-08/4722.AGDBMIO_5F00_Figure31.png"&gt;&lt;img border="0" alt=" " src="http://sqlcat.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-00-08/4722.AGDBMIO_5F00_Figure31.png" /&gt;&lt;/a&gt;&lt;a href="http://sqlcat.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-00-08/1616.AGDBMIO_5F00_Figure31.png"&gt;&lt;/a&gt;&lt;a href="http://sqlcat.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-00-08/6327.AGDBMIO_5F00_Figure3.png"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Figure 3: Batch Requests/sec&lt;/p&gt;
&lt;p&gt;For AlwaysOn Availability Groups, the average value for Batch Requests/sec is about 5000, and for Database Mirroring, the average is 4000. This improvement in throughput is caused by a difference in the Log writes waits counter and heavier read I/O (as measured by the Disk Read Byes/sec counter&lt;i&gt;)&lt;/i&gt; on the transaction log file for Database Mirroring. This enhancement comes from the log pool with a dynamically sized log cache. Database Mirroring, on the other hand, uses a fixed-size log cache. These log pool changes enable AlwaysOn Availability Groups to handle spikes in log volume much better, which results in an increase in capacity over Database Mirroring.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://sqlcat.com/aggbug.aspx?PostID=2693" width="1" height="1"&gt;</description><category domain="http://sqlcat.com/sqlCat/b/technicalnotes/archive/tags/Availability/default.aspx">Availability</category><category domain="http://sqlcat.com/sqlCat/b/technicalnotes/archive/tags/Performance/default.aspx">Performance</category><category domain="http://sqlcat.com/sqlCat/b/technicalnotes/archive/tags/I_2F00_O/default.aspx">I/O</category><category domain="http://sqlcat.com/sqlCat/b/technicalnotes/archive/tags/OLTP/default.aspx">OLTP</category><category domain="http://sqlcat.com/sqlCat/b/technicalnotes/archive/tags/Data+Warehouse/default.aspx">Data Warehouse</category></item><item><title>Fast Track: improving performance through correct LUN Mapping and Storage Enclosure configuration</title><link>http://sqlcat.com/sqlCat/b/msdnmirror/archive/2012/05/03/fast-track-improving-performance-through-correct-lun-mapping-and-storage-enclosure-configuration.aspx</link><pubDate>Thu, 03 May 2012 14:49:00 GMT</pubDate><guid isPermaLink="false">e9619797-5f48-4d02-a1a8-7f300d09be66:2677</guid><dc:creator>AlexeiK</dc:creator><slash:comments>3</slash:comments><description>&lt;p&gt;&lt;strong&gt;Author:&lt;/strong&gt; Alexei Khalyako&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Reviewers:&lt;/strong&gt; Thomas Kejser, Marcel Franke (PM One); Kevin Cox; Erik Kraemer; Kun Cheng; Murshed Zaman; Chuck Heinzelman&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;During the recent &amp;lsquo;Proof of Concept&amp;rsquo; we were testing mid-range Fast Track configuration. Fast Track configuration looked like: server with 32 cores, more than 200 GB of RAM and storage capacity about 40TB.&lt;/p&gt;
&lt;p&gt;Before getting started looking at the SQL Server database performance, we obviously wanted to measure the maximum throughput of the storage and then to rely on it as the theoretical maximum of IO that system could deliver. According to the documentation of the hardware vendor the Maximum Consumption Rate is around 7,5 GB/sec, therefore&amp;nbsp; in the real life we were expecting to see the IO in the range of 6-6,5GB/sec.&lt;/p&gt;
&lt;p&gt;The very first runs of SQLIO brought quite surprising numbers: we couldn&amp;rsquo;t exceed 4,7 GB/sec.&lt;/p&gt;
&lt;table cellpadding="0" cellspacing="0" border="0"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td width="641" valign="top"&gt;
&lt;p&gt;&lt;i&gt;Comment: following SQLIO command was used for analysis &lt;/i&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&amp;nbsp;&lt;/b&gt;&lt;/p&gt;
&lt;table cellpadding="0" cellspacing="0" border="1"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td width="626" valign="top"&gt;
&lt;p&gt;&lt;b&gt;ECHO ------ Sequential read block size 256 thread on Concurrent --------------------&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;sqlio -kR -t10 -s%1 -fsequential -o1 &amp;ndash;b512 -LS -FCreate_big_test_file_Param.txt&amp;nbsp; &amp;gt;&amp;gt; .\TestCycle3\sqliotest_sr_t10_b256_all.txt &amp;nbsp;timeout &amp;nbsp;/T 60&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;&amp;nbsp;&lt;/b&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;&lt;b&gt;&lt;i&gt;&amp;nbsp;&lt;/i&gt;&lt;/b&gt;&lt;i&gt;where:&lt;/i&gt;&lt;/p&gt;
&lt;p&gt;&lt;i&gt;-kR &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; -&amp;nbsp; means that &amp;lsquo;READ&amp;rsquo; workload is used&lt;/i&gt;&lt;/p&gt;
&lt;p&gt;&lt;i&gt;-fsequential&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; - workload is sequential&lt;/i&gt;&lt;/p&gt;
&lt;p&gt;&lt;i&gt;-b512&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; - block size 256, which is quite typical size for the data warehouse type of workload &lt;/i&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Looking at the Performance Monitor, we also observed that instead of the nice flat line across all LUNs we have got absolutely uneven performance of the LUNs with the fluctuation up to 100 MB/sec between slowest and the fastest LUN.&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;&lt;a href="http://sqlcat.com/cfs-filesystemfile.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-00-22/5545.LUNPerf.png"&gt;&lt;img src="http://sqlcat.com/cfs-filesystemfile.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-00-22/5545.LUNPerf.png" border="0" alt=" " /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;All those observations indicated that we have &amp;nbsp;a problem, but what exactly was the reason for such the underperforming behavior? Since we tested only the throughput of the system storage using SQLIO, we may conclude that the problem is on the hardware or hardware configuration site.&lt;/p&gt;
&lt;p&gt;What should we then examine? Following components typically impact the data throughput capabilities: &lt;/p&gt;
&lt;p&gt;&lt;a href="http://sqlcat.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-00-22/2210.datatrail.PNG"&gt;&lt;img src="http://sqlcat.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-00-22/2210.datatrail.PNG" border="0" alt=" " /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;i&gt;PCI-slots -&amp;gt; HBA-&amp;gt; Network to the Switch -&amp;gt;Switch -&amp;gt; Network to the storage controller-&amp;gt; storage controller.&lt;/i&gt;&lt;/p&gt;
&lt;p&gt;First we checked if the HBAs are installed in the right PCI-E slots. In the past we observed couple of cases where HBAs were installed in the slots which were not able to deliver the throughput the HBA can consume. &lt;/p&gt;
&lt;p&gt;&lt;i&gt;Note: PCIe x1 v1.0 can deliver about 250 MB/sec. PCIe x4 v1.0 slot can deliver aggregated throughput around 1GB/sec. PCIe x1 v2.0 provides with double performance of the v1.0, which is about 500 MB/sec. Accordingly, PCIe x4 v2.0 could deliver up to 2 GB/sec. Therefore, in order to get anticipated throughput, it would be recommended then installing 8Gb dual port HBA into the PCIe x4.&amp;nbsp;&amp;nbsp; However, not all motherboard PCIe slots are equal. You need to read the fine-print for the motherboard spec for full details. &lt;/i&gt;&lt;/p&gt;
&lt;p&gt;Even though current hardware typically has enough high throughput PCI-E slots, there are still &lt;ins cite="mailto:Steve%20Howard%20(PFE)"&gt;a &lt;/ins&gt;couple of the &amp;lsquo;slow&amp;rsquo; slots on the motherboards and it is quite understandable if during assembling of the box people could overlook in which slot they put the HBA. So, checking this first could be the easy step to do and very fast to fix if this was a reason for the low throughput.&lt;/p&gt;
&lt;p&gt;However, in our case the HBAs were &amp;lsquo;sitting&amp;rsquo; in the right slots. What&amp;rsquo;s next then? Since cabling looked correct, we had to check the mapping of the HBAs to the LUNs. &lt;/p&gt;
&lt;p&gt;Checking the mapping on our configuration we observed each port A of the each individual HBA was mapped to all ports A of available storage enclosures. Following picture may help to illustrate configuration.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://sqlcat.com/cfs-filesystemfile.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-00-22/8463.WrongMapping.png"&gt;&lt;img src="http://sqlcat.com/cfs-filesystemfile.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-00-22/8463.WrongMapping.png" border="0" alt=" " /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;However even according to the vendor there must be explicit mappings created, matching up a single storage port with a single HBA port on the server. So, one HBA port must be connected to only one storage enclosure, like illustrated on the following picture:&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;a href="http://sqlcat.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-00-22/3681.FixedMapping.png"&gt;&lt;img src="http://sqlcat.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-00-22/3681.FixedMapping.png" border="0" alt=" " /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The diagram show only how the &amp;lsquo;Active&amp;rsquo; MPIO paths were mapped. For failover you can setup two paths per HBA with the MPIO policy ― &amp;lsquo;Failover Only&amp;rsquo;‖. This will direct MPIO to use a single path only and failover to the second or secondary path when the first one fails.&lt;/p&gt;
&lt;p&gt;With described above &amp;nbsp;configuration, where we &amp;nbsp;fixed mapping issue we&amp;rsquo;ve got throughput increased about 20% and brought it up from 4,7 GB/sec to 5,7 GB/sec.&amp;nbsp; During the SQLIO runs all LUNs were showing much more attractive picture&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;a href="http://sqlcat.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-00-22/3326.FixedPerf.png"&gt;&lt;img src="http://sqlcat.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-00-22/3326.FixedPerf.png" border="0" alt=" " /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Additional configuration settings change of the Read Ahead option on the storage from the &amp;nbsp;value &amp;lsquo;Default &amp;lsquo; to &amp;lsquo; 32MB&amp;rsquo; helped to raise performance to the ~6,7 GB/sec which was additional &lt;strong&gt;+14% &lt;/strong&gt;gain comparable to that we have got from the re-mapping the HBA-Storage Enclosure configuration.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://sqlcat.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-00-22/3426.Cache.png"&gt;&lt;img height="185" width="300" src="http://sqlcat.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-00-22/3426.Cache.png" alt=" " /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Conclusion:&lt;/b&gt; &amp;nbsp;&amp;nbsp;Reference architectures and appliances&amp;nbsp; give us greatly balanced configurations which help to speed up Data Warehouse deployments and vendors give very clear guidance on how to set it up for better performance. However, the old know wisdom &amp;ldquo;Trust but verify&amp;rdquo; is still true and may help your setup look way better.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://sqlcat.com/aggbug.aspx?PostID=2677" width="1" height="1"&gt;</description><category domain="http://sqlcat.com/sqlCat/b/msdnmirror/archive/tags/Data+Warehouse/default.aspx">Data Warehouse</category><category domain="http://sqlcat.com/sqlCat/b/msdnmirror/archive/tags/Fast+Track/default.aspx">Fast Track</category></item><item><title>Who is using AlwaysOn?</title><link>http://sqlcat.com/sqlCat/b/msdnmirror/archive/2012/04/17/who-is-using-alwayson.aspx</link><pubDate>Tue, 17 Apr 2012 19:19:00 GMT</pubDate><guid isPermaLink="false">e9619797-5f48-4d02-a1a8-7f300d09be66:2670</guid><dc:creator>SanjayMishra</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;Several customers are already running SQL Server 2012 AlwaysOn in production. You can find the case studies with some of these reference customers here:&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.microsoft.com/casestudies/Case_Study_Search_Results.aspx?Type=1&amp;amp;Keywords=AlwaysOn&amp;amp;LangID=46"&gt;http://www.microsoft.com/casestudies/Case_Study_Search_Results.aspx?Type=1&amp;amp;Keywords=AlwaysOn&amp;amp;LangID=46&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://sqlcat.com/aggbug.aspx?PostID=2670" width="1" height="1"&gt;</description><category domain="http://sqlcat.com/sqlCat/b/msdnmirror/archive/tags/OLTP/default.aspx">OLTP</category><category domain="http://sqlcat.com/sqlCat/b/msdnmirror/archive/tags/Denali/default.aspx">Denali</category><category domain="http://sqlcat.com/sqlCat/b/msdnmirror/archive/tags/SQL+Server+2012/default.aspx">SQL Server 2012</category><category domain="http://sqlcat.com/sqlCat/b/msdnmirror/archive/tags/AlwaysOn/default.aspx">AlwaysOn</category><category domain="http://sqlcat.com/sqlCat/b/msdnmirror/archive/tags/Disaster+Recovery/default.aspx">Disaster Recovery</category><category domain="http://sqlcat.com/sqlCat/b/msdnmirror/archive/tags/Availability+Groups/default.aspx">Availability Groups</category></item><item><title>Migration Guide: Migrating to SQL Server 2012 Failover Clustering and Availability Groups from Prior Clustering and Mirroring Deployments</title><link>http://sqlcat.com/sqlCat/b/whitepapers/archive/2012/04/04/migration-guide-migrating-to-sql-server-2012-failover-clustering-and-availability-groups-from-prior-clustering-and-mirroring-deployments.aspx</link><pubDate>Wed, 04 Apr 2012 23:45:00 GMT</pubDate><guid isPermaLink="false">e9619797-5f48-4d02-a1a8-7f300d09be66:2667</guid><dc:creator>SanjayMishra</dc:creator><slash:comments>1</slash:comments><description>&lt;p&gt;&lt;strong&gt;Writer:&lt;/strong&gt; Cephas Lin (Microsoft) &lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Contributors:&lt;/strong&gt; Sanjay Mishra (Microsoft), David Smith (ServiceU Corporation), LeRoy Tuttle Jr. (Microsoft)&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Technical Reviewers:&lt;/strong&gt; Prem Mehra (Microsoft), Mike Weiner (Microsoft), Steve Howard (Microsoft), Kun Cheng (Microsoft)&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Summary:&amp;nbsp;&lt;/strong&gt;Using Failover Cluster Instance (FCI) for local high availability within a data center and augmenting it with Database Mirroring (DBM) for disaster recovery has been a very popular HA+DR solution. With SQL Server 2012, this FCI+DBM solution can be replaced with a FCI+AG (Availability Groups) solution. This whitepaper describes how to migrate an existing FCI+DBM solution to a FCI+AG solution.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Read on: &lt;a href="http://msdn.microsoft.com/en-us/library/hh923056.aspx"&gt;http://msdn.microsoft.com/en-us/library/hh923056.aspx&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://sqlcat.com/aggbug.aspx?PostID=2667" width="1" height="1"&gt;</description><category domain="http://sqlcat.com/sqlCat/b/whitepapers/archive/tags/Availability/default.aspx">Availability</category><category domain="http://sqlcat.com/sqlCat/b/whitepapers/archive/tags/Architecture/default.aspx">Architecture</category><category domain="http://sqlcat.com/sqlCat/b/whitepapers/archive/tags/OLTP/default.aspx">OLTP</category><category domain="http://sqlcat.com/sqlCat/b/whitepapers/archive/tags/Failover+Clustering/default.aspx">Failover Clustering</category><category domain="http://sqlcat.com/sqlCat/b/whitepapers/archive/tags/HADR/default.aspx">HADR</category><category domain="http://sqlcat.com/sqlCat/b/whitepapers/archive/tags/Disaster+Recovery/default.aspx">Disaster Recovery</category><category domain="http://sqlcat.com/sqlCat/b/whitepapers/archive/tags/High+Availability/default.aspx">High Availability</category><category domain="http://sqlcat.com/sqlCat/b/whitepapers/archive/tags/Database+Mirroring/default.aspx">Database Mirroring</category><category domain="http://sqlcat.com/sqlCat/b/whitepapers/archive/tags/Denali/default.aspx">Denali</category><category domain="http://sqlcat.com/sqlCat/b/whitepapers/archive/tags/Data+Warehouse/default.aspx">Data Warehouse</category><category domain="http://sqlcat.com/sqlCat/b/whitepapers/archive/tags/AlwaysOn/default.aspx">AlwaysOn</category><category domain="http://sqlcat.com/sqlCat/b/whitepapers/archive/tags/sql+server+2012/default.aspx">sql server 2012</category><category domain="http://sqlcat.com/sqlCat/b/whitepapers/archive/tags/Migration/default.aspx">Migration</category><category domain="http://sqlcat.com/sqlCat/b/whitepapers/archive/tags/Availability+Group/default.aspx">Availability Group</category><category domain="http://sqlcat.com/sqlCat/b/whitepapers/archive/tags/Failover+Cluster+Instance/default.aspx">Failover Cluster Instance</category></item><item><title>DO NOT use Windows Failover Cluster Manager to perform Availability Group Failover</title><link>http://sqlcat.com/sqlCat/b/msdnmirror/archive/2012/03/30/do-not-use-windows-failover-cluster-manager-to-perform-availability-group-failover.aspx</link><pubDate>Fri, 30 Mar 2012 19:12:25 GMT</pubDate><guid isPermaLink="false">e9619797-5f48-4d02-a1a8-7f300d09be66:2663</guid><dc:creator>SanjayMishra</dc:creator><slash:comments>3</slash:comments><description>&lt;p&gt;&lt;b&gt;Author&lt;/b&gt;: Sanjay Mishra&lt;br /&gt;&lt;b&gt;Contributors&lt;/b&gt;: David P Smith (ServiceU)&lt;br /&gt;&lt;b&gt;Reviewers&lt;/b&gt;: Chuck Heinzelman, Mike Weiner, Prem Mehra, Kevin Cox, Jimmy May, Tim Wieman, Cephas Lin, Steve Lindell, Goden Yao&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Windows Server Failover Cluster (WSFC) is the foundation for SQL Server 2012 AlwaysOn Availability Group functionality. The Availability Group (AG) is registered as a resource group within the Windows Server Failover Cluster. Figure 1 shows an availability group in the Windows Failover Cluster Manager (FCM) interface.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://sqlcat.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-00-22/0675.Fig1_5F00_Blog_5F00_FCM_5F00_AG.png"&gt;&lt;img height="501" width="835" src="http://sqlcat.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-00-22/0675.Fig1_5F00_Blog_5F00_FCM_5F00_AG.png" border="0" alt=" " /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Figure 1: Availability Group service in the Failover Cluster Manager interface&lt;/p&gt;
&lt;p&gt;Even though Availability Group (AG) is a resource group within the Windows Server Failover Cluster, DO NOT use the Failover Cluster Manager (FCM) to perform certain operations on the AG:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;DO NOT change the &lt;i&gt;preferred owners&lt;/i&gt; and &lt;i&gt;possible owners&lt;/i&gt; settings for the AG. When an AG is created, the &lt;i&gt;preferred owners&lt;/i&gt; and &lt;i&gt;possible owners&lt;/i&gt; settings for the AG are established based on the primary and secondary servers information provided to SQL Server. Whenever a failover happens, the &lt;i&gt;preferred owners&lt;/i&gt; and &lt;i&gt;possible owners&lt;/i&gt; settings for the AG are reset based on the new primary. This is automatically done for you by the AG, so do not try to manually configure these settings.&lt;/li&gt;
&lt;li&gt;DO NOT change the &lt;i&gt;preferred owners&lt;/i&gt; and &lt;i&gt;possible owners&lt;/i&gt; settings for the AG listener. Similar to the AG discussion above the AG Listener settings are handled automatically.&lt;/li&gt;
&lt;li&gt;DO NOT move the AG between nodes using the Windows Failover Cluster Manager. The FCM doesn&amp;rsquo;t provide or have any awareness as to the synchronization status of the secondary replicas. Therefore, if the replica is not synchronized and the AG resource is failed over, the failover will then fail which can lead to extended downtime. The recommended ways to perform AG failover include SQL Server Management Studio and T-SQL statements.&lt;/li&gt;
&lt;li&gt;DO NOT add or remove resources in the AG resource group.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Note that the FCM does not prevent you from performing any of these operations. However, we recommend against executing these actions through FCM, as doing so may result in unintended outcomes, including unexpected downtime.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://sqlcat.com/aggbug.aspx?PostID=2663" width="1" height="1"&gt;</description><category domain="http://sqlcat.com/sqlCat/b/msdnmirror/archive/tags/OLTP/default.aspx">OLTP</category><category domain="http://sqlcat.com/sqlCat/b/msdnmirror/archive/tags/Denali/default.aspx">Denali</category><category domain="http://sqlcat.com/sqlCat/b/msdnmirror/archive/tags/SQL+Server+2012/default.aspx">SQL Server 2012</category><category domain="http://sqlcat.com/sqlCat/b/msdnmirror/archive/tags/AlwaysOn/default.aspx">AlwaysOn</category><category domain="http://sqlcat.com/sqlCat/b/msdnmirror/archive/tags/High+Availability/default.aspx">High Availability</category><category domain="http://sqlcat.com/sqlCat/b/msdnmirror/archive/tags/Availability+Groups/default.aspx">Availability Groups</category><category domain="http://sqlcat.com/sqlCat/b/msdnmirror/archive/tags/Failover+Cluster+Manager/default.aspx">Failover Cluster Manager</category></item><item><title>Concurrent ADD NODE operation yields unexpected results in a SQL Server Failover Cluster Instance</title><link>http://sqlcat.com/sqlCat/b/msdnmirror/archive/2012/03/30/concurrent-add-node-operation-yields-unexpected-results-in-a-sql-server-failover-cluster-instance.aspx</link><pubDate>Fri, 30 Mar 2012 18:43:00 GMT</pubDate><guid isPermaLink="false">e9619797-5f48-4d02-a1a8-7f300d09be66:2662</guid><dc:creator>SanjayMishra</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;&lt;b&gt;Author&lt;/b&gt;: Sanjay Mishra&lt;br /&gt;&lt;b&gt;Contributors&lt;/b&gt;: David P Smith (ServiceU)&lt;br /&gt;&lt;b&gt;Reviewers&lt;/b&gt;: Chuck Heinzelman, Mike Weiner, Prem Mehra, Kevin Cox, Jimmy May, Min He&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Installing a SQL Server Failover Cluster Instance (FCI) usually involves performing a setup on the first node, and after that, running setup to ADD NODE on the other node(s) in the FCI. A recent SQLCAT lab engagement required a 4-node FCI; and, with the intention of saving overall setup time, we tried to be &amp;ldquo;smart&amp;rdquo; by:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;First, running setup on Node1.&lt;/li&gt;
&lt;li&gt;Then, running setup on Node2 because we wanted to test the user interface when performing an &amp;ldquo;add node&amp;rdquo; operation&lt;/li&gt;
&lt;li&gt;Then, concurrently running setups on Node3 and Node4 (setup on Node4 started a few seconds later than Node3).&amp;nbsp; These were run concurrently because we just needed to get the nodes added to the FCI as quickly as possible to start application testing.&lt;a href="http://sqlcat.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-00-22/1351.Fig1_5F00_Blog_5F00_Concurrent_5F00_FCI.png"&gt;&lt;img src="http://sqlcat.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-00-22/1351.Fig1_5F00_Blog_5F00_Concurrent_5F00_FCI.png" border="0" alt=" " /&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;After the concurrent setups on Node3 and Node4 were complete, we looked at the properties of the FCI, and what we saw surprised us. Node3 was missing from the possible owners list of all the resources. We expected the possible owners list to be Node1, Node2, Node3, and Node4, but what we saw were Node1, Node2, and Node4 listed as possible owners, but not Node3.&lt;/p&gt;
&lt;p&gt;After further analysis, we discovered what happened during the concurrent setup on Node3 and Node4.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;After initial install on Node1 and Node2(possible owners = Node1 &amp;amp; Node2)&lt;/li&gt;
&lt;li&gt;Node3 setup started (possible owners=Node1 &amp;amp; Node2)&lt;/li&gt;
&lt;li&gt;Node4 setup started a few seconds later (possible owners=Node1 &amp;amp; Node2)&lt;/li&gt;
&lt;li&gt;Node3 setup finished:&amp;nbsp; possible owners set to previous owners (Node1 &amp;amp; Node2) PLUS this node (Node3)&lt;/li&gt;
&lt;li&gt;Node4 setup finished:&amp;nbsp; possible owners set to previous owners (Node1 &amp;amp; Node2) PLUS this node (Node4)&lt;/li&gt;
&lt;li&gt;&lt;b&gt;End result&lt;/b&gt;:&amp;nbsp; Possible owners=Node1, Node2, Node4 &lt;/li&gt;
&lt;/ul&gt;
&lt;p style="padding-left:30px;"&gt;&lt;b&gt;Expected result&lt;/b&gt;: Possible owners=Node1, Node2, Node3, Node4&lt;/p&gt;
&lt;p&gt;Upon further research, we found out that SQL FCI setup is not designed for concurrent setups on multiple nodes of an FCI.&amp;nbsp; In fact, concurrent setup on multiple nodes of an FCI is not a supported operation. The correct approach to install this multi-node FCI is:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Run setup on Node 1, and once it is complete&lt;/li&gt;
&lt;li&gt;Run setup on Node 2, and once it is complete&lt;/li&gt;
&lt;li&gt;Run setup on Node 3, and once it is complete&lt;/li&gt;
&lt;li&gt;Run setup on Node 4&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://sqlcat.com/aggbug.aspx?PostID=2662" width="1" height="1"&gt;</description><category domain="http://sqlcat.com/sqlCat/b/msdnmirror/archive/tags/SQL+Server+Best+Practices/default.aspx">SQL Server Best Practices</category><category domain="http://sqlcat.com/sqlCat/b/msdnmirror/archive/tags/Data+Warehouse/default.aspx">Data Warehouse</category><category domain="http://sqlcat.com/sqlCat/b/msdnmirror/archive/tags/SQL+Server+2008+R2/default.aspx">SQL Server 2008 R2</category><category domain="http://sqlcat.com/sqlCat/b/msdnmirror/archive/tags/SQL+Server+2008/default.aspx">SQL Server 2008</category><category domain="http://sqlcat.com/sqlCat/b/msdnmirror/archive/tags/SQL+Server+2005/default.aspx">SQL Server 2005</category><category domain="http://sqlcat.com/sqlCat/b/msdnmirror/archive/tags/OLTP/default.aspx">OLTP</category><category domain="http://sqlcat.com/sqlCat/b/msdnmirror/archive/tags/SQL+Server+2012/default.aspx">SQL Server 2012</category><category domain="http://sqlcat.com/sqlCat/b/msdnmirror/archive/tags/AlwaysOn/default.aspx">AlwaysOn</category><category domain="http://sqlcat.com/sqlCat/b/msdnmirror/archive/tags/High+Availability/default.aspx">High Availability</category><category domain="http://sqlcat.com/sqlCat/b/msdnmirror/archive/tags/Failover+Clustering/default.aspx">Failover Clustering</category><category domain="http://sqlcat.com/sqlCat/b/msdnmirror/archive/tags/Setup/default.aspx">Setup</category><category domain="http://sqlcat.com/sqlCat/b/msdnmirror/archive/tags/FCI/default.aspx">FCI</category><category domain="http://sqlcat.com/sqlCat/b/msdnmirror/archive/tags/Install/default.aspx">Install</category><category domain="http://sqlcat.com/sqlCat/b/msdnmirror/archive/tags/Failover+Cluster+Instances/default.aspx">Failover Cluster Instances</category></item><item><title>Microsoft SQL Server AlwaysOn Solutions Guide for High Availability and Disaster Recovery</title><link>http://sqlcat.com/sqlCat/b/whitepapers/archive/2012/02/25/microsoft-sql-server-alwayson-solutions-guide-for-high-availability-and-disaster-recovery.aspx</link><pubDate>Sat, 25 Feb 2012 17:28:00 GMT</pubDate><guid isPermaLink="false">e9619797-5f48-4d02-a1a8-7f300d09be66:2646</guid><dc:creator>SanjayMishra</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;&lt;span style="font-size:small;"&gt;&lt;strong&gt;Writer:&lt;/strong&gt; LeRoy Tuttle, Jr. (Microsoft). &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:small;"&gt;&lt;strong&gt;Contributors:&lt;/strong&gt; Cephas Lin (Microsoft), Justin Erickson (Microsoft), Lindsey Allen (Microsoft), Min He (Microsoft), Sanjay Mishra (Microsoft).&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:small;"&gt;&lt;strong&gt;Reviewers:&lt;/strong&gt; Alexei Khalyako (Microsoft), Allan Hirt (SQLHA), Ayad Shammout (Caregroup), Benjamin Wright-Jones (Microsoft), Charles Matthews (Microsoft), David P. Smith (ServiceU), Juergen Thomas (Microsoft), Kevin Farlee (Microsoft), Shahryar G. Hashemi (Motricity), Wolfgang Kutschera (Bwin Party).&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:small;"&gt;&lt;strong&gt;Summary: &lt;/strong&gt;This white paper discusses how to reduce planned and unplanned downtime, maximize application availability, and provide data protection using SQL Server 2012 AlwaysOn high availability and disaster recovery solutions.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:small;"&gt;A key goal of this paper is to establish a common context for related discussions between business stakeholders, technical decision makers, system architects, infrastructure engineers, and database administrators.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:small;"&gt;The content is presented in two major parts:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:small;"&gt;&lt;strong&gt;High Availability and Disaster Recovery Concepts.&lt;/strong&gt; Provide a brief discussion of the drivers and challenges of planning, managing, and measuring the business objectives of a highly available database environment. This discussion is followed by a brief overview of the high availability and disaster recovery capabilities of SQL Server 2012 AlwaysOn and Windows Server solutions.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:small;"&gt;&lt;strong&gt;SQL Server AlwaysOn Layers of Protection.&lt;/strong&gt; Provide a deeper discussion of the feature capabilities, rationale, and dependencies of the layers of protection offered by a SQL Server AlwaysOn solution. It will cover infrastructure availability, SQL Server instance-level protection, database-level protection, and data tier application capabilities.&lt;span id="mce_marker"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:&amp;#39;Segoe UI&amp;#39;,&amp;#39;sans-serif&amp;#39;;color:black;font-size:small;"&gt;&lt;strong&gt;Read on: &lt;a href="http://msdn.microsoft.com/en-us/library/hh781257.aspx"&gt;http://msdn.microsoft.com/en-us/library/hh781257.aspx&lt;/a&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://sqlcat.com/aggbug.aspx?PostID=2646" width="1" height="1"&gt;</description><category domain="http://sqlcat.com/sqlCat/b/whitepapers/archive/tags/Architecture/default.aspx">Architecture</category><category domain="http://sqlcat.com/sqlCat/b/whitepapers/archive/tags/OLTP/default.aspx">OLTP</category><category domain="http://sqlcat.com/sqlCat/b/whitepapers/archive/tags/Cluster/default.aspx">Cluster</category><category domain="http://sqlcat.com/sqlCat/b/whitepapers/archive/tags/Planned+Downtime/default.aspx">Planned Downtime</category><category domain="http://sqlcat.com/sqlCat/b/whitepapers/archive/tags/HADR/default.aspx">HADR</category><category domain="http://sqlcat.com/sqlCat/b/whitepapers/archive/tags/Disaster+Recovery/default.aspx">Disaster Recovery</category><category domain="http://sqlcat.com/sqlCat/b/whitepapers/archive/tags/Unplanned+Downtime/default.aspx">Unplanned Downtime</category><category domain="http://sqlcat.com/sqlCat/b/whitepapers/archive/tags/High+Availability/default.aspx">High Availability</category><category domain="http://sqlcat.com/sqlCat/b/whitepapers/archive/tags/Data+Warehouse/default.aspx">Data Warehouse</category><category domain="http://sqlcat.com/sqlCat/b/whitepapers/archive/tags/AlwaysOn/default.aspx">AlwaysOn</category><category domain="http://sqlcat.com/sqlCat/b/whitepapers/archive/tags/sql+server+2012/default.aspx">sql server 2012</category></item><item><title>SQL Server 2012 AlwaysOn: Multisite Failover Cluster Instance</title><link>http://sqlcat.com/sqlCat/b/whitepapers/archive/2011/12/22/sql-server-2012-alwayson_3A00_-multisite-failover-cluster-instance.aspx</link><pubDate>Thu, 22 Dec 2011 22:09:00 GMT</pubDate><guid isPermaLink="false">e9619797-5f48-4d02-a1a8-7f300d09be66:2615</guid><dc:creator>Mike Weiner</dc:creator><slash:comments>3</slash:comments><description>&lt;p&gt;&lt;b&gt;Writers:&lt;/b&gt; Mike Weiner, Sanjay Mishra, Min He&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Contributors:&lt;/b&gt; Lingwei Li, Mike Anderson (EMC Corporation)&lt;b&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Technical Reviewers:&lt;/b&gt; Shaun Tinline-Jones, Steve Howard, Prem Mehra, Paul Burpo, Mike Ruthruff, Jimmy May, Matt Neerincx, Dan Benediktson, Michael Steineke (Edgenet Inc.), David P. Smith (ServiceU Corporation)&lt;b&gt;&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Applies to:&lt;/b&gt; SQL Server 2012&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Summary:&lt;/b&gt; SQL Server Failover Clustering, which includes support for both local and multisite failover configurations, is part of the SQL Server 2012 AlwaysOn implementation suite, designed to provide high availability and disaster recovery for SQL Server. The multisite failover clustering technology has been enhanced significantly in SQL Server 2012. The multisite failover cluster architecture, enhancements in SQL Server 2012 to the technology, and some best practices to help with deployment of the technology are the primary focus of this paper.&lt;/p&gt;
&lt;p&gt;You can download the complete document here: &lt;a href="http://download.microsoft.com/download/D/2/0/D20E1C5F-72EA-4505-9F26-FEF9550EFD44/SQLServer2012_MultisiteFailoverCluster%20(2).docx"&gt;http://download.microsoft.com/download/D/2/0/D20E1C5F-72EA-4505-9F26-FEF9550EFD44/SQLServer2012_MultisiteFailoverCluster%20(2).docx&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://sqlcat.com/aggbug.aspx?PostID=2615" width="1" height="1"&gt;</description><category domain="http://sqlcat.com/sqlCat/b/whitepapers/archive/tags/Failover/default.aspx">Failover</category><category domain="http://sqlcat.com/sqlCat/b/whitepapers/archive/tags/OLTP/default.aspx">OLTP</category><category domain="http://sqlcat.com/sqlCat/b/whitepapers/archive/tags/Cluster/default.aspx">Cluster</category><category domain="http://sqlcat.com/sqlCat/b/whitepapers/archive/tags/Disaster+Recovery/default.aspx">Disaster Recovery</category><category domain="http://sqlcat.com/sqlCat/b/whitepapers/archive/tags/High+Availability/default.aspx">High Availability</category><category domain="http://sqlcat.com/sqlCat/b/whitepapers/archive/tags/Denali/default.aspx">Denali</category><category domain="http://sqlcat.com/sqlCat/b/whitepapers/archive/tags/AlwaysOn/default.aspx">AlwaysOn</category><category domain="http://sqlcat.com/sqlCat/b/whitepapers/archive/tags/multisite/default.aspx">multisite</category><category domain="http://sqlcat.com/sqlCat/b/whitepapers/archive/tags/sql+server+2012/default.aspx">sql server 2012</category></item><item><title>SQL Server 2012 AlwaysOn High Availability and Disaster Recovery Design Patterns</title><link>http://sqlcat.com/sqlCat/b/msdnmirror/archive/2011/12/22/sql-server-2012-alwayson-high-availability-and-disaster-recovery-design-patterns.aspx</link><pubDate>Thu, 22 Dec 2011 08:05:00 GMT</pubDate><guid isPermaLink="false">e9619797-5f48-4d02-a1a8-7f300d09be66:2614</guid><dc:creator>SanjayMishra</dc:creator><slash:comments>3</slash:comments><description>&lt;p&gt;&lt;strong&gt;Author&lt;/strong&gt;: Sanjay Mishra&lt;br /&gt;&lt;strong&gt;Contributors&lt;/strong&gt;: Justin Erickson, Mike Weiner&lt;br /&gt;&lt;strong&gt;Reviewers&lt;/strong&gt;: Prem Mehra, Juergen Thomas, Steve Howard, Chuck Heinzelman, Jimmy May&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;SQL Server 2012 AlwaysOn provides flexible design choices for selecting an appropriate high availability and disaster recovery solution for your application. SQL Server AlwaysOn was developed for applications that require high uptime, need protection against failures within a data center (high availability) and adequate redundancy against data center failures (disaster recovery). &lt;a href="http://msdn.microsoft.com/en-us/sqlserver/gg490638"&gt;http://msdn.microsoft.com/en-us/sqlserver/gg490638&lt;/a&gt; provides an overview of high availability and disaster recovery solutions available in SQL Server 2012 AlwaysOn.&lt;/p&gt;
&lt;p&gt;Through working with customers who are evaluating and deploying SQL Server 2012 AlwaysOn currently, we have seen the following design patterns emerge as end-to-end HA+DR solution:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Using Multi-site Failover Cluster Instance (FCI) for local high availability and disaster recovery solution&lt;/li&gt;
&lt;li&gt;Using Availability Groups (AG) for local high availability and disaster recovery solution&lt;/li&gt;
&lt;li&gt;Using Failover Cluster Instance (FCI) for local high availability, and Availability Groups (AG) for disaster recovery solution&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;We expect most of the SQL Server 2012 AlwaysOn deployments to match one of these design patterns or contain slight variations.&lt;/p&gt;
&lt;p&gt;So, how do these three design patterns compare and contrast? This blog highlights the salient features of each of these design patterns. A detailed whitepaper on each of these will be developed and published in near future.&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:medium;text-decoration:underline;"&gt;&lt;strong&gt;Multi-site Failover Cluster Instance (FCI) for HA and DR&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;The ability to implement a multi-site FCI as a HA and DR solution has been available in the SQL Server product for a number of previous releases, and many customers have been successfully using the solution (example: &lt;a href="http://sqlcat.com/sqlCat/b/whitepapers/archive/2010/09/20/sql-server-high-availability-and-disaster-recovery-for-sap-deployment-at-qr-a-technical-case-study.aspx"&gt;http://sqlcat.com/sqlCat/b/whitepapers/archive/2010/09/20/sql-server-high-availability-and-disaster-recovery-for-sap-deployment-at-qr-a-technical-case-study.aspx&lt;/a&gt;). In earlier versions of SQL Server, multi-site FCI required a stretch VLAN. SQL Server 2012 removes that requirement (along with a number of other improvements to the failover cluster instance technology) enabling multi-site FCI to be more commonly adopted as a HA and DR solution.&lt;/p&gt;
&lt;p&gt;Multi-site FCI requires storage level replication (provided by the storage vendor) to maintain a copy of the databases at the DR site. Even though there are separate storage volumes at each site, to SQL Server, this looks like a &lt;b&gt;Shared Storage solution&lt;/b&gt;. Other important attributes of this solution are:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The unit of failover for both local HA, and remote DR is SQL Server instance.&lt;/li&gt;
&lt;li&gt;No requirement on database recovery model, as storage level replication is used for maintaining the remote copy of the data.&lt;/li&gt;
&lt;li&gt;The DR copy of the data is not readable.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span style="font-size:small;"&gt;The whitepaper &lt;a href="http://sqlcat.com/sqlcat/b/whitepapers/archive/2011/12/22/sql-server-2012-alwayson_3a00_-multisite-failover-cluster-instance.aspx"&gt;http://sqlcat.com/sqlcat/b/whitepapers/archive/2011/12/22/sql-server-2012-alwayson_3a00_-multisite-failover-cluster-instance.aspx&lt;/a&gt;&amp;nbsp;provides architecture details and best practices for this solution.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="text-decoration:underline;"&gt;&lt;strong&gt;&lt;span style="font-size:medium;"&gt;Availability Group for HA and DR&lt;/span&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Using Database Mirroring for local high availability, and combining it with Log Shipping for a disaster recovery solution is a popular deployment architecture prior to SQL Server 2012 (example: &lt;a href="http://sqlcat.com/sqlcat/b/whitepapers/archive/2010/10/29/high-availability-and-disaster-recovery-for-microsoft-s-sap-data-tier-a-sql-server-2008-technical-case-study.aspx"&gt;http://sqlcat.com/sqlcat/b/whitepapers/archive/2010/10/29/high-availability-and-disaster-recovery-for-microsoft-s-sap-data-tier-a-sql-server-2008-technical-case-study.aspx&lt;/a&gt;).&lt;/p&gt;
&lt;p&gt;With SQL Server 2012, the Database Mirroring and Log Shipping solution can be replaced with an Availability Group solution with multiple secondaries.&lt;/p&gt;
&lt;p&gt;This is considered a &lt;b&gt;non-shared storage solution&lt;/b&gt;, as each SQL Server in the topology has its own copy of data and does not need to share storage.&amp;nbsp; Other important attributes of this solution are:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The unit of failover for local HA, and DR is the Availability Group (a group of one or more databases).&lt;/li&gt;
&lt;li&gt;The database is required to be in the FULL recovery model.&lt;/li&gt;
&lt;li&gt;The DR replica can be utilized as an Active Secondary (&lt;a href="http://msdn.microsoft.com/en-us/library/ff878253(v=SQL.110).aspx"&gt;Readable Secondary Replicas&lt;/a&gt;, &lt;a href="http://technet.microsoft.com/en-us/library/hh245119(SQL.110).aspx"&gt;Backup on Secondary Replicas&lt;/a&gt;).&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span style="font-size:small;"&gt;The whitepaper &lt;a href="http://sqlcat.com/sqlcat/b/whitepapers/archive/2012/06/22/alwayson-architecture-guide-building-a-high-availability-and-disaster-recovery-solution-by-using-alwayson-availability-groups.aspx"&gt;http://sqlcat.com/sqlcat/b/whitepapers/archive/2012/06/22/alwayson-architecture-guide-building-a-high-availability-and-disaster-recovery-solution-by-using-alwayson-availability-groups.aspx&lt;/a&gt; provides architecture details and best practices for this solution.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="text-decoration:underline;"&gt;&lt;strong&gt;&lt;span style="font-size:medium;"&gt;Failover Cluster Instance for local HA and Availability Group for DR&lt;/span&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Using Failover Cluster Instance for local high availability, and combing it with database mirroring for a disaster recovery solution is a popular deployment architecture prior to SQL Server 2012 (example: &lt;a href="http://sqlcat.com/sqlcat/b/whitepapers/archive/2009/08/04/high-availability-and-disaster-recovery-at-serviceu-a-sql-server-2008-technical-case-study.aspx"&gt;http://sqlcat.com/sqlcat/b/whitepapers/archive/2009/08/04/high-availability-and-disaster-recovery-at-serviceu-a-sql-server-2008-technical-case-study.aspx&lt;/a&gt;).&lt;/p&gt;
&lt;p&gt;With SQL Server 2012, the Database Mirroring can be replaced with an Availability Group for the DR solution, while continuing to use Failover Cluster instance for local HA.&lt;/p&gt;
&lt;p&gt;This architecture is a &lt;b&gt;combined Shared Storage and Non-Shared Storage &lt;/b&gt;solution. Other important attributes of this solution are:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The unit of failover for local HA is the SQL Server instance.&lt;/li&gt;
&lt;li&gt;The unit of failover for DR is the Availability Group (a group of one or more databases).&lt;/li&gt;
&lt;li&gt;The database is required to be in the FULL recovery model.&lt;/li&gt;
&lt;li&gt;The DR replica can be utilized as an Active Secondary (&lt;a href="http://msdn.microsoft.com/en-us/library/ff878253(v=SQL.110).aspx"&gt;Readable Secondary Replicas&lt;/a&gt;, &lt;a href="http://technet.microsoft.com/en-us/library/hh245119(SQL.110).aspx"&gt;Backup on Secondary Replicas&lt;/a&gt;).&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span style="font-size:small;"&gt;The whitepaper &lt;a href="http://sqlcat.com/sqlcat/b/whitepapers/archive/2012/06/22/alwayson-architecture-guide-building-a-high-availability-and-disaster-recovery-solution-by-using-failover-cluster-instances-and-availability-groups.aspx"&gt;http://sqlcat.com/sqlcat/b/whitepapers/archive/2012/06/22/alwayson-architecture-guide-building-a-high-availability-and-disaster-recovery-solution-by-using-failover-cluster-instances-and-availability-groups.aspx&lt;/a&gt; provides architecture details and best practices for this solution.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="text-decoration:underline;"&gt;&lt;strong&gt;&lt;span style="font-size:medium;"&gt;Summary&lt;/span&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;A brief outline and comparison of three common HA/DR design patterns with SQL Server 2012 AlwaysOn is provided above. The detailed architecture guides on each of these design patterns are published as separate whitepapers and the links are provided above.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://sqlcat.com/aggbug.aspx?PostID=2614" width="1" height="1"&gt;</description><category domain="http://sqlcat.com/sqlCat/b/msdnmirror/archive/tags/SQL+Server/default.aspx">SQL Server</category><category domain="http://sqlcat.com/sqlCat/b/msdnmirror/archive/tags/database+mirroring/default.aspx">database mirroring</category><category domain="http://sqlcat.com/sqlCat/b/msdnmirror/archive/tags/DBM/default.aspx">DBM</category><category domain="http://sqlcat.com/sqlCat/b/msdnmirror/archive/tags/Reliability+and+Availability/default.aspx">Reliability and Availability</category><category domain="http://sqlcat.com/sqlCat/b/msdnmirror/archive/tags/OLTP/default.aspx">OLTP</category><category domain="http://sqlcat.com/sqlCat/b/msdnmirror/archive/tags/Denali/default.aspx">Denali</category><category domain="http://sqlcat.com/sqlCat/b/msdnmirror/archive/tags/SQL+Server+2012/default.aspx">SQL Server 2012</category><category domain="http://sqlcat.com/sqlCat/b/msdnmirror/archive/tags/AlwaysOn/default.aspx">AlwaysOn</category><category domain="http://sqlcat.com/sqlCat/b/msdnmirror/archive/tags/Disaster+Recovery/default.aspx">Disaster Recovery</category><category domain="http://sqlcat.com/sqlCat/b/msdnmirror/archive/tags/High+Availability/default.aspx">High Availability</category><category domain="http://sqlcat.com/sqlCat/b/msdnmirror/archive/tags/design+pattern/default.aspx">design pattern</category><category domain="http://sqlcat.com/sqlCat/b/msdnmirror/archive/tags/architecture/default.aspx">architecture</category></item><item><title>Considerations for Using Azure Data Sync</title><link>http://sqlcat.com/sqlCat/b/technicalnotes/archive/2011/12/21/considerations-when-using-data-sync.aspx</link><pubDate>Wed, 21 Dec 2011 18:30:13 GMT</pubDate><guid isPermaLink="false">e9619797-5f48-4d02-a1a8-7f300d09be66:2613</guid><dc:creator>sthoward</dc:creator><slash:comments>3</slash:comments><description>&lt;div style="line-height:13pt;list-style-type:disc;margin:0in 0in 10pt;"&gt;&lt;font face="Calibri"&gt;&lt;font color="#000000"&gt;&lt;b&gt;&lt;font style="font-size:11pt;"&gt;Author: &lt;/font&gt;&lt;/b&gt;&lt;font style="font-size:11pt;"&gt;&lt;span&gt;&amp;#160;&lt;/span&gt;Steve Howard&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/div&gt;  &lt;div style="line-height:13pt;list-style-type:disc;margin:0in 0in 10pt;"&gt;&lt;font face="Calibri"&gt;&lt;font color="#000000"&gt;&lt;b&gt;&lt;font style="font-size:11pt;"&gt;Technical reviewers: &lt;/font&gt;&lt;/b&gt;&lt;font style="font-size:11pt;"&gt;Prem Mehra, Thomas Kejser, Shaun Tinline-Jones, Murshed Zaman, Praveen M, Sudhesh Suresh&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/div&gt;  &lt;div style="line-height:13pt;list-style-type:disc;margin:0in 0in 10pt;"&gt;&lt;font face="Calibri"&gt;&lt;font style="font-size:11pt;" color="#000000"&gt;Azure Data Sync offers companies a way of synchronizing data between Azure databases and other Azure databases, or between Azure databases and on premises databases. On selected intervals, only changed rows are synchronized between databases in a synchronization group, thus minimizing the bandwidth requirement at sync time. This makes it an attractive option both for synchronizing data among production databases for locality or functionality, and also for moving data for migration to the cloud to minimize cutover time. However; the minimizing of the bandwidth and synchronization time comes at a cost which must be planned for when Data Sync services are part of your option. This article looks at considerations learned from a recent engagement. &lt;/font&gt;&lt;/font&gt;&lt;/div&gt;  &lt;div style="line-height:13pt;list-style-type:disc;margin:0in 0in 10pt;"&gt;&lt;font color="#000000" face="Calibri"&gt;&lt;font style="font-size:11pt;"&gt;For an introduction on Data Sync, its setup and use, see: &lt;/font&gt;&lt;/font&gt;&lt;font style="font-size:11pt;"&gt;&lt;a href="http://blogs.msdn.com/b/windowsazure/archive/2011/11/22/new-webcast-series-explores-sql-azure-data-sync.aspx"&gt;&lt;font color="#0000ff" face="Calibri"&gt;&lt;u&gt;http://blogs.msdn.com/b/windowsazure/archive/2011/11/22/new-webcast-series-explores-sql-azure-data-sync.aspx&lt;/u&gt;&lt;/font&gt;&lt;/a&gt;&lt;/font&gt;&lt;font face="Calibri"&gt;&lt;font style="font-size:11pt;" color="#000000"&gt; &lt;/font&gt;&lt;/font&gt;&lt;/div&gt;  &lt;h1 style="line-height:16pt;list-style-type:disc;margin:24pt 0in 0pt;"&gt;&lt;font face="Cambria"&gt;&lt;font style="font-size:14pt;" color="#365f91"&gt;How the tracking of changes is accomplished&lt;/font&gt;&lt;/font&gt;&lt;/h1&gt;  &lt;div style="line-height:13pt;list-style-type:disc;margin:0in 0in 10pt;"&gt;&lt;font face="Calibri"&gt;&lt;font style="font-size:11pt;" color="#000000"&gt;When Data Sync is set up, on all tables to be synchronized, a new table is created using the naming convention DataSync.&amp;lt;tablename&amp;gt;_dss_tracking. This table will have the primary key columns from the base table, and 76 bytes/row of meta metadata about modifications to that row. The primary key values for every row in the tracked table, along with the meta-columns will be stored in this table so that at the end of this initial synchronization step, there will be a 1:1 ratio of rows in the base and tracking tables.&lt;/font&gt;&lt;/font&gt;&lt;/div&gt;  &lt;div style="line-height:13pt;list-style-type:disc;margin:0in 0in 10pt;"&gt;&lt;font face="Calibri"&gt;&lt;font style="font-size:11pt;" color="#000000"&gt;If you run the “Disk Usage by Table” report on a Synchronized database immediately after the provisioning, you will see a pattern like Figure 1.&lt;/font&gt;&lt;/font&gt;&lt;/div&gt;  &lt;div style="line-height:13pt;list-style-type:disc;margin:0in 0in 10pt;"&gt;&lt;span&gt;&lt;a href="http://sqlcat.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-00-08-metablogapi/4657.clip_5F00_image0026_5F00_396B9E37.jpg"&gt;&lt;img style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" title="clip_image002[6]" border="0" alt="clip_image002[6]" src="http://sqlcat.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-00-08-metablogapi/1057.clip_5F00_image0026_5F00_thumb_5F00_458D185E.jpg" width="624" height="299" /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;  &lt;p style="line-height:normal;list-style-type:disc;margin:0in 0in 10pt;" class="MsoCaption"&gt;&lt;font face="Calibri"&gt;&lt;font color="#4f81bd"&gt;&lt;strong&gt;Figure &lt;span&gt;1&lt;/span&gt;: Immediately after provisioning databases to use Azure Data Sync, a base table and its associated tracking table will have a 1:1 ratio of rows. The size (Reserved (KB)) of the tracking table can be significant - sometimes even more than the base table as seen when comparing dbo.PeopleType with DataSync.PeopleType_dss_tracking.&lt;/strong&gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;  &lt;div style="line-height:13pt;list-style-type:disc;margin:0in 0in 10pt;"&gt;&lt;font face="Calibri"&gt;&lt;font style="font-size:11pt;" color="#000000"&gt;For tables with only a clustered index, the total space required to store the tracking table data and its indexes (as shone in the “Reserved (KB)” column) may be near to the storage space required for the base table. In fact, for a narrow base table such as the PeopleType table in the example, the tracking table may require more storage space than the base table.&lt;/font&gt;&lt;/font&gt;&lt;/div&gt;  &lt;div style="line-height:13pt;list-style-type:disc;margin:0in 0in 10pt;"&gt;&lt;font face="Calibri"&gt;&lt;font style="font-size:11pt;" color="#000000"&gt;To track data modifications, 3 triggers are created on each base table: one for inserts; one for updates; and one for deletes. For inserts, a new row is inserted in the tracking table. However; for deletes, the row is not immediately deleted from the tracking table. If it were, then it would not be possible for the Sync agent to know what rows were deleted. In the current version of Data Sync, the deleted rows will be marked as tombstoned and will stay in the tracking tables for 45 days after a delete operation before being removed by the Sync agent. This time is not configurable in the current version of Sync. This means that after deletes have been run on a table, there will likely be more rows in the tracking table than in the base table, and the tracking table may require significantly more storage space than the base table.&lt;/font&gt;&lt;/font&gt;&lt;/div&gt;  &lt;h1 style="line-height:16pt;list-style-type:disc;margin:24pt 0in 0pt;"&gt;&lt;font face="Cambria"&gt;&lt;font style="font-size:14pt;" color="#365f91"&gt;Planning for Data Sync Implementation&lt;/font&gt;&lt;/font&gt;&lt;/h1&gt;  &lt;div style="line-height:13pt;list-style-type:disc;margin:0in 0in 10pt;"&gt;&lt;font face="Calibri"&gt;&lt;font style="font-size:11pt;" color="#000000"&gt;When planning to use Azure Data Sync to synchronize databases, you need to plan to leave enough space to store the tracking data both in any on-premises databases, and in any Azure databases to be synchronized. This may mean provisioning larger databases in Azure. In the example in Figure 1, when a synchronization was attempted with a 10 GB Azure database, less than half the data could be synchronized. You can see that even if the People table was reduced to a size of 9GB, the data still could not be synchronized with a 10 GB Azure database because the tracking table for People is nearly as large as the People table. If you have enough storage in the databases for the initial provision, but run out of space in a subsequent synchronization, then Data Sync will synchronize as much as there is room to synchronize, then will stop synchronizing.&lt;/font&gt;&lt;/font&gt;&lt;/div&gt;  &lt;div style="line-height:13pt;list-style-type:disc;margin:0in 0in 10pt;"&gt;&lt;font face="Calibri"&gt;&lt;font style="font-size:11pt;" color="#000000"&gt;With this in mind, here are a few recommendations when planning to use Data Sync:&lt;/font&gt;&lt;/font&gt;&lt;/div&gt;  &lt;p style="line-height:13pt;list-style-type:disc;text-indent:-0.25in;margin:0in 0in 0pt 0.5in;margin:0 0 .0001pt .5in;" class="CxSpFirst"&gt;&lt;font color="#000000"&gt;&lt;span&gt;&lt;span&gt;&lt;font face="Symbol"&gt;&lt;font style="font-size:11pt;"&gt;·&lt;/font&gt;&lt;/font&gt;&lt;span style="line-height:normal;"&gt;&lt;font face="Times New Roman"&gt;&lt;font style="font-size:7pt;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;font face="Calibri"&gt;&lt;font style="font-size:11pt;"&gt;Run the “Disk Usage by Table” report on the database you want to synchronize. &lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p style="line-height:13pt;list-style-type:disc;text-indent:-0.25in;margin:0in 0in 0pt 0.5in;margin:0 0 .0001pt .5in;" class="CxSpMiddle"&gt;&lt;font color="#000000"&gt;&lt;span&gt;&lt;span&gt;&lt;font face="Symbol"&gt;&lt;font style="font-size:11pt;"&gt;·&lt;/font&gt;&lt;/font&gt;&lt;span style="line-height:normal;"&gt;&lt;font face="Times New Roman"&gt;&lt;font style="font-size:7pt;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;font face="Calibri"&gt;&lt;font style="font-size:11pt;"&gt;Start with the estimation that it may require as much space to store the synchronized tables with their associated tracking data as it takes to store just the table.&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p style="line-height:13pt;list-style-type:disc;text-indent:-0.25in;margin:0in 0in 0pt 0.5in;margin:0 0 .0001pt .5in;" class="CxSpMiddle"&gt;&lt;font color="#000000"&gt;&lt;span&gt;&lt;span&gt;&lt;font face="Symbol"&gt;&lt;font style="font-size:11pt;"&gt;·&lt;/font&gt;&lt;/font&gt;&lt;span style="line-height:normal;"&gt;&lt;font face="Times New Roman"&gt;&lt;font style="font-size:7pt;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;font face="Calibri"&gt;&lt;font style="font-size:11pt;"&gt;Remember that wide primary keys will increase the storage space required as primary keys are stored in the tracking tables.&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p style="line-height:13pt;list-style-type:disc;text-indent:-0.25in;margin:0in 0in 10pt 0.5in;margin:0 0 .0001pt .5in;" class="CxSpLast"&gt;&lt;font color="#000000"&gt;&lt;span&gt;&lt;span&gt;&lt;font face="Symbol"&gt;&lt;font style="font-size:11pt;"&gt;·&lt;/font&gt;&lt;/font&gt;&lt;span style="line-height:normal;"&gt;&lt;font face="Times New Roman"&gt;&lt;font style="font-size:7pt;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;font face="Calibri"&gt;&lt;font style="font-size:11pt;"&gt;Remember that deleted rows are stored for 45 days in the tracking tables. Therefore, with tables with significant numbers of deletes, you may need significantly more than double the storage space of the base table. &lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;  &lt;h1 style="line-height:16pt;list-style-type:disc;margin:24pt 0in 0pt;"&gt;&lt;font face="Cambria"&gt;&lt;font style="font-size:14pt;" color="#365f91"&gt;Other Considerations and Best Practices&lt;/font&gt;&lt;/font&gt;&lt;/h1&gt;  &lt;div style="line-height:13pt;list-style-type:disc;margin:0in 0in 10pt;"&gt;&lt;font face="Calibri"&gt;&lt;font style="font-size:11pt;" color="#000000"&gt;After implementation, you need to consider what happens with schema modifications, or when a synchronized table is truncated.&lt;/font&gt;&lt;/font&gt;&lt;/div&gt;  &lt;h2 style="line-height:15pt;list-style-type:disc;margin:10pt 0in 0pt;"&gt;&lt;font face="Cambria"&gt;&lt;font style="font-size:13pt;" color="#4f81bd"&gt;Schema Modifications&lt;/font&gt;&lt;/font&gt;&lt;/h2&gt;  &lt;div style="line-height:13pt;list-style-type:disc;margin:0in 0in 10pt;"&gt;&lt;font face="Calibri"&gt;&lt;font style="font-size:11pt;" color="#000000"&gt;Since only the primary key columns are tracked, the only schema modifications of concern are those that modify the primary key. Consider this chain of events:&lt;/font&gt;&lt;/font&gt;&lt;/div&gt;  &lt;p style="line-height:13pt;list-style-type:disc;text-indent:-0.25in;margin:0in 0in 0pt 0.5in;margin:0 0 .0001pt .5in;" class="CxSpFirst"&gt;&lt;font color="#000000"&gt;&lt;span&gt;&lt;span&gt;&lt;font face="Calibri"&gt;&lt;font style="font-size:11pt;"&gt;1.&lt;/font&gt;&lt;/font&gt;&lt;span style="line-height:normal;"&gt;&lt;font face="Times New Roman"&gt;&lt;font style="font-size:7pt;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;font face="Calibri"&gt;&lt;font style="font-size:11pt;"&gt;Create a table with a primary key on col1.&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p style="line-height:13pt;list-style-type:disc;text-indent:-0.25in;margin:0in 0in 0pt 0.5in;margin:0 0 .0001pt .5in;" class="CxSpMiddle"&gt;&lt;font color="#000000"&gt;&lt;span&gt;&lt;span&gt;&lt;font face="Calibri"&gt;&lt;font style="font-size:11pt;"&gt;2.&lt;/font&gt;&lt;/font&gt;&lt;span style="line-height:normal;"&gt;&lt;font face="Times New Roman"&gt;&lt;font style="font-size:7pt;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;font face="Calibri"&gt;&lt;font style="font-size:11pt;"&gt;Insert a row with col1 = 1 and col2 = 1.&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p style="line-height:13pt;list-style-type:disc;text-indent:-0.25in;margin:0in 0in 0pt 0.5in;margin:0 0 .0001pt .5in;" class="CxSpMiddle"&gt;&lt;font color="#000000"&gt;&lt;span&gt;&lt;span&gt;&lt;font face="Calibri"&gt;&lt;font style="font-size:11pt;"&gt;3.&lt;/font&gt;&lt;/font&gt;&lt;span style="line-height:normal;"&gt;&lt;font face="Times New Roman"&gt;&lt;font style="font-size:7pt;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;font face="Calibri"&gt;&lt;font style="font-size:11pt;"&gt;Set this table up as a synchronized table.&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p style="line-height:13pt;list-style-type:disc;text-indent:-0.25in;margin:0in 0in 0pt 0.5in;margin:0 0 .0001pt .5in;" class="CxSpMiddle"&gt;&lt;font color="#000000"&gt;&lt;span&gt;&lt;span&gt;&lt;font face="Calibri"&gt;&lt;font style="font-size:11pt;"&gt;4.&lt;/font&gt;&lt;/font&gt;&lt;span style="line-height:normal;"&gt;&lt;font face="Times New Roman"&gt;&lt;font style="font-size:7pt;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;font face="Calibri"&gt;&lt;font style="font-size:11pt;"&gt;Drop the primary key and re-create it on (col1, col2).&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p style="line-height:13pt;list-style-type:disc;text-indent:-0.25in;margin:0in 0in 10pt 0.5in;margin:0 0 .0001pt .5in;" class="CxSpLast"&gt;&lt;font color="#000000"&gt;&lt;span&gt;&lt;span&gt;&lt;font face="Calibri"&gt;&lt;font style="font-size:11pt;"&gt;5.&lt;/font&gt;&lt;/font&gt;&lt;span style="line-height:normal;"&gt;&lt;font face="Times New Roman"&gt;&lt;font style="font-size:7pt;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/font&gt;&lt;/font&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;font face="Calibri"&gt;&lt;font style="font-size:11pt;"&gt;Insert a new row with col1 = 1 and col2 = 2.&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;  &lt;div style="line-height:13pt;list-style-type:disc;margin:0in 0in 10pt;"&gt;&lt;font face="Calibri"&gt;&lt;font style="font-size:11pt;" color="#000000"&gt;When step 4 is performed, nothing happens to the tracking table, it will still have its primary key on col1 only. This means when step 5 occurs, another row will not be inserted into the tracking table. Instead, the existing row with col1 = 1 in this table is marked as updated. This creates a situation where the tables in the other synchronized databases cannot be updated properly. For this reason, when making changes to your primary keys on your tables, it may be necessary to drop and recreate your synchronization databases or groups.&lt;/font&gt;&lt;/font&gt;&lt;/div&gt;  &lt;h2 style="line-height:15pt;list-style-type:disc;margin:10pt 0in 0pt;"&gt;&lt;font face="Cambria"&gt;&lt;font style="font-size:13pt;" color="#4f81bd"&gt;Truncating tables&lt;/font&gt;&lt;/font&gt;&lt;/h2&gt;  &lt;div style="line-height:13pt;list-style-type:disc;margin:0in 0in 10pt;"&gt;&lt;font face="Calibri"&gt;&lt;font style="font-size:11pt;" color="#000000"&gt;A truncation does not fire triggers. In the current version of data sync, nothing prevents synchronized tables from being truncating. However; truncating a table will cause the tables to be out of sync, and in a state where they cannot be synchronized without manual intervention. Do not truncate tables synchronized by data sync. &lt;/font&gt;&lt;/font&gt;&lt;/div&gt;  &lt;h1 style="line-height:16pt;list-style-type:disc;margin:24pt 0in 0pt;"&gt;&lt;font face="Cambria"&gt;&lt;font style="font-size:14pt;" color="#365f91"&gt;Conclusion&lt;/font&gt;&lt;/font&gt;&lt;/h1&gt;  &lt;div style="line-height:13pt;list-style-type:disc;margin:0in 0in 10pt;"&gt;&lt;font face="Calibri"&gt;&lt;font style="font-size:11pt;" color="#000000"&gt;By understanding how Sync works, and by following best practices when dealing with tables with triggers, you can make use of Azure Data Sync as part of your migration, and as an ongoing part of your hybrid on-premises and Azure database applications. As with all Azure features, Data Sync is undergoing rapid development and improvement. Sync may operate differently in the future. Check the current documentation on Data Sync to verify operations as new features in SQL Azure and Windows Azure may make changes in Data Sync possible.&lt;/font&gt;&lt;/font&gt;&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://sqlcat.com/aggbug.aspx?PostID=2613" width="1" height="1"&gt;</description><category domain="http://sqlcat.com/sqlCat/b/technicalnotes/archive/tags/Cloud/default.aspx">Cloud</category><category domain="http://sqlcat.com/sqlCat/b/technicalnotes/archive/tags/Azure/default.aspx">Azure</category><category domain="http://sqlcat.com/sqlCat/b/technicalnotes/archive/tags/Sync/default.aspx">Sync</category></item></channel></rss>