<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://sqlblog.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Buck Woody : Testing</title><link>http://sqlblog.com/blogs/buck_woody/archive/tags/Testing/default.aspx</link><description>Tags: Testing</description><dc:language>en</dc:language><generator>CommunityServer 2.1 SP2 (Build: 61129.1)</generator><item><title>How Microsoft helps you NOT break your Windows Azure Application: Storage Services Versioning</title><link>http://sqlblog.com/blogs/buck_woody/archive/2011/12/06/how-microsoft-helps-you-not-break-your-windows-azure-application-storage-services-versioning.aspx</link><pubDate>Tue, 06 Dec 2011 14:42:57 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:40161</guid><dc:creator>BuckWoody</dc:creator><slash:comments>0</slash:comments><comments>http://sqlblog.com/blogs/buck_woody/comments/40161.aspx</comments><wfw:commentRss>http://sqlblog.com/blogs/buck_woody/commentrss.aspx?PostID=40161</wfw:commentRss><description>&lt;p&gt;&lt;font size="2"&gt;One of the advantages of using Windows Azure to run your code is that you don’t have to constantly manage upgrades on your platform. While that’s a big advantage indeed, it immediately brings up the question - how do the upgrades happen? Microsoft upgrades the Azure platform in periodic increments, and the components that are affected are documented. &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2"&gt;This brings up another question - upgrades mean change, and change can sometimes alter the way you might implement a feature. What if you have taken a dependency on some feature in your code that has been altered by an upgrade? Windows Azure does have an Application Lifecycle Management (ALM) Process, which I’ll reference at the end of this post. But beyond that, there are some features we’ve put into place that will help you manage many of these changes. One of those is being able to set the version of storage features you would like your code to use. &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2"&gt;Windows Azure is made up of three main component areas: Computing, Storage and a group of features called the Application Fabric. You can use these components together or separately, depending on what you would like your application to do. In this post I’ll deal with the version control in the storage subsystem - in other posts I’ll explain how to track and in some cases control the versions of the other components you work with.&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2"&gt;When you send a request to a Windows Azure resource, you’re actually using a &lt;a href="http://en.wikipedia.org/wiki/REST" target="_blank"&gt;REST&lt;/a&gt; call. That’s a three-part call to the system that has a request (called a URI), a header, and a body of code you want to send. So a typical call, such as to a table, might look like this example, which changes the properties of a Blob: &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2"&gt;&lt;strong&gt;URI&lt;/strong&gt;:       &lt;br /&gt;&lt;font color="#0000ff"&gt;PUT http://myaccount.table.core.windows.net/?restype=service&amp;amp;comp=properties HTTP/1.1&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2"&gt;&lt;strong&gt;Header&lt;/strong&gt;:       &lt;br /&gt;&lt;font color="#0000ff"&gt;&lt;font style="background-color:#ffff00;"&gt;x-ms-version: 2011-08-18&lt;/font&gt;        &lt;br /&gt;x-ms-date: Tue, 30 Aug 2011 04:28:19 GMT        &lt;br /&gt;Authorization: SharedKey        &lt;br /&gt;myaccount:Z1lTLDwtq5o1UYQluucdsXk6/iB7YxEu0m6VofAEkUE=        &lt;br /&gt;Host: myaccount.table.core.windows.net&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2"&gt;&lt;strong&gt;Body&lt;/strong&gt;:      &lt;br /&gt;&lt;font color="#0000ff"&gt;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;utf-8&amp;quot;?&amp;gt;       &lt;br /&gt;&amp;lt;StorageServiceProperties&amp;gt;        &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;Logging&amp;gt;        &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;Version&amp;gt;1.0&amp;lt;/Version&amp;gt;        &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;Delete&amp;gt;true&amp;lt;/Delete&amp;gt;        &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;Read&amp;gt;false&amp;lt;/Read&amp;gt;        &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;Write&amp;gt;true&amp;lt;/Write&amp;gt;        &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;RetentionPolicy&amp;gt;        &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;Enabled&amp;gt;true&amp;lt;/Enabled&amp;gt;        &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;Days&amp;gt;7&amp;lt;/Days&amp;gt;        &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/RetentionPolicy&amp;gt;        &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/Logging&amp;gt;        &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;Metrics&amp;gt;        &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;Version&amp;gt;1.0&amp;lt;/Version&amp;gt;        &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;Enabled&amp;gt;true&amp;lt;/Enabled&amp;gt;        &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;IncludeAPIs&amp;gt;false&amp;lt;/IncludeAPIs&amp;gt;        &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;RetentionPolicy&amp;gt;        &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;Enabled&amp;gt;true&amp;lt;/Enabled&amp;gt;        &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;Days&amp;gt;7&amp;lt;/Days&amp;gt;        &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/RetentionPolicy&amp;gt;        &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &amp;lt;/Metrics&amp;gt;        &lt;br /&gt;&amp;lt;/StorageServiceProperties&amp;gt;        &lt;br /&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2"&gt;&lt;em&gt;(&lt;/em&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/windowsazure/hh452240.aspx" target="_blank"&gt;&lt;em&gt;Source&lt;/em&gt;&lt;/a&gt;&lt;em&gt; of this code)&lt;/em&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2"&gt;You can see that I’ve highlighted a portion of the header block - that’s where you set the version of the Storage Services you would like to use. You can find a list of the &lt;a href="http://msdn.microsoft.com/en-us/library/windowsazure/dd894041.aspx" target="_blank"&gt;features introduced in each version here&lt;/a&gt;. &lt;/font&gt;&lt;font size="2"&gt;It’s not a requirement of adding that element to the header, but it’s best practices to do so. &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2"&gt;You don’t have to use REST calls directly, however. It’s more common to use the API in the Software Development Kit to just change the property in your IDE environment - the setting you’re looking for there is the &lt;a href="http://msdn.microsoft.com/en-us/library/windowsazure/hh343266.aspx"&gt;Set Storage Service Properties&lt;/a&gt; call. &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2"&gt;Interestingly, rather than a breaking change you might run into an unexpected behavior if you are not aware of these parameters. In some code I recently reviewed a newer feature from the storage system failed when it was called. On inspection I found that the developer had used an older codeblock from a previous version of the storage system - he was not aware you can set the version of storage in the call. We changed the header to the latest version, and everything worked as expected. &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2"&gt;&lt;strong&gt;References:&lt;/strong&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2"&gt;The Storage Services Versioning and the changes for each version: &lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font size="2"&gt;&lt;span style="font-family:'Calibri','sans-serif';font-size:11pt;mso-fareast-font-family:'Times New Roman';mso-bidi-font-family:'Times New Roman';mso-ansi-language:en-us;mso-fareast-language:en-us;mso-bidi-language:ar-sa;"&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/windowsazure/dd894041.aspx"&gt;&lt;u&gt;&lt;font color="#4f81bd" size="2" face="Arial"&gt;http://msdn.microsoft.com/en-us/library/windowsazure/dd894041.aspx&lt;/font&gt;&lt;/u&gt;&lt;/a&gt;&lt;font color="#000000" face="Arial"&gt; &lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;span style="font-family:'Calibri','sans-serif';font-size:11pt;mso-fareast-font-family:'Times New Roman';mso-bidi-font-family:'Times New Roman';mso-ansi-language:en-us;mso-fareast-language:en-us;mso-bidi-language:ar-sa;"&gt;&lt;font color="#000000" size="2" face="Arial"&gt;Windows Azure Application Lifecycle Management: &lt;/font&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;span style="font-family:'Calibri','sans-serif';font-size:11pt;mso-fareast-font-family:'Times New Roman';mso-bidi-font-family:'Times New Roman';mso-ansi-language:en-us;mso-fareast-language:en-us;mso-bidi-language:ar-sa;"&gt;&lt;font color="#000000" size="2" face="Arial"&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/ff803362.aspx"&gt;http://msdn.microsoft.com/en-us/library/ff803362.aspx&lt;/a&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;span style="font-family:'Calibri','sans-serif';font-size:11pt;mso-fareast-font-family:'Times New Roman';mso-bidi-font-family:'Times New Roman';mso-ansi-language:en-us;mso-fareast-language:en-us;mso-bidi-language:ar-sa;"&gt;&lt;font color="#000000" size="2" face="Arial"&gt;&lt;a href="http://channel9.msdn.com/posts/Windows-Azure-Jump-Start-03-Windows-Azure-Lifecycle-Part-1"&gt;http://channel9.msdn.com/posts/Windows-Azure-Jump-Start-03-Windows-Azure-Lifecycle-Part-1&lt;/a&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;span style="font-family:'Calibri','sans-serif';font-size:11pt;mso-fareast-font-family:'Times New Roman';mso-bidi-font-family:'Times New Roman';mso-ansi-language:en-us;mso-fareast-language:en-us;mso-bidi-language:ar-sa;"&gt;&lt;a href="http://channel9.msdn.com/Events/TechEd/Australia/Tech-Ed-Australia-2011/COS201"&gt;http://channel9.msdn.com/Events/TechEd/Australia/Tech-Ed-Australia-2011/COS201&lt;/a&gt;&amp;#160;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;span style="font-family:'Calibri','sans-serif';font-size:11pt;mso-fareast-font-family:'Times New Roman';mso-bidi-font-family:'Times New Roman';mso-ansi-language:en-us;mso-fareast-language:en-us;mso-bidi-language:ar-sa;"&gt;&amp;#160;&lt;/span&gt;&lt;/p&gt;&lt;img src="http://sqlblog.com/aggbug.aspx?PostID=40161" width="1" height="1"&gt;</description><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Developer/default.aspx">Developer</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Design/default.aspx">Design</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Testing/default.aspx">Testing</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Latest+Version/default.aspx">Latest Version</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Documentation/default.aspx">Documentation</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Upgrades/default.aspx">Upgrades</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Data/default.aspx">Data</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Installation+and+Upgrade/default.aspx">Installation and Upgrade</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Cloud/default.aspx">Cloud</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Azure/default.aspx">Azure</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Windows+Azure/default.aspx">Windows Azure</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Cloud+Computing/default.aspx">Cloud Computing</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Storage/default.aspx">Storage</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Service+Packs/default.aspx">Service Packs</category></item><item><title>Plan for Diagnostics in Cloud Computing From the Git-Go</title><link>http://sqlblog.com/blogs/buck_woody/archive/2011/09/06/plan-for-diagnostics-in-cloud-computing-from-the-git-go.aspx</link><pubDate>Tue, 06 Sep 2011 13:11:22 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:38295</guid><dc:creator>BuckWoody</dc:creator><slash:comments>0</slash:comments><comments>http://sqlblog.com/blogs/buck_woody/comments/38295.aspx</comments><wfw:commentRss>http://sqlblog.com/blogs/buck_woody/commentrss.aspx?PostID=38295</wfw:commentRss><description>&lt;p&gt;“Git-Go” is something we say in the South that means “right at the start”. I’ve seen several applications for on-premise systems that don’t have much in the way of diagnostics - the developers rely on a debugger, the event logs on the server and client workstation, and most of all, the ability to watch the system from end-to-end. &lt;/p&gt;  &lt;p&gt;This approach is a mistake for an on-premise system, and it’s definitely a problem for a distributed architecture. You simply do not own all of the components from end to end in a cloud environment, nor are you always able to attach a debugger or other remote monitoring tools to the various areas within the code path. So you need to make sure that from the very outset of your design that you build in diagnostics. My personal preference is to build a system such that a control file turns on deeper information gathering from the system, up to a minimal level.&lt;/p&gt;  &lt;p&gt;When I do that, I set a high level of logging, a medium level, and a moderate level. I normally use the deepest level of information during the testing and acceptance phase of the deployment, then switch to moderate and then the least level of information gathering. Also in my design I often set an error condition to begin gathering the deeper information along with the exception, where possible.&lt;/p&gt;  &lt;p&gt;There are decisions you need to make as to where to store the diagnostics (many operations in the cloud cost money), how often you collect them, and so on. You can get a quick overview on using the diagnostics that come with Windows Azure here: &lt;a href="http://www.azuresupport.com/2010/03/getting-started-with-windows-azure-diagnostics-and-monitoring/"&gt;http://www.azuresupport.com/2010/03/getting-started-with-windows-azure-diagnostics-and-monitoring/&lt;/a&gt; This is where you should start first. More detail on that: &lt;a href="http://msdn.microsoft.com/en-us/library/gg433048.aspx"&gt;http://msdn.microsoft.com/en-us/library/gg433048.aspx&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;My friend Dave Pallman has a great tool he’s released for free: &lt;a href="http://davidpallmann.blogspot.com/2009/03/azure-application-monitor-now-on.html"&gt;http://davidpallmann.blogspot.com/2009/03/azure-application-monitor-now-on.html&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;If the issue is in storage apps: &lt;a href="http://social.msdn.microsoft.com/Forums/en-US/windowsazuredata/thread/d84ba34b-b0e0-4961-a167-bbe7618beb83"&gt;http://social.msdn.microsoft.com/Forums/en-US/windowsazuredata/thread/d84ba34b-b0e0-4961-a167-bbe7618beb83&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;If you have System Center, this is the quickest and easiest way to implement the monitoring – really handy: &lt;a href="http://pinpoint.microsoft.com/en-us/applications/windows-azure-application-monitoring-management-pack-release-candidate-12884907699"&gt;http://pinpoint.microsoft.com/en-us/applications/windows-azure-application-monitoring-management-pack-release-candidate-12884907699&lt;/a&gt;&lt;/p&gt;&lt;img src="http://sqlblog.com/aggbug.aspx?PostID=38295" width="1" height="1"&gt;</description><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Development/default.aspx">Development</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Developer/default.aspx">Developer</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Design/default.aspx">Design</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Testing/default.aspx">Testing</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Best+Practices/default.aspx">Best Practices</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Error+Codes/default.aspx">Error Codes</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Link+Lists/default.aspx">Link Lists</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Troubleshooting/default.aspx">Troubleshooting</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Monitoring/default.aspx">Monitoring</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Cloud/default.aspx">Cloud</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Azure/default.aspx">Azure</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Windows+Azure/default.aspx">Windows Azure</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Cloud+Computing/default.aspx">Cloud Computing</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Concepts/default.aspx">Concepts</category></item><item><title>Database Testing Links</title><link>http://sqlblog.com/blogs/buck_woody/archive/2010/11/10/database-testing-links.aspx</link><pubDate>Wed, 10 Nov 2010 12:38:00 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:30347</guid><dc:creator>BuckWoody</dc:creator><slash:comments>0</slash:comments><comments>http://sqlblog.com/blogs/buck_woody/comments/30347.aspx</comments><wfw:commentRss>http://sqlblog.com/blogs/buck_woody/commentrss.aspx?PostID=30347</wfw:commentRss><description>&lt;p&gt;Yesterday at the SQL PASS 2010 Summit I did a presentation on database testing - I have two sets of links I mentioned there, one for the information I presented and the other for various tools I've tried. Enjoy:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;More information on Database Testing and Testing methodologies:&lt;br /&gt;&lt;/strong&gt;&lt;a href="http://www.agiledata.org/essays/whatToTest.html"&gt;http://www.agiledata.org/essays/whatToTest.html&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.agiledata.org/essays/databaseTesting.html"&gt;http://www.agiledata.org/essays/databaseTesting.html&lt;/a&gt;&amp;nbsp; &lt;br /&gt;&lt;a href="http://www.testinginstitute.com/display.php?id=DATF_MS"&gt;http://www.testinginstitute.com/display.php?id=DATF_MS&lt;/a&gt; &lt;br /&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/bb381703(VS.80).aspx"&gt;http://msdn.microsoft.com/en-us/library/bb381703(VS.80).aspx&lt;/a&gt; &lt;br /&gt;&lt;a href="http://blogs.technet.com/b/sql_server_isv/archive/2010/10/20/hot-fixes-and-cus-and-service-packs-oh-my.aspx"&gt;http://blogs.technet.com/b/sql_server_isv/archive/2010/10/20/hot-fixes-and-cus-and-service-packs-oh-my.aspx&lt;/a&gt;&lt;br /&gt;&lt;a href="http://sqlblog.com/blogs/alexander_kuznetsov/archive/2010/10/14/benefit-from-unit-testing-t-sql-speed-up-your-test-harness.aspx"&gt;http://sqlblog.com/blogs/alexander_kuznetsov/archive/2010/10/14/benefit-from-unit-testing-t-sql-speed-up-your-test-harness.aspx&lt;/a&gt;&lt;br /&gt;Close These Loopholes in Your Database Testing - &lt;a href="http://www.simple-talk.com/sql/t-sql-programming/close-these-loopholes---reproduce-database-errors/"&gt;http://www.simple-talk.com/sql/t-sql-programming/close-these-loopholes---reproduce-database-errors/&lt;/a&gt;&lt;br /&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Database Testing Tools:&lt;br /&gt;&lt;/strong&gt;&lt;a href="http://www.quest.com/benchmark-factory/"&gt;http://www.quest.com/benchmark-factory/&lt;/a&gt;&amp;nbsp; &lt;br /&gt;&lt;a href="http://weblogs.asp.net/rosherove/archive/2004/10/05/238201.aspx"&gt;http://weblogs.asp.net/rosherove/archive/2004/10/05/238201.aspx&lt;/a&gt; &lt;br /&gt;&lt;a href="http://www.red-gate.com/"&gt;http://www.red-gate.com/&lt;/a&gt;&amp;nbsp; &lt;br /&gt;&lt;a href="http://sourceforge.net/apps/trac/tsqlunit/"&gt;http://sourceforge.net/apps/trac/tsqlunit/&lt;/a&gt;&amp;nbsp; &lt;br /&gt;&lt;a href="http://sqlunit.sourceforge.net/"&gt;http://sqlunit.sourceforge.net/&lt;/a&gt;&amp;nbsp; &lt;br /&gt;&lt;a href="http://www.dbunit.org/"&gt;http://www.dbunit.org/&lt;/a&gt;&amp;nbsp; &lt;br /&gt;&lt;a href="http://gojko.net/fitnesse/dbfit/"&gt;http://gojko.net/fitnesse/dbfit/&lt;/a&gt; &lt;br /&gt;&lt;a href="http://www.anydbtest.com/"&gt;http://www.anydbtest.com/&lt;/a&gt; &lt;br /&gt;&lt;a href="http://www-01.ibm.com/software/data/optim/streamline-test-data-management/"&gt;http://www-01.ibm.com/software/data/optim/streamline-test-data-management/&lt;/a&gt; &lt;br /&gt;&lt;a href="http://www.turbodata.ca/"&gt;http://www.turbodata.ca/&lt;/a&gt; &lt;br /&gt;&lt;a href="http://www.sqledit.com/dg/"&gt;http://www.sqledit.com/dg/&lt;/a&gt; &lt;br /&gt;&lt;a href="http://www.datatect.com/"&gt;http://www.datatect.com/&lt;/a&gt; &lt;br /&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/aa730872(VS.80).aspx"&gt;http://msdn.microsoft.com/en-us/library/aa730872(VS.80).aspx&lt;/a&gt; &lt;br /&gt;&lt;a href="https://h10078.www1.hp.com/cda/hpms/display/main/hpms_content.jsp?zn=bto&amp;amp;cp=1-10^36653_4000_100"&gt;https://h10078.www1.hp.com/cda/hpms/display/main/hpms_content.jsp?zn=bto&amp;amp;cp=1-10^36653_4000_100&lt;/a&gt;__ &lt;br /&gt;&lt;a href="http://www.radview.com/"&gt;http://www.radview.com/&lt;/a&gt; &lt;br /&gt;&lt;a href="http://www.webperformanceinc.com/"&gt;http://www.webperformanceinc.com/&lt;/a&gt;&amp;nbsp;&lt;br /&gt;&lt;a href="http://sqlity.net"&gt;http://sqlity.net&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;img src="http://sqlblog.com/aggbug.aspx?PostID=30347" width="1" height="1"&gt;</description><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Testing/default.aspx">Testing</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Link+Lists/default.aspx">Link Lists</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Conferences/default.aspx">Conferences</category></item><item><title>Attaching a Database</title><link>http://sqlblog.com/blogs/buck_woody/archive/2010/01/26/attaching-a-database.aspx</link><pubDate>Tue, 26 Jan 2010 15:03:39 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:21446</guid><dc:creator>BuckWoody</dc:creator><slash:comments>3</slash:comments><comments>http://sqlblog.com/blogs/buck_woody/comments/21446.aspx</comments><wfw:commentRss>http://sqlblog.com/blogs/buck_woody/commentrss.aspx?PostID=21446</wfw:commentRss><description>&lt;p&gt;I had someone ask me yesterday how they could get to a database used by a product that they owned, but that was installed using SQL Server Express. They didn’t have access to the database, and they didn’t know the password for the service that started Express, so they wanted to know if they could look at the data. &lt;/p&gt;  &lt;p&gt;There are a few ways to do this, but the quickest, safest and easiest for me is to “attach” the database on another Instance of SQL Server. To understand how this works, let me quickly explain how SQL Server uses databases from a physical perspective.&lt;/p&gt;  &lt;p&gt;SQL Server uses two types of files, sometimes lots of each type. The two basic types are Data files and Log files. SQL Server basically writes data to the Log file first, and then on to the Data files. Of course it’s more complicated than that; but this is the basic flow.&lt;/p&gt;  &lt;p&gt;When SQL Server first starts up, it reads (among other things) the &lt;em&gt;master&lt;/em&gt; system database. And that’s where the crux of this post comes into play. In that database are two things that we care about right now: the &lt;em&gt;logical&lt;/em&gt; name of the databases SQL Server knows about and the &lt;em&gt;physical&lt;/em&gt; locations for the files that database uses.&lt;/p&gt;  &lt;p&gt;With that information in mind, here’s a simple way to transfer a database from an Instance you don’t have access to into one that you do.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;font color="#ff0000"&gt;There are a LOT of disclaimers here.        &lt;br /&gt;First: don’t do this on a database you don’t own, and own all the data for. That’s illegal.         &lt;br /&gt;Second, don’t do this with a large database – the possibility of multiple files in the filegroups on a complex database is high, and you might not get them all.         &lt;br /&gt;Third: you have to be running the same (or higher) version of SQL Server on the destination server, and the same (or higher) edition of SQL Server on the destination server.         &lt;br /&gt;Fourth: you’ll have to stop the source Instance. If you have users on that system, you don’t want to stop it without consulting everyone first.&lt;/font&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;OK – with all of that stated, you first need to stop the “source” instance. Let it shut down completely and normally. This will (theoretically) commit all of the transactions from the logs to the databases.&lt;/p&gt;  &lt;p&gt;Now copy the .MDF and .LDF files for the database you want to a location on your test Instance. If you don’t know what these are, you can try and copy what you think are those files, but don’t copy any of the system databases from the source system to your test Instance!&lt;/p&gt;  &lt;p&gt;Start the source Instance back up and let the users back into the application.&lt;/p&gt;  &lt;p&gt;On the test system, write-down the location where you copied both of those files (assuming there was one of each – it get’s trickier when there are multiples).&lt;/p&gt;  &lt;p&gt;Open SQL Server Management Studio. &lt;/p&gt;  &lt;p&gt;Right-click the “Databases” node in Object Explorer and select “Attach…” from the menu that appears. &lt;/p&gt;  &lt;p&gt;Click “Add” to find the MDF and LDF files, and then “OK” to name the database. &lt;/p&gt;  &lt;p&gt;You have two other options as well. You can use the sp_attachdb stored procedure (&lt;a href="http://msdn.microsoft.com/en-us/library/ms179877.aspx" target="_blank"&gt;detail here&lt;/a&gt; - deprecated) or the newer CREATE DATABASE…FOR ATTACH statement (&lt;a href="http://blog.sqlauthority.com/2007/08/24/sql-server-2005-t-sql-script-to-attach-and-detach-database/" target="_blank"&gt;article on that here&lt;/a&gt;). &lt;/p&gt;  &lt;p&gt;In any case, you now have the database, and you now “own” it in that test Instance. The logins will all be incorrect, since the names in the database security don’t match the new Instance’s master database. But you do have that data.&lt;/p&gt;&lt;img src="http://sqlblog.com/aggbug.aspx?PostID=21446" width="1" height="1"&gt;</description><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Tips/default.aspx">Tips</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/SQL+Server/default.aspx">SQL Server</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Testing/default.aspx">Testing</category></item><item><title>Spit it out already!</title><link>http://sqlblog.com/blogs/buck_woody/archive/2010/01/06/spit-it-out-already.aspx</link><pubDate>Wed, 06 Jan 2010 14:11:11 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:20617</guid><dc:creator>BuckWoody</dc:creator><slash:comments>14</slash:comments><comments>http://sqlblog.com/blogs/buck_woody/comments/20617.aspx</comments><wfw:commentRss>http://sqlblog.com/blogs/buck_woody/commentrss.aspx?PostID=20617</wfw:commentRss><description>&lt;p&gt;You’ve probably seen that commercial where the chewing-gum company van stalks the guy who has been chewing the same piece of gum too long, and they attack him and make him chew another piece.&lt;/p&gt;  &lt;p&gt;I feel like that with SQL Server 2000. Almost every shop I go into has at least one primary application running on SQL Server 2000. Now, don’t get me wrong – SQL Server 2000 is a fine piece of software engineering. From over TEN YEARS AGO. In “software time”,&amp;#160; that’s like a thousand years or something. &lt;/p&gt;  &lt;p&gt;While it was great for its day, the newer versions are faster, more secure, and more robust. And every time it doesn’t get upgraded, SQL Server is perceived as “not as fast/strong/etc” as other platforms (which &lt;em&gt;are&lt;/em&gt; upgraded, of course).&lt;/p&gt;  &lt;p&gt;Now, I’m not suggesting that anyone upgrade for upgrade’s sake. We all have work to do, and the last thing we need to do is change out a platform when there’s no need. &lt;/p&gt;  &lt;p&gt;But there is a need. SQL Server 2000 isn’t in mainline support any more. That means it can be attacked easier and so on. And it doesn’t scale like the new offerings, nor does it have any of the new features the latest versions have. &lt;/p&gt;  &lt;p&gt;“Oh”, you might say, “I don’t use those features anyway.” Well of course you don’t – you can’t if you still have SQL Server 2000! How do you know the ways you could help your organization if you don’t experiment with the new stuff?&lt;/p&gt;  &lt;p&gt;But it isn’t the DBA I would chase down and steal gum from. It’s the &lt;em&gt;vendors&lt;/em&gt;. &lt;/p&gt;  &lt;p&gt;Every time I raise my eyebrows when I hear about the SQL Server 2000 installs, the DBA shrugs and says “The vendor won’t certify SQL Server X, so we have to stay at SQL Server 2000 or 2005.” And I say, that’s just &lt;em&gt;lazy&lt;/em&gt;. Unless the vendor codes specifically for deprecated features, a simple test run during their software development should allow them to move forward. I’m not saying that’s an easy task, but certainly they’ve tested their software releases once in the last ten years, no? If not, doesn’t that make you nervous?&lt;/p&gt;  &lt;p&gt;Anyhoo, spit out the SQL Server 2000. Or I might have to fire up the company van.&lt;/p&gt;&lt;img src="http://sqlblog.com/aggbug.aspx?PostID=20617" width="1" height="1"&gt;</description><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/DBA/default.aspx">DBA</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/SQL+Server/default.aspx">SQL Server</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Administration/default.aspx">Administration</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Rant/default.aspx">Rant</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/SQL+Server+2008/default.aspx">SQL Server 2008</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Testing/default.aspx">Testing</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/SQL+Server+2000/default.aspx">SQL Server 2000</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Upgrades/default.aspx">Upgrades</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Support/default.aspx">Support</category></item><item><title>After the Upgrade, it runs differently…</title><link>http://sqlblog.com/blogs/buck_woody/archive/2009/12/01/after-the-upgrade-it-runs-differently.aspx</link><pubDate>Tue, 01 Dec 2009 16:06:55 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:19385</guid><dc:creator>BuckWoody</dc:creator><slash:comments>6</slash:comments><comments>http://sqlblog.com/blogs/buck_woody/comments/19385.aspx</comments><wfw:commentRss>http://sqlblog.com/blogs/buck_woody/commentrss.aspx?PostID=19385</wfw:commentRss><description>&lt;p&gt;I got a question yesterday in the mail that I thought I would just answer here in a broad context. While I can’t troubleshoot or do performance tuning from a distance, there are some interesting concepts and suggestions this e-mail brings up:&lt;/p&gt;  &lt;p&gt;&lt;font color="#800000" size="1"&gt;“I have recently seen a change from SQL Server from 2005 to 2008 in where it handles CASE statements differently. Previously we saw a tremendous improvement in performance by using CASE statements instead of OR statements. However when one of our client upgraded to 2008 they began to notice unusually long runtimes with a few of these queries (orders of magnitude larger runtimes). Swapping it to an OR statement allows it to run in 0.075 seconds... so my question to you is do you know of any changes to the exectution engine that would account for this and what is your recommendation?”&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;It’s a great question. Basically it boils down to “I changed versions, now something acts differently.” Before we talk about what might be the issue, let’s talk about some things you should do after you upgrade from one version of SQL Server to another.&lt;/p&gt;  &lt;p&gt;First, open the database properties and change the compatibility level to 10.0, unless you know you shouldn’t. Next, update your statistics – all of them. Third, ensure you have all of the proper service packs applied to the operating system and SQL Server. And finally, check the code you have for deprecated statements, or for places where you could optimize the code to use new statements or formats. There are other steps to follow, but these basics will help.&lt;/p&gt;  &lt;p&gt;Now, with all of that done, let’s move on to things that work differently. First, you need to find out what the&amp;#160; code is doing – and the primary way to do that is to examine the Query Execution Plan. There are a lot of resources to teach you how to do that, but the general idea is that you turn that plan on (in the Query menu), run the query, look at the graphical plan and check three items: the overall plan, the icons that show the highest percentage of use, and the thickest arrows. Evaluating this on the “before” system and the “after” system, and that will show you what changed.&lt;/p&gt;  &lt;p&gt;Maybe.&lt;/p&gt;  &lt;p&gt;The point is, the query might take exactly the same path, but a different component may show stress because you might have a different box or configuration. Perhaps the drive layouts changed (or should), you have more memory (or better access to it) and so on. In that case, you simply follow standard performance tuning methodologies to locate what’s waiting, and what is showing pressure.&lt;/p&gt;  &lt;p&gt;Now to the question at hand – does SQL Server (any version) handle a CASE statement differently than an OR statement? Well, once again, the execution plan will show you that answer, but the CASE statement is used for a different purpose than an OR statement – without having all of the code it’s difficult to say which to use in a given situation. The best thing to do is to evaluate the documentation on each and decide which fits the situation best.&lt;/p&gt;  &lt;p&gt;CASE: &lt;a title="http://msdn.microsoft.com/en-us/library/ms181765.aspx" href="http://msdn.microsoft.com/en-us/library/ms181765.aspx"&gt;http://msdn.microsoft.com/en-us/library/ms181765.aspx&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;OR: &lt;a title="http://msdn.microsoft.com/en-us/library/ms188361.aspx" href="http://msdn.microsoft.com/en-us/library/ms188361.aspx"&gt;http://msdn.microsoft.com/en-us/library/ms188361.aspx&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Did we make changes to CASE or OR? Not directly – but each change to the product may have orthogonal implications, which is where I point you back to the steps I mentioned for the “after upgrade” process.&lt;/p&gt;&lt;img src="http://sqlblog.com/aggbug.aspx?PostID=19385" width="1" height="1"&gt;</description><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Development/default.aspx">Development</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Developer/default.aspx">Developer</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/DBA/default.aspx">DBA</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/SQL+Server/default.aspx">SQL Server</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/SQL+Server+2008/default.aspx">SQL Server 2008</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Testing/default.aspx">Testing</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Performance+Tuning/default.aspx">Performance Tuning</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Latest+Version/default.aspx">Latest Version</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Documentation/default.aspx">Documentation</category></item></channel></rss>