<?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 : Administration</title><link>http://sqlblog.com/blogs/buck_woody/archive/tags/Administration/default.aspx</link><description>Tags: Administration</description><dc:language>en</dc:language><generator>CommunityServer 2.1 SP2 (Build: 61129.1)</generator><item><title>High Availability for IaaS, PaaS and SaaS in the Cloud</title><link>http://sqlblog.com/blogs/buck_woody/archive/2012/11/06/high-availability-for-iaas-paas-and-saas-in-the-cloud.aspx</link><pubDate>Tue, 06 Nov 2012 15:15:28 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:45969</guid><dc:creator>BuckWoody</dc:creator><slash:comments>0</slash:comments><comments>http://sqlblog.com/blogs/buck_woody/comments/45969.aspx</comments><wfw:commentRss>http://sqlblog.com/blogs/buck_woody/commentrss.aspx?PostID=45969</wfw:commentRss><description>&lt;p&gt;Outages, natural disasters and unforeseen events have proved that even in a distributed architecture, you need to plan for High Availability (HA). In this entry I'll explain a few considerations for HA within Infrastructure-as-a-Service (IaaS), Platform-as-a-Service (PaaS) and Software-as-a-Service (SaaS). In a separate post I'll talk more about Disaster Recovery (DR), since each paradigm has a different way to handle that.&lt;/p&gt;
&lt;h1&gt;Planning for HA in IaaS&lt;/h1&gt;
&lt;p&gt;IaaS involves Virtual Machines - so in effect, an HA strategy here takes on many of the same characteristics as it would on-premises. The primary difference is that the vendor controls the hardware, so you need to verify what they do for things like local redundancy and so on from the hardware perspective.&lt;/p&gt;
&lt;p&gt;As far as what you can control and plan for, the primary factors fall into three areas: multiple instances, geographical dispersion and task-switching.&lt;/p&gt;
&lt;p&gt;In almost every cloud vendor I've studied, to ensure your application will be protected by any level of HA, you need to have at least two of the Instances (VM's) running. This makes sense, but you might assume that the vendor just takes care of that for you - they don't. If a single VM goes down (for whatever reason) then the access to it is lost. Depending on multiple factors, you might be able to recover the data, but you should assume that you can't. You should keep a sync to another location (perhaps the vendor's storage system in another geographic datacenter or to a local location) to ensure you can continue to serve your clients.&lt;/p&gt;
&lt;p&gt;You'll also need to host the same VM's in another geographical location. Everything from a vendor outage to a network path problem could prevent your users from reaching the system, so you need to have multiple locations to handle this.&lt;/p&gt;
&lt;p&gt;This means that you'll have to figure out how to manage state between the geo's. If the system goes down in the middle of a transaction, you need to figure out what part of the process the system was in, and then re-create or transfer that state to the second set of systems. If you didn't write the software yourself, this is non-trivial.&lt;/p&gt;
&lt;p&gt;You'll also need a manual or automatic process to detect the failure and re-route the traffic to your secondary location. You could flip a DNS entry (if your application can tolerate that) or invoke another process to alias the first system to the second, such as load-balancing and so on. There are many options, but all of them involve coding the state into the application layer. If you've simply moved a state-ful application to VM's, you may not be able to easily implement an HA solution.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://sqlblog.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-79-79/6366.HAIaaS.png"&gt;&lt;img src="http://sqlblog.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-79-79/6366.HAIaaS.png" alt="" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h1&gt;Planning for HA in PaaS&lt;/h1&gt;
&lt;p&gt;Implementing HA in PaaS is a bit simpler, since it's built on the concept of stateless applications deployment. Once again, you need at least two copies of each element in the solution (web roles, worker roles, etc.) to remain available in a single datacenter. Also, you need to deploy the application again in a separate geo, but the advantage here is that you could work out a "shared storage" model such that state is auto-balanced across the world. In fact, you don't have to maintain a "DR" site, the alternate location can be live and serving clients, and only take on extra load if the other site is not available. In Windows Azure, you can use the Traffic Manager service top route the requests as a type of auto balancer.&lt;/p&gt;
&lt;p&gt;Even with these benefits, I recommend a second backup of storage in another geographic location. Storage is inexpensive; and that second copy can be used for not only HA but DR.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://sqlblog.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-79-79/2313.HAPaaS.png"&gt;&lt;img src="http://sqlblog.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-79-79/2313.HAPaaS.png" alt="" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h1&gt;Planning for HA in SaaS&lt;/h1&gt;
&lt;p&gt;In Software-as-a-Service (such as Office 365, or Hadoop in Windows Azure) You have far less control over the HA solution, although you still maintain the responsibility to ensure you have it. Since each SaaS is different, check with the vendor on the solution for HA - and make sure you understand what they do and what you are responsible for. They may have no HA for that solution, or pin it to a particular geo, or perhaps they have a massive HA built in with automatic load balancing (which is often the case).&lt;/p&gt;
&lt;p&gt;&lt;a href="http://sqlblog.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-79-79/8345.HASaaS.png"&gt;&lt;img src="http://sqlblog.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-79-79/8345.HASaaS.png" alt="" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;All of these options (with the exception of SaaS) involve higher costs for the design. Do not sacrifice reliability for cost - that will always cost you more in the end. Build in the redundancy and HA at the very outset of the project - if you try to tack it on later in the process the business will push back and potentially not implement HA.&lt;/p&gt;
&lt;p&gt;References: &lt;a href="http://www.bing.com/search?q=windows+azure+High+Availability"&gt;http://www.bing.com/search?q=windows+azure+High+Availability&lt;/a&gt;&amp;nbsp; (each type of implementation is different, so I'm routing you to a search on the topic - look for the "Patterns and Practices" results for the area in Azure you're interested in)&lt;/p&gt;&lt;img src="http://sqlblog.com/aggbug.aspx?PostID=45969" width="1" height="1"&gt;</description><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/Application+Architecture/default.aspx">Application Architecture</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/Best+Practices/default.aspx">Best Practices</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Computing/default.aspx">Computing</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Concepts/default.aspx">Concepts</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/Monitoring/default.aspx">Monitoring</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Windows+Azure/default.aspx">Windows Azure</category></item><item><title>Management and Monitoring Tools for Windows Azure</title><link>http://sqlblog.com/blogs/buck_woody/archive/2012/07/03/management-and-monitoring-tools-for-windows-azure.aspx</link><pubDate>Tue, 03 Jul 2012 13:10:00 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:44190</guid><dc:creator>BuckWoody</dc:creator><slash:comments>1</slash:comments><comments>http://sqlblog.com/blogs/buck_woody/comments/44190.aspx</comments><wfw:commentRss>http://sqlblog.com/blogs/buck_woody/commentrss.aspx?PostID=44190</wfw:commentRss><description>&lt;p&gt;&lt;span style="color:#339966;"&gt;&lt;em&gt;&lt;strong&gt;(Last updated on 01/15/2013)&lt;/strong&gt;&lt;/em&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;With such a large platform, Windows Azure has a lot of moving parts. We&amp;rsquo;ve done our best to keep the interface as simple as possible, while giving you the most control and visibility we can. However, as with most Microsoft products, there are multiple ways to do something &amp;ndash; and I&amp;rsquo;ve always found that to be a good strength. Depending on the situation, I might want a graphical interface, a command-line interface, or just an API so I can incorporate the management into my own tools, or have third-party companies write other tools.&lt;/p&gt;
&lt;p&gt;While by no means exhaustive, I thought I might put together a quick list of a few tools you can use to manage and monitor Windows Azure components, from our IaaS, SaaS and PaaS offerings. Some of the products focus on one area more than another, but all are available today. I&amp;rsquo;ll try and maintain this list to keep it current, but make sure you check the date of this post&amp;rsquo;s update &amp;ndash; if it&amp;rsquo;s more than six months old, it&amp;rsquo;s most likely out of date. Things move fast in the cloud.&lt;/p&gt;
&lt;h2&gt;&lt;span style="color:#0000ff;"&gt;The Windows Azure Management Portal&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;The primary tool for managing Windows Azure is our portal &amp;ndash; most everything you need is there, from creating new services to querying a database. There are two versions as of this writing &amp;ndash; a Silverlight client version, and a newer HTML5 version. The latter is being updated constantly to be in parity with the Silverlight client.&lt;/p&gt;
&lt;p&gt;There&amp;rsquo;s a balance in this portal between simplicity and power &amp;ndash; we&amp;rsquo;re following the &amp;ldquo;less is more&amp;rdquo; approach, with increasing levels of detail as you work through the portal rather than overwhelming you with a single, long &amp;ldquo;more is more&amp;rdquo; page.&lt;/p&gt;
&lt;p&gt;You can find the Portal here: &lt;a href="http://windowsazure.com"&gt;http://windowsazure.com&lt;/a&gt; (then click &amp;ldquo;Log In&amp;rdquo; and then &amp;ldquo;Portal&amp;rdquo;)&lt;/p&gt;
&lt;h2&gt;&lt;span style="color:#0000ff;"&gt;Windows Azure Management API&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;You can also use programming tools to either write your own interface, or simply provide management functions directly within your solution. You have two options &amp;ndash; you can use the more universal REST API&amp;rsquo;s, which area bit more complex but work with any system that can write to them, or the more approachable .NET API calls in code.&lt;/p&gt;
&lt;p&gt;You can find the reference for the API&amp;rsquo;s here: &lt;a href="http://msdn.microsoft.com/en-us/library/windowsazure/ee460799.aspx"&gt;http://msdn.microsoft.com/en-us/library/windowsazure/ee460799.aspx&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;All Class Libraries, for each part of Windows Azure: &lt;a href="http://msdn.microsoft.com/en-us/library/ee393295.aspx"&gt;http://msdn.microsoft.com/en-us/library/ee393295.aspx&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;h2&gt;&lt;span style="color:#0000ff;"&gt;PowerShell Command-lets&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;PowerShell is one of the most powerful scripting languages I&amp;rsquo;ve used with Windows &amp;ndash; and it&amp;rsquo;s baked into all of our products. When you need to work with multiple servers, scripting is really the only way to go, and the Windows Azure PowerShell Command-Lets allow you to work across most any part of the platform &amp;ndash; and can even be used within the services themselves. You can do everything with them from creating a new IaaS, PaaS or SaaS service, to controlling them and even working with security and more.&lt;/p&gt;
&lt;p&gt;You can find more about the Command-Lets here: &lt;a href="http://wappowershell.codeplex.com/documentation"&gt;http://wappowershell.codeplex.com/documentation&lt;/a&gt; (older link, still works, will point you to the new ones as well)&lt;/p&gt;
&lt;p&gt;We have command-line utilities for other operating systems as well: &lt;a href="https://www.windowsazure.com/en-us/manage/downloads/"&gt;https://www.windowsazure.com/en-us/manage/downloads/&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Video walkthrough of using the Command-Lets: &lt;a href="http://channel9.msdn.com/Events/BUILD/BUILD2011/SAC-859T"&gt;http://channel9.msdn.com/Events/BUILD/BUILD2011/SAC-859T&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;h2&gt;&lt;span style="color:#0000ff;"&gt;System Center&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;System Center is actually a suite of graphical tools you can use to manage, deploy, control, monitor and tune software from Microsoft and even other platforms. This will be the primary tool we&amp;rsquo;ll recommend for managing a hybrid or contiguous management process &amp;ndash; and as time goes on you&amp;rsquo;ll see more and more features put into System Center for the entire Windows Azure suite of products.&lt;/p&gt;
&lt;p&gt;You can find the Management Pack and README for it here: &lt;a href="http://www.microsoft.com/en-us/download/details.aspx?id=11324"&gt;http://www.microsoft.com/en-us/download/details.aspx?id=11324&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;h2&gt;&lt;span style="color:#0000ff;"&gt;SQL Server Management Studio / Data Tools / Visual Studio&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;SQL Server has two built-in management and development, and since Version 2008 R2, you can use them to manage Windows Azure Databases. Visual Studio also lets you connect to and manage portions of Windows Azure as well as Windows Azure Databases.&lt;/p&gt;
&lt;p&gt;You can read more about Visual Studio here: &lt;a href="http://msdn.microsoft.com/en-us/library/windowsazure/ee405484"&gt;http://msdn.microsoft.com/en-us/library/windowsazure/ee405484&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;You can read more about managing Windows Azure Subscriptions with Visual Studio here: &lt;a href="http://fabriccontroller.net/blog/posts/manage-your-subscriptions-with-the-windows-azure-tools-for-visual-studio/" target="_blank"&gt;http://fabriccontroller.net/blog/posts/manage-your-subscriptions-with-the-windows-azure-tools-for-visual-studio/&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;You can read more about the SQL tools here: &lt;a href="http://msdn.microsoft.com/en-us/library/windowsazure/ee621784.aspx"&gt;http://msdn.microsoft.com/en-us/library/windowsazure/ee621784.aspx&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;h2&gt;&lt;span style="color:#0000ff;"&gt;Vendor-Provided Tools&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;Microsoft does not suggest or endorse a specific third-party product. We do, however, use them, and see lots of other customers use them. You can browse to these sites to learn more, and chat with their folks directly on how they support Windows Azure.&lt;/p&gt;
&lt;p&gt;Cerebrata: Tools for managing from the command-line, graphical diagnostics, graphical storage management - &lt;a href="http://www.cerebrata.com/"&gt;http://www.cerebrata.com/&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Quest Cloud Tools: Monitoring, Storage Management, and costing tools - &lt;a href="http://communities.quest.com/community/cloud-tools"&gt;http://communities.quest.com/community/cloud-tools&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Paraleap: Monitoring tool - &lt;a href="http://www.paraleap.com/AzureWatch"&gt;http://www.paraleap.com/AzureWatch&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Cloudgraphs: Monitoring too -&amp;nbsp; &lt;a href="http://www.cloudgraphs.com/"&gt;http://www.cloudgraphs.com/&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Opstera: Monitoring for Windows Azure and a Scale-out pattern manager - &lt;a href="http://www.opstera.com/products/Azureops/"&gt;http://www.opstera.com/products/Azureops/&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Compuware: SaaS performance monitoring, load testing -&amp;nbsp; &lt;a href="http://www.compuware.com/application-performance-management/gomez-apm-products.html"&gt;http://www.compuware.com/application-performance-management/gomez-apm-products.html&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;SOASTA: Penetration and Security Testing - &lt;a href="http://www.soasta.com/cloudtest/enterprise/"&gt;http://www.soasta.com/cloudtest/enterprise/&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;LoadStorm: Load-testing tool - &lt;a href="http://loadstorm.com/windows-azure"&gt;http://loadstorm.com/windows-azure&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;New Relic: Application Monitoring - &lt;a href="http://newrelic.com/azure"&gt;http://newrelic.com/azure&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;AppDynamics: Application Monitoring - &lt;a href="http://www.appdynamics.com/azure.php"&gt;http://www.appdynamics.com/azure.php&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Manage Engine's Application Monitor: http://www.manageengine.com/products/applications_manager/windows-azure-monitoring.html&lt;/p&gt;
&lt;p&gt;I ran across this blog entry that deals with storage clients - your mileage may vary, but he has some screen-shots and his impressions: &lt;a href="http://cloud.dzone.com/articles/windows-azure-blob-storage"&gt;http://cloud.dzone.com/articles/windows-azure-blob-storage&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;&lt;span style="color:#0000ff;"&gt;Open-Source Tools&lt;/span&gt;&lt;/h2&gt;
&lt;p&gt;This is probably the most specific set of tools, and the list I&amp;rsquo;ll have to maintain most often. Smaller projects have a way of coming and going, so I&amp;rsquo;ll try and make sure this list is current.&lt;/p&gt;
&lt;p&gt;Windows Azure MMC: (I actually use this one a lot) &lt;a href="http://wapmmc.codeplex.com/"&gt;http://wapmmc.codeplex.com/&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Windows Azure Diagnostics Monitor: &lt;a href="http://archive.msdn.microsoft.com/wazdmon"&gt;http://archive.msdn.microsoft.com/wazdmon&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Azure Application Monitor: &lt;a href="http://azuremonitor.codeplex.com/"&gt;http://azuremonitor.codeplex.com/&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Azure Web Log: &lt;a href="http://www.xentrik.net/software/azure_web_log.html"&gt;http://www.xentrik.net/software/azure_web_log.html&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Cloud Ninja:Multi-Tennant billing and performance monitor -&amp;nbsp; &lt;a href="http://cnmb.codeplex.com/"&gt;http://cnmb.codeplex.com/&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Cloud Samurai: Multi-Tennant Management- &lt;a href="http://cloudsamurai.codeplex.com/"&gt;http://cloudsamurai.codeplex.com/&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Azure Storage Explorer: Storage management - &lt;a href="http://azurestorageexplorer.codeplex.com/" rel="nofollow" target="_new"&gt;azurestorageexplorer.codeplex.com&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;If you have additions to this list, please post them as a comment and I&amp;rsquo;ll research and then add them. Thanks!&lt;/p&gt;&lt;img src="http://sqlblog.com/aggbug.aspx?PostID=44190" width="1" height="1"&gt;</description><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/Application+Fabric/default.aspx">Application Fabric</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/Management/default.aspx">Management</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/SQL+Azure/default.aspx">SQL Azure</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Windows+Azure/default.aspx">Windows Azure</category></item><item><title>More than one way to skin an Audit</title><link>http://sqlblog.com/blogs/buck_woody/archive/2010/05/20/more-than-one-way-to-skin-an-audit.aspx</link><pubDate>Thu, 20 May 2010 13:40:00 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:25343</guid><dc:creator>BuckWoody</dc:creator><slash:comments>0</slash:comments><comments>http://sqlblog.com/blogs/buck_woody/comments/25343.aspx</comments><wfw:commentRss>http://sqlblog.com/blogs/buck_woody/commentrss.aspx?PostID=25343</wfw:commentRss><description>&lt;P&gt;I get asked quite a bit about auditing in SQL Server. By "audit", people mean everything from tracking logins to finding out exactly who ran a particular SELECT statement. &lt;/P&gt;
&lt;P&gt;In the really early versions of SQL Server, we didn't have a great story for very granular audits, so lots of workarounds were suggested. As time progressed, more and more audit capabilities were added to the product, and in typical database platform fashion, as we added a feature we didn't often take&amp;nbsp;the others away. So now, instead of not having an option to audit actions by users, you might face the opposite problem - too many&amp;nbsp;ways to audit! You can read more about the options you have for tracking users here: &lt;A href="http://msdn.microsoft.com/en-us/library/cc280526(v=SQL.100).aspx"&gt;http://msdn.microsoft.com/en-us/library/cc280526(v=SQL.100).aspx&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In SQL Server 2008,&amp;nbsp;we introduced SQL Server Audit, which uses Extended Events to really get a simple way to&amp;nbsp;implement high-level or granular auditing.&amp;nbsp;You can read more about that here: &lt;A href="http://msdn.microsoft.com/en-us/library/dd392015.aspx"&gt;http://msdn.microsoft.com/en-us/library/dd392015.aspx&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As with any feature, you should understand what your needs are first. Auditing isn't "free" in the performance sense, so you need to make sure you're only auditing what you need to.&lt;/P&gt;&lt;img src="http://sqlblog.com/aggbug.aspx?PostID=25343" width="1" height="1"&gt;</description><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/Best+Practices/default.aspx">Best Practices</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/Security/default.aspx">Security</category></item><item><title>Book review: Microsoft System Center Enterprise Suite Unleashed</title><link>http://sqlblog.com/blogs/buck_woody/archive/2010/05/06/book-review-microsoft-system-center-enterprise-suite-unleashed.aspx</link><pubDate>Thu, 06 May 2010 12:33:49 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:24866</guid><dc:creator>BuckWoody</dc:creator><slash:comments>0</slash:comments><comments>http://sqlblog.com/blogs/buck_woody/comments/24866.aspx</comments><wfw:commentRss>http://sqlblog.com/blogs/buck_woody/commentrss.aspx?PostID=24866</wfw:commentRss><description>&lt;p&gt;I know, I know – what’s a database guy doing reading a book on System Center? Well, I need it from time to time. System Center is actually a collection of about 7 different products that you can use to manage and monitor your software and hardware, from drive space through Microsoft Office, UNIX systems, and yes, SQL Server. It’s that last part I care about the most, and so I’ve dealt with Data Protection Manager and System Center Operations Manager (I call it SCOM) in SQL Server. But I wasn’t familiar with the rest of the suite nor was I as familiar as I needed to be with the “Essentials” release – a separate product that groups together the main features of System Center into a single offering for smaller organizations. These companies usually run with a smaller IT shop, so they sometimes opt for this product to help them monitor everything, including SQL Server.&lt;/p&gt;  &lt;p&gt;So I picked up &lt;a href="http://www.informit.com/store/product.aspx?isbn=0672333198" target="_blank"&gt;“Microsoft System Center Enterprise Suite Unleashed” by Chris Amaris&lt;/a&gt; and a cast of others. I don’t normally like to get a technical book by multiple authors – I just find that most of the time it’s quite jarring to switch from author to author, but I think this group did pretty well here.&amp;#160; The first chapter on introducing System Center has helped me talk with others about what the product does, and which pieces fit well together with SQL Server. &lt;/p&gt;  &lt;p&gt;The writing is well done, and I didn’t find a jump from author to author as I went along. The information is sequential, meaning that they lead you from install to configuration and then use. It’s very much a concepts-and-how-to book, and a big one at that – over 950 pages of learning! It was a pretty quick read, though, since I skipped the installation parts and there are lots of screenshots. While I’m not sure you’d be an expert on the product when you finish reading this book, but I would say you’re more than halfway there. I would say it suits someone that learns through examples the best, since they have a lot of step-by-step examples&lt;/p&gt;  &lt;p&gt;I do recommend that you take a look if you have to interact with this product, or even if you are a smaller shop and you’re the primary IT resource. The last few chapters deal with System Center Essentials, and honestly it was the best part of the book for me.&lt;/p&gt;&lt;img src="http://sqlblog.com/aggbug.aspx?PostID=24866" width="1" height="1"&gt;</description><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/Book+Review/default.aspx">Book Review</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/SQL+Server/default.aspx">SQL Server</category></item><item><title>Backup those keys, citizen</title><link>http://sqlblog.com/blogs/buck_woody/archive/2010/04/20/backup-those-keys-citizen.aspx</link><pubDate>Tue, 20 Apr 2010 12:14:50 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:24408</guid><dc:creator>BuckWoody</dc:creator><slash:comments>1</slash:comments><comments>http://sqlblog.com/blogs/buck_woody/comments/24408.aspx</comments><wfw:commentRss>http://sqlblog.com/blogs/buck_woody/commentrss.aspx?PostID=24408</wfw:commentRss><description>&lt;p&gt;Periodically I back up the keys within my servers and databases, and when I do, I blog a reminder here. This should be part of your standard backup rotation – the keys should be backed up often enough to have at hand and again when they change.&lt;/p&gt;  &lt;p&gt;The first key you need to back up is the Service Master Key, which each Instance already has built-in. You do that with the &lt;a href="http://msdn.microsoft.com/en-us/library/ms190337.aspx" target="_blank"&gt;BACKUP SERVICE MASTER KEY command, which you can read more about here&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;The second set of keys are the Database Master Keys, stored per database, if you’ve created one. You can back those up with the &lt;a href="http://technet.microsoft.com/en-us/library/ms174387.aspx" target="_blank"&gt;BACKUP MASTER KEY command, which you can read more about here&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;Finally, you can use the keys to create certificates and other keys – those should also be backed up. &lt;a href="http://msdn.microsoft.com/en-us/library/ms189586.aspx" target="_blank"&gt;Read more about those here&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;Anyway, the important part here is the backup. Make sure you keep those keys safe!&lt;/p&gt;&lt;img src="http://sqlblog.com/aggbug.aspx?PostID=24408" width="1" height="1"&gt;</description><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/Best+Practices/default.aspx">Best Practices</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/Disaster+Recovery/default.aspx">Disaster Recovery</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Maintenance/default.aspx">Maintenance</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Maintenance+Plans/default.aspx">Maintenance Plans</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Security/default.aspx">Security</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/Tips/default.aspx">Tips</category></item><item><title>Create and Track Your Own License Keys with PowerShell</title><link>http://sqlblog.com/blogs/buck_woody/archive/2010/04/15/create-and-track-your-own-license-keys-with-powershell.aspx</link><pubDate>Thu, 15 Apr 2010 13:10:45 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:24316</guid><dc:creator>BuckWoody</dc:creator><slash:comments>1</slash:comments><comments>http://sqlblog.com/blogs/buck_woody/comments/24316.aspx</comments><wfw:commentRss>http://sqlblog.com/blogs/buck_woody/commentrss.aspx?PostID=24316</wfw:commentRss><description>&lt;p&gt;SQL Server used to have&amp;#160; cool little tool that would let you track your licenses. Microsoft didn’t use it to limit your system or anything, it was just a place on the server where you could put that this system used this license key. I miss those days – we don’t track that any more, and I want to make sure I’m up to date on my licensing, so I made my own.&lt;/p&gt;  &lt;p&gt;Now, there are a LOT of ways you could do this. You could add an extended property in SQL Server, add a table to a tracking database, use a text file, track it somewhere else, whatever. This is just the route I chose; if you want to use some other method, feel free. Just sharing here.&lt;/p&gt;  &lt;p&gt;&lt;font color="#ff0000"&gt;&lt;strong&gt;Warning&lt;/strong&gt; Serious problems might occur if you modify the registry incorrectly by using Registry Editor or by using another method. These problems &lt;strong&gt;might require that you reinstall the operating system&lt;/strong&gt;. Microsoft cannot guarantee that these problems can be solved. Modify the registry &lt;em&gt;&lt;u&gt;at your own risk&lt;/u&gt;&lt;/em&gt;.&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;And this is REALLY important. I include a disclaimer at the end of my scripts, but in this case you’re modifying your registry, and that could be EXTREMELY dangerous – only do this on a test server – and I’m just showing you how I did mine. It isn’t an endorsement or anything like that, and this is a “Buck Woody” thing, NOT a Microsoft thing. &lt;a href="http://support.microsoft.com/kb/256986" target="_blank"&gt;See this link first&lt;/a&gt;, and then you can read on.&lt;/p&gt;  &lt;p&gt;OK, here’s my script:&lt;/p&gt;  &lt;p style="margin:0in;font-family:calibri;color:navy;font-size:11pt;"&gt;# Track your own licenses&lt;/p&gt;  &lt;p style="margin:0in;font-family:calibri;color:navy;font-size:11pt;"&gt;# Write a New Key to be the License Location&lt;/p&gt;  &lt;p style="margin:0in;font-family:calibri;color:green;font-size:11pt;"&gt;mkdir HKCU:\SOFTWARE\Buck&lt;/p&gt;  &lt;p style="margin:0in;font-family:calibri;color:green;font-size:11pt;"&gt;&amp;#160;&lt;/p&gt;  &lt;p style="margin:0in;font-family:calibri;color:navy;font-size:11pt;"&gt;# Write the variables - one sets the type, the other sets the number, and the last one holds the key &lt;/p&gt;  &lt;p style="margin:0in;font-family:calibri;color:green;font-size:11pt;"&gt;New-ItemProperty HKCU:\SOFTWARE\Buck -name &amp;quot;SQLServerLicenseType&amp;quot; -value &amp;quot;Processor&amp;quot;&lt;/p&gt;  &lt;p style="margin:0in;font-family:calibri;color:navy;font-size:11pt;"&gt;# Notice the Dword value here - this one is a number so it needs that. Keep this on one line!&lt;/p&gt;  &lt;p style="margin:0in;font-family:calibri;color:green;font-size:11pt;"&gt;New-ItemProperty HKCU:\SOFTWARE\Buck -name &amp;quot;SQLServerLicenseNumber&amp;quot; -propertytype DWord -value 4&lt;/p&gt;  &lt;p style="margin:0in;font-family:calibri;color:green;font-size:11pt;"&gt;New-ItemProperty HKCU:\SOFTWARE\Buck -name &amp;quot;SQLServerLicenseKey&amp;quot; -value &amp;quot;ABCD1234&amp;quot;&lt;/p&gt;  &lt;p style="margin:0in;font-family:calibri;color:green;font-size:11pt;"&gt;&amp;#160;&lt;/p&gt;  &lt;p style="margin:0in;font-family:calibri;color:navy;font-size:11pt;"&gt;# Read them all&lt;/p&gt;  &lt;p style="margin:0in;font-family:calibri;color:green;font-size:11pt;"&gt;$LicenseKey = Get-Item HKCU:\Software\Buck&lt;/p&gt;  &lt;p style="margin:0in;font-family:calibri;color:green;font-size:11pt;"&gt;$Licenses = Get-ItemProperty $LicenseKey.PSPath&lt;/p&gt;  &lt;p style="margin:0in;font-family:calibri;color:green;font-size:11pt;"&gt;foreach ($License in $LicenseKey.Property) { $License + &amp;quot;=&amp;quot; + $Licenses.$License }&lt;/p&gt;  &lt;p style="margin:0in;font-family:calibri;color:green;font-size:11pt;"&gt;&amp;#160;&lt;/p&gt;  &lt;p style="margin:0in 0in 0pt;mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;" class="MsoNormal"&gt;&lt;b&gt;&lt;i style="mso-bidi-font-style:normal;"&gt;&lt;span style="color:maroon;font-size:10pt;mso-bidi-font-size:11.0pt;mso-bidi-font-family:calibri;mso-ansi-language:en;"&gt;&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p style="margin:0in 0in 0pt;mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;" class="MsoNormal"&gt;&lt;b&gt;&lt;i style="mso-bidi-font-style:normal;"&gt;&lt;span style="color:maroon;font-size:10pt;mso-bidi-font-size:11.0pt;mso-bidi-font-family:calibri;mso-ansi-language:en;"&gt;Script Disclaimer, for people who need to be told this sort of thing: &lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;b&gt;&lt;i style="mso-bidi-font-style:normal;"&gt;&lt;span style="color:maroon;font-size:10pt;mso-bidi-font-family:calibri;mso-ansi-language:en;"&gt;         &lt;p&gt;&lt;/p&gt;       &lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p style="margin:0in 0in 0pt;" class="MsoNormal"&gt;&lt;i style="mso-bidi-font-style:normal;"&gt;&lt;span style="color:maroon;font-size:10pt;mso-bidi-font-family:calibri;mso-ansi-language:en;"&gt;Never trust any script, including those that you find here, until you understand exactly what it does and how it will act on your systems. Always check the script on a test system or Virtual Machine, not a production system. Yes, there are always multiple ways to do things, and this script may not work in every situation, for everything. It’s just a script, people. All scripts on this site are performed by a professional stunt driver on a closed course. Your mileage may vary. Void where prohibited. Offer good for a limited time only. Keep out of reach of small children. Do not operate heavy machinery while using this script. If you experience blurry vision, indigestion or diarrhea during the operation of this script, see a physician immediately.&lt;/span&gt;&lt;/i&gt;&lt;span style="font-family:'Times New Roman','serif';font-size:12pt;mso-ansi-language:en;"&gt;     &lt;p&gt;&lt;/p&gt;   &lt;/span&gt;&lt;/p&gt;&lt;img src="http://sqlblog.com/aggbug.aspx?PostID=24316" width="1" height="1"&gt;</description><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/PowerShell/default.aspx">PowerShell</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Scripts/default.aspx">Scripts</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/SQL+Server/default.aspx">SQL Server</category></item><item><title>PowerShell PowerPack Download</title><link>http://sqlblog.com/blogs/buck_woody/archive/2010/04/07/powershell-powerpack-download.aspx</link><pubDate>Wed, 07 Apr 2010 13:30:20 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:24123</guid><dc:creator>BuckWoody</dc:creator><slash:comments>1</slash:comments><comments>http://sqlblog.com/blogs/buck_woody/comments/24123.aspx</comments><wfw:commentRss>http://sqlblog.com/blogs/buck_woody/commentrss.aspx?PostID=24123</wfw:commentRss><description>&lt;p&gt;I read &lt;a href="http://redmondmag.com/articles/2010/04/01/pack-some-power-in-your-shell.aspx" target="_blank"&gt;Jeffery Hicks’ article in this month’s Redmond Magazine&lt;/a&gt; on a new add-in for Windows PowerShell 2.0. It’s called the PowerShell Pack and it has a some great new features that I plan to put into place on my production systems as soon as I finished learning and testing them.&lt;/p&gt;  &lt;p&gt;You can &lt;a href="http://code.msdn.microsoft.com/PowerShellPack" target="_blank"&gt;download the pack here if you have PowerShell 2.0&lt;/a&gt;. I’m having a lot of fun with it, and I’ll blog about what I’m learning here in the near future, but you should check it out. The only issue I have with it right now is that you have to load a module and then use get-help to find out what it does, because I haven’t found a lot of other documentation so far.&lt;/p&gt;  &lt;p&gt;The most interesting modules for me are the ones that can run a command elevated (in &lt;strong&gt;PSUserTools&lt;/strong&gt;), the task scheduling commands (in &lt;strong&gt;TaskScheduler&lt;/strong&gt;) and the file system checks and tools (in &lt;strong&gt;FileSystem&lt;/strong&gt;). There’s also a way to create simple Graphical User Interface panels (in ). I plan to string all these together to install a management set of tools on my SQL Server Express Instances, giving the user “task buttons” to backup or restore a database, add or delete users and so on. Yes, I’ll be careful, and yes, I’ll make sure the user is allowed to do that.&lt;/p&gt;  &lt;p&gt;For now, I’m testing the download, but I thought I would share what I’m up to. If you have PowerShell 2.0 and you download the pack, let me know how you use it.&lt;/p&gt;  &lt;p style="margin:0in 0in 0pt;mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;" class="MsoNormal"&gt;&lt;font face="Calibri"&gt;&lt;b&gt;&lt;i style="mso-bidi-font-style:normal;"&gt;&lt;span style="color:maroon;font-size:10pt;mso-bidi-font-size:11.0pt;mso-bidi-font-family:calibri;mso-ansi-language:en;"&gt;Script Disclaimer, for people who need to be told this sort of thing: &lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;b&gt;&lt;i style="mso-bidi-font-style:normal;"&gt;&lt;span style="color:maroon;font-size:10pt;mso-bidi-font-family:calibri;mso-ansi-language:en;"&gt;           &lt;p&gt;&lt;/p&gt;         &lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p style="margin:0in 0in 0pt;" class="MsoNormal"&gt;&lt;i style="mso-bidi-font-style:normal;"&gt;&lt;span style="color:maroon;font-size:10pt;mso-bidi-font-family:calibri;mso-ansi-language:en;"&gt;&lt;font face="Calibri"&gt;Never trust any script, including those that you find here, until you understand exactly what it does and how it will act on your systems. Always check the script on a test system or Virtual Machine, not a production system. Yes, there are always multiple ways to do things, and this script may not work in every situation, for everything. It’s just a script, people. All scripts on this site are performed by a professional stunt driver on a closed course. Your mileage may vary. Void where prohibited. Offer good for a limited time only. Keep out of reach of small children. Do not operate heavy machinery while using this script. If you experience blurry vision, indigestion or diarrhea during the operation of this script, see a physician immediately.&lt;/font&gt;&lt;/span&gt;&lt;/i&gt;&lt;/p&gt;&lt;img src="http://sqlblog.com/aggbug.aspx?PostID=24123" width="1" height="1"&gt;</description><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/DBA/default.aspx">DBA</category><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/Downloads/default.aspx">Downloads</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/PowerShell/default.aspx">PowerShell</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/Tips/default.aspx">Tips</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Web/default.aspx">Web</category></item><item><title>Process Improvement and the Data Professional</title><link>http://sqlblog.com/blogs/buck_woody/archive/2010/04/06/process-improvement-and-the-data-professional.aspx</link><pubDate>Tue, 06 Apr 2010 13:23:48 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:24098</guid><dc:creator>BuckWoody</dc:creator><slash:comments>0</slash:comments><comments>http://sqlblog.com/blogs/buck_woody/comments/24098.aspx</comments><wfw:commentRss>http://sqlblog.com/blogs/buck_woody/commentrss.aspx?PostID=24098</wfw:commentRss><description>&lt;p&gt;Don’t be afraid of that title – I’m not talking about &lt;a href="http://en.wikipedia.org/wiki/Six_Sigma" target="_blank"&gt;Six Sigma&lt;/a&gt; or anything super-formal here. In many organizations, there are more folks in other IT roles than in the Data Professional area. In other words, there are more developers, system administrators and so on than there are the “DBA” role. &lt;/p&gt;  &lt;p&gt;That means we often have more to do than the time we need to do it. And, oddly enough, the first thing that is sacrificed is process improvement – the little things we need to do to make the day go faster in the first place. Then we get even more behind, the work piles up and…well, you know all about that.&lt;/p&gt;  &lt;p&gt;Earlier I challenged you to find 10-30 minutes a day to study. Some folks wrote back and asked “where do I start”? Well, why not be super-efficient and combine that time with learning how to make yourself more efficient? Try out a new scripting language, learn a new tool that automates things or find out ways others have automated their systems. In general, find out what you’re doing and how, and then see if that can be improved. It’s kind of like doing a performance tuning gig on yourself!&lt;/p&gt;  &lt;p&gt;If you’re pressed for time, look for bite-sized articles (&lt;a href="http://www.informit.com/guides/content.aspx?g=sqlserver&amp;amp;seqNum=253" target="_blank"&gt;like the ones I’ve done here for PowerShell and SQL Server&lt;/a&gt;) that you can follow in a “serial” fashion. In a short time you’ll have a new set of knowledge you can use to make your day faster.&lt;/p&gt;&lt;img src="http://sqlblog.com/aggbug.aspx?PostID=24098" width="1" height="1"&gt;</description><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/Career/default.aspx">Career</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/Developer/default.aspx">Developer</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/PowerShell/default.aspx">PowerShell</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/Tips/default.aspx">Tips</category></item><item><title>List SQL Server Instances using the Registry</title><link>http://sqlblog.com/blogs/buck_woody/archive/2010/03/31/list-sql-server-instances-using-the-registry.aspx</link><pubDate>Wed, 31 Mar 2010 13:41:24 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:23906</guid><dc:creator>BuckWoody</dc:creator><slash:comments>4</slash:comments><comments>http://sqlblog.com/blogs/buck_woody/comments/23906.aspx</comments><wfw:commentRss>http://sqlblog.com/blogs/buck_woody/commentrss.aspx?PostID=23906</wfw:commentRss><description>&lt;p&gt;I read &lt;a href="http://thepowershellguy.com/blogs/posh/archive/2007/06/20/remote-registry-access-and-creating-new-registry-values-with-powershell.aspx" target="_blank"&gt;this interesting article on using PowerShell and the registry&lt;/a&gt;, and thought I would modify his information a bit to list the SQL Server Instances on a box. The interesting thing about listing instances this was is that you can touch remote machines, find the instances when they are off and so on. Anyway, here’s the scriptlet I used to find the Instances on my system:&lt;/p&gt;  &lt;p&gt;$MachineName = '.'&lt;/p&gt;  &lt;p&gt;$reg = [Microsoft.Win32.RegistryKey]::OpenRemoteBaseKey('LocalMachine', $MachineName)&lt;/p&gt;  &lt;p&gt;$regKey= $reg.OpenSubKey(&amp;quot;SOFTWARE\\Microsoft\\Microsoft SQL Server\\Instance Names\\SQL&amp;quot; )&lt;/p&gt;  &lt;p&gt;$regkey.GetValueNames()&lt;/p&gt;  &lt;p&gt;You can read more of his article to find out the reason for the remote registry call and so forth – there are also security implications here for being able to read the registry.&lt;/p&gt;  &lt;p style="margin:0in 0in 0pt;mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;" class="MsoNormal"&gt;&lt;font face="Calibri"&gt;&lt;b&gt;&lt;i style="mso-bidi-font-style:normal;"&gt;&lt;span style="color:maroon;font-size:10pt;mso-bidi-font-size:11.0pt;mso-bidi-font-family:calibri;mso-ansi-language:en;"&gt;Script Disclaimer, for people who need to be told this sort of thing: &lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;b&gt;&lt;i style="mso-bidi-font-style:normal;"&gt;&lt;span style="color:maroon;font-size:10pt;mso-bidi-font-family:calibri;mso-ansi-language:en;"&gt;           &lt;p&gt;&lt;/p&gt;         &lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p style="margin:0in 0in 0pt;" class="MsoNormal"&gt;&lt;i style="mso-bidi-font-style:normal;"&gt;&lt;span style="color:maroon;font-size:10pt;mso-bidi-font-family:calibri;mso-ansi-language:en;"&gt;&lt;font face="Calibri"&gt;Never trust any script, including those that you find here, until you understand exactly what it does and how it will act on your systems. Always check the script on a test system or Virtual Machine, not a production system. Yes, there are always multiple ways to do things, and this script may not work in every situation, for everything. It’s just a script, people. All scripts on this site are performed by a professional stunt driver on a closed course. Your mileage may vary. Void where prohibited. Offer good for a limited time only. Keep out of reach of small children. Do not operate heavy machinery while using this script. If you experience blurry vision, indigestion or diarrhea during the operation of this script, see a physician immediately.&lt;/font&gt;&lt;/span&gt;&lt;/i&gt;&lt;/p&gt;&lt;img src="http://sqlblog.com/aggbug.aspx?PostID=23906" width="1" height="1"&gt;</description><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/Metadata/default.aspx">Metadata</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/PowerShell/default.aspx">PowerShell</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Scripts/default.aspx">Scripts</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/SQL+Server/default.aspx">SQL Server</category></item><item><title>Backup Meta-Data</title><link>http://sqlblog.com/blogs/buck_woody/archive/2010/03/30/backup-meta-data.aspx</link><pubDate>Tue, 30 Mar 2010 14:46:00 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:23870</guid><dc:creator>BuckWoody</dc:creator><slash:comments>3</slash:comments><comments>http://sqlblog.com/blogs/buck_woody/comments/23870.aspx</comments><wfw:commentRss>http://sqlblog.com/blogs/buck_woody/commentrss.aspx?PostID=23870</wfw:commentRss><description>&lt;P&gt;I'm working on a PowerShell script to show me the trending durations of my backup activities. The first thing I need is the data, so I looked at the Standard Reports in SQL Server Management Studio, and found a report that suited my needs, so I pulled out the script that it runs and modified it to this T-SQL Script. &lt;/P&gt;
&lt;P&gt;A few words here - you need to be in the MSDB database for this to run, and you can add a WHERE clause to limit to a database, timeframe, type of backup, whatever. For that matter, I won't use all of the data in this query in my PowerShell script, but it gives me lots of avenues to graph:&lt;/P&gt;
&lt;P&gt;&lt;FONT color=#009900&gt;SELECT distinct t1.name AS 'DatabaseName'&lt;/FONT&gt;&lt;/P&gt;
&lt;P style="MARGIN:0in;FONT-FAMILY:Calibri;FONT-SIZE:11pt;"&gt;&lt;FONT color=#009900&gt;,(datediff( ss,&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp; &lt;/SPAN&gt;t3.backup_start_date, t3.backup_finish_date)) AS 'DurationInSeconds'&lt;/FONT&gt;&lt;/P&gt;
&lt;P style="MARGIN:0in;FONT-FAMILY:Calibri;FONT-SIZE:11pt;"&gt;&lt;FONT color=#009900&gt;,t3.user_name AS 'UserResponsible'&lt;/FONT&gt;&lt;/P&gt;
&lt;P style="MARGIN:0in;FONT-FAMILY:Calibri;FONT-SIZE:11pt;"&gt;&lt;FONT color=#009900&gt;,t3.name AS backup_name&lt;/FONT&gt;&lt;/P&gt;
&lt;P style="MARGIN:0in;FONT-FAMILY:Calibri;FONT-SIZE:11pt;"&gt;&lt;FONT color=#009900&gt;,t3.description&lt;/FONT&gt;&lt;/P&gt;
&lt;P style="MARGIN:0in;FONT-FAMILY:Calibri;FONT-SIZE:11pt;"&gt;&lt;FONT color=#009900&gt;,t3.backup_start_date&lt;/FONT&gt;&lt;/P&gt;
&lt;P style="MARGIN:0in;FONT-FAMILY:Calibri;FONT-SIZE:11pt;"&gt;&lt;FONT color=#009900&gt;,t3.backup_finish_date&lt;/FONT&gt;&lt;/P&gt;
&lt;P style="MARGIN:0in;FONT-FAMILY:Calibri;FONT-SIZE:11pt;"&gt;&lt;FONT color=#009900&gt;,CASE WHEN t3.type = 'D' THEN 'Database'&lt;/FONT&gt;&lt;/P&gt;
&lt;P style="MARGIN:0in;FONT-FAMILY:Calibri;FONT-SIZE:11pt;"&gt;&lt;FONT color=#009900&gt;WHEN t3.type = 'L' THEN 'Log'&lt;/FONT&gt;&lt;/P&gt;
&lt;P style="MARGIN:0in;FONT-FAMILY:Calibri;FONT-SIZE:11pt;"&gt;&lt;FONT color=#009900&gt;WHEN t3.type = 'F' THEN 'FileOrFilegroup'&lt;/FONT&gt;&lt;/P&gt;
&lt;P style="MARGIN:0in;FONT-FAMILY:Calibri;FONT-SIZE:11pt;"&gt;&lt;FONT color=#009900&gt;WHEN t3.type = 'G' THEN 'DifferentialFile'&lt;/FONT&gt;&lt;/P&gt;
&lt;P style="MARGIN:0in;FONT-FAMILY:Calibri;FONT-SIZE:11pt;"&gt;&lt;FONT color=#009900&gt;WHEN t3.type = 'P' THEN 'Partial'&lt;/FONT&gt;&lt;/P&gt;
&lt;P style="MARGIN:0in;FONT-FAMILY:Calibri;FONT-SIZE:11pt;"&gt;&lt;FONT color=#009900&gt;WHEN t3.type = 'Q' THEN 'DifferentialPartial'&lt;/FONT&gt;&lt;/P&gt;
&lt;P style="MARGIN:0in;FONT-FAMILY:Calibri;FONT-SIZE:11pt;"&gt;&lt;FONT color=#009900&gt;END AS 'BackupType'&lt;/FONT&gt;&lt;/P&gt;
&lt;P style="MARGIN:0in;FONT-FAMILY:Calibri;FONT-SIZE:11pt;"&gt;&lt;FONT color=#009900&gt;,t3.backup_size AS 'BackupSizeKB' &lt;/FONT&gt;&lt;/P&gt;
&lt;P style="MARGIN:0in;FONT-FAMILY:Calibri;FONT-SIZE:11pt;"&gt;&lt;FONT color=#009900&gt;,t6.physical_device_name&lt;/FONT&gt;&lt;/P&gt;
&lt;P style="MARGIN:0in;FONT-FAMILY:Calibri;FONT-SIZE:11pt;"&gt;&lt;FONT color=#009900&gt;,CASE WHEN t6.device_type = 2 THEN 'Disk'&lt;/FONT&gt;&lt;/P&gt;
&lt;P style="MARGIN:0in;FONT-FAMILY:Calibri;FONT-SIZE:11pt;"&gt;&lt;FONT color=#009900&gt;WHEN t6.device_type = 102 THEN 'Disk'&lt;/FONT&gt;&lt;/P&gt;
&lt;P style="MARGIN:0in;FONT-FAMILY:Calibri;FONT-SIZE:11pt;"&gt;&lt;FONT color=#009900&gt;WHEN t6.device_type = 5 THEN 'Tape'&lt;/FONT&gt;&lt;/P&gt;
&lt;P style="MARGIN:0in;FONT-FAMILY:Calibri;FONT-SIZE:11pt;"&gt;&lt;FONT color=#009900&gt;WHEN t6.device_type = 105 THEN 'Tape'&lt;/FONT&gt;&lt;/P&gt;
&lt;P style="MARGIN:0in;FONT-FAMILY:Calibri;FONT-SIZE:11pt;"&gt;&lt;FONT color=#009900&gt;END AS 'DeviceType'&lt;/FONT&gt;&lt;/P&gt;
&lt;P style="MARGIN:0in;FONT-FAMILY:Calibri;FONT-SIZE:11pt;"&gt;&lt;FONT color=#009900&gt;,t3.recovery_model&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P style="MARGIN:0in;FONT-FAMILY:Calibri;FONT-SIZE:11pt;"&gt;&lt;FONT color=#009900&gt;FROM sys.databases t1 &lt;/FONT&gt;&lt;/P&gt;
&lt;P style="MARGIN:0in 0in 0in 0.375in;FONT-FAMILY:Calibri;FONT-SIZE:11pt;"&gt;&lt;FONT color=#009900&gt;INNER JOIN backupset t3 &lt;/FONT&gt;&lt;/P&gt;
&lt;P style="MARGIN:0in 0in 0in 0.75in;FONT-FAMILY:Calibri;FONT-SIZE:11pt;"&gt;&lt;FONT color=#009900&gt;ON (t3.database_name = t1.name )&lt;SPAN style="mso-spacerun:yes;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P style="MARGIN:0in 0in 0in 0.375in;FONT-FAMILY:Calibri;FONT-SIZE:11pt;"&gt;&lt;FONT color=#009900&gt;LEFT OUTER JOIN backupmediaset t5 &lt;/FONT&gt;&lt;/P&gt;
&lt;P style="MARGIN:0in 0in 0in 0.75in;FONT-FAMILY:Calibri;FONT-SIZE:11pt;"&gt;&lt;FONT color=#009900&gt;ON ( t3.media_set_id = t5.media_set_id ) &lt;/FONT&gt;&lt;/P&gt;
&lt;P style="MARGIN:0in 0in 0in 0.375in;FONT-FAMILY:Calibri;FONT-SIZE:11pt;"&gt;&lt;FONT color=#009900&gt;LEFT OUTER JOIN backupmediafamily t6 &lt;/FONT&gt;&lt;/P&gt;
&lt;P style="MARGIN:0in 0in 0in 0.75in;FONT-FAMILY:Calibri;FONT-SIZE:11pt;"&gt;&lt;FONT color=#009900&gt;ON ( t6.media_set_id = t5.media_set_id ) &lt;/FONT&gt;&lt;/P&gt;
&lt;P style="MARGIN:0in;FONT-FAMILY:Calibri;FONT-SIZE:11pt;"&gt;&lt;FONT color=#009900&gt;ORDER BY backup_start_date DESC&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;I'll munge this into my Excel PowerShell chart script tomorrow.&lt;/P&gt;
&lt;P style="MARGIN:0in 0in 0pt;mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;" class=MsoNormal&gt;&lt;FONT face=Calibri&gt;&lt;B&gt;&lt;I style="mso-bidi-font-style:normal;"&gt;&lt;SPAN style="COLOR:maroon;FONT-SIZE:10pt;mso-bidi-font-size:11.0pt;mso-bidi-font-family:Calibri;mso-ansi-language:EN;"&gt;Script Disclaimer, for people who need to be told this sort of thing: &lt;/SPAN&gt;&lt;/I&gt;&lt;/B&gt;&lt;B&gt;&lt;I style="mso-bidi-font-style:normal;"&gt;&lt;SPAN style="COLOR:maroon;FONT-SIZE:10pt;mso-bidi-font-family:Calibri;mso-ansi-language:EN;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/SPAN&gt;&lt;/I&gt;&lt;/B&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P style="MARGIN:0in 0in 0pt;" class=MsoNormal&gt;&lt;I style="mso-bidi-font-style:normal;"&gt;&lt;SPAN style="COLOR:maroon;FONT-SIZE:10pt;mso-bidi-font-family:Calibri;mso-ansi-language:EN;"&gt;&lt;FONT face=Calibri&gt;Never trust any script, including those that you find here, until you understand exactly what it does and how it will act on your systems. Always check the script on a test system or Virtual Machine, not a production system. Yes, there are always multiple ways to do things, and this script may not work in every situation, for everything. It’s just a script, people. All scripts on this site are performed by a professional stunt driver on a closed course. Your mileage may vary. Void where prohibited. Offer good for a limited time only. Keep out of reach of small children. Do not operate heavy machinery while using this script. If you experience blurry vision, indigestion or diarrhea&amp;nbsp;during the operation of this script, see a physician immediately.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/I&gt;&lt;/P&gt;&lt;img src="http://sqlblog.com/aggbug.aspx?PostID=23870" width="1" height="1"&gt;</description><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/DBA/default.aspx">DBA</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/Maintenance/default.aspx">Maintenance</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Maintenance+Plans/default.aspx">Maintenance Plans</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Metadata/default.aspx">Metadata</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Scripts/default.aspx">Scripts</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+Management+Studio/default.aspx">SQL Server Management Studio</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Standard+Reports/default.aspx">Standard Reports</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/T-SQL/default.aspx">T-SQL</category></item><item><title>Open the SQL Server Error Log with PowerShell</title><link>http://sqlblog.com/blogs/buck_woody/archive/2010/03/29/open-the-sql-server-error-log-with-powershell.aspx</link><pubDate>Mon, 29 Mar 2010 13:35:52 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:23836</guid><dc:creator>BuckWoody</dc:creator><slash:comments>1</slash:comments><comments>http://sqlblog.com/blogs/buck_woody/comments/23836.aspx</comments><wfw:commentRss>http://sqlblog.com/blogs/buck_woody/commentrss.aspx?PostID=23836</wfw:commentRss><description>&lt;p&gt;Using the Server Management Objects (SMO) library, you don’t even need to have the SQL Server 2008 PowerShell Provider to read the SQL Server Error Logs – in fact, you can use regular old everyday PowerShell. Keep in mind you &lt;strong&gt;will&lt;/strong&gt; need the SMO libraries – which can be installed separately or by installing the Client Tools from the SQL Server install media. You could search for errors, store a result as a variable, or act on the returned values in some other way.&lt;/p&gt;  &lt;p&gt;Replace the Machine Name with your server and Instance Name with your instance, but leave the quotes, to make this work on your system:&lt;/p&gt;  &lt;p&gt;&lt;font color="#008000"&gt;[reflection.assembly]::LoadWithPartialName(&amp;quot;Microsoft.SqlServer.Smo&amp;quot;)     &lt;br /&gt;$machineName = &amp;quot;UNIVAC&amp;quot;      &lt;br /&gt;$instanceName = &amp;quot;Production&amp;quot;      &lt;br /&gt;$sqlServer = new-object (&amp;quot;Microsoft.SqlServer.Management.Smo.Server&amp;quot;) &amp;quot;$machineName\$instanceName&amp;quot;      &lt;br /&gt;$sqlServer.ReadErrorLog()&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;Want to search for something specific, like the word “Error”? Replace the last line with this:&lt;/p&gt;  &lt;p&gt;&lt;font color="#008000"&gt;$sqlServer.ReadErrorLog() | where {$_.Text -like &amp;quot;Error*&amp;quot;}&lt;/font&gt;&lt;/p&gt;  &lt;p style="margin:0in 0in 0pt;mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;" class="MsoNormal"&gt;&lt;font face="Calibri"&gt;&lt;b&gt;&lt;i style="mso-bidi-font-style:normal;"&gt;&lt;span style="color:maroon;font-size:10pt;mso-bidi-font-size:11.0pt;mso-bidi-font-family:calibri;mso-ansi-language:en;"&gt;Script Disclaimer, for people who need to be told this sort of thing: &lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;b&gt;&lt;i style="mso-bidi-font-style:normal;"&gt;&lt;span style="color:maroon;font-size:10pt;mso-bidi-font-family:calibri;mso-ansi-language:en;"&gt;           &lt;p&gt;&lt;/p&gt;         &lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p style="margin:0in 0in 0pt;" class="MsoNormal"&gt;&lt;i style="mso-bidi-font-style:normal;"&gt;&lt;span style="color:maroon;font-size:10pt;mso-bidi-font-family:calibri;mso-ansi-language:en;"&gt;&lt;font face="Calibri"&gt;Never trust any script, including those that you find here, until you understand exactly what it does and how it will act on your systems. Always check the script on a test system or Virtual Machine, not a production system. Yes, there are always multiple ways to do things, and this script may not work in every situation, for everything. It’s just a script, people. All scripts on this site are performed by a professional stunt driver on a closed course. Your mileage may vary. Void where prohibited. Offer good for a limited time only. Keep out of reach of small children. Do not operate heavy machinery while using this script. If you experience blurry vision, indigestion or diarrhea during the operation of this script, see a physician immediately.&lt;/font&gt;&lt;/span&gt;&lt;/i&gt;&lt;/p&gt;&lt;img src="http://sqlblog.com/aggbug.aspx?PostID=23836" width="1" height="1"&gt;</description><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/DBA/default.aspx">DBA</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/PowerShell/default.aspx">PowerShell</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Scripts/default.aspx">Scripts</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/SQL+Server/default.aspx">SQL Server</category></item><item><title>Cluster Nodes as RAID Drives</title><link>http://sqlblog.com/blogs/buck_woody/archive/2010/03/24/cluster-nodes-as-raid-drives.aspx</link><pubDate>Thu, 25 Mar 2010 05:56:00 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:23734</guid><dc:creator>BuckWoody</dc:creator><slash:comments>1</slash:comments><comments>http://sqlblog.com/blogs/buck_woody/comments/23734.aspx</comments><wfw:commentRss>http://sqlblog.com/blogs/buck_woody/commentrss.aspx?PostID=23734</wfw:commentRss><description>&lt;P&gt;I'm unable to sleep tonight so I thought I would push this post out VERY early. When you don't sleep your mind takes interesting&amp;nbsp;turns, which can be a good thing. &lt;/P&gt;
&lt;P&gt;I was watching a briefing today by a couple of friends as they were talking about various ways to arrange a Windows Server Cluster for SQL Server. I often see an "active" node of a cluster with a "passive" node backing it up. That means one node is working and accepting transactions, and the other is not doing any work but simply "standing by" waiting for the first to fail over.&lt;/P&gt;
&lt;P&gt;The configuration in the demonstration I saw was a bit different. In this example, there were three nodes that were actively working, and a fourth standing by for all three. I've put configurations like this one into place before, but as I was looking at their architecture diagram, it looked familar - it looked like a RAID drive setup! And that's not a bad way to think about your cluster arrangements. The same concerns you might think about for a particular RAID&amp;nbsp;configuration provides a good way to think about protecting&amp;nbsp;your systems in general.&lt;/P&gt;
&lt;P&gt;So even if you're not staying awake all night thinking about SQL Server clusters, take this post as an opportunity for "lateral thinking" - a way of combining in your mind the concepts from one piece of knowledge to another. You might find a new way of making your technical environment a little better.&lt;/P&gt;&lt;img src="http://sqlblog.com/aggbug.aspx?PostID=23734" width="1" height="1"&gt;</description><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/Computing/default.aspx">Computing</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/Disaster+Recovery/default.aspx">Disaster Recovery</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/Tips/default.aspx">Tips</category></item><item><title>Using linked servers, OPENROWSET and OPENQUERY</title><link>http://sqlblog.com/blogs/buck_woody/archive/2010/03/16/using-linked-servers-openrowset-and-openquery.aspx</link><pubDate>Tue, 16 Mar 2010 12:41:33 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:23448</guid><dc:creator>BuckWoody</dc:creator><slash:comments>5</slash:comments><comments>http://sqlblog.com/blogs/buck_woody/comments/23448.aspx</comments><wfw:commentRss>http://sqlblog.com/blogs/buck_woody/commentrss.aspx?PostID=23448</wfw:commentRss><description>&lt;p&gt;SQL Server has a few mechanisms to reach out to another server (even another server type) and query data from within a Transact-SQL statement. Among them are a set of stored credentials and information (called a &lt;a href="http://msdn.microsoft.com/en-us/library/ms190479.aspx" target="_blank"&gt;Linked Server&lt;/a&gt;), a statement that uses a linked server called called &lt;a href="http://msdn.microsoft.com/en-us/library/ms188427.aspx" target="_blank"&gt;OPENQUERY&lt;/a&gt;, another called &lt;a href="http://msdn.microsoft.com/en-us/library/ms190312.aspx" target="_blank"&gt;OPENROWSET&lt;/a&gt;, and one called &lt;a href="http://msdn.microsoft.com/en-us/library/ms179856.aspx" target="_blank"&gt;OPENDATASOURCE&lt;/a&gt;. This post isn’t about those particular functions or statements – hit the links for more if you’re new to those topics.&lt;/p&gt;  &lt;p&gt;I’m actually more concerned about where I see these used than the particular method. In many cases, a Linked server isn’t another Relational Database Management System (RDMBS) like Oracle or DB2 (which is possible with a linked server), but another SQL Server. My concern is that linked servers are the new Data Transformation Services (DTS) from SQL Server 2000 – something that was designed for one purpose but which is being morphed into something much more.&lt;/p&gt;  &lt;p&gt;In the case of DTS, most of us turned that feature into a full-fledged job system. What was designed as a simple data import and export system has been pressed into service doing logic, routing and timing. And of course we all know how painful it was to move off of a complex DTS system onto SQL Server Integration Services.&lt;/p&gt;  &lt;p&gt;In the case of linked servers, what should be used as a method of running a simple query or two on another server where you have occasional connection or need a quick import of a small data set is morphing into a full federation strategy. In some cases I’ve seen a complex web of linked servers, and when credentials, names or anything else changes there are huge problems.&lt;/p&gt;  &lt;p&gt;Now don’t get me wrong – linked servers and &lt;a href="http://msdn.microsoft.com/en-us/library/ms188721.aspx" target="_blank"&gt;other forms of distributing queries&lt;/a&gt; is a fantastic set of tools that we have to move data around. I’m just saying that when you start having lots of workarounds and when things get really complicated, you might want to step back a little and ask if there’s a better way. Are you able to tolerate some latency? Perhaps you’re &lt;a href="http://msdn.microsoft.com/en-us/library/ms345108(SQL.90).aspx" target="_blank"&gt;able to use Service Broker&lt;/a&gt;. Would you like to be platform-independent on the data source? &lt;a href="http://www.c-sharpcorner.com/UploadFile/mikegriffin/middle_tier12232005054629AM/middle_tier.aspx" target="_blank"&gt;Perhaps a middle-tier might make more sense&lt;/a&gt;, abstracting the queries there and sending them to the proper server. Designed properly, I’ve seen these systems scale further and be more resilient than loading up on linked servers.&lt;/p&gt;&lt;img src="http://sqlblog.com/aggbug.aspx?PostID=23448" width="1" height="1"&gt;</description><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/Design/default.aspx">Design</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/Development/default.aspx">Development</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Planning/default.aspx">Planning</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/Tips/default.aspx">Tips</category></item><item><title>What to leave when you're leaving</title><link>http://sqlblog.com/blogs/buck_woody/archive/2010/03/15/what-to-leave-when-you-re-leaving.aspx</link><pubDate>Mon, 15 Mar 2010 14:09:00 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:23390</guid><dc:creator>BuckWoody</dc:creator><slash:comments>0</slash:comments><comments>http://sqlblog.com/blogs/buck_woody/comments/23390.aspx</comments><wfw:commentRss>http://sqlblog.com/blogs/buck_woody/commentrss.aspx?PostID=23390</wfw:commentRss><description>&lt;P&gt;There's already a post on&amp;nbsp;this topic - sort of. &lt;A href="http://www.mssqltips.com/tip.asp?tip=1960&amp;amp;utm_source=feedburner&amp;amp;utm_medium=feed&amp;amp;utm_campaign=Feed%3A+MSSQLTips-LatestSqlServerTips+%28MSSQLTips+-+Latest+SQL+Server+Tips%29" target=_blank&gt;I read this entry, where the author did a good job on a few&amp;nbsp;steps&lt;/A&gt;, but I found that a&amp;nbsp;few other tips might be useful, so if you want to check that one out and then this post, you might be able to put together your own plan for when you leave your job.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I once took over the system administrator (of which the Oracle and SQL Server servers were a part) at a mid-sized firm. The outgoing administrator had about a two-&amp;nbsp;week-long scheduled overlap with me, but was angry at the company and told me "hey, I know this is going to be hard on you, but I want them to know how important I was. I'm not telling you where anything is or what the passwords are. Good luck!" He then quit that day.&lt;/P&gt;
&lt;P&gt;It took me about three days to find all of the servers and crack the passwords. Yes, the company tried to take legal action against the guy and all that, but he moved back to his home country and so largely got away with it.&lt;/P&gt;
&lt;P&gt;Obviously, this isn't the way to leave a job. Many of us have changed jobs in the past, and most of us try to be very professional about the transition to a new team, regardless of the feelings about a particular company. I've been treated badly at a firm, but that is no reason to leave a mess for someone else. So here's what you should put into place at a&amp;nbsp;minimum before you go. Most of this is common sense - which of course isn't very common these days - and another good rule is just to ask yourself "what would I&amp;nbsp;want to know"?&lt;/P&gt;
&lt;P&gt;The article I referenced at the top of this post focuses on a lot of documentation of the systems. I think that's fine, but in actuality, I really don't need that. Even with this kind of documentation, I still perform&amp;nbsp;a full audit on the systems, so in the end I create my own system documentation. There are actually only&amp;nbsp;four big items I need to know to get started with the systems:&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;1. Where is everything/everybody?&lt;BR&gt;&lt;/STRONG&gt;The first thing I need to know is where all of the systems are. I mean not only the street address, but the closet or room, the rack number, the IU number in the rack, the SAN luns, all that. A picture here is worth a thousand words, which is why I really like Visio. It combines nice graphics, full text and all that. But use whatever you have to tell someone the physical locations of the boxes. Also, tell them the physical location of the folks in charge of those boxes (in case you aren't) or who share that responsibility. And by "where" in this case, I mean names and phones.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;STRONG&gt;2. What do they do?&lt;/STRONG&gt;&lt;BR&gt;For both the servers and the people, tell them what they do. If it's a database server, detail what each database does and what application goes to that, and who "owns" that application. In my mind, this is one of hte most important things a Data Professional needs to know. In the case of the other administrtors or co-owners, document each person's responsibilities.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;3. What are the credentials?&lt;/STRONG&gt;&lt;BR&gt;Logging on/in and gaining access to the buildings are things that the new Data Professional will need to do to successfully complete their job. This means service accounts, certificates, all of that. The first thing they should do, of course, is change the passwords on all that, but the first thing they need is the ability to do that!&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;4. What is out of the ordinary?&lt;BR&gt;&lt;/STRONG&gt;This is the most tricky, and perhaps the next most important thing to know. Did you have to use a "special" driver for that video card on server X? Is the person that co-owns an application with you mentally unstable (like me) or have special needs, like "don't talk to Buck before he's had coffee. Nothing will make any sense"? Do you have service pack requirements for a specific setup? Write all that down. Anything that took you a day or longer to make work is probably a candidate here.&lt;/P&gt;
&lt;P&gt;This is my short list - anything you care to add?&lt;/P&gt;&lt;img src="http://sqlblog.com/aggbug.aspx?PostID=23390" width="1" height="1"&gt;</description><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/Best+Practices/default.aspx">Best Practices</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></item><item><title>System Variables, Stored Procedures or Functions for Meta Data</title><link>http://sqlblog.com/blogs/buck_woody/archive/2010/03/11/system-variables-stored-procedures-or-functions-for-meta-data.aspx</link><pubDate>Thu, 11 Mar 2010 13:42:22 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:23190</guid><dc:creator>BuckWoody</dc:creator><slash:comments>0</slash:comments><comments>http://sqlblog.com/blogs/buck_woody/comments/23190.aspx</comments><wfw:commentRss>http://sqlblog.com/blogs/buck_woody/commentrss.aspx?PostID=23190</wfw:commentRss><description>&lt;p&gt;Whenever you want to know something about SQL Server’s configuration, whether that’s the Instance itself or a database, you have a few options.&lt;/p&gt;  &lt;p&gt;If you want to know “dynamic” data, such as how much memory or CPU is consumed or what a particular query is doing, you should be using the Dynamic Management Views (DMVs) that you can read about here: &lt;a href="http://msdn.microsoft.com/en-us/library/ms188754.aspx"&gt;http://msdn.microsoft.com/en-us/library/ms188754.aspx&lt;/a&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;But if you’re looking for how much memory is installed on the server, the version of the Instance, the drive letters of the backups and so on, you have other choices.&lt;/p&gt;  &lt;p&gt;The first of these are system variables. You access these with a SELECT statement, and they are useful when you need a discrete value for use, say in another query or to put into a table. You can read more about those here: &lt;a href="http://msdn.microsoft.com/en-us/library/ms173823.aspx"&gt;http://msdn.microsoft.com/en-us/library/ms173823.aspx&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;You also have a few stored procedures you can use. These often bring back a lot more data, pre-formatted for the screen. You access these with the EXECUTE syntax. It is a bit more difficult to take the data they return and get a single value or place the results in another table, but it is possible. You can read more about those here: &lt;a href="http://msdn.microsoft.com/en-us/library/ms187961.aspx"&gt;http://msdn.microsoft.com/en-us/library/ms187961.aspx&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Yet another option is to use a system function, which you access with a SELECT statement, which also brings back a discrete value that you can use in a test or to place in another table. You can read about those here: &lt;a href="http://msdn.microsoft.com/en-us/library/ms187812.aspx"&gt;http://msdn.microsoft.com/en-us/library/ms187812.aspx&lt;/a&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;By the way, many of these constructs simply query from tables in the &lt;strong&gt;master &lt;/strong&gt;or &lt;strong&gt;msdb &lt;/strong&gt;databases for the Instance or the &lt;em&gt;system tables&lt;/em&gt; in a user database. You can get much of the information there as well, and there are even system views in each database to show you the meta-data dealing with structure – more on that here: &lt;a href="http://msdn.microsoft.com/en-us/library/ms186778.aspx"&gt;http://msdn.microsoft.com/en-us/library/ms186778.aspx&lt;/a&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Some of these choices are the only way to get at a certain piece of data. But others overlap – you can use one or the other, they both come back with the same data. So, like many Microsoft products, you have multiple ways to do the same thing. And that’s OK – just research what each is used for and how it’s intended to be used, and you’ll be able to select (pun intended) the right choice. &lt;/p&gt;&lt;img src="http://sqlblog.com/aggbug.aspx?PostID=23190" width="1" height="1"&gt;</description><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/DBA/default.aspx">DBA</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Metadata/default.aspx">Metadata</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/Tips/default.aspx">Tips</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/T-SQL/default.aspx">T-SQL</category></item></channel></rss>