<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="https://www.w3.org/2005/Atom" xmlns:sy="https://purl.org/rss/1.0/modules/syndication/" xmlns:dc="https://purl.org/dc/elements/1.1/" xmlns:content="https://purl.org/rss/1.0/modules/content/" xmlns:wfw="https://wellformedweb.org/CommentAPI/" xmlns:slash="https://purl.org/rss/1.0/modules/slash/"
  version="2.0">
  <channel>
    <title>isilefe</title>
    <atom:link
      href="https://docs.microsoft.com/archive/blogs/isilefe/feed.xml"
      rel="self"
      type="application/rss+xml" />
    <link>https://docs.microsoft.com/archive/blogs/isilefe/feed.xml</link>
    <description />
    <lastBuildDate>Wed, 17 Apr 2019 04:07:01 GMT</lastBuildDate>
    <language>en-US</language>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <item>
      <title>how to collect data for troubleshooting SQL Servers via sqldiag</title>
      <link>https://docs.microsoft.com/archive/blogs/isilefe/how-to-collect-data-for-troubleshooting-sql-servers-via-sqldiag</link>
      <pubDate>Wed, 14 May 2014 14:48:00 GMT</pubDate>
      <dc:creator><![CDATA[isilefe]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/isilefe/2014/05/14/how-to-collect-data-for-troubleshooting-sql-servers-via-sqldiag/</guid>
      <description><![CDATA[Nowadays, I am reviewing the tools for troubleshooting SQL Servers since I will deliver a training...]]></description>
      <content:encoded><![CDATA[<p>Nowadays, I am reviewing the tools for troubleshooting SQL Servers since I will deliver a training in Dublin next week. While reviewing them, i would like to summarize them with a blog series. Now, first one is SQLDiag. SQLDiag is a general purpose diagnostics utility that can collect the following types of diagnostic information:</p>
<ul>
<li>
<p>Windows performance logs</p>
</li>
<li>
<p>Windows event logs</p>
</li>
<li>
<p>SQL Server Profiler traces</p>
</li>
<li>
<p>SQL Server blocking information</p>
</li>
<li>
<p>SQL Server configuration information</p>
</li>
</ul>
<p>It is a utility coming with SQL Server installation by default. And the default path for the exe file is&nbsp;C:\Program Files\Microsoft SQL Server\110\Tools\Binn for SQL 2012. For the first time please just run the exe to create necessary files and folders:</p>
<p><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/54/25/3581.1.JPG" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-54-25/3581.1.JPG" alt="" border="0" /></p>
<p>Wait until you see the green line and press Ctrl+C.</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/54/25/0207.2.JPG" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-54-25/0207.2.JPG"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/54/25/0207.2.JPG" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-54-25/0207.2.JPG" alt="" border="0" /></a></p>
<p>Under Binn folder, there is a new file created called SD_Detailed.xml which is used to configure which issues to collect. This file can be copied and the new file can be edited to keep the default configuration file as it is. I have just copied it and renamed the new file as SD_Detailed_test.xml. And just edited ShowPlan All event as true to be able to view query plans of the collected trace. Please be careful in your live systems with the expected <strong>performance impact</strong> of ShowPlan All event.&nbsp;</p>
<p><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/54/25/8154.3.JPG" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-54-25/8154.3.JPG" alt="" border="0" /></p>
<p>&nbsp;</p>
<p>The next step is running the sqldiag utility with the recently configured file properties. To be able to run SQLDiag with the new input file, I have used /I parameter. For the set of parameters please review:&nbsp;https://technet.microsoft.com/en-us/library/ms162833(v=sql.110).aspx&nbsp;</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/54/25/6165.4.JPG" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-54-25/6165.4.JPG"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/54/25/6165.4.JPG" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-54-25/6165.4.JPG" alt="" border="0" /></a></p>
<p>&nbsp;</p>
<p>It will ask you to overwrite the output folder, I have just type "Y" in my case. With the green line, it will warn you when it starts to collect data. I have run a workload here to have more meaningful data but in your live systems you will have already meaningful workloads :)&nbsp;</p>
<p>All collected data will be stored under&nbsp;C:\Program Files\Microsoft SQL Server\110\Tools\Binn\SQLDIAG folder:</p>
<p>--Files with .trc extensions are the sql profiler trace file giving information to analyze queries.</p>
<p>--Files with .blg extensions are the performance monitor files giving information about the configured performance counters.</p>
<p>--File with .log extention shows the error log information.</p>
<p>--File having "ms_info32.txt" in its name, shows system configuration information.</p>
<p>Now, we have collected many data to be analyzed, analyzing by eye and each file one by one could be an option of course however it could be a waste of time.&nbsp;</p>
<p>I will write about analyzing tools in my next blog posts. please hold the line :)&nbsp;</p>
<p>Işıl</p>]]></content:encoded>
    </item>
    <item>
      <title>Managing SQL Servers in multi-server environment via Central Management Server, Policy Management, Power Shell and Reporting Services - 4</title>
      <link>https://docs.microsoft.com/archive/blogs/isilefe/managing-sql-servers-in-multi-server-environment-via-central-management-server-policy-management-power-shell-and-reporting-services-4</link>
      <pubDate>Sun, 02 Mar 2014 06:18:00 GMT</pubDate>
      <dc:creator><![CDATA[isilefe]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/isilefe/2014/03/02/managing-sql-servers-in-multi-server-environment-via-central-management-server-policy-management-power-shell-and-reporting-services-4/</guid>
      <description><![CDATA[And now, our last blog post on these series. I will continue with another series on this topic. This...]]></description>
      <content:encoded><![CDATA[<p>And now, our last blog post on these series. I will continue with another series on this topic. This time with my custom scripts and custom reports. Just keep in touch J</p>
<p>We are going to visualize our results now. How? We are going to use Reporting Services. If you are not familiar please don&rsquo;t worry, just follow.</p>
<p>If you don&rsquo;t have reporting services installed, you should do it first.</p>
<p>BE CAREFUL, I am going to install it on central management server, but it is not a must.</p>
<p>I just run the sqlserver setup.exe and followed the usual steps until &ldquo;Installation Type&rdquo; dialog. On Installation Type dialog, please select add features and related instance:</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/54/25/3554.41.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-54-25/3554.41.png"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/54/25/3554.41.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-54-25/3554.41.png" alt="" border="0" /></a></p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/54/25/7457.42.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-54-25/7457.42.png"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/54/25/7457.42.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-54-25/7457.42.png" alt="" border="0" /></a></p>
<p>&nbsp;</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/54/25/0181.43.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-54-25/0181.43.png"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/54/25/0181.43.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-54-25/0181.43.png" alt="" border="0" /></a></p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/54/25/3426.44.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-54-25/3426.44.png"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/54/25/3426.44.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-54-25/3426.44.png" alt="" border="0" /></a></p>
<p><a href="https://msdn.microsoft.com/en-us/library/ms159624.aspx">https://msdn.microsoft.com/en-us/library/ms159624.aspx</a></p>
<p>The next step is configuring Reporting Services from Reporting Service Configuration Manager: <a href="https://technet.microsoft.com/en-us/library/ms159644(v=sql.105).aspx">https://technet.microsoft.com/en-us/library/ms159644(v=sql.105).aspx</a></p>
<p>After clicking https://ISILEFE03/80 /Reports, you should have a website like the one below:</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/54/25/6763.45.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-54-25/6763.45.png"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/54/25/6763.45.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-54-25/6763.45.png" alt="" border="0" /></a></p>
<p>&nbsp;</p>
<p>And now time is deploying reports. Under C:\Users\isilefe\Downloads\CodePlex 3.0.zip\CodePlex 3.0 folder, there exists 2Reporting folder. This is a bunch of rdl&rsquo;s wrapped as a project solution. After opening this solution via BIDS or Visual Studio, you should edit data source first:</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/54/25/8206.46.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-54-25/8206.46.png"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/54/25/8206.46.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-54-25/8206.46.png" alt="" border="0" /></a></p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/54/25/1830.47.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-54-25/1830.47.png"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/54/25/1830.47.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-54-25/1830.47.png" alt="" border="0" /></a></p>
<p>As a last step, we can deploy reports now. Firstly, we should edit the path of url under properties of project solution:</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/54/25/1321.48.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-54-25/1321.48.png"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/54/25/1321.48.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-54-25/1321.48.png" alt="" border="0" /></a></p>
<p>&nbsp;</p>
<p>And the just right click the PolicyReports solution name and click deploy.</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/54/25/3583.49.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-54-25/3583.49.png"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/54/25/3583.49.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-54-25/3583.49.png" alt="" border="0" /></a></p>
<p>&nbsp;</p>
<p>And now, we can check the reports from the browser:&nbsp;</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/54/25/3823.410.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-54-25/3823.410.png"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/54/25/3823.410.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-54-25/3823.410.png" alt="" border="0" /></a></p>
<p>And here is an example dashboard report where you can drill down to other reports and details of failed policies.</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/54/25/1512.411.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-54-25/1512.411.png"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/54/25/1512.411.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-54-25/1512.411.png" alt="" border="0" /></a></p>]]></content:encoded>
    </item>
    <item>
      <title>Managing SQL Servers in multi-server environment via Central Management Server, Policy Management, Power Shell and Reporting Services - 3</title>
      <link>https://docs.microsoft.com/archive/blogs/isilefe/managing-sql-servers-in-multi-server-environment-via-central-management-server-policy-management-power-shell-and-reporting-services-3</link>
      <pubDate>Sat, 01 Mar 2014 13:01:37 GMT</pubDate>
      <dc:creator><![CDATA[isilefe]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/isilefe/2014/03/01/managing-sql-servers-in-multi-server-environment-via-central-management-server-policy-management-power-shell-and-reporting-services-3/</guid>
      <description><![CDATA[Time is automating data collection now. It is nothing but just a SQL Server agent job. After going...]]></description>
      <content:encoded><![CDATA[<p>Time is automating data collection now. It is nothing but just a SQL Server agent job. After going through the usual steps while defining a SQL Agent job, the important thing is choosing &ldquo;PowerShell&rdquo; as type on &ldquo;New Job Step&rdquo; dialog.</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/54/25/5584.31.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-54-25/5584.31.png"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/54/25/5584.31.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-54-25/5584.31.png" alt="" border="0" /></a></p>
<p>And as a command you should type the same command as you configured before according to the instructions in my 2<sup>nd</sup> blog post in these series.</p>
<p>As a result you should have a dialog similar to the one below:</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/54/25/0434.32.jpg" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-54-25/0434.32.jpg"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/54/25/0434.32.jpg" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-54-25/0434.32.jpg" alt="" border="0" /></a></p>
<p>&nbsp;</p>
<p>And as a last step, please don&rsquo;t forget to define a schedule. I just configured it to run once a day except working hours.</p>
<p>Lastly, don&rsquo;t forget to test your job not to hit any syntax or permission issue.&nbsp;</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/54/25/0247.33.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-54-25/0247.33.png"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/54/25/0247.33.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-54-25/0247.33.png" alt="" border="0" /></a></p>]]></content:encoded>
    </item>
    <item>
      <title>Managing SQL Servers in multi-server environment via Central Management Server, Policy Management, Power Shell and Reporting Services - 2</title>
      <link>https://docs.microsoft.com/archive/blogs/isilefe/managing-sql-servers-in-multi-server-environment-via-central-management-server-policy-management-power-shell-and-reporting-services-2</link>
      <pubDate>Sat, 01 Mar 2014 12:51:00 GMT</pubDate>
      <dc:creator><![CDATA[isilefe]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/isilefe/2014/03/01/managing-sql-servers-in-multi-server-environment-via-central-management-server-policy-management-power-shell-and-reporting-services-2/</guid>
      <description><![CDATA[Collection of Evaluated Policies:
To collect results, firstly of course we need a database. But,...]]></description>
      <content:encoded><![CDATA[<p>Collection of Evaluated Policies:</p>
<p>To collect results, firstly of course we need a database. But, don&rsquo;t worry about that actually it is the easiest part since we have a ready script for that. The only thing you need to do is downloading EPMFramework from the link <a href="https://epmframework.codeplex.com/releases/view/28621">https://epmframework.codeplex.com/releases/view/28621</a> I haven&rsquo;t changed the default download path and have just gone to C:\Users\isilefe\Downloads\CodePlex 3.0.zip\CodePlex 3.0\0Setup Scripts and opened EPM_Create_Database_Objects.sql script.</p>
<p>And now, you should configure the variables below according to your environment.</p>
<p>:SETVAR ServerName "ISILEFE02" &ndash; ISILEFE02 is the name of central management server in my environment</p>
<p>:SETVAR ManagementDatabase "PSDatabase" &ndash; PSDatabase is the name of the database that I am going to use, it could be either and existing one or a new one, I just preferred a new one.</p>
<p>GO&nbsp;</p>
<p>After changing these two variables, you can run the script in SQL CMD mode.&nbsp;</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/54/25/7444.21.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-54-25/7444.21.png"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/54/25/7444.21.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-54-25/7444.21.png" alt="" border="0" /></a></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>Now, our database is ready to store the data.</p>
<p>The next step is collecting data:</p>
<p>It is also an easy step since we have a ready powershell script. Don&rsquo;t worry if you are not familiar with PowerShell, you can just review my blogpost <a href="https://blogs.msdn.com/b/isilefe/archive/2012/07/23/how-to-manage-your-sql-servers-with-powershell.aspx">https://blogs.msdn.com/b/isilefe/archive/2012/07/23/how-to-manage-your-sql-servers-with-powershell.aspx</a> to understand the logic better.</p>
<p>I could find the downloaded script under C:\Users\isilefe\Downloads\CodePlex 3.0.zip\CodePlex 3.0\1Down Version Evaluation PS. Firstly, you should edit this script in notepad, by declaring centralmanagement server name, database name. and also you should define a results directory.</p>
<p># Declare variables to define the central warehouse</p>
<p># in which to write the output, store the policies</p>
<p>$CentralManagementServer = "ISILEFE02"</p>
<p>$HistoryDatabase = "PSDatabase"</p>
<p># Define the location to write the results of the</p>
<p># policy evaluation.&nbsp; Delete any files in the directory.</p>
<p>$ResultDir = "c:\Results\"</p>
<p>And now, the thing to do is just going to SSMS and right click on your central management server name and choose StartPowershell to try if the script can be run successfully.</p>
<p>&nbsp;</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/54/25/1638.22.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-54-25/1638.22.png"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/54/25/1638.22.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-54-25/1638.22.png" alt="" border="0" /></a></p>
<p>&nbsp;</p>
<p>The script asks for configuration group and category filter as a parameter, to be able to run the script in all configuration groups and for all categories, I made a small edit in the &ldquo;parameters&rdquo; part as seen below:</p>
<p># Uses the Invoke-PolicyEvaluation Cmdlet</p>
<p>&nbsp;</p>
<p>#param([string]$ConfigurationGroup=$(Throw `</p>
<p>#"Paramater missing: -ConfigurationGroup ConfigGroup"),`</p>
<p>#[string]$PolicyCategoryFilter=$(Throw "Parameter missing: `</p>
<p>#-PolicyCategoryFilter Category"), `</p>
<p>#[string]$EvalMode=$(Throw "Parameter missing: -EvalMode EvalMode"))</p>
<p>&nbsp;</p>
<p>[string]$ConfigurationGroup=""</p>
<p>[string]$PolicyCategoryFilter=""</p>
<p>[string]$EvalMode="check"</p>
<p>&nbsp;</p>
<p>And now you can run the script without any parameters, if you would like to define categories and configuration group you can use the original script and run the script by passing parameters:</p>
<p>SL "C:\Users\isilefe\Downloads\CodePlex 3.0\CodePlex 3.0"</p>
<p>.\EPM_EnterpriseEvaluation_3.0.0.ps1 -ConfigurationGroup</p>
<p>After you press &ldquo;Enter&rdquo; you see informational text as below meaning that you successfully run your policies:</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/54/25/8233.Capture.JPG" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-54-25/8233.Capture.JPG"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/54/25/8233.Capture.JPG" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-54-25/8233.Capture.JPG" alt="" border="0" /></a></p>
<p>&nbsp;</p>
<p>And now, let&rsquo;s check if we have the data in our database. I have just run the scripts below on my central management server:</p>
<p>select * from PSDatabase.[policy].[v_PolicyHistory]</p>
<p>select * from PSDatabase.[policy].[v_PolicyHistory_LastEvaluation]</p>
<p>&nbsp;</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/54/25/4572.23.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-54-25/4572.23.png"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/54/25/4572.23.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-54-25/4572.23.png" alt="" border="0" /></a></p>
<p>&nbsp;</p>
<p>So far so good, I can see the results of evaluated policies for my both sql instances that I have registered under Central Management Server.</p>
<p>However, still not perfect J Why not?</p>
<p>Since I don&rsquo;t want to run policies each and every time manually. How to automate it? Please review my next blog post on this topic.</p>
<p>&nbsp;</p>]]></content:encoded>
    </item>
    <item>
      <title>Managing SQL Servers in multi-server environment via Central Management Server, Policy Management, Power Shell and Reporting Services - 1</title>
      <link>https://docs.microsoft.com/archive/blogs/isilefe/managing-sql-servers-in-multi-server-environment-via-central-management-server-policy-management-power-shell-and-reporting-services-1</link>
      <pubDate>Sat, 01 Mar 2014 11:25:00 GMT</pubDate>
      <dc:creator><![CDATA[isilefe]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/isilefe/2014/03/01/managing-sql-servers-in-multi-server-environment-via-central-management-server-policy-management-power-shell-and-reporting-services-1/</guid>
      <description><![CDATA[Nowadays, one of my trendy topics @my customers is multi server management. I will make a few blog...]]></description>
      <content:encoded><![CDATA[<p>Nowadays, one of my trendy topics @my customers is multi server management. I will make a few blog posts regarding on this topic. Firstly, even though it is very basic I will start with Central Management Server and Policy Based Management, and then merge them with Reporting Services. I will mainly refer <a href="https://epmframework.codeplex.com/">https://epmframework.codeplex.com/</a> during these series. After going through with those topics I am planning to go with my custom PowerShell scripts that I use to manage SQL Servers effectively in a multi- server environment.&nbsp;</p>
<p>Let&rsquo;s start with Central Management Server which is a feature coming with SQL 2008. <a href="https://technet.microsoft.com/en-us/library/bb934126(v=sql.100).aspx">https://technet.microsoft.com/en-us/library/bb934126(v=sql.100).aspx</a> (But don&rsquo;t worry if you still have SQL servers older than 2008. You can still register them under a central management server whose version is 2008. )</p>
<p>CMS is mainly used for running a query or a policy on more than one SQL Server instances at the same time. Registering is very straightforward in fact. Please just follow the steps below:</p>
<ol>
<li>In SQL Server Management Studio, on the&nbsp;<strong>View</strong>&nbsp;menu, click&nbsp;<strong>Registered Servers</strong>.</li>
<li>In Registered Servers, expand&nbsp;<strong>Database Engine</strong>, right-click&nbsp;<strong>Central Management Servers</strong>, point to&nbsp;<strong>New</strong>, and then click&nbsp;<strong>Central Management Servers</strong>.</li>
<li>In the&nbsp;<strong>New Server Registration</strong>&nbsp;dialog box, register the instance of SQL Server that you want to become the Central Management Server.</li>
<li>In Registered Servers, right-click the Central Management Server, point to&nbsp;<strong>New</strong>, and then click&nbsp;<strong>New Server Group</strong>. Type a group name and description, and then click&nbsp;<strong>OK</strong>.</li>
<li>In Registered Servers, right-click the Central Management Server group, and then click&nbsp;<strong>New Server Registration</strong>.</li>
<li>In the&nbsp;<strong>New Server Registration</strong>&nbsp;dialog box, register one or more instances of SQL Server that you want to become members of the server group.</li>
</ol>
<p>&nbsp;</p>
<p>After registering your central management server, you can register a group (for ex you can group according to versions) or you can directly register a SQL instance under your central management server. I have chosen the 2<sup>nd</sup> option and skipped 4 define above. As a result you should have sth like the one below:</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/54/25/0385.1.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-54-25/0385.1.png"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/54/25/0385.1.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-54-25/0385.1.png" alt="" border="0" /></a></p>
<p>BE CAREFUL that only Windows authentication is permitted.&nbsp;</p>
<p>And now, let&rsquo;s talk about Policy Based Management and then combine these two together. I am not going to go into detail with Policy Based Management Server, you can review the link for details. <a href="https://technet.microsoft.com/en-us/library/bb510667.aspx">https://technet.microsoft.com/en-us/library/bb510667.aspx</a></p>
<p>Let me give you an example,</p>
<p>Our policy: A database has a full backup since yesterday.</p>
<p>If you evaluate this policy against a SQL instance, if you have a database that you have full backup older than yesterday, then the policy will be evaluated.</p>
<p>You can check many things from data-file location to your db options with policies. You can write your own policies even with your custom script, however not to go away from our main topic I will work with standard policies coming with SQL Server installation. When you expand Management branch on SSMS, you have a branch called &ldquo;Policy Management&rdquo;. To be able to use standard policies we have to import first. Please review the screen shot below:&nbsp;</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/54/25/7318.2.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-54-25/7318.2.png"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/54/25/7318.2.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-54-25/7318.2.png" alt="" border="0" /></a></p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/54/25/1411.3.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-54-25/1411.3.png"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/54/25/1411.3.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-54-25/1411.3.png" alt="" border="0" /></a></p>
<p>After importing the policy, we can now evaluate it and see the results.</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/54/25/1325.4.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-54-25/1325.4.png"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/54/25/1325.4.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-54-25/1325.4.png" alt="" border="0" /></a></p>
<p>&nbsp;</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/54/25/6648.5.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-54-25/6648.5.png"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/54/25/6648.5.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-54-25/6648.5.png" alt="" border="0" /></a></p>
<p>&nbsp;</p>
<p>So far so good, right? But what if I have dozens of SQL instances and I want to evaluate a policy on all SQL instances at the same time?</p>
<p>Now, it is time to combine CMS and Policy Based Management together:</p>
<p>Just right click Registered Servers &gt; Central Management Server &gt; ISILEFE02 and then click import policies:</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/54/25/5584.6.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-54-25/5584.6.png"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/54/25/5584.6.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-54-25/5584.6.png" alt="" border="0" /></a></p>
<p>And import &ldquo;Last Successful Backup Date&rdquo; policy:</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/54/25/1665.7.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-54-25/1665.7.png"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/54/25/1665.7.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-54-25/1665.7.png" alt="" border="0" /></a></p>
<p>&nbsp;</p>
<p>And here you go, just evaluate it and see your results on all SQL instances under your Central Management Server!</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/54/25/8867.8.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-54-25/8867.8.png"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/54/25/8867.8.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-54-25/8867.8.png" alt="" border="0" /></a></p>
<p>&nbsp;</p>
<p>OK so far so good but still not perfect. Why not?</p>
<p>We can view the results by run time, what if we collected the results in a database regularly by a scheduled agent job and view the results via reports. It would be great, right?</p>
<p>And it is not that much work, please review my next blog post in this series.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>]]></content:encoded>
    </item>
    <item>
      <title>differences between quorum models in windows 2003, 2008, 2008R2, 2012 and 2012 R2</title>
      <link>https://docs.microsoft.com/archive/blogs/isilefe/differences-between-quorum-models-in-windows-2003-2008-2008r2-2012-and-2012-r2</link>
      <pubDate>Wed, 26 Feb 2014 01:47:00 GMT</pubDate>
      <dc:creator><![CDATA[isilefe]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/isilefe/2014/02/26/differences-between-quorum-models-in-windows-2003-2008-2008r2-2012-and-2012-r2/</guid>
      <description><![CDATA[In this blog post, the differences between the quorum models for Windows Server Clusters 2003, 2008,...]]></description>
      <content:encoded><![CDATA[<p>In this blog post, the differences between the quorum models for Windows Server Clusters 2003, 2008, 2008R2, 2012 and 2012 R2 will be clarified.</p>
<p>The basic idea of a server cluster is physical servers acting as a virtual server, so &nbsp;it is critical that each of the physical servers have a consistent view of how the cluster is configured. Quorum acts as a definitive repository for the configuration information of physical clusters. When network problems occur, they can interfere with communication between cluster nodes. A small set of nodes might be able to communicate together across a functioning part of a network but not be able to communicate with a different set of nodes in another part of the network. In that case, the quorum is used to guarantee that any cluster resource is only brought online on only one node.</p>
<p>&nbsp;</p>
<p>In other words, the quorum configuration determines the number of failures that the cluster can sustain. If an additional failure occurs, the cluster must stop running. The relevant failures in are failures of nodes or, in some cases, of a&nbsp;<em>disk witness</em>&nbsp;(which contains a copy of the cluster configuration) or&nbsp;<em>file share witness</em>. It is essential that the cluster stop running if too many failures occur or if there is a problem with communication between the cluster nodes.</p>
<p>&nbsp;</p>
<p><strong>Windows 2003 : </strong></p>
<p><strong><em>&nbsp;</em></strong></p>
<p><strong><em>Local Quorum:</em></strong> This cluster model is for clusters that consist of only one node. This model is also referred to as a local quorum. It is typically used for:</p>
<ul>
<li>Deploying dynamic file shares on a single cluster node, to ease home directory deployment and administration.</li>
<li>Testing.</li>
<li>Development.</li>
</ul>
<p>&nbsp;</p>
<p><strong><em>Standard Quorum:</em></strong> A standard quorum uses a quorum log file that is located on a disk hosted on a shared storage interconnect that is accessible by all members of the cluster. In this configuration, quorum disk should be online in order to provide cluster to be online.</p>
<p>&nbsp;</p>
<p>The following diagram is an example of standard quorum for a 4-node cluster, referencing <a href="https://technet.microsoft.com/en-us/library/cc779076(v=ws.10).aspx">https://technet.microsoft.com/en-us/library/cc779076(v=ws.10).aspx</a></p>
<p>&nbsp;</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/54/25/8726.test.gif" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-54-25/8726.test.gif"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/54/25/8726.test.gif" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-54-25/8726.test.gif" alt="" border="0" /></a>,</p>
<p>&nbsp;</p>
<p><strong><em>Majority Node Set:</em></strong>&nbsp; For this type, the data is actually stored by default on the system disk of each member of the cluster. The MNS resource takes care to ensure that the cluster configuration data stored on the MNS is kept consistent across the different disks. The cluster service itself will only start up and therefore bring resources online if a majority of the nodes configured as part of the cluster are up and running the cluster service.</p>
<p>&nbsp;</p>
<p>The number of nodes is important to decide which model to use, for example for a 2-node failover cluster, MNS model is not recommended since when one of the nodes is unavailable it will cause the cluster to be offline. For a 2-node cluster, standard quorum model is recommended.</p>
<p>&nbsp;</p>
<p>Note that MNS only removes the requirement for shared disk only for the quorum requirement, for example if you are using SQL Server Failover Cluster you still require shared storage to keep data. <strong></strong></p>
<p><strong>&nbsp;</strong></p>
<p><strong>Window 2008 &ndash; Windows 2008 R2:</strong></p>
<p>&nbsp;</p>
<p>Note that for Windows 2003 clusters either each node can have a vote, and if majority of nodes are online, cluster will sustain or a shared disk can be used to decide if the cluster will sustain or not.. &nbsp;</p>
<p>&nbsp;</p>
<p>For Windows 2008-Windows 2008 R2 cluster, standard quorum model is still an option, as listed no majority- disk only below. Other options are based on providing majority of votes. For the quorum configuration, each node, shared disk or a file share can have a vote. And as best practice, it is recommended to have an odd number nodes in total, for example if you have 5 nodes, node majority is recommended, however if you have 4 nodes it is not a good idea to use node majority since total number of votes is four and when 2 nodes are unavailable, the cluster will stop. If you use 1 more vote (could be a shared disk), then the cluster will sustain for 2 nodes failure since 2 nodes + 1 shared disk will have totally 3 votes which is enough to sustain cluster.</p>
<p>&nbsp;</p>
<p>All modes for Windows 2008 clusters can be summarized as below referencing <a href="https://technet.microsoft.com/en-us/library/cc731739.aspx#BKMK_how">https://technet.microsoft.com/en-us/library/cc731739.aspx#BKMK_how</a>.</p>
<p><strong><em>&nbsp;</em></strong></p>
<p><strong><em>Node Majority</em></strong>&nbsp;(recommended for clusters with an odd number of nodes)</p>
<p>Can sustain failures of half the nodes (rounding up) minus one. For example, a seven node cluster can sustain three node failures.</p>
<p><strong><em>Node and Disk Majority</em></strong>&nbsp;(recommended for clusters with an even number of nodes)</p>
<p><br /> Can sustain failures of half the nodes (rounding up) if the disk witness remains online. For example, a six node cluster in which the disk witness is online could sustain three node failures.<br /> <br /> Can sustain failures of half the nodes (rounding up) minus one if the disk witness goes offline or fails. For example, a six node cluster with a failed disk witness could sustain two (3-1=2) node failures.</p>
<p>&nbsp;</p>
<p><strong><em>Node and File Share Majority</em></strong>&nbsp;(for clusters with special configurations)</p>
<p><br /> Works in a similar way to Node and Disk Majority, but instead of a disk witness, this cluster uses a file share witness.<br /> <br /> Note that if you use Node and File Share Majority, at least one of the available cluster nodes must contain a current copy of the cluster configuration before you can start the cluster. Otherwise, you must force the starting of the cluster through a particular node. For more information, see "Additional considerations" in&nbsp;<a href="https://technet.microsoft.com/en-us/library/cc771742.aspx">Start or Stop the Cluster Service on a Cluster Node</a>.</p>
<p>&nbsp;</p>
<p><strong><em>No Majority: Disk Only</em></strong>&nbsp;(not recommended)</p>
<p>Can sustain failures of all nodes except one (if the disk is online). However, this configuration is not recommended because the disk might be a single point of failure.</p>
<p><strong>&nbsp;</strong></p>
<p><strong>Node Vote Assignment Enhancement: </strong>By default, all nodes are assigned votes. With the hotfix <a href="https://support.microsoft.com/kb/2494036">https://support.microsoft.com/kb/2494036</a> for Windows 2008 and Windows 2008 R2, removing vote of a node is an option to choose as an advanced quorum option. All nodes continue to function in the cluster, receive cluster database updates, and can host applications either it has vote or not.</p>
<p>In certain disaster recovery scenarios, it may be required to remove votes from nodes. &nbsp;For example, in a multisite cluster, you could remove votes from the nodes in a backup site so that those nodes do not affect quorum calculations. This configuration is recommended only for manual failover across sites.&nbsp;</p>
<p>In Windows 2008 and Windows 2008R2, removing vote from nodes is only possible with powershell commands as described in hotfix article above.</p>
<p>Note that Node vote assignment is not recommended to enforce an odd number of voting nodes. Instead, a disk witness or file share witness should be configured.</p>
<p><strong>&nbsp;</strong></p>
<p><strong>Windows 2012:</strong></p>
<p>The quorum models are the same in Windows 2012 like Windows 2008 R2, however there are enhancements with Node Vote Assignment and there is a new concept called as &ldquo;Dynamic Quorum Configuration&rdquo;.&nbsp;</p>
<p>&nbsp;</p>
<p><strong><em>Node Vote Assignment Enhancement:</em></strong></p>
<p>Node vote assignment could be done only with Powershell commands in Windows 2008 or 2008 R2. Starting with Windows 2012, it can be done via Failover Cluster Manager:</p>
<p>&nbsp;</p>
<p><strong><em>Dynamic Quorum Configuration:</em></strong></p>
<p>Starting Windows Server 2012, there is a new concept called dynamic quorum configuration. This concept is based on node vote assignment, specifically it relies on the fact that cluster can manage node vote assignment automatically based on the state of each node. &nbsp;Votes are automatically removed from nodes that leave active cluster membership, and a vote is automatically assigned when a node rejoins the cluster. By default, dynamic quorum management is enabled.</p>
<p>This is a huge improvement as it is possible to continue to run a cluster even if the number of nodes remaining in the cluster is less than 50%.</p>
<p>By dynamic quorum configuration, quorum is calculated according to majority of active nodes since the nodes that are unavailable has no votes. With dynamic quorum management, it is also possible for a cluster to run on the last surviving cluster node.</p>
<p>With <a href="https://technet.microsoft.com/library/hh847268.aspx">Get-ClusterNode</a>&nbsp;Windows PowerShell cmdlet, it can be determined if a node has vote or not. A value of 0 indicates that the node does not have a quorum vote. A value of 1 indicates that the node has a quorum vote.</p>
<p>The vote assignment for all cluster nodes can be verified by using the&nbsp;<strong>Validate Cluster Quorum</strong>&nbsp;validation test.</p>
<p><strong>Note that </strong>the vote of a node is removed expilicitly, the cluster cannot dynamically add or remove that vote.</p>
<p><strong>Note that</strong> if you have 2 remaining nodes, the cluster will sustain with a possibility of&nbsp; %50&nbsp; or will go down with a possibility of&nbsp; %50. (randomly chosen) This drawback has been resolved in Windows 2012 R2, see in <strong><em>Dynamic Witness</em></strong><strong><em> </em></strong>part.</p>
<p><strong><em>&nbsp;</em></strong></p>
<p><strong>Windows 2012 R2:</strong></p>
<p>In Windows 2012 R2 there are new enhancements on top of node vode assignment and dynamic quorum configuration.<em></em></p>
<p><strong><em>Quorum Userinterface Improvement:</em></strong></p>
<p>The assigned node vote values can be seen from UI starting with Windows Server 2012 R2:</p>
<p>&nbsp;</p>
<p><strong><em>Dynamic Quorum Enhancements: </em></strong></p>
<ol>
<li><strong><em>1.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </em></strong><strong><em>Force Quorum Resiliency:</em></strong></li>
</ol>
<p>If there is a partitioned cluster in Windows Server 2012, after connectivity is restored, you must manually restart any partitioned nodes that are not part of the forced quorum subset with the&nbsp;<strong>/pq</strong>&nbsp;switch to prevent quorum. Ideally, you should do this as quickly as possible.</p>
<p>In Windows Server 2012 R2, both sides have a view of cluster membership and they will automatically reconcile when connectivity is restored. The side that you started with force quorum is deemed authoritative and the partitioned nodes automatically restart with the&nbsp;<strong>/pq</strong>&nbsp;switch to prevent quorum.</p>
<p>&nbsp;</p>
<ol>
<li><strong><em>2.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </em></strong><strong><em>Dynamic Witness: </em></strong></li>
</ol>
<p>In Windows Server 2012 R2, the cluster is configured to use dynamic quorum configuration by default, in addition to that, the witness vote is also dynamically adjusted based on the number of voting nodes in current cluster membership. If there are an odd number of votes, the quorum witness does not have a vote. If there is an even number of votes, the quorum witness has a vote. The quorum witness vote is also dynamically adjusted based on the state of the witness resource. If the witness resource is offline or failed, the cluster sets the witness vote to "0."</p>
<p>&nbsp;</p>
<p>Dynamic witness significantly reduces the risk that the cluster will go down because of witness failure. The cluster decides whether to use the witness vote based on the number of voting nodes that are available in the cluster.</p>
<p>&nbsp;</p>
<p>Note that if you have 2 remaining nodes in a cluster in Windows 2012, if 1 node is unavailable the cluster will be online with %50 possibility. With starting Windows 2012 R2, it is guaranteed to sustain cluster by the help of&nbsp; &ldquo;dynamic witness&rdquo; concept.</p>
<p>&nbsp;</p>
<p>This change also greatly simplifies quorum witness configuration. You no longer have to determine whether to configure a quorum witness because the recommendation in Windows Server 2012 R2 is to always configure a quorum witness. The cluster automatically determines when to use it.</p>
<p>&nbsp;</p>
<ol>
<li><strong><em>3.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </em></strong><strong><em>Tie-breaker for %50 Node Split: </em></strong></li>
</ol>
<p><strong><em>&nbsp;</em></strong>Referencing : <a href="https://technet.microsoft.com/en-us/library/dn265972.aspx#BKMK_FQ">https://technet.microsoft.com/en-us/library/dn265972.aspx#BKMK_FQ</a></p>
<p>&nbsp;</p>
<p>Starting with Windows 2012 R2,&nbsp; a cluster can dynamically adjust a running node's vote to keep&nbsp;&nbsp; the total number of votes at an odd number. This functionality works seamlessly with dynamic witness. To maintain an odd number of votes, a cluster will first adjust the quorum witness vote through dynamic witness. However, if a quorum witness is not available, the cluster can adjust a node's vote. For example:</p>
<ol start="1">
<li>You have a six node cluster with a file share witness. The cluster stretches across two sites with three nodes in each site. The cluster has a total of seven votes.</li>
<li>The file share witness fails. Because the cluster uses dynamic witness, the cluster automatically removes the witness vote. The cluster now has a total of six votes.</li>
<li>To maintain an odd number of votes, the cluster randomly picks a node to remove its quorum vote. One site now has two votes, and the other site has three.</li>
<li>A network issue disrupts communication between the two sites. Therefore, the cluster is evenly split into two sets of three nodes each. The partition in the site with two votes goes down. The partition in the site with three votes continues to function.</li>
</ol>
<p>&nbsp;</p>
<ul>
<li>In Windows Server 2012, in the scenario above both sides will go down if there is a 50% split where neither site has quorum, both sides will go down.</li>
<li>In Windows Server 2012 R2, <strong>LowerQuorumPriorityNodeID</strong>&nbsp;cluster common property can be assigned to a cluster node in the secondary site so that the primary site stays running. Set this property on only one node in the site.</li>
</ul>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>]]></content:encoded>
    </item>
    <item>
      <title>how to find long-running queries and send as an email</title>
      <link>https://docs.microsoft.com/archive/blogs/isilefe/how-to-find-long-running-queries-and-send-as-an-email</link>
      <pubDate>Mon, 24 Feb 2014 13:51:00 GMT</pubDate>
      <dc:creator><![CDATA[isilefe]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/isilefe/2014/02/24/how-to-find-long-running-queries-and-send-as-an-email/</guid>
      <description><![CDATA[Long running queries for SQL Server can cause many problems and it is deadly important to find them...]]></description>
      <content:encoded><![CDATA[<p>Long running queries for SQL Server can cause many problems and it is deadly important to find them and to be informed when something goes wrong. Let's assume that we would like to tune queries lasting more than 60 seconds. We will pass duration as a parameter and you can adapt it to your environment as you wish. The T-SQL script below gets @duration as a parameter choosing the oldest active query running. And if the oldest one is running for more than 60 secs, it lists all the queries running longer than 60 secs.</p>
<pre class="scroll"><code class="mysql"><br /> declare @minstarttime datetime<br /> declare @duration int<br /> select @minstarttime=min(start_time) from sys.dm_exec_requests where session_id&gt;50<br /> --select getdate()<br /> --select @minstarttime<br /> select @duration=datediff (s, @minstarttime, getdate())<br /> --select @duration<br /> if(@duration &gt; 60)<br /> select r.session_id, t.text, x.login_name, x.program_name, datediff(s, start_time, getdate()) as durationSec, p.query_plan<br /> --cross apply sys.dm_exec_sql_text (sql_handle)<br /> from sys.dm_exec_requests r with (nolock) <br /> cross apply sys.dm_exec_sql_text(sql_handle) t <br /> cross apply sys.dm_exec_query_plan(plan_handle) p <br /> inner join sys.dm_exec_sessions x on r.session_id = x.session_id <br /> inner join sys.dm_exec_connections c on c.session_id = x.session_id <br /> where datediff(s, start_time, getdate()) &gt; 60<br /> order by datediff(s, start_time, getdate()) desc</code></pre>
<pre class="scroll"><code class="mysql"><br /></code></pre>
<p class="scroll">If you have queries running more than 60 secs, the result will be sth similar to the below:</p>
<p class="scroll"><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/54/25/0741.Capture.JPG" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-54-25/0741.Capture.JPG"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/54/25/0741.Capture.JPG" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-54-25/0741.Capture.JPG" alt="" border="0" /></a></p>
<p class="scroll">After configuring DB mail, you can run a script which is similar to below in every 60 seconds via SQL Agent job, and then you will be alarmed if you have queries running longer than 60 seconds, that's all!</p>
<p class="scroll">Within the script, sp_send_dbmail stored procedure is used to send an email. With @tableHTML variable, the T-SQL script is used to detect queries running more than 60 seconds and @recipients variable shows the recipient email address.</p>
<pre class="scroll"><code class="mysql">declare @minstarttime datetime<br /> declare @duration int<br /> select @minstarttime=min(start_time) from sys.dm_exec_requests where session_id&gt;50<br /> select @duration=datediff (s, @minstarttime, getdate())<br /> <br /> if(@duration &gt; 60)<br /> begin<br /> declare @tableHTML NVARCHAR(MAX) <br /> SET @tableHTML =<br /> N'Hello;&lt;br/&gt;&lt;br/&gt; On the X server, queries running longer than 60 seconds:&lt;br/&gt;'+<br /> N'&lt;table style="border-collapse:collapse;font-size:10pt;white-space:nowrap;" border="1" cellpadding="10"&gt;' +<br /> N'&lt;tr bgcolor="#D6D9E0"&gt;&lt;td&gt;session_id&lt;/td&gt;&lt;td&gt;login_name&lt;/td&gt;&lt;td&gt;sql_text&lt;/td&gt;&lt;td&gt;program_name&lt;/td&gt;&lt;td&gt;Second_Duration&lt;/td&gt;' +<br /> N'&lt;td&gt;query_plans&lt;/td&gt;&lt;/tr&gt;' +<br /> CAST ( ( select <br /> td = r.session_id,'',<br /> td = x.login_name,'',<br /> td = t.text,'',<br /> td = x.program_name,'',<br /> td = datediff(s, start_time, getdate()),'',<br /> td = p.query_plan,''<br /> from sys.dm_exec_requests r with (nolock) <br /> cross apply sys.dm_exec_sql_text(sql_handle) t <br /> cross apply sys.dm_exec_query_plan(plan_handle) p <br /> inner join sys.dm_exec_sessions x on r.session_id = x.session_id <br /> inner join sys.dm_exec_connections c on c.session_id = x.session_id <br /> where datediff(s, start_time, getdate()) &gt; 60<br /> order by datediff(s, start_time, getdate()) desc<br /> FOR XML PATH('tr'), TYPE ) AS NVARCHAR(MAX) ) + N'&lt;/table&gt;' ;<br /> <br /> EXEC msdb.dbo.sp_send_dbmail<br /> @recipients = 'recipient@xmail.com',<br /> @subject = 'Queries Running Longer Than 60 Seconds',<br /> @body = @tableHTML,<br /> @importance = 'HIGH',<br /> @body_format = 'HTML' ; <br /> <br /> <br /> end<br /> <br /> <br /> </code></pre>]]></content:encoded>
    </item>
    <item>
      <title>checking the status of SQL services and databases on multiserver environment</title>
      <link>https://docs.microsoft.com/archive/blogs/isilefe/checking-the-status-of-sql-services-and-databases-on-multiserver-environment</link>
      <pubDate>Tue, 21 Jan 2014 01:09:00 GMT</pubDate>
      <dc:creator><![CDATA[isilefe]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/isilefe/2014/01/21/checking-the-status-of-sql-services-and-databases-on-multiserver-environment/</guid>
      <description><![CDATA[If you have only one SQL Server to check, it is quite straightforward to check the status of...]]></description>
      <content:encoded><![CDATA[<p>If you have only one SQL Server to check, it is quite straightforward to check the status of services and databases. When you have dozens of SQL servers, I am sure you don&rsquo;t want to spend several hours just for a basic control.&nbsp; To monitor the SQL services (SQL server service and SQL agent service, you can also add Integration, Analysis and Reporting Services if you need) and databases on multiserver environment, I have written a PowerShell script and will explain the steps briefly.</p>
<p>I will create this demo on SQL 2012 SP1 running on Windows 8.1. As a prerequisite, I will set PowerShell execution policy to RemoteSigned with the script:</p>
<pre class="scroll"><strong><span style="color: #003366;"><code class="mysql">Set-ExecutionPolicy RemoteSigned</code></span></strong></pre>
<p>Firstly I will create 3 txt files called <em>AllServers.txt, status.txt</em> and <em>status_error.txt</em> under the path <em>C:\control_scripts</em> as shown below:</p>
<p>&nbsp;&nbsp;<img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/54/25/2816.1.jpg" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-54-25/2816.1.jpg" alt="" border="0" /></p>
<p><em>Status.txt</em> and <em>status_error.txt</em> files will be empty. In <em>AllServes.txt</em> file, there will be list of servers you want to monitor. Please write the host names which SQL Servers are running on. As a test environment, I am using only one server, but will write the hostname two times to confirm that my code can be run on multiserver environment:</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/54/25/5342.2.jpg" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-54-25/5342.2.jpg"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/54/25/5342.2.jpg" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-54-25/5342.2.jpg" alt="" border="0" /></a></p>
<p>Now, it is time to write the PowerShell script:</p>
<p>I will write the code in 3 basic parts, the first part of the code is a function which get all SQL instances for a server. The second part of the code will monitor SQL services and the last part will monitor the databases for all servers.</p>
<pre class="scroll"><code class="mysql"><strong><span style="color: #008000;">#Here is the first part of the code, referring PowerShell magazine here: </span></strong><br /><strong><span style="color: #008000;"> #https://www.powershellmagazine.com/2013/08/06/pstip-retrieve-all-sql-instance-names-on-local-and-remote-computers </span></strong><br /><strong><span style="color: #008000;"> #I will use this function in the 3rd part of the code to access the SQL instances to be able to check database status.</span></strong><br /> <br /> <strong><span style="color: #000000;">Function Get-SQLInstance {</span></strong><br /> <br /><strong><span style="color: #000000;"> param (</span></strong><br /><strong><span style="color: #000000;"> [string]$ComputerName = $env:COMPUTERNAME,</span></strong><br /><strong><span style="color: #000000;"> [string]$InstanceName</span></strong><br /><strong><span style="color: #000000;"> )</span></strong><br /> <br /> <br /><strong><span style="color: #000000;"> try {</span></strong><br /><strong><span style="color: #000000;"> $reg = [Microsoft.Win32.RegistryKey]::OpenRemoteBaseKey('LocalMachine', $ComputerName)</span></strong><br /><strong><span style="color: #000000;"> $regKey= $reg.OpenSubKey("SOFTWARE\\Microsoft\\Microsoft SQL Server\\Instance Names\\SQL" )</span></strong><br /><strong><span style="color: #000000;"> $instances = $regkey.GetValueNames()</span></strong><br /> <br /><strong><span style="color: #000000;"> if ($InstanceName) {</span></strong><br /><strong><span style="color: #000000;"> if ($instances -contains $InstanceName) {</span></strong><br /><strong><span style="color: #000000;"> return $true</span></strong><br /><strong><span style="color: #000000;"> } else {</span></strong><br /><strong><span style="color: #000000;"> return $false</span></strong><br /><strong><span style="color: #000000;"> }</span></strong><br /><strong><span style="color: #000000;"> } else {</span></strong><br /><strong><span style="color: #000000;"> $instances</span></strong><br /><strong><span style="color: #000000;"> }</span></strong><br /><strong><span style="color: #000000;"> }</span></strong><br /><strong><span style="color: #000000;"> catch {</span></strong><br /><strong><span style="color: #000000;"> Write-Error $_.Exception.Message</span></strong><br /><strong><span style="color: #000000;"> return $false</span></strong><br /><strong><span style="color: #000000;"> }</span></strong><br /><strong><span style="color: #000000;"> } </span></strong><br /> <br /><strong><span style="color: #008000;"> #I am getting the list of all SQL Servers with the following code:</span></strong></code></pre>
<pre class="scroll"><code class="mysql"><strong></strong><span style="color: #008000;"><strong><br /></strong></span><strong><span style="color: #000000;"> $servers = @(get-content "C:\control_scripts\AllServers.txt" -TotalCount 2)</span></strong><br /> <br /><strong><span style="color: #008000;"> #The code below is doing nothing but just defining columns of the output table:</span></strong><br /> <br /> <span style="color: #000000;"><strong>$SrvcName =@{label="Service Name" ;alignment="left" ;width=20 ;Expression={$_.Name};};</strong></span><br /><span style="color: #000000;"><strong> $SrvcMode =@{label="Start Mode" ;alignment="left" ;width=20 ;Expression={$_.StartMode};};</strong></span><br /><span style="color: #000000;"><strong> $SrvcState =@{label="State" ;alignment="left" ;width=20 ;Expression={$_.State};};</strong></span><br /><span style="color: #000000;"><strong> $SrvcMsg =@{label="Message" ;alignment="left" ;width=30 ; `</strong></span><br /><span style="color: #000000;"><strong> Expression={ if ($_.State -ne "Running") {"Alarm: Stopped"} else {"OK"} };};</strong></span><br /><br /> <span style="color: #008000;"><strong>#Here is what I am doing the basic job, With the help of Get-WmiObject cmdlet I am getting the status information of </strong></span><br /><span style="color: #008000;"><strong> #SQL Server services and SQL Agent services. And with a simple for loop, I am getting start mode, state and status information.</strong></span><br /> <br /><strong> <span style="background-color: #ffffff;">foreach($server in $servers)</span></strong><br /><strong><span style="background-color: #ffffff;"> {</span></strong><br /> <br /><strong><span style="background-color: #ffffff;"> $srvc = Get-WmiObject `</span></strong><br /><strong><span style="background-color: #ffffff;"> -query "SELECT * </span></strong><br /><strong><span style="background-color: #ffffff;"> FROM win32_service </span></strong><br /><strong><span style="background-color: #ffffff;"> WHERE name LIKE '%MSSQL%' </span></strong><br /><strong><span style="background-color: #ffffff;"> OR name LIKE '%SQLAgent%'" `</span></strong><br /><strong><span style="background-color: #ffffff;"> -computername $server `</span></strong><br /><strong><span style="background-color: #ffffff;"> | Sort-Object -property name;</span></strong><br /> <br /><strong><span style="background-color: #ffffff;"> Write-Output ("Server: {0}" -f $server);</span></strong><br /><strong><span style="background-color: #ffffff;"> Write-Output $srvc | Format-Table $SrvcName, $SrvcMode, $SrvcState, $SrvcMsg; </span></strong><br /><strong><span style="background-color: #ffffff;"> }</span></strong><br /> <strong><span style="color: #008000;">#Here is the last part of the code, the outer loop is for all servers, and the inner one is for all instances.</span></strong><br /> <br /><strong><span style="background-color: #ffffff; color: #000000;"> foreach($server in $servers)</span></strong><br /><strong><span style="background-color: #ffffff; color: #000000;"> {</span></strong><br /><strong><span style="background-color: #ffffff; color: #000000;"> $insts= Get-SQLInstance -ComputerName $server</span></strong><br /> <br /> <br /><strong><span style="background-color: #ffffff; color: #000000;"> foreach($inst in $insts)</span></strong><br /><strong><span style="background-color: #ffffff; color: #000000;"> {</span></strong><br /> <br /><span style="color: #008000;"> <strong>#customizing the result of the function here</strong></span><br /> <br /> <span style="color: #000000;"><strong>$sqlinst =if ($inst -eq "MSSQLSERVER") {"$server"} else {"$server\$inst"};</strong></span><br /> <br /><strong><span style="color: #008000;"> #T-SQL code checks the status of DBs, if all is ONLINE; then it returns OK; #if not it lists the offline DBs</span></strong><br /> <br /> <span style="color: #000000;"><strong>$q = "declare @offline table</strong></span><br /><span style="color: #000000;"><strong> (instname varchar(20),</strong></span><br /><span style="color: #000000;"><strong> dbname sysname,</strong></span><br /><span style="color: #000000;"><strong> status varchar(20))</strong></span><br /> <br /><span style="color: #000000;"><strong> declare @query varchar(max)</strong></span><br /><span style="color: #000000;"><strong> declare @all int</strong></span><br /><span style="color: #000000;"><strong> select @all = count(name) from sys.databases</strong></span><br /><span style="color: #000000;"><strong> --select @all</strong></span><br /><span style="color: #000000;"><strong> declare @online int</strong></span><br /><span style="color: #000000;"><strong> select @online = count(name) from sys.databases where state=0</strong></span><br /><span style="color: #000000;"><strong> --select @online</strong></span><br /><span style="color: #000000;"><strong> if ( @online = @all)</strong></span><br /><span style="color: #000000;"><strong> begin</strong></span><br /> <br /><span style="color: #000000;"><strong> set @query='select @@servername as instname, ''all DBs'' as dbname, ''OK'' as status '</strong></span><br /><span style="color: #000000;"><strong> insert into @offline</strong></span><br /><span style="color: #000000;"><strong> exec (@query)</strong></span><br /> <br /> <br /><span style="color: #000000;"><strong> select getdate() as datetime, * from @offline</strong></span><br /><span style="color: #000000;"><strong> end</strong></span><br /><span style="color: #000000;"><strong> else </strong></span><br /><span style="color: #000000;"><strong> begin</strong></span><br /> <br /> <br /><span style="color: #000000;"><strong> set @query = 'select @@servername as instname, name as db_name, state_desc from sys.databases where state&lt;&gt;0'</strong></span><br /> <br /><span style="color: #000000;"><strong> insert into @offline</strong></span><br /><span style="color: #000000;"><strong> exec (@query)</strong></span><br /> <br /> <br /><span style="color: #000000;"><strong> select getdate() as datetime, * from @offline</strong></span><br /><span style="color: #000000;"><strong> end" </strong></span><br /> <br /> <br /> <strong><span style="color: #008000;">#Invoke-SQLcmd cmdlet is used to run a query on a SQL instance within #Powershell.</span></strong><br /> <span style="color: #000000;"><strong>Invoke-Sqlcmd -ServerInstance $sqlinst -Database "master" -Query $q `</strong></span><br /><span style="color: #000000;"><strong> }</strong></span></code> <strong><code class="mysql"> }&nbsp;</code></strong></pre>
<pre class="scroll">&nbsp;</pre>
<p>You can save the above code as status.ps1 file under the path <em>C:\control_scripts</em>. Last step is running this code in a bat file called <em>STATUS.bat</em>:</p>
<p>&nbsp;</p>
<p>The code for <em>STATUS.bat</em> file should be like below:</p>
<p>powershell.exe "C:\control_scripts\status.ps1" -noclobber &gt;status.txt 2&gt; status_error.txt</p>
<p>If the result is successful it will write it to <em>status.txt</em> file as shown below:</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/54/25/3515.6.jpg" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-54-25/3515.6.jpg"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/54/25/3515.6.jpg" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-54-25/3515.6.jpg" alt="" border="0" /></a></p>
<p>If it gets any error, it will write the details of the error(s) to <em>status_error.txt</em> file.</p>
<pre class="scroll"><code class="mysql"><br /> </code></pre>]]></content:encoded>
    </item>
    <item>
      <title>collecting performance data for SQL Server via Powershell</title>
      <link>https://docs.microsoft.com/archive/blogs/isilefe/collecting-performance-data-for-sql-server-via-powershell</link>
      <pubDate>Tue, 05 Nov 2013 07:24:00 GMT</pubDate>
      <dc:creator><![CDATA[isilefe]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/isilefe/2013/11/05/collecting-performance-data-for-sql-server-via-powershell/</guid>
      <description><![CDATA[Performance Monitor is a Windowds-based tool which has also very effective counters for SQL Server....]]></description>
      <content:encoded><![CDATA[<p style="text-align: justify;"><span style="font-family: arial, helvetica, sans-serif; font-size: small;">Performance Monitor is a Windowds-based tool which has also very effective counters for SQL Server. There are various methods to collect performance data like typeperf (<a href="https://technet.microsoft.com/en-us/library/bb490960.aspx">https://technet.microsoft.com/en-us/library/bb490960.aspx</a>)</span></p>
<p style="text-align: justify;"><span style="font-family: arial, helvetica, sans-serif; font-size: small;">and creating data collector sets (</span><a style="font-family: arial, helvetica, sans-serif; font-size: small;" href="https://technet.microsoft.com/en-us/library/cc722414.aspx">https://technet.microsoft.com/en-us/library/cc722414.aspx</a><span style="font-family: arial, helvetica, sans-serif; font-size: small;">). Another method is using Powershell script. Here you go with the script:</span></p>
<pre class="scroll"><span style="font-size: medium;"><strong><code class="cplusplus">#In do-while loop, you can define how many times you would like to run the script with one execution. <br /> #Get-Counter cmdlet has -max samples parameter as well, however if you set it a value other than 1 then<br /> #it waits until the end of the script to write the database after collecting all samples.<br /> #With the logic of do-while loop I managed to write the database after each sample collection.<br /> $a = 0 <br /> do<br /> {<br /> #$server variable defines the server to be monitored<br /> #if you would like to monitor more than 1 server you can use Get-Content cmdlet as shown below:<br /> #$server = @(get-content "C:\perfcounter_ps\AllServers.txt")<br /> $server = 'ISILEFE03'<br /> #$monitorServer variable defines the server that we are collecting data on and $monitorDB variable defines<br /> #the database that we are using like a datawarehouse<br /> $monitorServer = "ISILEFE03" <br /> $monitorDB = "testperf" <br /> $counters = @("\Memory\Available MBytes",<br /> "\Memory\Pages/sec",<br /> "\PhysicalDisk(_Total)\Avg. Disk sec/Read",<br /> "\PhysicalDisk(_Total)\Avg. Disk sec/Write",<br /> "\PhysicalDisk(_Total)\Current Disk Queue Length",<br /> "\PhysicalDisk(*)\Avg. Disk sec/Read",<br /> "\PhysicalDisk(*)\Avg. Disk sec/Write",<br /> "\PhysicalDisk(*)\Current Disk Queue Length",<br /> "\Process(sqlservr)\% Privileged Time",<br /> "\Process(sqlservr)\% Processor Time",<br /> "\Processor(_Total)\% Privileged Time",<br /> "\Processor(_Total)\% Processor Time",<br /> "\SQLServer:Buffer Manager\Buffer cache hit ratio",<br /> "\SQLServer:Buffer Manager\Lazy writes/sec",<br /> "\SQLServer:Buffer Manager\Page life expectancy",<br /> "\SQLSERVER:Memory Manager\Memory Grants Pending" ,<br /> "\SQLServer:SQL Statistics\Batch Requests/sec",<br /> "\System\Context Switches/sec",<br /> "\System\Processor Queue Length" <br /> ) <br /> $sequence=1 <br /> $collections = Get-Counter -ComputerName $server -Counter $counters -SampleInterval 10 -MaxSamples 1<br /> Write-Output $collections <br /> foreach ($collection in $collections) <br /> {$sampling = $collection.CounterSamples | Select-Object -Property TimeStamp, Path, Cookedvalue <br /> $xmlString = $sampling | ConvertTo-Xml -As String<br /> #dbo.usp_InserPerfmonCounter is the stored procedure that is used to insert collected data to testperf database<br /> $query = "dbo.usp_InsertPerfmonCounter '$xmlString';" <br /> Invoke-Sqlcmd -ServerInstance $monitorServer -Database $monitorDB -Query $query<br /> Write-Output $sampling<br /> $sequence+=1}<br /> #Write-Output $sampling <br /> #Write-Output $xmlString <br /> #Write-Output $query <br /> $a+=1<br /> Write-Output $a<br /> }<br /> while($a-lt 10) <br /> </code></strong></span></pre>
<pre class="scroll">&nbsp;</pre>
<pre><span style="font-family: arial, helvetica, sans-serif; font-size: small;">The script for the stored procedure dbo.usp_InsertPerfmonCounter is:&nbsp;</span></pre>
<pre><span style="font-family: arial, helvetica, sans-serif; font-size: small;">(refering https://www.travisgan.com/2013/03/powershell-and-performance-monitor.html)&nbsp;&nbsp;</span></pre>
<pre class="scroll"><code class="mysql">USE [testperf]<br /> GO<br /> <br /> /****** Object: StoredProcedure [dbo].[usp_InsertPerfmonCounter] Script Date: 11/5/2013 11:27:48 AM ******/<br /> SET ANSI_NULLS ON<br /> GO<br /> <br /> SET QUOTED_IDENTIFIER ON<br /> GO<br /> <br /> CREATE PROCEDURE [dbo].[usp_InsertPerfmonCounter]<br /> (<br /> @xmlString varchar(max)<br /> )<br /> AS<br /> SET NOCOUNT ON;<br /> <br /> DECLARE @xml xml;<br /> SET @xml = @xmlString;<br /> <br /> INSERT INTO [dbo].[PerfmonCounterData] ([TimeStamp], [Server], [CounterGroup], [CounterName], [CounterValue])<br /> SELECT [Timestamp]<br /> , SUBSTRING([Path], 3, CHARINDEX('\',[Path],3)-3) AS [Server]<br /> , SUBSTRING([Path]<br /> , CHARINDEX('\',[Path],3)+1<br /> , LEN([Path]) - CHARINDEX('\',REVERSE([Path]))+1 - (CHARINDEX('\',[Path],3)+1)) AS [CounterGroup]<br /> , REVERSE(LEFT(REVERSE([Path]), CHARINDEX('\', REVERSE([Path]))-1)) AS [CounterName]<br /> , CAST([CookedValue] AS float) AS [CookedValue]<br /> FROM<br /> (SELECT<br /> [property].value('(./text())[1]', 'VARCHAR(200)') AS [Value]<br /> , [property].value('@Name', 'VARCHAR(30)') AS [Attribute]<br /> , DENSE_RANK() OVER (ORDER BY [object]) AS [Sampling]<br /> FROM @xml.nodes('Objects/Object') AS mn ([object]) <br /> CROSS APPLY mn.object.nodes('./Property') AS pn (property)) AS bp<br /> PIVOT (MAX(value) FOR Attribute IN ([Timestamp], [Path], [CookedValue]) ) AS ap;<br /> <br />GO</code></pre>
<pre class="scroll">&nbsp;</pre>
<pre><span style="font-family: arial, helvetica, sans-serif; font-size: small;">And here is the script of the table that I used.</span></pre>
<pre class="scroll"><code class="mysql">CREATE TABLE [dbo].[PerfmonCounterData]<br /> (<br /> [ID] [bigint] IDENTITY(1,1) NOT NULL PRIMARY KEY CLUSTERED,<br /> [Server] [nvarchar](50) NOT NULL,<br /> [TimeStamp] [datetime2](0) NOT NULL,<br /> [CounterGroup] [varchar](200) NULL,<br /> [CounterName] [varchar](200) NOT NULL,<br /> [CounterValue] [decimal](18, 5) NULL<br /> );<br /> GO</code></pre>
<pre><br /><span style="font-family: arial, helvetica, sans-serif;">And then when we run my script with the command below on Powershell, we can check the result from our table&nbsp;</span></pre>
<pre><span style="font-family: arial, helvetica, sans-serif;">for inserted data.The result is written for every 10 sec as we expected since sampleinterval parameter is 10 sec&nbsp;</span></pre>
<pre><span style="font-family: arial, helvetica, sans-serif;">for Get-Counter cmdlet.&nbsp;</span><span style="font-family: arial, helvetica, sans-serif;">And with the help of do-while loop, the data is written 10 times with every execution of&nbsp;</span></pre>
<pre><span style="font-family: arial, helvetica, sans-serif;">the script. It means that the execution of the script takes 100+ seconds.</span></pre>
<pre>&nbsp;</pre>
<pre class="scroll"><span style="font-size: large;"><strong><span style="color: #000000;"><code class="cplusplus">cd "C:\perfcounter_ps"<br />powershell.exe .\collectperfdata.ps1</code></span></strong></span></pre>
<pre class="scroll">&nbsp;</pre>
<pre class="scroll">&nbsp;</pre>
<pre>&nbsp;</pre>
<pre>&nbsp;</pre>
<pre><span style="font-family: arial, helvetica, sans-serif; font-size: small;">And here is our last step, scheduling a SQL Server agent job to run periodically, The only thing you&nbsp;</span></pre>
<pre><span style="font-family: arial, helvetica, sans-serif; font-size: small;">should take into consideration is just changing the type as Powershell. After this point, you can just send&nbsp;</span></pre>
<pre><span style="font-family: arial, helvetica, sans-serif; font-size: small;">queries filtering&nbsp;</span><span style="font-family: arial, helvetica, sans-serif; font-size: small;">according to counter or timestamp, even you can </span><span style="font-family: arial, helvetica, sans-serif; font-size: small;">visualize your data on Reporting Services. </span></pre>
<pre>&nbsp;</pre>
<pre>&nbsp;<a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/54/25/7115.Capture.JPG" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-54-25/7115.Capture.JPG"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/54/25/7115.Capture.JPG" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x500/__key/communityserver-blogs-components-weblogfiles/00-00-01-54-25/7115.Capture.JPG" alt="" border="0" /></a></pre>
<pre>&nbsp;</pre>
<pre><span style="font-size: small; font-family: arial, helvetica, sans-serif;">BE CAREFUL that i am using SQL Server 2012, and it is enough when I import sql powershell module&nbsp;</span></pre>
<pre><span style="font-size: small; font-family: arial, helvetica, sans-serif;">once to be able to use SQL cmdlets like Invoke-SQLcmd. In fact, SQL Module is coming with sql&nbsp;</span></pre>
<pre><span style="font-size: small; font-family: arial, helvetica, sans-serif;">server installation&nbsp;</span><span style="font-size: small; font-family: arial, helvetica, sans-serif;">and the only thing you should do is running Import-Module </span><span style="font-size: small; font-family: arial, helvetica, sans-serif;">-Name sqlps command.&nbsp;</span></pre>
<pre><span style="font-size: small; font-family: arial, helvetica, sans-serif;">However, if you are using a lower version of SQL Server, since there is not a sql module you should be&nbsp;</span></pre>
<pre><span style="font-size: small; font-family: arial, helvetica, sans-serif;">importing sql assemblies at the </span><span style="font-size: small; font-family: arial, helvetica, sans-serif;">beginning of our powershell script.</span> </pre>]]></content:encoded>
    </item>
    <item>
      <title>how to manage your SQL Servers with Central Mangement Server and Powershell</title>
      <link>https://docs.microsoft.com/archive/blogs/isilefe/how-to-manage-your-sql-servers-with-central-mangement-server-and-powershell</link>
      <pubDate>Mon, 23 Jul 2012 12:40:00 GMT</pubDate>
      <dc:creator><![CDATA[isilefe]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/isilefe/2012/07/23/how-to-manage-your-sql-servers-with-central-mangement-server-and-powershell/</guid>
      <description><![CDATA[&nbsp;
One of the features I like most with 2008 is Central Management Server. CMS introduces us...]]></description>
      <content:encoded><![CDATA[<p>&nbsp;</p>
<p><span style="font-size: small;"><span style="font-family: Calibri;">One of the features I like most with 2008 is Central Management Server. CMS introduces us with multi server management. However, it only shows the results in SSMS and does not save the result set.&nbsp; To get the result set in a SQL Server table, the only thing you need is a handy Power Shell script. Let me explain&nbsp;this script with a simple example. </span></span></p>
<p><span style="font-size: small;"><span style="font-family: Calibri;">I have my default instance ISILEFE01 registered as a Central Management Server and two instances registered as members, named as ISILEFE01\ISIL and ISILEFE01\EFE. </span></span></p>
<p><span style="font-size: small;"><span style="font-family: Calibri;"><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/54/25/2148.image1.gif" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-54-25/2148.image1.gif"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/54/25/2148.image1.gif" original-url="https://blogs.msdn.com/resized-image.ashx/__size/250x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-54-25/2148.image1.gif" alt="" border="0" /></a></span></span></p>
<p>&nbsp;</p>
<p><span style="font-size: small;"><span style="font-family: Calibri;">Now, let&rsquo;s run a very simple query to get the versions of all SQL server instances registered under CMS.</span></span></p>
<p><span style="font-size: small;"><span style="font-family: Calibri;"><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/54/25/6177.image2.gif" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-54-25/6177.image2.gif"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/54/25/6177.image2.gif" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-54-25/6177.image2.gif" alt="" border="0" /></a></span></span></p>
<p>&nbsp;</p>
<p><span style="font-size: small;"><span style="font-family: Calibri;">That&rsquo;s all what CMS can do. Further we will go with Powershell. Please review the powershell script below:</span></span></p>
<p>&nbsp;</p>
<p>$CentralManagementServer = "ISILEFE01"<br />$HistoryDatabase = "PSDatabase"</p>
<p>function ResultInsert($sqlServerVariable, $sqlDatabaseVariable, $EvaluatedServer, $EvaluatedResult) <br />{</p>
<p><br />&nbsp;$sqlQueryText = "INSERT INTO dbo.test&nbsp; (servername1,servername2) VALUES('$EvaluatedServer', '$EvaluatedResult')"<br />&nbsp;write-output $sqlQueryText<br />&nbsp;Invoke-Sqlcmd -ServerInstance $sqlServerVariable -Database $sqlDatabaseVariable -Query $sqlQueryText</p>
<p>}</p>
<p>&nbsp;</p>
<p>$sconn = new-object System.Data.SqlClient.SqlConnection("server=$CentralManagementServer;Trusted_Connection=true");</p>
<p>$q = "select name from [msdb].[dbo].[sysmanagement_shared_registered_servers_internal];"</p>
<p>$sconn.Open()<br />$cmd = new-object System.Data.SqlClient.SqlCommand ($q, $sconn);<br />$cmd.CommandTimeout = 0;<br />$dr = $cmd.ExecuteReader();</p>
<p>&nbsp;</p>
<p>while ($dr.Read()) { <br />&nbsp;$ServerName = $dr.GetValue(0);<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $sqlQueryText = "select @@version"<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $selectResult=Invoke-Sqlcmd -ServerInstance $ServerName -Query $sqlQueryText<br />&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;[string]$a=$selectResult.column1</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ResultInsert $CentralManagementServer $HistoryDatabase $ServerName $a;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br />&nbsp;}</p>
<p>&nbsp;</p>
<p>$dr.Close()<br />$sconn.Close()</p>
<p>&nbsp;</p>
<p><span style="font-size: small;"><span style="font-family: Calibri;">According to the script, I would like to get the results into a sql server table on my default instance, ISILEFE01. I created a database called &ldquo;PSDatabase&rdquo; and a table called &ldquo;test&rdquo; on my default instance, ISILEFE01. </span></span></p>
<p><span style="font-size: small;"><span style="font-family: Calibri;">The important point here is that the names of the SQL Server&rsquo;s instances registered in CMS is written in a table called as &ldquo;[msdb].[dbo].[sysmanagement_shared_registered_servers_internal]&rdquo; . By running a select query to that table, I can retrieve the names of the sql server instances and then in a simple loop I can run any T-SQL query on all instances registered under CMS. </span></span></p>
<p><span style="font-size: small;"><span style="font-family: Calibri;">Lastly, in my main function I am calling a function to insert the values that I retrieve,&nbsp;to the&nbsp;&ldquo;test&rdquo; table under &ldquo;PSDatabase&rdquo;. &nbsp;Now pls check what is inserted in the test table:</span></span></p>
<p><span style="font-size: small;"><span style="font-family: Calibri;"><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/54/25/2664.image3.gif" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-54-25/2664.image3.gif"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/54/25/2664.image3.gif" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-54-25/2664.image3.gif" alt="" border="0" /></a></span></span></p>
<p><span style="font-size: small;"><span style="font-family: Calibri;">Enjoy managing your SQL servers with Powershell!</span></span></p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>]]></content:encoded>
    </item>
  </channel>
</rss>