<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>SQL Server Faq</title>
	<atom:link href="http://www.sqlserverfaq.net/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.sqlserverfaq.net</link>
	<description></description>
	<lastBuildDate>Sat, 19 May 2012 13:26:56 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Placing a Drillthrough Report in a different folder in SQL Server Reporting Services</title>
		<link>http://www.sqlserverfaq.net/2012/05/03/placing-a-drillthrough-report-in-a-different-folder-in-sql-server-reporting-services/</link>
		<comments>http://www.sqlserverfaq.net/2012/05/03/placing-a-drillthrough-report-in-a-different-folder-in-sql-server-reporting-services/#comments</comments>
		<pubDate>Thu, 03 May 2012 16:25:51 +0000</pubDate>
		<dc:creator>Parikshit</dc:creator>
				<category><![CDATA[SSRS]]></category>
		<category><![CDATA[linked report;drillthrough report;different folder;seperate folder;Actions]]></category>

		<guid isPermaLink="false">http://www.sqlserverfaq.net/?p=222</guid>
		<description><![CDATA[When you design a drillthrough report in your reporting server project using BIDS, while adding the drillthrough actions for the report, in the dropdown you only get option to select the reports (rdl files ) designed in the same project. &#8230; <a href="http://www.sqlserverfaq.net/2012/05/03/placing-a-drillthrough-report-in-a-different-folder-in-sql-server-reporting-services/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>When you design a drillthrough report in your reporting server project using BIDS, while adding the drillthrough actions for the report, in the dropdown you only get option to select the reports (rdl files ) designed in the same project. Hence when the entire project is uploaded, all the drillthrough reports can deployed in the same folder.</p>
<p>Now you may want to move the parameterized drillthrough reports on a different folder to implement security and to promote reusability. However when you move the drillthrough reports to seperate folder, the dashboard report breaks and shouts at you since it is not able to locate the drillthrough report in the same folder.</p>
<p>How do you achieve this ?</p>
<p>There are two ways to achieve the above requirements</p>
<p><span style="text-decoration: underline;"><strong>1. Using to Jump to URL in the Drillthrough Action while designing the reports in BIDS</strong></span></p>
<p>In this approach, you need to deploy the drillthrough reports first on the report server and get the URL to render the report. You can use this URL in the JUMP to URL option while defining the Drillthrough Actions in the Dashbaord Report.</p>
<p>The only drawback of this approach is, in the dashboard report when the end user clicks on the drillthrough report, the drillthrough report is rendered from here the user can&#8217;t go back to the original dashboard report.</p>
<p>&nbsp;</p>
<p><span style="text-decoration: underline;"><strong>2. Creating a Linked Report in the same folder</strong></span></p>
<p>In this approach, after  we move the drillthrough report in a seperate folder, we need to create a linked report with the same name as the drillthrough report and place it in the same folder as the dashboard.</p>
<p>The Linked report will serve the requirement.</p>
<p>&nbsp;</p>
<p>Hope this small tip helps !!!</p>
<p>Parikshit Savjani<br />
<em>Premier Field Engineer</em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.sqlserverfaq.net/2012/05/03/placing-a-drillthrough-report-in-a-different-folder-in-sql-server-reporting-services/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Considerations for Configuring Log Shipping for a cross-domain clustered instance of SQL Server over a Firewall Tweet</title>
		<link>http://www.sqlserverfaq.net/2012/04/25/considerations-for-configuring-log-shipping-for-a-cross-domain-clustered-instance-of-sql-server-over-a-firewall/</link>
		<comments>http://www.sqlserverfaq.net/2012/04/25/considerations-for-configuring-log-shipping-for-a-cross-domain-clustered-instance-of-sql-server-over-a-firewall/#comments</comments>
		<pubDate>Wed, 25 Apr 2012 15:01:32 +0000</pubDate>
		<dc:creator>Parikshit</dc:creator>
				<category><![CDATA[AlwaysON]]></category>
		<category><![CDATA[cluster]]></category>
		<category><![CDATA[Disaster Recovery]]></category>
		<category><![CDATA[Fileshare]]></category>
		<category><![CDATA[Firewall]]></category>
		<category><![CDATA[High Availability]]></category>
		<category><![CDATA[Log shipping]]></category>
		<category><![CDATA[Network Passthrough]]></category>
		<category><![CDATA[SMB]]></category>
		<category><![CDATA[sql server]]></category>

		<guid isPermaLink="false">http://www.sqlserverfaq.net/?p=213</guid>
		<description><![CDATA[Last week, one of my customers had engaged me for consulting to configure Log Shipping on clustered instance of SQL Servers which are running in different domains. In other words, the primary and secondary servers are in different domains. While &#8230; <a href="http://www.sqlserverfaq.net/2012/04/25/considerations-for-configuring-log-shipping-for-a-cross-domain-clustered-instance-of-sql-server-over-a-firewall/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Last week, one of my customers had engaged me for consulting to configure Log Shipping on clustered instance of SQL Servers which are running in different domains. In other words, the primary and secondary servers are in different domains.</p>
<p>While Log Shipping is pretty easy to configure but configuring log-shipping for a cross-domain clustered instance of SQL server over a Firewall can be trickier which requires some consideration so I plan to discuss these consideration in this blog post for the benefit of larger audience</p>
<p>First Let us discuss Clustering and Log Shipping as HADR Solution</p>
<p><strong><em>Clustering and Log Shipping<br />
=======================</em></strong></p>
<p>Until SQL 2012 AlwaysON, we didn’t have a good HADR solution with SQL Server. Clustering serves as a very good High Availability Solution due to minimum failover time as well as SQL Network Name allowing the Application a transparent failover.  However due to the shared storage, Clustering cannot be used as a Disaster recovery solution. While Log Shipping/Database Mirroring serves as a good DR Solution but may not be a good High Availability solution since RPO and RTO depends on the frequency of tlog backup, Network latency.</p>
<p>So Clustering along with Database Mirroring or Log Shipping together serves as a Good HADR Solution where we can take the best of both the worlds</p>
<p>Let us now discuss various considerations in Log Shipping scenario</p>
<p><strong><em>Considerations for Log Shipping for a Clustered instance<br />
=============================================</em></strong></p>
<p>For a clustered instance, there is one important consideration. The network share for the Log Shipping should be created as a Fileshare resource on the Cluster.</p>
<p>Further, the fileshare resource should be created in the SQL Group while the shared folder should be created on the shared drive. The dependency of the Fileshare resource should be on Shared Drive in the SQL Group and SQL Network Name.</p>
<p>The reason for creating Fileshare in the SQL Group of the Cluster is so that when the instance is failed over to Node 2, the Log shipping continues to run transparently without any impact. Further the UNC path for the share would be <a href="file:///\\SQL">\\&lt;SQL</a> Network Name&gt;\&lt;Folder Name&gt;. This will ensure the copy job will always be able to access the network share on shared drive.</p>
<p><strong>How to create file shares on a cluster<br />
</strong><a href="http://support.microsoft.com/kb/224967">http://support.microsoft.com/kb/224967</a></p>
<p>&nbsp;</p>
<p><strong><em>Considerations for Log Shipping on a cross domain servers<br />
================================================</em></strong></p>
<p>While it is possible to establish Log Shipping on a cross domain servers, the only requirement is the two servers should have network connectivity to each other and should be able to access each other.</p>
<p>However the major challenge while establishing Log Shipping on a cross domain servers is permission on the network share which should be accessible to copy job running as under SQL Agent account on the secondary server.</p>
<p>For the SQL Agent account which will be a domain account, to be authenticated by the Primary server, there should be two way trust between the domains.</p>
<p>However if you are not able to establish the two way trust between the domains due to some reason, we can still configure Log Shipping by using Network PassThrough Authentication.</p>
<p>With Network PassThrough Authentication, the SQL Agent account for the servers should have same name and same password.</p>
<p>More information on Network Passthrough Authentication<br />
<a href="http://support.microsoft.com/kb/102716">http://support.microsoft.com/kb/102716</a></p>
<p>&nbsp;</p>
<p><strong><em>Considerations for Log Shipping over a Firewall<br />
=======================================</em></strong></p>
<p>While Log shipping uses SMB communication to copy the log files from the Network Share to the local destination folder and hence in order to configure over Firewall, following ports should be open</p>
<p>If,</p>
<p><strong>Netbios over TCP/IP is enabled<br />
</strong><br />
TCP ports 137,139<br />
UDP ports 137,138</p>
<p><strong>Direct Hosting of SMB over TCP/IP</strong></p>
<p>TCP port 445</p>
<p>More information on port requirement for Windows Server<br />
<a href="http://support.microsoft.com/kb/832017">http://support.microsoft.com/kb/832017</a></p>
<p>Further, with Cluster, the above ports should be open in Firewall on Virtual IP address for inbound rules while for outbound rules, it should be open on Physical IP address of the Nodes.</p>
<p>More information for Firewall configuration on Cluster<br />
<a href="https://msmvps.com/blogs/clustering/archive/2005/08/11/62372.aspx">https://msmvps.com/blogs/clustering/archive/2005/08/11/62372.aspx</a></p>
<p>While in my case, we had to take all the above consideration to ensure we are a able to setup Log shipping for a clustered instance of SQL Server across cross domain server over a Firewall.</p>
<p>Hope this Helps !!</p>
<p>Parikshit Savjani<br />
<em>Premier Field Engineer</em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.sqlserverfaq.net/2012/04/25/considerations-for-configuring-log-shipping-for-a-cross-domain-clustered-instance-of-sql-server-over-a-firewall/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SQL Server Deployment Checklist</title>
		<link>http://www.sqlserverfaq.net/2012/04/25/sql-server-deployment-checklist/</link>
		<comments>http://www.sqlserverfaq.net/2012/04/25/sql-server-deployment-checklist/#comments</comments>
		<pubDate>Wed, 25 Apr 2012 13:10:18 +0000</pubDate>
		<dc:creator>Parikshit</dc:creator>
				<category><![CDATA[SQL SERVER SETUP]]></category>
		<category><![CDATA[checklist]]></category>
		<category><![CDATA[configuration]]></category>
		<category><![CDATA[deployment]]></category>
		<category><![CDATA[Microsoft SQL Server]]></category>

		<guid isPermaLink="false">http://www.sqlserverfaq.net/?p=209</guid>
		<description><![CDATA[While most experienced DBAs would maintain their checklist before installing and setting up SQL Server in the production environment. However SQL Server is a product which is very commonly used by Small and Medium Enterprise who do not necessarily have &#8230; <a href="http://www.sqlserverfaq.net/2012/04/25/sql-server-deployment-checklist/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>While most experienced DBAs would maintain their checklist before installing and setting up SQL Server in the production environment. However SQL Server is a product which is very commonly used by Small and Medium Enterprise who do not necessarily have experienced DBAs. Infact the person, installing SQL Server may not be even a DBA.</p>
<p>I came across an excellent Blog post from John who has enlisted a comprehensive checklist of the consideration for installing SQL Server setup. Although SQL Server configuration is very easy due to its User Friendly setup and minimal administration. If all the points mentioned in this checklist is taken care off, you can avoid most problems/issues which you might encounter post deployment of SQL Server</p>
<p><a href="http://blogs.msdn.com/b/johnhicks/archive/2008/03/03/sql-server-checklist.aspx">http://blogs.msdn.com/b/johnhicks/archive/2008/03/03/sql-server-checklist.aspx</a></p>
<p>Would like to appreciate the author&#8217;s efforts to pen down a comprehensive checklist !!!</p>
<p>Hope this Helps !!</p>
<p>Parikshit Savjani<br />
<em>Premier Field Engineer</em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.sqlserverfaq.net/2012/04/25/sql-server-deployment-checklist/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SQL Server Predeployment IO Stress Testing using sqlio Tweet</title>
		<link>http://www.sqlserverfaq.net/2012/04/02/sql-server-predeployment-io-stress-testing-using-sqlio/</link>
		<comments>http://www.sqlserverfaq.net/2012/04/02/sql-server-predeployment-io-stress-testing-using-sqlio/#comments</comments>
		<pubDate>Mon, 02 Apr 2012 11:11:49 +0000</pubDate>
		<dc:creator>Parikshit</dc:creator>
				<category><![CDATA[Performance]]></category>
		<category><![CDATA[deployment]]></category>
		<category><![CDATA[io]]></category>
		<category><![CDATA[io stress]]></category>
		<category><![CDATA[san]]></category>
		<category><![CDATA[sql server]]></category>
		<category><![CDATA[sqlio]]></category>
		<category><![CDATA[sqliosim]]></category>
		<category><![CDATA[stress testing]]></category>

		<guid isPermaLink="false">http://www.sqlserverfaq.net/?p=198</guid>
		<description><![CDATA[While there are some really good in-depth whitepapers and blogs (specifically by CSS Team and Brent Ozar &#38; his team) to address this topic. However the information in these blogs,whitepapers is kind-off scattered and for a novice the information in &#8230; <a href="http://www.sqlserverfaq.net/2012/04/02/sql-server-predeployment-io-stress-testing-using-sqlio/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>While there are some really good in-depth whitepapers and blogs (specifically by CSS Team and Brent Ozar &amp; his team) to address this topic. However the information in these blogs,whitepapers is kind-off scattered and for a novice the information in some these whitepapers can be overwhelming.In this blog post I would like to explain you the approach one would want to take to perform IO Stress Testing in order to meet expected workload from Application hosted on SQL Server.</p>
<p>If you are migrating to a new server, it is important to capture the IO statistics which is generated by your current workload which can help you to make a decision whether the new server will be able to withstand your current IO workload while providing the expected response time.</p>
<p>In order to capture the current Disk IO statistics, we need to capture the following performance counters</p>
<p><strong>Logical Disk &amp; Physical Disk</strong></p>
<p><strong><br />
</strong>Disk Read Bytes/sec   )<br />
Disk Write Bytes/sec  )    Referred as IO bandwidth<br />
Disk Bytes/sec             )<br />
Disk Reads/sec            }<br />
Disk Transfers/sec      }    Equates to IOPs in SAP World<br />
Disk Writes/sec           }<br />
Disk sec/reads             )<br />
Disk sec/Writes           )     Referred as Disk Latency<br />
Disk sec/Transfers      )<br />
Disk Bytes/Read          }<br />
Disk Bytes/Writes       }    IO Transfer Size (generally ranges from 8k to 64k)<br />
Disk Bytes/Transfer   }<br />
Avg Disk Read Queue Length   )<br />
Avg Disk Write Queue Length  )   (Disk Transfers/sec) * (Disk sec/Transfer)<br />
Avg Disk Queue Length             )<br />
If you need more information on these counter, I would recommend you to read <a href="http://blogs.technet.com/b/askcore/archive/2012/03/16/windows-performance-monitor-disk-counters-explained.aspx" target="_blank">this blog</a>.</p>
<p>On my server, I captured the above mentioned performance counters during peak workload and I derived at the following IO statistics generated by current workload.</p>
<p>&nbsp;</p>
<table style="line-height: normal; border-collapse: collapse; border-style: none;" width="610" border="0" cellspacing="0" cellpadding="0">
<colgroup>
<col style="width: 155pt; mso-width-source: userset; mso-width-alt: 7570;" width="207" />
<col style="width: 98pt; mso-width-source: userset; mso-width-alt: 4754;" width="130" />
<col style="width: 91pt; mso-width-source: userset; mso-width-alt: 4425;" width="121" />
<col style="width: 114pt; mso-width-source: userset; mso-width-alt: 5558;" width="152" /></colgroup>
<tbody>
<tr style="height: 15pt;">
<td class="xl65" style="padding-bottom: 0px; padding-left: 1px; padding-right: 1px; background: black; vertical-align: middle; padding-top: 1px; text-underline-style: none; text-line-through: none; mso-pattern: black none; border: windowtext 0.5pt solid;" align="center" width="206" height="20"><span style="font-family: Calibri;"><span style="color: #ffffff; font-size: 11pt;"><strong>IO Metrics</strong></span></span></td>
<td class="xl66" style="padding-bottom: 0px; padding-left: 1px; padding-right: 1px; background: black; vertical-align: middle; padding-top: 1px; text-underline-style: none; text-line-through: none; mso-pattern: black none; border: windowtext 0.5pt solid;" align="center" width="130"><span style="font-family: Calibri;"><span style="color: #ffffff; font-size: 11pt;"><strong>E: (Log Drive)</strong></span></span></td>
<td class="xl66" style="padding-bottom: 0px; padding-left: 1px; padding-right: 1px; background: black; vertical-align: middle; padding-top: 1px; text-underline-style: none; text-line-through: none; mso-pattern: black none; border: windowtext 0.5pt solid;" align="center" width="121"><span style="font-family: Calibri;"><span style="color: #ffffff; font-size: 11pt;"><strong>F: (Data Drive)</strong></span></span></td>
<td class="xl67" style="padding-bottom: 0px; padding-left: 1px; padding-right: 1px; background: black; vertical-align: middle; padding-top: 1px; text-underline-style: none; text-line-through: none; mso-pattern: black none; border: windowtext 0.5pt solid;" align="center" width="152"><span style="font-family: Calibri;"><span style="color: #ffffff; font-size: 11pt;"><strong>Total Physical Disk</strong></span></span></td>
</tr>
<tr style="height: 15pt;">
<td class="xl68" style="padding-bottom: 0px; padding-left: 1px; padding-right: 1px; background: #366092; vertical-align: middle; padding-top: 1px; text-underline-style: none; text-line-through: none; mso-pattern: #366092 none; border: windowtext 0.5pt solid;" align="center" width="206" height="20"><span style="font-family: Calibri;"><span style="color: #ffffff; font-size: 11pt;">Disk MB/sec</span></span></td>
<td class="xl69" style="padding-bottom: 0px; padding-left: 1px; padding-right: 1px; background: #366092; vertical-align: middle; padding-top: 1px; text-underline-style: none; text-line-through: none; mso-pattern: #366092 none; border: windowtext 0.5pt solid;" align="center" width="130"><span style="font-family: Calibri;"><span style="color: #ffffff; font-size: 11pt;">100MB/sec</span></span></td>
<td class="xl69" style="padding-bottom: 0px; padding-left: 1px; padding-right: 1px; background: #366092; vertical-align: middle; padding-top: 1px; text-underline-style: none; text-line-through: none; mso-pattern: #366092 none; border: windowtext 0.5pt solid;" align="center" width="121"><span style="font-family: Calibri;"><span style="color: #ffffff; font-size: 11pt;">80MB/s</span></span></td>
<td class="xl70" style="padding-bottom: 0px; padding-left: 1px; padding-right: 1px; background: #366092; vertical-align: middle; padding-top: 1px; text-underline-style: none; text-line-through: none; mso-pattern: #366092 none; border: windowtext 0.5pt solid;" align="center" width="152"><span style="font-family: Calibri;"><span style="color: #ffffff; font-size: 11pt;">180MB/sec</span></span></td>
</tr>
<tr style="height: 15pt;">
<td class="xl68" style="padding-bottom: 0px; padding-left: 1px; padding-right: 1px; background: #4f81bd; vertical-align: middle; padding-top: 1px; text-underline-style: none; text-line-through: none; mso-pattern: #4f81bd none; border: windowtext 0.5pt solid;" align="center" width="206" height="20"><span style="font-family: Calibri;"><span style="color: #ffffff; font-size: 11pt;">Disk IOPs</span></span></td>
<td class="xl69" style="padding-bottom: 0px; padding-left: 1px; padding-right: 1px; background: #4f81bd; vertical-align: middle; padding-top: 1px; text-underline-style: none; text-line-through: none; mso-pattern: #4f81bd none; border: windowtext 0.5pt solid;" align="center" width="130"><span style="font-family: Calibri;"><span style="color: #ffffff; font-size: 11pt;">125</span></span></td>
<td class="xl69" style="padding-bottom: 0px; padding-left: 1px; padding-right: 1px; background: #4f81bd; vertical-align: middle; padding-top: 1px; text-underline-style: none; text-line-through: none; mso-pattern: #4f81bd none; border: windowtext 0.5pt solid;" align="center" width="121"><span style="font-family: Calibri;"><span style="color: #ffffff; font-size: 11pt;">202</span></span></td>
<td class="xl70" style="padding-bottom: 0px; padding-left: 1px; padding-right: 1px; background: #4f81bd; vertical-align: middle; padding-top: 1px; text-underline-style: none; text-line-through: none; mso-pattern: #4f81bd none; border: windowtext 0.5pt solid;" align="center" width="152"><span style="font-family: Calibri;"><span style="color: #ffffff; font-size: 11pt;">344</span></span></td>
</tr>
<tr style="height: 15pt;">
<td class="xl68" style="padding-bottom: 0px; padding-left: 1px; padding-right: 1px; background: #366092; vertical-align: middle; padding-top: 1px; text-underline-style: none; text-line-through: none; mso-pattern: #366092 none; border: windowtext 0.5pt solid;" align="center" width="206" height="20"><span style="font-family: Calibri;"><span style="color: #ffffff; font-size: 11pt;">Disk Bytes/Transfer</span></span></td>
<td class="xl69" style="padding-bottom: 0px; padding-left: 1px; padding-right: 1px; background: #366092; vertical-align: middle; padding-top: 1px; text-underline-style: none; text-line-through: none; mso-pattern: #366092 none; border: windowtext 0.5pt solid;" align="center" width="130"><span style="font-family: Calibri;"><span style="color: #ffffff; font-size: 11pt;">23KB</span></span></td>
<td class="xl69" style="padding-bottom: 0px; padding-left: 1px; padding-right: 1px; background: #366092; vertical-align: middle; padding-top: 1px; text-underline-style: none; text-line-through: none; mso-pattern: #366092 none; border: windowtext 0.5pt solid;" align="center" width="121"><span style="font-family: Calibri;"><span style="color: #ffffff; font-size: 11pt;">50KB</span></span></td>
<td class="xl70" style="padding-bottom: 0px; padding-left: 1px; padding-right: 1px; background: #366092; vertical-align: middle; padding-top: 1px; text-underline-style: none; text-line-through: none; mso-pattern: #366092 none; border: windowtext 0.5pt solid;" align="center" width="152"><span style="font-family: Calibri;"><span style="color: #ffffff; font-size: 11pt;">37KB</span></span></td>
</tr>
<tr style="height: 15pt;">
<td class="xl68" style="padding-bottom: 0px; padding-left: 1px; padding-right: 1px; background: #4f81bd; vertical-align: middle; padding-top: 1px; text-underline-style: none; text-line-through: none; mso-pattern: #4f81bd none; border: windowtext 0.5pt solid;" align="center" width="206" height="20"><span style="font-family: Calibri;"><span style="color: #ffffff; font-size: 11pt;">Avg Disk Queue Length</span></span></td>
<td class="xl69" style="padding-bottom: 0px; padding-left: 1px; padding-right: 1px; background: #4f81bd; vertical-align: middle; padding-top: 1px; text-underline-style: none; text-line-through: none; mso-pattern: #4f81bd none; border: windowtext 0.5pt solid;" align="center" width="130"><span style="font-family: Calibri;"><span style="color: #ffffff; font-size: 11pt;">5.7</span></span></td>
<td class="xl69" style="padding-bottom: 0px; padding-left: 1px; padding-right: 1px; background: #4f81bd; vertical-align: middle; padding-top: 1px; text-underline-style: none; text-line-through: none; mso-pattern: #4f81bd none; border: windowtext 0.5pt solid;" align="center" width="121"><span style="font-family: Calibri;"><span style="color: #ffffff; font-size: 11pt;">17</span></span></td>
<td class="xl70" style="padding-bottom: 0px; padding-left: 1px; padding-right: 1px; background: #4f81bd; vertical-align: middle; padding-top: 1px; text-underline-style: none; text-line-through: none; mso-pattern: #4f81bd none; border: windowtext 0.5pt solid;" align="center" width="152"><span style="font-family: Calibri;"><span style="color: #ffffff; font-size: 11pt;">23.47</span></span></td>
</tr>
<tr style="height: 15pt;">
<td class="xl68" style="padding-bottom: 0px; padding-left: 1px; padding-right: 1px; background: #366092; vertical-align: middle; padding-top: 1px; text-underline-style: none; text-line-through: none; mso-pattern: #366092 none; border: windowtext 0.5pt solid;" align="center" width="206" height="20"><span style="font-family: Calibri;"><span style="color: #ffffff; font-size: 11pt;">Disk Read Latency</span></span></td>
<td class="xl69" style="padding-bottom: 0px; padding-left: 1px; padding-right: 1px; background: #366092; vertical-align: middle; padding-top: 1px; text-underline-style: none; text-line-through: none; mso-pattern: #366092 none; border: windowtext 0.5pt solid;" align="center" width="130"><span style="font-family: Calibri;"><span style="color: #ffffff; font-size: 11pt;">23ms</span></span></td>
<td class="xl69" style="padding-bottom: 0px; padding-left: 1px; padding-right: 1px; background: #366092; vertical-align: middle; padding-top: 1px; text-underline-style: none; text-line-through: none; mso-pattern: #366092 none; border: windowtext 0.5pt solid;" align="center" width="121"><span style="font-family: Calibri;"><span style="color: #ffffff; font-size: 11pt;">57ms</span></span></td>
<td class="xl70" style="padding-bottom: 0px; padding-left: 1px; padding-right: 1px; background: #366092; vertical-align: middle; padding-top: 1px; text-underline-style: none; text-line-through: none; mso-pattern: #366092 none; border: windowtext 0.5pt solid;" align="center" width="152"><span style="font-family: Calibri;"><span style="color: #ffffff; font-size: 11pt;">51ms</span></span></td>
</tr>
<tr style="height: 15pt;">
<td class="xl71" style="padding-bottom: 0px; padding-left: 1px; padding-right: 1px; background: #4f81bd; vertical-align: middle; padding-top: 1px; text-underline-style: none; text-line-through: none; mso-pattern: #4f81bd none; border: windowtext 0.5pt solid;" align="center" width="206" height="20"><span style="font-family: Calibri;"><span style="color: #ffffff; font-size: 11pt;">Disk Write Latency</span></span></td>
<td class="xl72" style="padding-bottom: 0px; padding-left: 1px; padding-right: 1px; background: #4f81bd; vertical-align: middle; padding-top: 1px; text-underline-style: none; text-line-through: none; mso-pattern: #4f81bd none; border: windowtext 0.5pt solid;" align="center" width="130"><span style="font-family: Calibri;"><span style="color: #ffffff; font-size: 11pt;">77ms</span></span></td>
<td class="xl72" style="padding-bottom: 0px; padding-left: 1px; padding-right: 1px; background: #4f81bd; vertical-align: middle; padding-top: 1px; text-underline-style: none; text-line-through: none; mso-pattern: #4f81bd none; border: windowtext 0.5pt solid;" align="center" width="121"><span style="font-family: Calibri;"><span style="color: #ffffff; font-size: 11pt;">56ms</span></span></td>
<td class="xl73" style="padding-bottom: 0px; padding-left: 1px; padding-right: 1px; background: #4f81bd; vertical-align: middle; padding-top: 1px; text-underline-style: none; text-line-through: none; mso-pattern: #4f81bd none; border: windowtext 0.5pt solid;" align="center" width="152"><span style="font-family: Calibri;"><span style="color: #ffffff; font-size: 11pt;">67ms</span></span></td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
<p>Ideally the Disk latency is expected to be within 10-15ms so the above counters already suggests the current Disk performance is poor and not meeting the expected standards.</p>
<p>As a result of poor Disk performance, we start seeing IO_COMPLETION, WRITELOG and PAGEIOLATCH_*  wait types in our environment.</p>
<p>Once we have established the IO Statistics for our current workload we can now look at tools available to benchmark our new Storage which will be hosting our SQL Server and will have to provide throughput which exceeds our current workload within the acceptable Disk latency (&lt; 10-15ms).</p>
<p>Our recommended tool for performing SQL IO stress testing is <a href="http://www.microsoft.com/download/en/details.aspx?id=20163" target="_blank">sqlio</a>. There are other third party tools available  viz IOMeter and CrystalDiskMark, however I prefer to use sqlio. it is purely your own comfort and in this blog post I will be talking about sqlio.</p>
<p>We have another tool called SQLIOSim but as per the guidance from <a href="http://blogs.msdn.com/b/psssql/archive/2008/04/05/sqliosim-is-not-an-i-o-performance-tuning-tool.aspx" target="_blank">Microsoft CSS Blog</a>, It should not be used for  performance testing purpose and should only be used to test the storage from perspective of data integrity and consistency.</p>
<p>Before performing the Stress test, it helps to get the following information from the Storage Vendor</p>
<p><strong>Which RAID configuration is used ? </strong><br />
RAID 10 is recommended for SQL Server.</p>
<p><strong>How many LUNs are configured?<br />
</strong>Generally we recommend separate LUNs for datafiles,log files and Tempdb files.</p>
<p><strong>What is strip_unit_size used for LUN ? </strong><br />
It should be multiple of file_allocation_unit_size to address <a href="http://msdn.microsoft.com/en-us/library/dd758814(v=sql.100).aspx" target="_blank">Disk Alignment issues</a></p>
<p><strong>How much is the Storage Controller Cache available? How much is Read Cache and how much is the write cache?<br />
</strong><br />
Larger the Storage Cache, better is the response time at the expense of cost. For SQL Server, it is recommended to have 80/20 or 90/10 ratio of write cache/read cache for SQL Server since large write cache tends to absorb the checkpoint spikes and improves the write performance of SQL Server.</p>
<p>Once we have the above information available, we need to install sqlio.msi which by default installs itself in<br />
C:\Program Files\sqlio                       For 32 bit<br />
C:\Program Files(x86)\sqlio              For 64 bit</p>
<p>More information about SQLIO command line options is already documented by Brent Ozar in his <a href="http://www.brentozar.com/archive/2008/09/finding-your-san-bottlenecks-with-sqlio/" target="_blank">blog post</a> and hence I would not like to duplicate the efforts here.</p>
<p>To start with first we should create a file called testfile.dat in the drive which needs to be stress tested. So we need to make the necessary changes in param.txt to change the drive letter and change the file size as mentioned in the Brent’s blog.</p>
<p>Practically the file size should be around 3 to 4 times the Storage controller cache size. So if the cache size is 5GB we might want to create the testfile.dat of 20GB size. In my case, we create a file of 100GB size.</p>
<p>We can fire the following command to create the file.<br />
sqlio -kW -s10 -fsequential -t8 -o8 -b64 -LS -Fparam.txt timeout /T 10</p>
<p>During this run of SQLIO, ignore the data points and just let the file be created.</p>
<p>The advantage of using SQLIO for IO Stress testing is gives lot of flexibility to generate various IO patterns as generated by SQL Server.</p>
<p>SQL Server generates both random and sequential IO patterns while transfer size of the IO varies from 8k to 64K but doesn’t exceed 64K except for backup and restore operations.</p>
<p>So in our test, we have 3 variable parameters viz</p>
<p>1. IO Pattern (Sequential or Random)  &#8211;&gt; 2 values<br />
2. IO Type (Read or Write) –&gt; 2 values<br />
2. IO Transfer Size (8k,64k,128k,256k,512k)  &#8211;&gt; 5 values<br />
3. Outstanding IO requests (1,2,4,……1024) –&gt; 11  values</p>
<p>As we all know the rules of testing, if we have 3 variable parameters on which we need to perform the test, we need to vary one parameter at a time while keeping rest of the parameters constant.</p>
<p>So we will have around ( 2*2* 5* 11= 220)  test runs of sql io. I prefer to create bat files for these test runs beforehand and also capture the above mentioned perfmon counters while running the tests.</p>
<p><strong><br />
Random Read Test </strong></p>
<p>sqlio -dE -BH -kR -frandom <strong>-t1</strong> -o1 -s120 -b64 -LS testfile.dat<br />
sqlio -dE -BH -kR -frandom <strong>-t2</strong> -o1 -s120 -b64 -LS testfile.dat<br />
sqlio -dE -BH -kR -frandom <strong>-t4</strong> -o1 -s120 -b64 -LS testfile.dat<br />
sqlio -dE -BH -kR -frandom -t4 <strong>-o2</strong> -s120 -b64 -LS testfile.dat<br />
sqlio -dE -BH -kR -frandom -t4 <strong>-o4</strong> -s120 -b64 -LS testfile.dat<br />
sqlio -dE -BH -kR -frandom -t4 <strong>-o8</strong> -s120 -b64 -LS testfile.dat<br />
sqlio -dE -BH -kR -frandom -t4 <strong>-o12</strong> -s120 -b64 -LS testfile.dat<br />
sqlio -dE -BH -kR -frandom -t4 <strong>-o16</strong> -s120 -b64 -LS testfile.dat<br />
sqlio -dE -BH -kR -frandom -t4 <strong>-o64</strong> -s120 -b64 -LS testfile.dat<br />
sqlio -dE -BH -kR -frandom -t4 <strong>-o128</strong> -s120 -b64 -LS testfile.dat</p>
<p><strong>Note:</strong> Do not exceed the no. of threads (-t) beyond the number of processors on the server.</p>
<p>In this test run, as mentioned earlier we keep other parameters constant while varying only 1 of the parameter. So we have <strong>random read and io transfer size is fixed to 64KB </strong>while outstanding io ( no. of threads (-t) * no. of io per threads (-o)) is increased in steps from 1 to 512.</p>
<p>For the above test, I created a bat files and routed the results to text file. In the output, we need to capture MBs/sec, IOs/sec and Avg_Latency(ms) for each test runs.</p>
<p>&nbsp;</p>
<p>We captured the result in the excel sheet as shown below</p>
<p>&nbsp;</p>
<table style="line-height: normal; border-collapse: collapse; border-style: none;" width="480" border="0" cellspacing="0" cellpadding="0">
<colgroup>
<col style="width: 102pt; mso-width-source: userset; mso-width-alt: 4973;" width="136" />
<col style="width: 95pt; mso-width-source: userset; mso-width-alt: 4608;" width="126" />
<col style="width: 80pt; mso-width-source: userset; mso-width-alt: 3876;" width="106" />
<col style="width: 83pt; mso-width-source: userset; mso-width-alt: 4059;" width="111" /></colgroup>
<tbody>
<tr style="height: 30pt;">
<td class="xl65" style="border-bottom: windowtext 0.5pt solid; border-left: #95b3d7 0.5pt solid; padding-bottom: 0px; padding-left: 1px; padding-right: 1px; background: #4f81bd; vertical-align: middle; border-top: #95b3d7 0.5pt solid; border-right: windowtext 0.5pt solid; padding-top: 1px; text-underline-style: none; text-line-through: none; mso-pattern: #4f81bd none;" align="center" width="136" height="40"><span style="font-family: Calibri;"><span style="color: #ffffff; font-size: 11pt;"><strong>Outstanding IO</strong></span></span></td>
<td class="xl66" style="border-bottom: windowtext 0.5pt solid; border-left: windowtext 0.5pt solid; padding-bottom: 0px; padding-left: 1px; padding-right: 1px; background: #4f81bd; vertical-align: middle; border-top: #95b3d7 0.5pt solid; border-right: windowtext 0.5pt solid; padding-top: 1px; text-underline-style: none; text-line-through: none; mso-pattern: #4f81bd none;" align="center" width="126"><span style="font-family: Calibri;"><span style="color: #ffffff; font-size: 11pt;"><strong>IO MB/sec</strong></span></span></td>
<td class="xl66" style="border-bottom: windowtext 0.5pt solid; border-left: windowtext 0.5pt solid; padding-bottom: 0px; padding-left: 1px; padding-right: 1px; background: #4f81bd; vertical-align: middle; border-top: #95b3d7 0.5pt solid; border-right: windowtext 0.5pt solid; padding-top: 1px; text-underline-style: none; text-line-through: none; mso-pattern: #4f81bd none;" align="center" width="106"><span style="font-family: Calibri;"><span style="color: #ffffff; font-size: 11pt;"><strong>IOPs</strong></span></span></td>
<td class="xl67" style="border-bottom: windowtext 0.5pt solid; border-left: windowtext 0.5pt solid; padding-bottom: 0px; padding-left: 1px; padding-right: 1px; background: #4f81bd; vertical-align: middle; border-top: #95b3d7 0.5pt solid; border-right: #95b3d7 0.5pt solid; padding-top: 1px; text-underline-style: none; text-line-through: none; mso-pattern: #4f81bd none;" align="center" width="110"><span style="font-family: Calibri;"><span style="color: #ffffff; font-size: 11pt;"><strong>Disk Latency</strong></span></span></td>
</tr>
<tr style="height: 15pt;">
<td class="xl68" style="border-bottom: windowtext 0.5pt solid; border-left: #95b3d7 0.5pt solid; padding-bottom: 0px; padding-left: 1px; padding-right: 1px; background: #dce6f1; vertical-align: middle; border-top: windowtext 0.5pt solid; border-right: windowtext 0.5pt solid; padding-top: 1px; text-underline-style: none; text-line-through: none; mso-pattern: #dce6f1 none;" align="center" width="136" height="20"><span style="font-family: Calibri;"><span style="color: #000000; font-size: 11pt;"><strong>1</strong></span></span></td>
<td class="xl68" style="border-bottom: windowtext 0.5pt solid; border-left: medium none; padding-bottom: 0px; padding-left: 1px; padding-right: 1px; background: #dce6f1; vertical-align: middle; border-top: windowtext 0.5pt solid; border-right: windowtext 0.5pt solid; padding-top: 1px; text-underline-style: none; text-line-through: none; mso-pattern: #dce6f1 none;" align="center" width="126"><span style="font-family: Calibri;"><span style="color: #000000; font-size: 11pt;"><strong>11.5</strong></span></span></td>
<td class="xl68" style="border-bottom: windowtext 0.5pt solid; border-left: medium none; padding-bottom: 0px; padding-left: 1px; padding-right: 1px; background: #dce6f1; vertical-align: middle; border-top: windowtext 0.5pt solid; border-right: windowtext 0.5pt solid; padding-top: 1px; text-underline-style: none; text-line-through: none; mso-pattern: #dce6f1 none;" align="center" width="106"><span style="font-family: Calibri;"><span style="color: #000000; font-size: 11pt;"><strong>184</strong></span></span></td>
<td class="xl68" style="border-bottom: windowtext 0.5pt solid; border-left: medium none; padding-bottom: 0px; padding-left: 1px; padding-right: 1px; background: #dce6f1; vertical-align: middle; border-top: windowtext 0.5pt solid; border-right: windowtext 0.5pt solid; padding-top: 1px; text-underline-style: none; text-line-through: none; mso-pattern: #dce6f1 none;" align="center" width="110"><span style="font-family: Calibri;"><span style="color: #000000; font-size: 11pt;"><strong>4</strong></span></span></td>
</tr>
<tr style="height: 15pt;">
<td class="xl68" style="border-bottom: windowtext 0.5pt solid; border-left: #95b3d7 0.5pt solid; padding-bottom: 0px; padding-left: 1px; padding-right: 1px; vertical-align: middle; border-top: windowtext 0.5pt solid; border-right: windowtext 0.5pt solid; padding-top: 1px; text-underline-style: none; text-line-through: none;" align="center" width="136" height="20"><span style="font-family: Calibri;"><span style="color: #000000; font-size: 11pt;"><strong>2</strong></span></span></td>
<td class="xl68" style="border-bottom: windowtext 0.5pt solid; padding-bottom: 0px; padding-left: 1px; padding-right: 1px; vertical-align: middle; border-top: medium none; border-right: windowtext 0.5pt solid; padding-top: 1px;" align="center" width="126"><span style="font-family: Calibri;"><span style="color: #000000; font-size: 11pt;"><strong>23</strong></span></span></td>
<td class="xl68" style="border-bottom: windowtext 0.5pt solid; padding-bottom: 0px; padding-left: 1px; padding-right: 1px; vertical-align: middle; border-top: medium none; border-right: windowtext 0.5pt solid; padding-top: 1px;" align="center" width="106"><span style="font-family: Calibri;"><span style="color: #000000; font-size: 11pt;"><strong>369</strong></span></span></td>
<td class="xl68" style="border-bottom: windowtext 0.5pt solid; padding-bottom: 0px; padding-left: 1px; padding-right: 1px; vertical-align: middle; border-top: medium none; border-right: windowtext 0.5pt solid; padding-top: 1px;" align="center" width="110"><span style="font-family: Calibri;"><span style="color: #000000; font-size: 11pt;"><strong>4</strong></span></span></td>
</tr>
<tr style="height: 15pt;">
<td class="xl68" style="border-bottom: windowtext 0.5pt solid; border-left: #95b3d7 0.5pt solid; padding-bottom: 0px; padding-left: 1px; padding-right: 1px; background: #dce6f1; vertical-align: middle; border-top: windowtext 0.5pt solid; border-right: windowtext 0.5pt solid; padding-top: 1px; text-underline-style: none; text-line-through: none; mso-pattern: #dce6f1 none;" align="center" width="136" height="20"><span style="font-family: Calibri;"><span style="color: #000000; font-size: 11pt;"><strong>4</strong></span></span></td>
<td class="xl68" style="border-bottom: windowtext 0.5pt solid; border-left: medium none; padding-bottom: 0px; padding-left: 1px; padding-right: 1px; background: #dce6f1; vertical-align: middle; border-top: windowtext 0.5pt solid; border-right: windowtext 0.5pt solid; padding-top: 1px; text-underline-style: none; text-line-through: none; mso-pattern: #dce6f1 none;" align="center" width="126"><span style="font-family: Calibri;"><span style="color: #000000; font-size: 11pt;"><strong>42.9</strong></span></span></td>
<td class="xl68" style="border-bottom: windowtext 0.5pt solid; border-left: medium none; padding-bottom: 0px; padding-left: 1px; padding-right: 1px; background: #dce6f1; vertical-align: middle; border-top: windowtext 0.5pt solid; border-right: windowtext 0.5pt solid; padding-top: 1px; text-underline-style: none; text-line-through: none; mso-pattern: #dce6f1 none;" align="center" width="106"><span style="font-family: Calibri;"><span style="color: #000000; font-size: 11pt;"><strong>686</strong></span></span></td>
<td class="xl68" style="border-bottom: windowtext 0.5pt solid; border-left: medium none; padding-bottom: 0px; padding-left: 1px; padding-right: 1px; background: #dce6f1; vertical-align: middle; border-top: windowtext 0.5pt solid; border-right: windowtext 0.5pt solid; padding-top: 1px; text-underline-style: none; text-line-through: none; mso-pattern: #dce6f1 none;" align="center" width="110"><span style="font-family: Calibri;"><span style="color: #000000; font-size: 11pt;"><strong>5</strong></span></span></td>
</tr>
<tr style="height: 15pt;">
<td class="xl68" style="border-bottom: windowtext 0.5pt solid; border-left: #95b3d7 0.5pt solid; padding-bottom: 0px; padding-left: 1px; padding-right: 1px; vertical-align: middle; border-top: windowtext 0.5pt solid; border-right: windowtext 0.5pt solid; padding-top: 1px; text-underline-style: none; text-line-through: none;" align="center" width="136" height="20"><span style="font-family: Calibri;"><span style="color: #000000; font-size: 11pt;"><strong>8</strong></span></span></td>
<td class="xl68" style="border-bottom: windowtext 0.5pt solid; padding-bottom: 0px; padding-left: 1px; padding-right: 1px; vertical-align: middle; border-top: medium none; border-right: windowtext 0.5pt solid; padding-top: 1px;" align="center" width="126"><span style="font-family: Calibri;"><span style="color: #000000; font-size: 11pt;"><strong>65.9</strong></span></span></td>
<td class="xl68" style="border-bottom: windowtext 0.5pt solid; padding-bottom: 0px; padding-left: 1px; padding-right: 1px; vertical-align: middle; border-top: medium none; border-right: windowtext 0.5pt solid; padding-top: 1px;" align="center" width="106"><span style="font-family: Calibri;"><span style="color: #000000; font-size: 11pt;"><strong>1054</strong></span></span></td>
<td class="xl68" style="border-bottom: windowtext 0.5pt solid; padding-bottom: 0px; padding-left: 1px; padding-right: 1px; vertical-align: middle; border-top: medium none; border-right: windowtext 0.5pt solid; padding-top: 1px;" align="center" width="110"><span style="font-family: Calibri;"><span style="color: #000000; font-size: 11pt;"><strong>7</strong></span></span></td>
</tr>
<tr style="height: 15pt;">
<td class="xl68" style="border-bottom: windowtext 0.5pt solid; border-left: #95b3d7 0.5pt solid; padding-bottom: 0px; padding-left: 1px; padding-right: 1px; background: #dce6f1; vertical-align: middle; border-top: windowtext 0.5pt solid; border-right: windowtext 0.5pt solid; padding-top: 1px; text-underline-style: none; text-line-through: none; mso-pattern: #dce6f1 none;" align="center" width="136" height="20"><span style="font-family: Calibri;"><span style="color: #000000; font-size: 11pt;"><strong>16</strong></span></span></td>
<td class="xl68" style="border-bottom: windowtext 0.5pt solid; border-left: medium none; padding-bottom: 0px; padding-left: 1px; padding-right: 1px; background: #dce6f1; vertical-align: middle; border-top: windowtext 0.5pt solid; border-right: windowtext 0.5pt solid; padding-top: 1px; text-underline-style: none; text-line-through: none; mso-pattern: #dce6f1 none;" align="center" width="126"><span style="font-family: Calibri;"><span style="color: #000000; font-size: 11pt;"><strong>109.6</strong></span></span></td>
<td class="xl68" style="border-bottom: windowtext 0.5pt solid; border-left: medium none; padding-bottom: 0px; padding-left: 1px; padding-right: 1px; background: #dce6f1; vertical-align: middle; border-top: windowtext 0.5pt solid; border-right: windowtext 0.5pt solid; padding-top: 1px; text-underline-style: none; text-line-through: none; mso-pattern: #dce6f1 none;" align="center" width="106"><span style="font-family: Calibri;"><span style="color: #000000; font-size: 11pt;"><strong>1754.2</strong></span></span></td>
<td class="xl68" style="border-bottom: windowtext 0.5pt solid; border-left: medium none; padding-bottom: 0px; padding-left: 1px; padding-right: 1px; background: #dce6f1; vertical-align: middle; border-top: windowtext 0.5pt solid; border-right: windowtext 0.5pt solid; padding-top: 1px; text-underline-style: none; text-line-through: none; mso-pattern: #dce6f1 none;" align="center" width="110"><span style="font-family: Calibri;"><span style="color: #000000; font-size: 11pt;"><strong>8</strong></span></span></td>
</tr>
<tr style="height: 15pt;">
<td class="xl69" style="border-bottom: #95b3d7 0.5pt solid; border-left: #95b3d7 0.5pt solid; padding-bottom: 0px; padding-left: 1px; padding-right: 1px; vertical-align: middle; border-top: windowtext 0.5pt solid; border-right: windowtext 0.5pt solid; padding-top: 1px; text-underline-style: none; text-line-through: none;" align="center" width="136" height="20"><span style="font-family: Calibri;"><span style="color: #000000; font-size: 11pt;"><strong>32</strong></span></span></td>
<td class="xl69" style="border-bottom: #95b3d7 0.5pt solid; border-left: medium none; padding-bottom: 0px; padding-left: 1px; padding-right: 1px; vertical-align: middle; border-top: windowtext 0.5pt solid; border-right: windowtext 0.5pt solid; padding-top: 1px; text-underline-style: none; text-line-through: none;" align="center" width="126"><span style="font-family: Calibri;"><span style="color: #000000; font-size: 11pt;"><strong>152.67</strong></span></span></td>
<td class="xl69" style="border-bottom: #95b3d7 0.5pt solid; border-left: medium none; padding-bottom: 0px; padding-left: 1px; padding-right: 1px; vertical-align: middle; border-top: windowtext 0.5pt solid; border-right: windowtext 0.5pt solid; padding-top: 1px; text-underline-style: none; text-line-through: none;" align="center" width="106"><span style="font-family: Calibri;"><span style="color: #000000; font-size: 11pt;"><strong>2442.7</strong></span></span></td>
<td class="xl69" style="border-bottom: #95b3d7 0.5pt solid; border-left: medium none; padding-bottom: 0px; padding-left: 1px; padding-right: 1px; vertical-align: middle; border-top: windowtext 0.5pt solid; border-right: windowtext 0.5pt solid; padding-top: 1px; text-underline-style: none; text-line-through: none;" align="center" width="110"><span style="font-family: Calibri;"><span style="color: #000000; font-size: 11pt;"><strong>12</strong></span></span></td>
</tr>
<tr style="height: 15pt;">
<td class="xl68" style="border-bottom: windowtext 0.5pt solid; border-left: #95b3d7 0.5pt solid; padding-bottom: 0px; padding-left: 1px; padding-right: 1px; background: #dce6f1; vertical-align: middle; border-top: windowtext 0.5pt solid; border-right: windowtext 0.5pt solid; padding-top: 1px; text-underline-style: none; text-line-through: none; mso-pattern: #dce6f1 none;" align="center" width="136" height="20"><span style="font-family: Calibri;"><span style="color: #000000; font-size: 11pt;"><strong>48</strong></span></span></td>
<td class="xl68" style="border-bottom: windowtext 0.5pt solid; border-left: medium none; padding-bottom: 0px; padding-left: 1px; padding-right: 1px; background: #dce6f1; vertical-align: middle; border-top: windowtext 0.5pt solid; border-right: windowtext 0.5pt solid; padding-top: 1px; text-underline-style: none; text-line-through: none; mso-pattern: #dce6f1 none;" align="center" width="126"><span style="font-family: Calibri;"><span style="color: #000000; font-size: 11pt;"><strong>151.21</strong></span></span></td>
<td class="xl68" style="border-bottom: windowtext 0.5pt solid; border-left: medium none; padding-bottom: 0px; padding-left: 1px; padding-right: 1px; background: #dce6f1; vertical-align: middle; border-top: windowtext 0.5pt solid; border-right: windowtext 0.5pt solid; padding-top: 1px; text-underline-style: none; text-line-through: none; mso-pattern: #dce6f1 none;" align="center" width="106"><span style="font-family: Calibri;"><span style="color: #000000; font-size: 11pt;"><strong>2419.4</strong></span></span></td>
<td class="xl68" style="border-bottom: windowtext 0.5pt solid; border-left: medium none; padding-bottom: 0px; padding-left: 1px; padding-right: 1px; background: #dce6f1; vertical-align: middle; border-top: windowtext 0.5pt solid; border-right: windowtext 0.5pt solid; padding-top: 1px; text-underline-style: none; text-line-through: none; mso-pattern: #dce6f1 none;" align="center" width="110"><span style="font-family: Calibri;"><span style="color: #000000; font-size: 11pt;"><strong>19</strong></span></span></td>
</tr>
<tr style="height: 15pt;">
<td class="xl68" style="border-bottom: windowtext 0.5pt solid; border-left: #95b3d7 0.5pt solid; padding-bottom: 0px; padding-left: 1px; padding-right: 1px; vertical-align: middle; border-top: windowtext 0.5pt solid; border-right: windowtext 0.5pt solid; padding-top: 1px; text-underline-style: none; text-line-through: none;" align="center" width="136" height="20"><span style="font-family: Calibri;"><span style="color: #000000; font-size: 11pt;"><strong>64</strong></span></span></td>
<td class="xl68" style="border-bottom: windowtext 0.5pt solid; padding-bottom: 0px; padding-left: 1px; padding-right: 1px; vertical-align: middle; border-top: medium none; border-right: windowtext 0.5pt solid; padding-top: 1px;" align="center" width="126"><span style="font-family: Calibri;"><span style="color: #000000; font-size: 11pt;"><strong>149.09</strong></span></span></td>
<td class="xl68" style="border-bottom: windowtext 0.5pt solid; padding-bottom: 0px; padding-left: 1px; padding-right: 1px; vertical-align: middle; border-top: medium none; border-right: windowtext 0.5pt solid; padding-top: 1px;" align="center" width="106"><span style="font-family: Calibri;"><span style="color: #000000; font-size: 11pt;"><strong>2385.45</strong></span></span></td>
<td class="xl68" style="border-bottom: windowtext 0.5pt solid; padding-bottom: 0px; padding-left: 1px; padding-right: 1px; vertical-align: middle; border-top: medium none; border-right: windowtext 0.5pt solid; padding-top: 1px;" align="center" width="110"><span style="font-family: Calibri;"><span style="color: #000000; font-size: 11pt;"><strong>26</strong></span></span></td>
</tr>
<tr style="height: 15pt;">
<td class="xl68" style="border-bottom: windowtext 0.5pt solid; border-left: #95b3d7 0.5pt solid; padding-bottom: 0px; padding-left: 1px; padding-right: 1px; background: #dce6f1; vertical-align: middle; border-top: windowtext 0.5pt solid; border-right: windowtext 0.5pt solid; padding-top: 1px; text-underline-style: none; text-line-through: none; mso-pattern: #dce6f1 none;" align="center" width="136" height="20"><span style="font-family: Calibri;"><span style="color: #000000; font-size: 11pt;"><strong>128</strong></span></span></td>
<td class="xl68" style="border-bottom: windowtext 0.5pt solid; border-left: medium none; padding-bottom: 0px; padding-left: 1px; padding-right: 1px; background: #dce6f1; vertical-align: middle; border-top: windowtext 0.5pt solid; border-right: windowtext 0.5pt solid; padding-top: 1px; text-underline-style: none; text-line-through: none; mso-pattern: #dce6f1 none;" align="center" width="126"><span style="font-family: Calibri;"><span style="color: #000000; font-size: 11pt;"><strong>149.77</strong></span></span></td>
<td class="xl68" style="border-bottom: windowtext 0.5pt solid; border-left: medium none; padding-bottom: 0px; padding-left: 1px; padding-right: 1px; background: #dce6f1; vertical-align: middle; border-top: windowtext 0.5pt solid; border-right: windowtext 0.5pt solid; padding-top: 1px; text-underline-style: none; text-line-through: none; mso-pattern: #dce6f1 none;" align="center" width="106"><span style="font-family: Calibri;"><span style="color: #000000; font-size: 11pt;"><strong>2396.33</strong></span></span></td>
<td class="xl68" style="border-bottom: windowtext 0.5pt solid; border-left: medium none; padding-bottom: 0px; padding-left: 1px; padding-right: 1px; background: #dce6f1; vertical-align: middle; border-top: windowtext 0.5pt solid; border-right: windowtext 0.5pt solid; padding-top: 1px; text-underline-style: none; text-line-through: none; mso-pattern: #dce6f1 none;" align="center" width="110"><span style="font-family: Calibri;"><span style="color: #000000; font-size: 11pt;"><strong>52</strong></span></span></td>
</tr>
<tr style="height: 15pt;">
<td class="xl68" style="border-bottom: windowtext 0.5pt solid; border-left: #95b3d7 0.5pt solid; padding-bottom: 0px; padding-left: 1px; padding-right: 1px; vertical-align: middle; border-top: windowtext 0.5pt solid; border-right: windowtext 0.5pt solid; padding-top: 1px; text-underline-style: none; text-line-through: none;" align="center" width="136" height="20"><span style="font-family: Calibri;"><span style="color: #000000; font-size: 11pt;"><strong>256</strong></span></span></td>
<td class="xl68" style="border-bottom: windowtext 0.5pt solid; padding-bottom: 0px; padding-left: 1px; padding-right: 1px; vertical-align: middle; border-top: medium none; border-right: windowtext 0.5pt solid; padding-top: 1px;" align="center" width="126"><span style="font-family: Calibri;"><span style="color: #000000; font-size: 11pt;"><strong>147.71</strong></span></span></td>
<td class="xl68" style="border-bottom: windowtext 0.5pt solid; padding-bottom: 0px; padding-left: 1px; padding-right: 1px; vertical-align: middle; border-top: medium none; border-right: windowtext 0.5pt solid; padding-top: 1px;" align="center" width="106"><span style="font-family: Calibri;"><span style="color: #000000; font-size: 11pt;"><strong>2363.38</strong></span></span></td>
<td class="xl68" style="border-bottom: windowtext 0.5pt solid; padding-bottom: 0px; padding-left: 1px; padding-right: 1px; vertical-align: middle; border-top: medium none; border-right: windowtext 0.5pt solid; padding-top: 1px;" align="center" width="110"><span style="font-family: Calibri;"><span style="color: #000000; font-size: 11pt;"><strong>107</strong></span></span></td>
</tr>
<tr style="height: 15pt;">
<td class="xl68" style="border-bottom: windowtext 0.5pt solid; border-left: #95b3d7 0.5pt solid; padding-bottom: 0px; padding-left: 1px; padding-right: 1px; background: #dce6f1; vertical-align: middle; border-top: windowtext 0.5pt solid; border-right: windowtext 0.5pt solid; padding-top: 1px; text-underline-style: none; text-line-through: none; mso-pattern: #dce6f1 none;" align="center" width="136" height="20"><span style="font-family: Calibri;"><span style="color: #000000; font-size: 11pt;"><strong>512</strong></span></span></td>
<td class="xl68" style="border-bottom: windowtext 0.5pt solid; border-left: medium none; padding-bottom: 0px; padding-left: 1px; padding-right: 1px; background: #dce6f1; vertical-align: middle; border-top: windowtext 0.5pt solid; border-right: windowtext 0.5pt solid; padding-top: 1px; text-underline-style: none; text-line-through: none; mso-pattern: #dce6f1 none;" align="center" width="126"><span style="font-family: Calibri;"><span style="color: #000000; font-size: 11pt;"><strong>151.83</strong></span></span></td>
<td class="xl68" style="border-bottom: windowtext 0.5pt solid; border-left: medium none; padding-bottom: 0px; padding-left: 1px; padding-right: 1px; background: #dce6f1; vertical-align: middle; border-top: windowtext 0.5pt solid; border-right: windowtext 0.5pt solid; padding-top: 1px; text-underline-style: none; text-line-through: none; mso-pattern: #dce6f1 none;" align="center" width="106"><span style="font-family: Calibri;"><span style="color: #000000; font-size: 11pt;"><strong>2429.4</strong></span></span></td>
<td class="xl68" style="border-bottom: windowtext 0.5pt solid; border-left: medium none; padding-bottom: 0px; padding-left: 1px; padding-right: 1px; background: #dce6f1; vertical-align: middle; border-top: windowtext 0.5pt solid; border-right: windowtext 0.5pt solid; padding-top: 1px; text-underline-style: none; text-line-through: none; mso-pattern: #dce6f1 none;" align="center" width="110"><span style="font-family: Calibri;"><span style="color: #000000; font-size: 11pt;"><strong>210</strong></span></span></td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
<p>Based on the above results we plotted 3 graphs as shown below</p>
<p>&nbsp;</p>
<p><a href="http://www.sqlserverfaq.net/wp-content/uploads/2012/04/IOPs.png"><img class="alignleft  wp-image-199" title="IOPs" src="http://www.sqlserverfaq.net/wp-content/uploads/2012/04/IOPs-300x198.png" alt="" width="300" height="198" /></a></p>
<p>So we see that as the outstanding IOs increases the IOPs and IO MB/sec (in other words Disk throughput) also increases until 32 outstanding IOs, beyond which there is no increase in Disk throughput even when there is increase in outstanding IOs.</p>
<p>Any guesses why the graph saturates at 32 outstanding IOs?<br />
No marks for guessing that 32 is HBA queue depth setting which can further increased to 256 if required. For SQL Server generally, the HBA queue depth between 32 and 64 is recommended so you might want to increase the queue depth setting if Disk throughput at 32 outstanding ios doesn’t meet the current workload requirement.</p>
<p>However from SQL Server perspective, the most important parameter which you are interested is the Disk Response time which should be within 15 ms. As seen in the graph, the until 48 outstanding IO requests, the Disk responds under the acceptable limits beyond which it begin to increase exponentially.</p>
<p><strong>Large Random Read Test</strong></p>
<p>In this test, we keep the outstanding <strong>IO request constant to 32</strong> (as found from the above test) generating <strong>random reads</strong> of various IO sizes varying from 8K to 512K.</p>
<p>sqlio -dE -BH -kR -frandom -t4 -o8 -s120 <strong>-b8</strong> -LS testfile.dat<br />
sqlio -dE -BH -kR -frandom -t4 -o8 -s120 <strong>-b64 </strong>-LS testfile.dat<br />
sqlio -dE -BH -kR -frandom -t4 -o8 -s120 <strong>-b128</strong> -LS testfile.dat<br />
sqlio -dE -BH -kR -frandom -t4 -o8 -s120 <strong>-b256</strong> -LS testfile.dat<br />
sqlio -dE -BH -kR -frandom -t4 -o8 -s120 <strong>-b512</strong> -LS testfile.dat</p>
<p>Following are the results from our testing</p>
<p>&nbsp;</p>
<table style="line-height: normal; border-collapse: collapse; border-style: none;" width="669" border="0" cellspacing="0" cellpadding="0">
<colgroup>
<col style="width: 149pt; mso-width-source: userset; mso-width-alt: 7241;" width="198" />
<col style="width: 118pt; mso-width-source: userset; mso-width-alt: 5741;" width="157" />
<col style="width: 107pt; mso-width-source: userset; mso-width-alt: 5229;" width="143" />
<col style="width: 128pt; mso-width-source: userset; mso-width-alt: 6253;" width="171" /></colgroup>
<tbody>
<tr style="height: 30pt;">
<td class="xl68" style="border-bottom: windowtext 0.5pt solid; border-left: #95b3d7 0.5pt solid; padding-bottom: 0px; padding-left: 1px; padding-right: 1px; background: #4f81bd; vertical-align: middle; border-top: #95b3d7 0.5pt solid; border-right: windowtext 0.5pt solid; padding-top: 1px; text-underline-style: none; text-line-through: none; mso-pattern: #4f81bd none;" align="center" width="198" height="40"><span style="font-family: Calibri;"><span style="color: #ffffff; font-size: 11pt;"><strong>IO Transfer Size</strong></span></span></td>
<td class="xl69" style="border-bottom: windowtext 0.5pt solid; border-left: windowtext 0.5pt solid; padding-bottom: 0px; padding-left: 1px; padding-right: 1px; background: #4f81bd; vertical-align: middle; border-top: #95b3d7 0.5pt solid; border-right: windowtext 0.5pt solid; padding-top: 1px; text-underline-style: none; text-line-through: none; mso-pattern: #4f81bd none;" align="center" width="157"><span style="font-family: Calibri;"><span style="color: #ffffff; font-size: 11pt;"><strong>IO MB/sec</strong></span></span></td>
<td class="xl69" style="border-bottom: windowtext 0.5pt solid; border-left: windowtext 0.5pt solid; padding-bottom: 0px; padding-left: 1px; padding-right: 1px; background: #4f81bd; vertical-align: middle; border-top: #95b3d7 0.5pt solid; border-right: windowtext 0.5pt solid; padding-top: 1px; text-underline-style: none; text-line-through: none; mso-pattern: #4f81bd none;" align="center" width="142"><span style="font-family: Calibri;"><span style="color: #ffffff; font-size: 11pt;"><strong>IOPs</strong></span></span></td>
<td class="xl70" style="border-bottom: windowtext 0.5pt solid; border-left: windowtext 0.5pt solid; padding-bottom: 0px; padding-left: 1px; padding-right: 1px; background: #4f81bd; vertical-align: middle; border-top: #95b3d7 0.5pt solid; border-right: #95b3d7 0.5pt solid; padding-top: 1px; text-underline-style: none; text-line-through: none; mso-pattern: #4f81bd none;" align="center" width="170"><span style="font-family: Calibri;"><span style="color: #ffffff; font-size: 11pt;"><strong>Disk Latency</strong></span></span></td>
</tr>
<tr style="height: 15pt;">
<td class="xl67" style="border-bottom: windowtext 0.5pt solid; border-left: #95b3d7 0.5pt solid; padding-bottom: 0px; padding-left: 1px; padding-right: 1px; background: #dce6f1; vertical-align: middle; border-top: windowtext 0.5pt solid; border-right: windowtext 0.5pt solid; padding-top: 1px; text-underline-style: none; text-line-through: none; mso-pattern: #dce6f1 none;" align="center" width="198" height="20"><span style="font-family: Calibri;"><span style="color: #000000; font-size: 11pt;"><strong>8KB</strong></span></span></td>
<td class="xl67" style="border-bottom: windowtext 0.5pt solid; padding-bottom: 0px; background-color: #dce6f1; padding-left: 1px; padding-right: 1px; vertical-align: middle; border-top: medium none; border-right: windowtext 0.5pt solid; padding-top: 1px;" align="center" width="157"><span style="font-family: Calibri;"><span style="color: #000000; font-size: 11pt;"><strong>37.88</strong></span></span></td>
<td class="xl67" style="border-bottom: windowtext 0.5pt solid; padding-bottom: 0px; background-color: #dce6f1; padding-left: 1px; padding-right: 1px; vertical-align: middle; border-top: medium none; border-right: windowtext 0.5pt solid; padding-top: 1px;" align="center" width="142"><span style="font-family: Calibri;"><span style="color: #000000; font-size: 11pt;"><strong>4849.78</strong></span></span></td>
<td class="xl67" style="border-bottom: windowtext 0.5pt solid; padding-bottom: 0px; background-color: #dce6f1; padding-left: 1px; padding-right: 1px; vertical-align: middle; border-top: medium none; border-right: windowtext 0.5pt solid; padding-top: 1px;" align="center" width="170"><span style="font-family: Calibri;"><span style="color: #000000; font-size: 11pt;"><strong>6</strong></span></span></td>
</tr>
<tr style="height: 15pt;">
<td class="xl65" style="border-bottom: windowtext 0.5pt solid; border-left: #95b3d7 0.5pt solid; padding-bottom: 0px; padding-left: 1px; padding-right: 1px; vertical-align: middle; border-top: windowtext 0.5pt solid; border-right: windowtext 0.5pt solid; padding-top: 1px; text-underline-style: none; text-line-through: none;" align="center" width="198" height="20"><span style="font-family: Calibri;"><span style="color: #000000; font-size: 11pt;"><strong>64KB</strong></span></span></td>
<td class="xl65" style="border-bottom: windowtext 0.5pt solid; padding-bottom: 0px; padding-left: 1px; padding-right: 1px; vertical-align: middle; border-top: medium none; border-right: windowtext 0.5pt solid; padding-top: 1px;" align="center" width="157"><span style="font-family: Calibri;"><span style="color: #000000; font-size: 11pt;"><strong>162.33</strong></span></span></td>
<td class="xl65" style="border-bottom: windowtext 0.5pt solid; padding-bottom: 0px; padding-left: 1px; padding-right: 1px; vertical-align: middle; border-top: medium none; border-right: windowtext 0.5pt solid; padding-top: 1px;" align="center" width="142"><span style="font-family: Calibri;"><span style="color: #000000; font-size: 11pt;"><strong>2597.38</strong></span></span></td>
<td class="xl65" style="border-bottom: windowtext 0.5pt solid; padding-bottom: 0px; padding-left: 1px; padding-right: 1px; vertical-align: middle; border-top: medium none; border-right: windowtext 0.5pt solid; padding-top: 1px;" align="center" width="170"><span style="font-family: Calibri;"><span style="color: #000000; font-size: 11pt;"><strong>11</strong></span></span></td>
</tr>
<tr style="height: 15pt;">
<td class="xl67" style="border-bottom: windowtext 0.5pt solid; border-left: #95b3d7 0.5pt solid; padding-bottom: 0px; padding-left: 1px; padding-right: 1px; background: #dce6f1; vertical-align: middle; border-top: windowtext 0.5pt solid; border-right: windowtext 0.5pt solid; padding-top: 1px; text-underline-style: none; text-line-through: none; mso-pattern: #dce6f1 none;" align="center" width="198" height="20"><span style="font-family: Calibri;"><span style="color: #000000; font-size: 11pt;"><strong>128KB</strong></span></span></td>
<td class="xl67" style="border-bottom: windowtext 0.5pt solid; padding-bottom: 0px; background-color: #dce6f1; padding-left: 1px; padding-right: 1px; vertical-align: middle; border-top: medium none; border-right: windowtext 0.5pt solid; padding-top: 1px;" align="center" width="157"><span style="font-family: Calibri;"><span style="color: #000000; font-size: 11pt;"><strong>226.57</strong></span></span></td>
<td class="xl67" style="border-bottom: windowtext 0.5pt solid; padding-bottom: 0px; background-color: #dce6f1; padding-left: 1px; padding-right: 1px; vertical-align: middle; border-top: medium none; border-right: windowtext 0.5pt solid; padding-top: 1px;" align="center" width="142"><span style="font-family: Calibri;"><span style="color: #000000; font-size: 11pt;"><strong>1812.63</strong></span></span></td>
<td class="xl67" style="border-bottom: windowtext 0.5pt solid; padding-bottom: 0px; background-color: #dce6f1; padding-left: 1px; padding-right: 1px; vertical-align: middle; border-top: medium none; border-right: windowtext 0.5pt solid; padding-top: 1px;" align="center" width="170"><span style="font-family: Calibri;"><span style="color: #000000; font-size: 11pt;"><strong>17</strong></span></span></td>
</tr>
<tr style="height: 15pt;">
<td class="xl66" style="border-bottom: #95b3d7 0.5pt solid; border-left: #95b3d7 0.5pt solid; padding-bottom: 0px; padding-left: 1px; padding-right: 1px; vertical-align: middle; border-top: windowtext 0.5pt solid; border-right: windowtext 0.5pt solid; padding-top: 1px; text-underline-style: none; text-line-through: none;" align="center" width="198" height="20"><span style="font-family: Calibri;"><span style="color: #000000; font-size: 11pt;"><strong>256KB</strong></span></span></td>
<td class="xl66" style="border-bottom: #95b3d7 0.5pt solid; border-left: medium none; padding-bottom: 0px; padding-left: 1px; padding-right: 1px; vertical-align: middle; border-top: windowtext 0.5pt solid; border-right: windowtext 0.5pt solid; padding-top: 1px; text-underline-style: none; text-line-through: none;" align="center" width="157"><span style="font-family: Calibri;"><span style="color: #000000; font-size: 11pt;"><strong>326.37</strong></span></span></td>
<td class="xl66" style="border-bottom: #95b3d7 0.5pt solid; border-left: medium none; padding-bottom: 0px; padding-left: 1px; padding-right: 1px; vertical-align: middle; border-top: windowtext 0.5pt solid; border-right: windowtext 0.5pt solid; padding-top: 1px; text-underline-style: none; text-line-through: none;" align="center" width="142"><span style="font-family: Calibri;"><span style="color: #000000; font-size: 11pt;"><strong>1305.48</strong></span></span></td>
<td class="xl66" style="border-bottom: #95b3d7 0.5pt solid; border-left: medium none; padding-bottom: 0px; padding-left: 1px; padding-right: 1px; vertical-align: middle; border-top: windowtext 0.5pt solid; border-right: windowtext 0.5pt solid; padding-top: 1px; text-underline-style: none; text-line-through: none;" align="center" width="170"><span style="font-family: Calibri;"><span style="color: #000000; font-size: 11pt;"><strong>24</strong></span></span></td>
</tr>
<tr style="height: 15pt;">
<td class="xl67" style="border-bottom: windowtext 0.5pt solid; border-left: #95b3d7 0.5pt solid; padding-bottom: 0px; padding-left: 1px; padding-right: 1px; background: #dce6f1; vertical-align: middle; border-top: windowtext 0.5pt solid; border-right: windowtext 0.5pt solid; padding-top: 1px; text-underline-style: none; text-line-through: none; mso-pattern: #dce6f1 none;" align="center" width="198" height="20"><span style="font-family: Calibri;"><span style="color: #000000; font-size: 11pt;"><strong>512KB</strong></span></span></td>
<td class="xl67" style="border-bottom: windowtext 0.5pt solid; border-left: medium none; padding-bottom: 0px; padding-left: 1px; padding-right: 1px; background: #dce6f1; vertical-align: middle; border-top: windowtext 0.5pt solid; border-right: windowtext 0.5pt solid; padding-top: 1px; text-underline-style: none; text-line-through: none; mso-pattern: #dce6f1 none;" align="center" width="157"><span style="font-family: Calibri;"><span style="color: #000000; font-size: 11pt;"><strong>380.92</strong></span></span></td>
<td class="xl67" style="border-bottom: windowtext 0.5pt solid; border-left: medium none; padding-bottom: 0px; padding-left: 1px; padding-right: 1px; background: #dce6f1; vertical-align: middle; border-top: windowtext 0.5pt solid; border-right: windowtext 0.5pt solid; padding-top: 1px; text-underline-style: none; text-line-through: none; mso-pattern: #dce6f1 none;" align="center" width="142"><span style="font-family: Calibri;"><span style="color: #000000; font-size: 11pt;"><strong>761.84</strong></span></span></td>
<td class="xl67" style="border-bottom: windowtext 0.5pt solid; border-left: medium none; padding-bottom: 0px; padding-left: 1px; padding-right: 1px; background: #dce6f1; vertical-align: middle; border-top: windowtext 0.5pt solid; border-right: windowtext 0.5pt solid; padding-top: 1px; text-underline-style: none; text-line-through: none; mso-pattern: #dce6f1 none;" align="center" width="170"><span style="font-family: Calibri;"><span style="color: #000000; font-size: 11pt;"><strong>41</strong></span></span></td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><a href="http://www.sqlserverfaq.net/wp-content/uploads/2012/04/IOdepth1.png"><img class="alignleft size-medium wp-image-201" title="IOdepth" src="http://www.sqlserverfaq.net/wp-content/uploads/2012/04/IOdepth1-300x207.png" alt="" width="300" height="207" /></a></p>
<p>In this test, between 8k to 64KB if we get the acceptable response time and our IOPs requirement meets the our current workload requirement,  Disk is said to meet the test requirements.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>Similarly,</p>
<p>We need to perform the following test<br />
<strong>Random Write Test</strong></p>
<p>sqlio -dE -BH -kW -frandom -t1 -o1 -s120 -b64 -LS testfile.dat<br />
sqlio -dE -BH -kW -frandom -t2 -o1 -s120 -b64 -LS testfile.dat<br />
sqlio -dE -BH -kW -frandom -t4 -o1 -s120 -b64 -LS testfile.dat<br />
sqlio -dE -BH -kW -frandom -t4 -o2 -s120 -b64 -LS testfile.dat<br />
sqlio -dE -BH -kW -frandom -t4 -o4 -s120 -b64 -LS testfile.dat<br />
sqlio -dE -BH -kW -frandom -t4 -o8 -s120 -b64 -LS testfile.dat<br />
sqlio -dE -BH -kW -frandom -t4 -o12 -s120 -b64 -LS testfile.dat<br />
sqlio -dE -BH -kW -frandom -t4 -o16 -s120 -b64 -LS testfile.dat<br />
sqlio -dE -BH -kW -frandom -t4 -o32 -s120 -b64 -LS testfile.dat<br />
sqlio -dE -BH -kW -frandom -t4 -o64 -s120 -b64 -LS testfile.dat<br />
sqlio -dE -BH -kW -frandom -t4 -o128 -s120 -b64 -LS testfile.dat</p>
<p><strong>Large Random Write Test</strong></p>
<p>sqlio -dE -BH -kW -frandom -t4 -o8 -s120 -b8 -LS testfile.dat<br />
sqlio -dE -BH -kW -frandom -t4 -o8 -s120 -b64 -LS testfile.dat<br />
sqlio -dE -BH -kW -frandom -t4 -o8 -s120 -b128 -LS testfile.dat<br />
sqlio -dE -BH -kW -frandom -t4 -o8 -s120 -b256 -LS testfile.dat<br />
sqlio -dE -BH -kW -frandom -t4 -o8 -s120 -b512 -LS testfile.dat</p>
<p><strong>Sequential Read Test </strong></p>
<p>sqlio -dE -BH -kR -fsequential -t1 -o1 -s120 -b64 -LS testfile.dat<br />
sqlio -dE -BH -kR -fsequential -t2 -o1 -s120 -b64 -LS testfile.dat<br />
sqlio -dE -BH -kR -fsequential -t4 -o1 -s120 -b64 -LS testfile.dat<br />
sqlio -dE -BH -kR -fsequential -t4 -o2 -s120 -b64 -LS testfile.dat<br />
sqlio -dE -BH -kR -fsequential -t4 -o4 -s120 -b64 -LS testfile.dat<br />
sqlio -dE -BH -kR -fsequential -t4 -o8 -s120 -b64 -LS testfile.dat<br />
sqlio -dE -BH -kR -fsequential -t4 -o12 -s120 -b64 -LS testfile.dat<br />
sqlio -dE -BH -kR -fsequential -t4 -o16 -s120 -b64 -LS testfile.dat<br />
sqlio -dE -BH -kR -fsequential -t4 -o64 -s120 -b64 -LS testfile.dat<br />
sqlio -dE -BH -kR -fsequential -t4 -o128 -s120 -b64 -LS testfile.dat</p>
<p><strong>Large Sequential Read Test</strong></p>
<p>sqlio -dE -BH -kR -fsequential -t4 -o8 -s120 -b8 -LS testfile.dat<br />
sqlio -dE -BH -kR -fsequential -t4 -o8 -s120 -b64 -LS testfile.dat<br />
sqlio -dE -BH -kR -fsequential -t4 -o8 -s120 -b128 -LS testfile.dat<br />
sqlio -dE -BH -kR -fsequential -t4 -o8 -s120 -b256 -LS testfile.dat<br />
sqlio -dE -BH -kR -fsequential -t4 -o8 -s120 -b512 -LS testfile.dat</p>
<p><strong>Sequential Write Test </strong></p>
<p>sqlio -dE -BH -kW -fsequential -t1 -o1 -s120 -b64 -LS testfile.dat<br />
sqlio -dE -BH -kW -fsequential -t2 -o1 -s120 -b64 -LS testfile.dat<br />
sqlio -dE -BH -kW -fsequential -t4 -o1 -s120 -b64 -LS testfile.dat<br />
sqlio -dE -BH -kW -fsequential -t4 -o2 -s120 -b64 -LS testfile.dat<br />
sqlio -dE -BH -kW -fsequential -t4 -o4 -s120 -b64 -LS testfile.dat<br />
sqlio -dE -BH -kW -fsequential -t4 -o8 -s120 -b64 -LS testfile.dat<br />
sqlio -dE -BH -kW -fsequential -t4 -o12 -s120 -b64 -LS testfile.dat<br />
sqlio -dE -BH -kW -fsequential -t4 -o16 -s120 -b64 -LS testfile.dat<br />
sqlio -dE -BH -kW -fsequential -t4 -o32 -s120 -b64 -LS testfile.dat<br />
sqlio -dE -BH -kW -fsequential -t4 -o64 -s120 -b64 -LS testfile.dat<br />
sqlio -dE -BH -kW -fsequential -t4 -o128 -s120 -b64 -LS testfile.dat</p>
<p><strong>Large Sequential Write Test</strong></p>
<p>sqlio -dE -BH -kW -fsequential -t4 -o8 -s120 -b8 -LS testfile.dat<br />
sqlio -dE -BH -kW -fsequential -t4 -o8 -s120 -b64 -LS testfile.dat<br />
sqlio -dE -BH -kW -fsequential -t4 -o8 -s120 -b128 -LS testfile.dat<br />
sqlio -dE -BH -kW -fsequential -t4 -o8 -s120 -b256 -LS testfile.dat<br />
sqlio -dE -BH -kW -fsequential -t4 -o8 -s120 -b512 -LS testfile.dat</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>The results can be captured and verifies whether it meets the expected workload requirement within the acceptable response time (&lt; 15ms).</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>Hope this Helps !!</p>
<p>Parikshit Savjani<br />
<em>Premier Field Engineer</em></p>
<p><em>Disclaimer: This post is provided “AS IS” with no warranties, and confers no rights</em></p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sqlserverfaq.net/2012/04/02/sql-server-predeployment-io-stress-testing-using-sqlio/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>SQL 2012: Indirect Checkpoint Explained !!!  Tweet</title>
		<link>http://www.sqlserverfaq.net/2012/03/18/185/</link>
		<comments>http://www.sqlserverfaq.net/2012/03/18/185/#comments</comments>
		<pubDate>Sun, 18 Mar 2012 09:09:40 +0000</pubDate>
		<dc:creator>Parikshit</dc:creator>
				<category><![CDATA[SQL 2012]]></category>
		<category><![CDATA[Dirty_page_Poll]]></category>
		<category><![CDATA[Indirect Checkpoints]]></category>
		<category><![CDATA[Recovery Writer]]></category>
		<category><![CDATA[recovery_interval]]></category>
		<category><![CDATA[sql 2012]]></category>
		<category><![CDATA[sysprocesses]]></category>

		<guid isPermaLink="false">http://www.sqlserverfaq.net/?p=185</guid>
		<description><![CDATA[Recently I got an opportunity to present at the SQL Server day organized by www.SQLServerGeeks.com on SQL 2012 Indirect Checkpoints.In this post I would like to explain the same for the benefit of wider audience. The focus of SQL 2012 &#8230; <a href="http://www.sqlserverfaq.net/2012/03/18/185/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Recently I got an opportunity to present at the <a href="http://www.sqlservergeeks.com/events/Inperson/O_sqlserverday.htm" target="_blank">SQL Server day</a> organized by <a href="http://www.SQLServerGeeks.com">www.SQLServerGeeks.com</a> on SQL 2012 Indirect Checkpoints.In this post I would like to explain the same for the benefit of wider audience.</p>
<p><a href="http://www.sqlserverfaq.net/wp-content/uploads/2012/03/SQL_Server_Day.png"><img class="wp-image-191 aligncenter" title="SQL_Server_Day" src="http://www.sqlserverfaq.net/wp-content/uploads/2012/03/SQL_Server_Day.png" alt="" width="516" height="392" /></a></p>
<p>The focus of SQL 2012 has always been to provide a reliable,robust and Highly Available Database Solution to give the customer enough confidence to host their Tier 1 data on SQL Server.</p>
<p>AlwaysON and Indirect Checkpoints are some of the new changes in SQL 2012 which gives you an assurance of High Availability with minimum downtime.</p>
<p>I wouldn’t say indirect Checkpoints as a new feature of SQL 2012 since it is just a change in the algorithm but a very important change as well since it overcomes the flaws of the previous algorithm.</p>
<p><strong>Checkpoints</strong> are mainly used to minimize the recovery time interval. At Checkpoints all the dirty buffers are flushed to disk so after the checkpoint is finished we are sure that datafile is consistent and contains all the committed transactions which occurred before checkpoint.</p>
<p>The Recovery Time Objective (RTO) for a given database decides the frequency of the checkpoints.</p>
<p>In SQL Server, we have configuration parameter viz <a href="http://msdn.microsoft.com/en-us/library/ms191154.aspx" target="_blank">recovery_interval(min)</a> which is used to set your recovery time objective. By default recovery_interval is set to 0 which sets the RTO to 1 min, so SQL Server will internally calculate the frequency of the checkpoints so that recovery should not take more than 1 min to bring the database online.</p>
<p>Let us understand the current checkpoint algorithm and its challenges</p>
<p><a href="http://www.sqlserverfaq.net/wp-content/uploads/2012/03/CheckpointAlgorithm.png"><img class="aligncenter  wp-image-189" title="CheckpointAlgorithm" src="http://www.sqlserverfaq.net/wp-content/uploads/2012/03/CheckpointAlgorithm-1024x729.png" alt="" width="559" height="352" /></a></p>
<p><strong>Current Checkpoint Algorithm </strong></p>
<ul>
<li>In our current checkpoint algorithm, based on the recovery interval(min), SQL Server internally calculates the regular intervals in the Tlog at which the checkpoint happens. In other words, checkpoint frequency is dependent on the no. of transactions in the Transaction log.</li>
<li>However a given transaction can insert/update/delete multiple dirty buffers.</li>
<li>So let us say after a Checkpoint we have some transactions which are inserting/updating/deleting large number of dirty buffer and if the crash happens after that, all these dirty buffers needs to be recovered by SQL Server.</li>
<li>The recovery time is mainly dependent on the number of dirty buffers to recover.</li>
<li>However our current checkpoint algorithm doesn’t account for the number of dirty buffer to be recovered.</li>
<li>Hence Recovery Interval(min) cannot be predicted our guaranteed.</li>
<li>Further, the flushing of dirty buffers occurs only at checkpoints and doesn’t occur anywhere in between which results in IO spikes at the time of checkpoint.</li>
</ul>
<p><strong>Challenges of Current Checkpoint Algorithm</strong></p>
<p><a href="http://www.sqlserverfaq.net/wp-content/uploads/2012/03/Challenges.png"><img class="aligncenter  wp-image-188" title="Challenges" src="http://www.sqlserverfaq.net/wp-content/uploads/2012/03/Challenges-1024x730.png" alt="" width="546" height="343" /></a></p>
<p>&nbsp;</p>
<p><strong>Indirect Checkpoint Algorithm</strong></p>
<p><a href="http://www.sqlserverfaq.net/wp-content/uploads/2012/03/IndirectCheckpointAlgorithm.png"><img class="aligncenter  wp-image-190" title="IndirectCheckpointAlgorithm" src="http://www.sqlserverfaq.net/wp-content/uploads/2012/03/IndirectCheckpointAlgorithm-1024x730.png" alt="" width="539" height="426" /></a></p>
<p>In the new Indirect Checkpoint Algorithm</p>
<ul>
<li>We need to first set <a href="http://msdn.microsoft.com/en-us/library/hh403416(v=sql.110).aspx" target="_blank">target_recovery_time</a> which is a new database level setting.</li>
<li>Once the target_recovery_time is set, SQL Server internally calculates target dirty buffer threshold.</li>
<li>As the transaction are logged in the Tlog, the LSN and dirty buffers which are modified by the transaction are tracked in Dirty Page List. So in the indirect checkpoint algorithm, we now track the dirty buffers from each transaction alongwith their LSN.</li>
<li>A new Background process, called Recovery Writer is introduced starting SQL 2012. The job of the recovery writer is to periodically POLL the Dirty Page List to see the following</li>
</ul>
<p>IF ( No. of Dirty Pages in BPOOL &gt; Target Dirty Buffer Threshold)<br />
{<br />
Flush Dirty Buffers<br />
Move MinRecoveryLSN to the next transaction until which the dirty buffers are     flushed<br />
}</p>
<ul>
<li>Recovery Writer is a new background thread which wakes up periodically based on a timed event to poll the dirty page list</li>
<li>DIRTY_PAGE_POLL is a new system waittype introduced to support timed wait of RECOVERY WRITER thread and if you see it as one of the high wait events in sys.dm_os_wait_stats you can safely ignore it.</li>
<li>With the new recovery writer thread, SQL 2012 ensures at any given point in time there is not more than target dirty buffers in the Buffer Pool, which can easily recovered within target recovery time.</li>
<li>The Checkpoint Background process is now not responsible for flushing the pages but instead is used to calculate the MinRecoveryLSN</li>
</ul>
<p>You can view the new recovery writer thread in the SQL Instance using the following query</p><pre class="crayon-plain-tag">&lt;span class=&quot;kwrd&quot;&gt;select&lt;/span&gt; * &lt;span class=&quot;kwrd&quot;&gt;from&lt;/span&gt; sysprocesses &lt;span class=&quot;kwrd&quot;&gt;where&lt;/span&gt; spid=2</pre><p>With the new indirect Checkpoint algorithm ,</p>
<ul>
<li>Target Recovery Time can be guaranteed and is predictable since the dirty page list is tracked by SQL Server.</li>
<li>IO spikes  occurring at Checkpoints are now smoothen out since the checkpoint process doesn’t flush dirty buffers but the Average IO Workload of the SQL Server will increase.</li>
<li>Setting the Target Recovery Time too small, can cause background recovery writer to run aggressively and thereby increases the IO workload for large OLTP systems.</li>
</ul>
<p><strong>POINTS TO REMEMBER</strong></p>
<p><a href="http://www.sqlserverfaq.net/wp-content/uploads/2012/03/Pointstoremember.png"><img class="aligncenter  wp-image-186" title="Pointstoremember" src="http://www.sqlserverfaq.net/wp-content/uploads/2012/03/Pointstoremember.png" alt="" width="538" height="376" /></a></p>
<p>&nbsp;</p>
<p><strong>CALL TO ACTION</strong></p>
<p><a href="http://www.sqlserverfaq.net/wp-content/uploads/2012/03/CalltoAction.png"><img class="aligncenter  wp-image-187" title="CalltoAction" src="http://www.sqlserverfaq.net/wp-content/uploads/2012/03/CalltoAction.png" alt="" width="543" height="413" /></a></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>Parikshit Savjani<br />
<em>Premier Field Engineer</em></p>
<p>&nbsp;</p>
<p><em>Disclaimer: This post is provided &#8220;AS IS&#8221; with no warranties, and confers no rights</em></p>
<p><strong><span style="color: #ff0000; font-size: x-small;"><em>Note: This is my interpretation of the Checkpoint Algorithm. This blog should not be treated as official document or record exposed by Microsoft.</em></span></strong></p>
]]></content:encoded>
			<wfw:commentRss>http://www.sqlserverfaq.net/2012/03/18/185/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Script to monitor Free Space of the data file and send alert Tweet</title>
		<link>http://www.sqlserverfaq.net/2012/02/16/script-to-monitor-free-space-of-the-data-file-and-send-alert/</link>
		<comments>http://www.sqlserverfaq.net/2012/02/16/script-to-monitor-free-space-of-the-data-file-and-send-alert/#comments</comments>
		<pubDate>Thu, 16 Feb 2012 14:03:48 +0000</pubDate>
		<dc:creator>Parikshit</dc:creator>
				<category><![CDATA[SQL Maintenance]]></category>
		<category><![CDATA[alert]]></category>
		<category><![CDATA[data file]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[free space]]></category>
		<category><![CDATA[monitor]]></category>
		<category><![CDATA[script]]></category>

		<guid isPermaLink="false">http://www.sqlserverfaq.net/?p=170</guid>
		<description><![CDATA[Recently I had to create a script which will monitor free space of all the datafiles and send alert if the free space within a datafile falls below 10% of the Total file space. The following script should help to &#8230; <a href="http://www.sqlserverfaq.net/2012/02/16/script-to-monitor-free-space-of-the-data-file-and-send-alert/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Recently I had to create a script which will monitor free space of all the datafiles and send alert if the free space within a datafile falls below 10% of the Total file space.</p>
<p>The following script should help to achieve the objective so sharing with the larger audience</p>
<p><span style="font-size: x-small;"><span class="kwrd">SET</span> NOCOUNT <span class="kwrd">ON</span> <span class="kwrd">DECLARE</span> @Tbl <span class="kwrd">Table</span> ( dbname <span class="kwrd">varchar</span>(30), file_id <span class="kwrd">int</span>, filename <span class="kwrd">varchar</span>(30), physicalname <span class="kwrd">varchar</span>(100), TotalSize <span class="kwrd">int</span>, Freespace <span class="kwrd">int</span>, PctFreespace <span class="kwrd">int</span> ) insert <span class="kwrd">into</span> @Tbl <span class="kwrd">EXEC</span> sp_MSforeachdb </span><span style="font-size: x-small;"><span class="str">&#8216;SELECT db_name(),[file_id],name,physical_name,size/128.0, size/128.0 &#8211; CAST(FILEPROPERTY(name, &#8216;</span><span class="str">&#8216;SpaceUsed&#8217;</span></span><span style="font-size: x-small;"><span class="str">&#8216;) AS int)/128.0, (size/128.0 &#8211; CAST(FILEPROPERTY(name, &#8216;</span><span class="str">&#8216;SpaceUsed&#8217;</span></span></p><pre class="crayon-plain-tag">&lt;span class=&quot;str&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;') AS int)/128.0)&lt;/span&gt;&lt;/span&gt;</pre><p><span style="font-size: x-small;"><span class="str">*100/(size/128.0) FROM sys.database_files&#8217;</span> <span class="kwrd">IF</span> <span class="kwrd">EXISTS</span>(<span class="kwrd">select</span> * <span class="kwrd">from</span> @Tbl <span class="kwrd">where</span> PctFreeSpace &lt;= 40) <span class="kwrd">BEGIN</span> &#8211;&lt;&lt;Send Alert&gt;&gt; <span class="kwrd">select</span> * <span class="kwrd">from</span> @Tbl <span class="kwrd">where</span> PctFreeSpace &lt;= 40 END</span></p>
<p>&nbsp;</p>
<p>Hope this helps !!!</p>
<p>Parikshit Savjani<br />
<em>Premier Field Engineer</em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.sqlserverfaq.net/2012/02/16/script-to-monitor-free-space-of-the-data-file-and-send-alert/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Blogs on SQLServerGeeks</title>
		<link>http://www.sqlserverfaq.net/2012/02/02/blogs-on-sqlservergeeks/</link>
		<comments>http://www.sqlserverfaq.net/2012/02/02/blogs-on-sqlservergeeks/#comments</comments>
		<pubDate>Thu, 02 Feb 2012 18:33:23 +0000</pubDate>
		<dc:creator>Parikshit</dc:creator>
				<category><![CDATA[SQLServerGeeks]]></category>
		<category><![CDATA[page allocation]]></category>
		<category><![CDATA[parallel plan]]></category>
		<category><![CDATA[rebuild index]]></category>
		<category><![CDATA[sql]]></category>
		<category><![CDATA[sql server]]></category>
		<category><![CDATA[sqlservergeeks]]></category>
		<category><![CDATA[sys.dm_db_database_page_allocations]]></category>

		<guid isPermaLink="false">http://www.sqlserverfaq.net/?p=165</guid>
		<description><![CDATA[Following are links to my blog post on SQLServerGeeks.com. Hope you find them useful Does Parallel Plan for rebuild index impact the fragmentation of index? http://sqlservergeeks.com/blogs/Parikshit/personal/427/does-parallel-plan-for-rebuild-index-impact-the-fragmentation-of-index Understanding SQL Server Page Allocation using new sys.dm_db_database_page_allocations introduced in SQL 2012 http://sqlservergeeks.com/blogs/Parikshit/personal/433/understanding-sql-server-page-allocation-using-new-sys-dm_db_database_page_allocations-introduced-in-sql-2012 Parikshit &#8230; <a href="http://www.sqlserverfaq.net/2012/02/02/blogs-on-sqlservergeeks/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Following are links to my blog post on SQLServerGeeks.com.</p>
<p>Hope you find them useful <img style="border-bottom-style: none; border-left-style: none; border-top-style: none; border-right-style: none" class="wlEmoticon wlEmoticon-smile" alt="Smile" src="http://www.sqlserverfaq.net/wp-content/uploads/2012/02/wlEmoticon-smile.png"></p>
<p>Does Parallel Plan for rebuild index impact the fragmentation of index?
<p><a href="http://sqlservergeeks.com/blogs/Parikshit/personal/427/does-parallel-plan-for-rebuild-index-impact-the-fragmentation-of-index">http://sqlservergeeks.com/blogs/Parikshit/personal/427/does-parallel-plan-for-rebuild-index-impact-the-fragmentation-of-index</a>
<p>Understanding SQL Server Page Allocation using new sys.dm_db_database_page_allocations introduced in SQL 2012
<p><a href="http://sqlservergeeks.com/blogs/Parikshit/personal/433/understanding-sql-server-page-allocation-using-new-sys-dm_db_database_page_allocations-introduced-in-sql-2012">http://sqlservergeeks.com/blogs/Parikshit/personal/433/understanding-sql-server-page-allocation-using-new-sys-dm_db_database_page_allocations-introduced-in-sql-2012</a>
<p>Parikshit Savjani<br /><em>Premier Field Engineer</em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.sqlserverfaq.net/2012/02/02/blogs-on-sqlservergeeks/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Failed to join the instance to the availability group while configuring AlwaysON Tweet</title>
		<link>http://www.sqlserverfaq.net/2012/01/30/failed-to-join-the-instance-to-the-availability-group-while-configuring-alwayson/</link>
		<comments>http://www.sqlserverfaq.net/2012/01/30/failed-to-join-the-instance-to-the-availability-group-while-configuring-alwayson/#comments</comments>
		<pubDate>Mon, 30 Jan 2012 17:39:26 +0000</pubDate>
		<dc:creator>Parikshit</dc:creator>
				<category><![CDATA[AlwaysON]]></category>
		<category><![CDATA[SQL 2012]]></category>
		<category><![CDATA[availability groups]]></category>
		<category><![CDATA[Denali]]></category>
		<category><![CDATA[Error: 41158]]></category>
		<category><![CDATA[failed]]></category>
		<category><![CDATA[Microsoft SQL Server]]></category>
		<category><![CDATA[sql 2012]]></category>
		<category><![CDATA[SQL Server error 41106]]></category>

		<guid isPermaLink="false">http://www.sqlserverfaq.net/?p=152</guid>
		<description><![CDATA[As SQL 2012 is in it’s RC0 phase, I was trying to configure AlwaysON on my 2-node WSFC with node and disk majority.Next I installed Default instance of SQL Server in parallel ( to save some time ) on both &#8230; <a href="http://www.sqlserverfaq.net/2012/01/30/failed-to-join-the-instance-to-the-availability-group-while-configuring-alwayson/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>As SQL 2012 is in it’s RC0 phase, I was trying to configure AlwaysON on my 2-node WSFC with node and disk majority.Next I installed Default instance of SQL Server in parallel ( to save some time <img class="wlEmoticon wlEmoticon-smile" style="border-style: none;" src="http://www.sqlserverfaq.net/wp-content/uploads/2012/01/wlEmoticon-smile.png" alt="Smile" /> ) on both nodes of the WSFC.Next I enabled my instances for AlwaysON from SQL Configuration Manager for both the instances.Next I created Availability Group to identify the databases,secondary replicas along with the mode of secondary(synchronous or asynchronous commit),endpoint port etc.</p>
<p>However, in my first encounter with AlwaysON, I was hit with the following error while joining the secondary replica to the Availability Group</p>
<p><span style="font-size: x-small;"><em>TITLE: Microsoft SQL Server Management Studio<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</em></span></p>
<p><span style="font-size: x-small;"><em>Failed to join the instance &#8216;DSI-CLUNODE2&#8242; to the availability group &#8216;AVG&#8217;. (Microsoft.SqlServer.Management.SDK.TaskForms)</em></span></p>
<p><span style="font-size: x-small;"><em>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />
ADDITIONAL INFORMATION:</em></span></p>
<p><span style="font-size: x-small;"><em>An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)</em></span></p>
<p><span style="font-size: x-small;"><em>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;</em></span></p>
<p><span style="font-size: x-small;"><em>Failed to join local availability replica to availability group &#8216;AVG&#8217;.  The operation encountered SQL Server error 41106 and has been rolled back.  Check the SQL Server error log for more details.  When the cause of the error has been resolved, retry the ALTER AVAILABILITY GROUP JOIN command. (Microsoft SQL Server, Error: 41158)</em></span></p>
<p>When I checked the Errorlog, I see my errorlog filled with following error messages</p>
<p><em><span style="font-size: x-small;">Error: 18456, Severity: 14, State: 5.<br />
Login failed for user &#8216;DOM2K8R2CLUDSI-CLUNODE2$&#8217;. Reason: Could not find a login matching the name provided</span>. </em></p>
<p>The error message tells me login failure error messages for the machine account (DOM2K8R2CLUDSI-CLUNODE2$) of Node 2 on the SQL Instance on Node 1.</p>
<p>So I consulted my senior colleague and I got following reply from Suresh Kandoth ,Escalation Engineer with Microsoft CSS Team</p>
<p><em>If we are using virtual accounts (Service SIDs in my case) for service startup of db engine, then if that service goes outside the machine, authentication on the remote system will be performed using machine account. So on the target server [SRV1] we need to add the windows login [domain_nameSRV2$] and give appropriate permissions.</em></p>
<p>Now, I understand that machine account of Node 2 is required to be a login to Node 1 and the same login should have connect permissions to database mirroring endpoint created by AlwaysON Group as documented ( Thanks to my colleague Jwalanth Chavan in Microsoft for providing the link ) in the following</p>
<p>MSDN link:  <a href="http://msdn.microsoft.com/en-us/library/ms366346(v=SQL.110).aspx">http://msdn.microsoft.com/en-us/library/ms366346(v=SQL.110).aspx</a></p>
<p><em>For two server instances to connect to each other&#8217;s <a href="http://msdn.microsoft.com/en-us/library/ms179511(v=sql.110).aspx">database mirroring endpoint</a> point, the login account of each instance requires access to the other instance. Also, each login account requires connect permission to the database mirroring endpoint of the other instance. </em></p>
<p><em>The impact of this requirement depends on whether the server instances run as the same domain user account:</em></p>
<p>· <em>If the server instances run as the same domain user account, the correct user logins exist automatically in both <strong>master</strong> databases. This simplifies the security configuration the database and is recommended. </em></p>
<p>· <em>If the server instances run as different user accounts, user logins on the server instance that hosts the principal server or primary replica must be manually reproduced on the server instance that hosts the mirror server or on every server instance that hosts a secondary replica. For more information, see <a href="http://msdn.microsoft.com/en-us/library/ms366346(v=SQL.110).aspx#CreateLogin">Create a Login for a Different Account</a> and <a href="http://msdn.microsoft.com/en-us/library/ms366346(v=SQL.110).aspx#GrantConnect">Grant Connect Permission</a>, later in this topic. </em></p>
<p>So to resolve the issue, I created a login for machine account (DOM2K8R2CLUDSI-CLUNODE2$) of the secondary replica on the primary instance and granted it connect permission to the database mirroring (hadr_endpoint) endpoint and vice versa.</p>
<p><strong>ON Primary Replica</strong></p>
<p><em><span style="font-size: x-small;">use [master]<br />
GO<br />
CREATE LOGIN [DOM2K8R2CLUDSI-CLUNODE2$] FROM WINDOWS<br />
GO<br />
GRANT CONNECT ON ENDPOINT::[Hadr_endpoint] TO [DOM2K8R2CLUDSI-CLUNODE2$]<br />
GO</span></em></p>
<p><strong>ON Secondary Replica</strong></p>
<p><em><span style="font-size: x-small;">use [master]<br />
GO<br />
CREATE LOGIN [DOM2K8R2CLUDSI-CLUNODE1$] FROM WINDOWS<br />
GO<br />
GRANT CONNECT ON ENDPOINT::[Hadr_endpoint] TO [DOM2K8R2CLUDSI-CLUNODE1$]<br />
GO<br />
</span></em></p>
<p>The above error was resolved and my secondary replica now looks clean without any errors as shown below</p>
<p>&nbsp;</p>
<p><a href="http://www.sqlserverfaq.net/wp-content/uploads/2012/01/image1.png"><img style="background-image: none; padding-left: 0px; padding-right: 0px; display: inline; padding-top: 0px; border-width: 0px;" title="image" src="http://www.sqlserverfaq.net/wp-content/uploads/2012/01/image_thumb1.png" alt="image" width="244" height="175" border="0" /></a></p>
<p>To conclude,</p>
<p>If the service startup account of the instances participating in AlwaysON are domain accounts, the AlwaysON GUI  creates the logins for the startup account and grants it connect permissions to hadr_endpoint on the opposite instances.</p>
<p>However in case when  the service startup account of the instances participating  AlwaysON is Service SIDs, the AlwaysON GUI doesn’t create login for the machine accounts on the opposite instances and hence we see the above error. As confirmed by the product team, it is by design behaviour and  recommendation is to manually</p>
<p>1. Add the logins for machine accounts (in other instances) and<br />
2. Give the connect permission to hadr_endpoint.</p>
<p><span style="color: #ff0000;">However, I am yet to confirm whether running SQL Server instance on Service SIDs is supported for AlwaysON scenario.</span></p>
<p><em>Special thanks to Jwalanth Chavan,Suresh Kandoth and Balmukund Lakhani to help me identify the cause of the issue.</em></p>
<p>The same issue is also discussed in the thread</p>
<p><a href="http://social.msdn.microsoft.com/Forums/en-US/sqlhadr/thread/616b9f77-fbd4-49fa-9887-b84ca72544a5">http://social.msdn.microsoft.com/Forums/en-US/sqlhadr/thread/616b9f77-fbd4-49fa-9887-b84ca72544a5</a></p>
<p>Hope this helps !!!</p>
<p>Parikshit Savjani<br />
<em>Premier Field Engineer</em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.sqlserverfaq.net/2012/01/30/failed-to-join-the-instance-to-the-availability-group-while-configuring-alwayson/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to prevent firing of subscriptions when there is no data in Report? Tweet</title>
		<link>http://www.sqlserverfaq.net/2012/01/05/how-to-prevent-firing-of-subscriptions-when-there-is-no-data-in-report/</link>
		<comments>http://www.sqlserverfaq.net/2012/01/05/how-to-prevent-firing-of-subscriptions-when-there-is-no-data-in-report/#comments</comments>
		<pubDate>Thu, 05 Jan 2012 13:35:13 +0000</pubDate>
		<dc:creator>Parikshit</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[data driven subscriptions]]></category>
		<category><![CDATA[fire]]></category>
		<category><![CDATA[no data]]></category>
		<category><![CDATA[reporting services]]></category>
		<category><![CDATA[subscription]]></category>

		<guid isPermaLink="false">http://www.sqlserverfaq.net/2012/01/05/how-to-prevent-firing-of-subscriptions-when-there-is-no-data-in-report/</guid>
		<description><![CDATA[Many times it is annoying to receive email alert when there is no data in the report. Generally such cases happen when you have scheduled an email subscription for a report which fires at the specified schedule and delivers the &#8230; <a href="http://www.sqlserverfaq.net/2012/01/05/how-to-prevent-firing-of-subscriptions-when-there-is-no-data-in-report/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Many times it is annoying to receive email alert when there is no data in the report. Generally such cases happen when you have scheduled an email subscription for a report which fires at the specified schedule and delivers the report. However as an end user you might be interested to receive an email alert only when there is data in the report.</p>
<p>To deal with such situation Reporting Services doesn’t have an Out of Box solution, so in this Blog I would like to discuss on how I managed to achieve to this</p>
<p><strong>Method 1: (Preferred Method for Enterprise Edition of SQL Server)</strong></p>
<p><strong>Use Data Driven Subscriptions</strong></p>
<p>If you are using Data Driven Subscriptions, you can prevent the Subscriptions being fired by modifying the query used for Data Driven Subscriptions as</p>
<p>select * from &lt;&lt;Data driven subscription table&gt;&gt;<br />
where exists ( select top 1  &lt;&lt; query which populates the dataset in report and select only one column in the query&gt;&gt;)</p>
<p>Make sure to use top 1 in query to fetch only 1 row and select only 1 column in the column list in the query since the intention is only to check the existence of data from the query</p>
<p><strong>Method 2: (Preferred Method for Other Editions Of SQL Server)</strong></p>
<p><strong>Use Custom T-SQL Script to trigger the subscription Job</strong></p>
<p>The reason I list this method as preferred method for other editions is since Data driven subscriptions is available only with Enterprise Edition of SQL Server and hence for all editions we will have to use this method.</p>
<p>As we know, each subscription creates a Job in SQL Agent which has named on GUID generated internally. At the defined schedule, the sql agent job kicks in to run the report and sends the report to the defined subscribers.</p>
<p>We use the same concept, however in our case we first need to check the existence of the data in the report and if data exist we can invoke the job.</p>
<p>We cannot afford to modify the existing job since it will land us in unsupported scenario.</p>
<p>So we first modify the schedule of subscriptions to run <strong>“once” </strong> on a schedule date of the past (may be yesterday). You can do this using Report Manager where you go the subscriptions tab for the report and edit the schedule. We do this so that report subscription remains active and enabled but at the same time doesn’t invoke the Job since we will invoke the job programmatically using our scripts.</p>
<p>We now create a new T-SQL job and add the following script. We schedule this job to run on the same schedule as the original subscription was initially configured</p>
<p>IF EXISTS<br />
(<br />
&lt;&lt;SELECT TOP 1 query to check data existence&gt;&gt;<br />
)<br />
BEGIN<br />
DECLARE @Jobid uniqueidentifier<br />
DECLARE @Subscriptions TABLE<br />
(Jobid uniqueidentifier)</p>
<p>INSERT INTO @Subscriptions<br />
select sch.ScheduleID from Schedule sch<br />
INNER JOIN Subscriptions subs ON sch.[EventData]=subs.SubscriptionID<br />
INNER JOIN Catalog cat ON subs.Report_OID=cat.ItemID<br />
where cat.Name=&lt;&lt;Report Name&gt;&gt;</p>
<p>select TOP 1 @Jobid =Jobid from @Subscriptions<br />
WHILE(@@ROWCOUNT&lt;&gt;0)<br />
BEGIN<br />
EXEC msdb.dbo.sp_start_job @Jobid<br />
DELETE FROM @Subscriptions where Jobid=@Jobid<br />
select TOP 1 @Jobid =Jobid from @Subscriptions<br />
END<br />
END</p>
<p>&nbsp;</p>
<p>So the new job created will run on the defined schedule, it will check for the existence of the data in the report and if data exists, it will invoke the subscriptions job which will run the report and send the report to subscribers.</p>
<p>Hope this helps !!!!</p>
<p>&nbsp;</p>
<p>Parikshit Savjani<br />
<em>Premier Field Engineer</em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.sqlserverfaq.net/2012/01/05/how-to-prevent-firing-of-subscriptions-when-there-is-no-data-in-report/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Powershell script to script all the Jobs from the given instance of SQL Server Tweet</title>
		<link>http://www.sqlserverfaq.net/2012/01/03/powershell-script-to-script-all-the-jobs-from-the-given-instance-of-sql-server/</link>
		<comments>http://www.sqlserverfaq.net/2012/01/03/powershell-script-to-script-all-the-jobs-from-the-given-instance-of-sql-server/#comments</comments>
		<pubDate>Tue, 03 Jan 2012 08:43:20 +0000</pubDate>
		<dc:creator>Parikshit</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.sqlserverfaq.net/2012/01/03/powershell-script-to-script-all-the-jobs-from-the-given-instance-of-sql-server/</guid>
		<description><![CDATA[Following is the powershell script to script out all the Jobs in one go. param($sqlserver)[System.Reflection.Assembly]::LoadWithPartialName(&#8220;Microsoft.SqlServer.Smo&#8221;) &#124; Out-Null$srv = New-Object &#8220;Microsoft.SqlServer.Management.Smo.Server&#8221; $sqlserver$srv.JobServer.Jobs &#124; foreach {$_.Script()} You can copy the above code in a notepad and save it as .ps1 file in &#8230; <a href="http://www.sqlserverfaq.net/2012/01/03/powershell-script-to-script-all-the-jobs-from-the-given-instance-of-sql-server/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Following is the powershell script to script out all the Jobs in one go.</p>
<p>param($sqlserver)<br />[System.Reflection.Assembly]::LoadWithPartialName(&#8220;Microsoft.SqlServer.Smo&#8221;) | Out-Null<br />$srv = New-Object &#8220;Microsoft.SqlServer.Management.Smo.Server&#8221; $sqlserver<br />$srv.JobServer.Jobs | foreach {$_.Script()}</p>
<p>You can copy the above code in a notepad and save it as .ps1 file in some location on server.</p>
<p>Next from the Object Explorer in SQL Management Studio, right click the SQL Server Name and Click on Start Powershell as shown below</p>
<p><a href="http://www.sqlserverfaq.net/wp-content/uploads/2012/01/image.png"><img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://www.sqlserverfaq.net/wp-content/uploads/2012/01/image_thumb.png" width="203" height="244"></a></p>
<p>&nbsp;</p>
<p>This will open up powershell prompt. In the Powershell prompt you can run the above code as below </p>
<p>&lt;exact path of file&gt;scriptjobs.ps1 &lt;&lt;Instance Name to script&gt;&gt;&nbsp;&nbsp; &gt;&nbsp;&nbsp;&nbsp;&nbsp; &lt;&lt;path of the file to redirect the script output&gt;&gt;</p>
<p>For e.g.</p>
<p>PS SQLSERVER:SQLPARIKS-MSFTDEFAULT&gt; C:UserspariksDesktopscriptjobs.ps1 PARIKS-MSFTSQLR2 &gt; C:UserspariksDesktopJob.sql</p>
<p>The Job.sql file will be created which will have all the Jobs scripted for that instance.</p>
<p>Parikshit Savjani<br /><em>Premier Field Engineer</em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.sqlserverfaq.net/2012/01/03/powershell-script-to-script-all-the-jobs-from-the-given-instance-of-sql-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

