<?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>SQL Journey</title>
    <atom:link
      href="https://docs.microsoft.com/archive/blogs/sqljourney/feed.xml"
      rel="self"
      type="application/rss+xml" />
    <link>https://docs.microsoft.com/archive/blogs/sqljourney/feed.xml</link>
    <description>A blog about real-life SQL Server Troubleshooting, providing solutions that actually work. By a SQL Server Enthusiast.</description>
    <lastBuildDate>Wed, 06 Apr 2016 02:18:12 GMT</lastBuildDate>
    <language>en-US</language>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <item>
      <title>An In-depth look at memory - SQL Server 2012/2014</title>
      <link>https://docs.microsoft.com/archive/blogs/sqljourney/an-in-depth-look-at-memory-sql-server-20122014</link>
      <pubDate>Mon, 27 Apr 2015 08:57:23 GMT</pubDate>
      <dc:creator><![CDATA[HarshDeep_Singh]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/sqljourney/2015/04/27/an-in-depth-look-at-memory-sql-server-20122014/</guid>
      <description><![CDATA[I finally had some time on my hands, so thought to try and get around to blogging about the memory...]]></description>
      <content:encoded><![CDATA[<p style="list-style-type: disc; font-family: ; color: ; margin: 0in"><font face="Calibri"><font style="font-size: 11pt" color="#1e4e79">I finally had some time on my hands, so thought to try and get around to blogging about the memory architecture of SQL server 2012/2014. The memory architecture for the SQL Server relational database engine was practically overhauled with SQL Server 2012, and most of it has remained the same in SQL 2014. Please note that the In-memory OLTP feature introduced in SQL 2014 has a different engine dedicated to it, which will not be covered as part of this blog post. </font></font></p>  <p style="list-style-type: disc; font-family: ; color: ; margin: 0in"><font face="Calibri"><font style="font-size: 11pt" color="#1e4e79">&#160;</font></font></p>  <p style="list-style-type: disc; font-family: ; color: ; margin: 0in"><span style="text-decoration: "><font face="Calibri"><font color="#1e4e79" size="4"><strong>Memory Manager           <br clear="all" /></strong></font></font></span></p>  <p style="list-style-type: disc; font-family: ; color: ; margin: 0in"><font face="Calibri"><font style="font-size: 11pt" color="#1e4e79">We have a new memory manager in SQL 2012. The new memory manager is responsible for almost all the memory management related activities, especially memory allocation. It includes 2 allocators, the Page Allocator, and the Virtual Address Space (VAS) allocator. </font></font></p>  <p style="list-style-type: disc; font-family: ; color: ; margin: 0in"><font face="Calibri"><font style="font-size: 11pt" color="#1e4e79">Memory consumers request memory from the memory manager through these allocators. The new memory manager supports allocations of all sizes, we no longer have the concept of single page and multipage allocators. For the sake of simplicity, I will refer to the allocator as &quot;Any Size Page allocator&quot; in this post. Consumers like memory clerks and the Buffer Pool are clients of the memory manager. This is a major change from previous versions, where the Buffer pool was a consumer as well as a provider(allocator) of memory (single pages). </font></font></p>  <p style="list-style-type: disc; font-family: ; color: ; margin: 0in"><font color="#1e4e79" face="Calibri"></font></p>  <p style="list-style-type: disc; font-family: ; color: ; margin: 0in"><font face="Calibri"><font style="font-size: 11pt" color="#1e4e79">Another major change that you will experience is that with the introduction of the Any Size Page allocator, the SQL Server &quot;Max Server Memory&quot; setting now controls the memory allocated for the Buffer Pool, CLR, as well as larger than 8 kb (single page) allocations. In prior versions, max server memory only controlled the size of the buffer pool, which made it difficult for DBA's/architects to apportion memory between applications/instances on shared servers. SQL Server 2012 gives us the ability to establish much tighter control on memory allocation using tools such as resource governor, because the resource governor is now able to control all page allocations. </font></font></p>  <p style="list-style-type: disc; font-family: ; color: ; margin: 0in"><font face="Calibri"><font style="font-size: 11pt" color="#1e4e79">The buffer pool in SQL 2012 does not contain any memory management functionality. It just manages the caching of database pages, and is now treated like a regular, external cache. Considering that the Buffer Pool is still likely to be the largest consumer of memory though, it is allowed to use almost all free memory from the SQL memory manager.</font></font></p>  <p style="list-style-type: disc; font-family: ; color: ; margin: 0in"><font face="Calibri"><font style="font-size: 11pt" color="#1e4e79">There are several visual representations of the changes to memory manager in SQL 2012 floating around on the internet, which I've included for your benefit:</font></font></p>  <p style="list-style-type: disc; font-family: ; color: ; margin: 0in"><font face="Calibri"><font style="font-size: 11pt" color="#1e4e79">&#160;</font></font></p>  <p style="list-style-type: disc; font-family: ; color: ; margin: 0in"><font face="Calibri"><font style="font-size: 11pt" color="#1e4e79">&#160;</font></font></p>  <p style="list-style-type: disc; margin: 0in"><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/51/72/metablogapi/5344.clip_image0014_518518AB.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-51-72-metablogapi/5344.clip_5F00_image0014_5F00_518518AB.png"><img title="clip_image001[4]" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="clip_image001[4]" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/51/72/metablogapi/3323.clip_image0014_thumb_482BE428.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-51-72-metablogapi/3323.clip_5F00_image0014_5F00_thumb_5F00_482BE428.png" width="747" height="318" /></a></p>  <p style="list-style-type: disc; font-family: ; margin: 0in"><font face="Calibri"><font style="font-size: 11pt" color="#000000">&#160;</font></font></p>  <p style="list-style-type: disc; font-family: ; color: ; margin: 0in"><font face="Calibri"><font style="font-size: 11pt" color="#1e4e79">As you might have noticed, memory allocation for CLR forms a bit of a &quot;special case&quot;, in that even though it uses VAS Allocator(Virtual Allocator in the diagram), it still is governed by the limits set using the &quot;max server memory&quot; setting in SQL. An auxiliary effect of this is that CLR is now initialized at SQL Server DB Engine startup, as opposed to being initialized when it was called in earlier versions of SQL Server. </font></font></p>  <p style="list-style-type: disc; font-family: ; color: ; margin: 0in"><font face="Calibri"><font style="font-size: 11pt" color="#1e4e79">&#160;</font></font></p>  <p style="list-style-type: disc; font-family: ; color: ; margin: 0in"><font face="Calibri"><font style="font-size: 11pt" color="#1e4e79">The memory manager architecture in SQL Server 2012 can be broken down into the following components:</font></font></p>  <ol style="margin-bottom: 0in; font-family: ; unicode-bidi: embed; direction: ltr; margin-left: 0.375in; margin-top: 0in" type="1">   <li style="margin-bottom: 0px; vertical-align: middle; color: ; margin-top: 0px" value="value"><span style="font-family: "><font face="Calibri"><font style="font-size: 11pt" color="#1e4e79">Fragments/Fragment Manager: A fragment is a large region of VAS. The fragment manager deals with fragments, which the memory manager will commit dynamically. </font></font></span></li>    <li style="margin-bottom: 0px; vertical-align: middle; color: ; margin-top: 0px"><span style="font-family: "><font face="Calibri"><font style="font-size: 11pt" color="#1e4e79">Top level block allocator: The Top level block allocator takes these large fragments and splits them up into top level blocks. These top level block sizes are fixed at 16 MB in 64-bit installations and 4 MB in 32-bit installations. </font></font></span></li>    <li style="margin-bottom: 0px; vertical-align: middle; color: ; margin-top: 0px"><span style="font-family: "><font face="Calibri"><font style="font-size: 11pt" color="#1e4e79">Workspace: A Workspace is a set of top level blocks. A workspace contains allocations of similar lifetime. Examples of workspaces include buffer pool, memory objects, etc.</font></font></span></li>    <li style="margin-bottom: 0px; vertical-align: middle; color: ; margin-top: 0px"><span style="font-family: "><font face="Calibri"><font style="font-size: 11pt" color="#1e4e79">Fixed Size Allocator: The most crucial component of the new memory manager hierarchy is the Fixed Size Allocator. This allocator is part of the workspace, and it gets memory from the top level block allocator, and breaks it up into smaller sized blocks. These are called parent blocks, and each parent block has its own descriptor, which has a free list as well as the current state of the block. The parent block can be in one of four states: </font></font></span></li> </ol>  <p style="list-style-type: disc; font-family: ; color: ; margin: 0in 0in 0in 0.375in"><font face="Calibri"><font style="font-size: 11pt" color="#1e4e79">&#160;</font></font></p>  <ul style="margin-bottom: 0in; unicode-bidi: embed; direction: ltr; margin-left: 0.75in; margin-top: 0in" type="disc">   <li style="margin-bottom: 0px; vertical-align: middle; color: ; margin-top: 0px"><span style="font-family: "><font face="Calibri"><font style="font-size: 11pt" color="#1e4e79">Active - The block from which allocations happen. New allocations requests are serviced from the Active block of the local CPU or the NUMA node.</font></font></span></li>    <li style="margin-bottom: 0px; vertical-align: middle; color: ; margin-top: 0px"><span style="font-family: "><font face="Calibri"><font style="font-size: 11pt" color="#1e4e79">Full - The block is full of allocations. There is no more free space in that block. This was previously an Active block.</font></font></span></li>    <li style="margin-bottom: 0px; vertical-align: middle; color: ; margin-top: 0px"><span style="font-family: "><font face="Calibri"><font style="font-size: 11pt" color="#1e4e79">Partial - The block is neither Full nor Active. There are multiple lists of Partial blocks. These lists are per NUMA node. A block is made part of a specific list according to the fill factor of allocations inside the block. This supports the mechanism to try to Free blocks which have less allocations sooner or try to allocate from blocks which have more allocation already to make it full. Thus, the overall algorithm pushes against having a large list of Partial blocks to manage. </font></font></span></li>    <li style="margin-bottom: 0px; vertical-align: middle; color: ; margin-top: 0px"><span style="font-family: "><font face="Calibri"><font color="#1e4e79"><font style="font-size: 11pt">Empty - When the block is allocated for the first time, it is in empty state. It is does not have any allocations.</font><span style="mso-spacerun: yes"><font style="font-size: 11pt">&#160; </font></span></font></font></span></li> </ul>  <p style="list-style-type: disc; font-family: ; color: ; margin: 0in"><font face="Calibri"><font style="font-size: 11pt" color="#1e4e79">&#160;</font></font></p>  <p style="list-style-type: disc; font-family: ; color: ; margin: 0in"><font face="Calibri"><font style="font-size: 11pt" color="#1e4e79">&#160;</font></font></p>  <p style="list-style-type: disc; margin: 0in"><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/51/72/metablogapi/3531.clip_image0024_050B7308.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-51-72-metablogapi/3531.clip_5F00_image0024_5F00_050B7308.png"><img title="clip_image002[4]" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="clip_image002[4]" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/51/72/metablogapi/7762.clip_image0024_thumb_72567950.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-51-72-metablogapi/7762.clip_5F00_image0024_5F00_thumb_5F00_72567950.png" width="846" height="464" /></a></p>  <p style="list-style-type: disc; font-family: ; color: ; margin: 0in"><font face="Calibri"><font style="font-size: 11pt" color="#1e4e79">&#160;</font></font></p>  <p style="list-style-type: disc; font-family: ; color: ; margin: 0in"><font color="#1e4e79" size="4" face="Calibri"><strong>Memory Allocation        <br clear="all" /></strong></font></p>  <p style="list-style-type: disc; font-family: ; color: ; margin: 0in"><font face="Calibri"><font style="font-size: 11pt" color="#1e4e79">Let's talk about how memory is allocated using the new memory manager. The first step is, of course, to determine which allocator to use, based on the amount of memory requested. This involves traversing the workspace hierarchy to find the appropriate allocator. If we're unable to find an allocator of the exact same size, the next highest size allocator is used. </font></font></p>  <p style="list-style-type: disc; font-family: ; color: ; margin: 0in"><font face="Calibri"><font style="font-size: 11pt" color="#1e4e79">Once we have the allocator, the fastest way to allocate is to look at the local partition, find the Active block and then pop an entry from the Free list. If the Active block does not have enough free space to allocate from, then we need to replace this Active block with one that has enough free space. </font></font></p>  <p style="list-style-type: disc; font-family: ; color: ; margin: 0in"><font face="Calibri"><font style="font-size: 11pt" color="#1e4e79">&#160;</font></font></p>  <p style="list-style-type: disc; font-family: ; color: ; margin: 0in"><font face="Calibri"><font style="font-size: 11pt" color="#1e4e79">Next, we start traversing the partial buckets, looking for a partial block that is almost full. If a partial block is found, we first re-evaluate the fill factor, since many free operations could have happened after this partial block was inserted into this fill factor bucket.<span style="mso-spacerun: yes">&#160; </span>If the fill factor has changed, then this partial block is inserted to the appropriate fill factor bucket. Repeat this process to find a partial block with the most allocations in it. Once found this partial block is installed as an Active Block. After this the allocation is performed from this Active block.</font></font></p>  <p style="list-style-type: disc; font-family: ; color: ; margin: 0in"><font face="Calibri"><font style="font-size: 11pt" color="#1e4e79">&#160;</font></font></p>  <p style="list-style-type: disc; font-family: ; color: ; margin: 0in"><font face="Calibri"><font style="font-size: 11pt" color="#1e4e79">During the above process, if another thread installs another active block, then that Active block should be used for allocation instead. If allocation is successful from that active block, then this block should be returned to the partial bucket where it came from. </font></font></p>  <p style="list-style-type: disc; font-family: ; color: ; margin: 0in"><font face="Calibri"><font style="font-size: 11pt" color="#1e4e79">&#160;</font></font></p>  <p style="list-style-type: disc; font-family: ; color: ; margin: 0in"><font face="Calibri"><font color="#1e4e79"><font style="font-size: 11pt">If no partial block was found, then go up to the parent block allocator and request a new block [empty] to be created. This corresponds to the process of growing against the target memory configured [for conventional and locked page memory].</font><span style="mso-spacerun: yes"><font style="font-size: 11pt">&#160;&#160; </font></span></font></font></p>  <p style="list-style-type: disc; font-family: ; margin: 0in"><font face="Calibri"><font style="font-size: 11pt" color="#000000">&#160;</font></font></p>  <p style="list-style-type: disc; font-family: ; color: ; margin: 0in"><font face="Calibri"><font style="font-size: 11pt" color="#1e4e79">If during the above process we were not able to find a suitable block, then we switch to the next NUMA node and repeat the same process. Switching to next node happens once the target for current node is reached. If all nodes reach target memory then an OOM (Out Of Memory) error is returned.</font></font></p>  <p style="list-style-type: disc; font-family: ; color: ; margin: 0in"><font face="Calibri"><font style="font-size: 11pt" color="#1e4e79">&#160;</font></font></p>  <p style="list-style-type: disc; font-family: ; color: ; margin: 0in"><font face="Calibri"><font style="font-size: 11pt" color="#1e4e79">In order to free a block, we first find the parent block descriptor for the current block that is being freed. Next, we return the block to the free list and update the state in the descriptor. It can go to two states, Partial or Empty. </font></font></p>  <p style="list-style-type: disc; font-family: ; color: ; margin: 0in"><font face="Calibri"><font style="font-size: 11pt" color="#1e4e79">&#160;</font></font></p>  <p style="list-style-type: disc; font-family: ; color: ; margin: 0in"><font face="Calibri"><font style="font-size: 11pt" color="#1e4e79">When we configure SQL to use large pages, all the top level blocks are committed at startup. For conventional and locked page memory model, the blocks are committed as needed. </font></font></p>  <p style="list-style-type: disc; font-family: ; color: ; margin: 0in"><font face="Calibri"><font style="font-size: 11pt" color="#1e4e79">&#160;</font></font></p>  <p style="list-style-type: disc; font-family: ; color: ; margin: 0in"><font face="Calibri"><font style="font-size: 11pt" color="#1e4e79">The rest of the components work in pretty much the same way as earlier versions of SQL Server. For more details on the memory architecture up to SQL Server 2008 R2, please refer the following posts:</font></font></p>  <p style="list-style-type: disc; font-family: ; margin: 0in"><a style="cursor: auto" href="https://blogs.msdn.com/b/sqljourney/archive/2012/12/17/an-in-depth-look-at-sql-server-memory-part-1.aspx"><font face="Calibri"><font style="font-size: 11pt" color="#0066cc"><u>An in-depth look at SQL Server Memory–Part 1</u></font></font></a></p>  <p style="list-style-type: disc; font-family: ; margin: 0in"><a style="cursor: auto" href="https://blogs.msdn.com/b/sqljourney/archive/2013/02/13/an-in-depth-look-at-sql-server-memory-part-2.aspx"><font face="Calibri"><font style="font-size: 11pt" color="#0066cc"><u>An in-depth look at SQL Server Memory–Part 2</u></font></font></a></p>  <p style="list-style-type: disc; font-family: ; margin: 0in"><a style="cursor: auto" href="https://blogs.msdn.com/b/sqljourney/archive/2013/03/16/an-in-depth-look-at-sql-server-memory-part-3.aspx"><font face="Calibri"><font style="font-size: 11pt" color="#0066cc"><u>An in-depth look at SQL Server Memory–Part 3</u></font></font></a></p>  <p style="list-style-type: disc; font-family: ; margin: 0in"><font face="Calibri"><font style="font-size: 11pt" color="#000000"></font></font></p>  <p style="list-style-type: disc; font-family: ; margin: 0in">&#160;</p>  <p style="list-style-type: disc; font-family: ; color: ; margin: 0in"><font face="Calibri"><font style="font-size: 11pt" color="#1e4e79">As always, comments and feedback are appreciated.        <br clear="all" /></font></font></p>  <p><font color="#000000" face="Calibri"><font face="Calibri"><font style="font-size: 11pt" color="#1e4e79">Disclaimer: </font></font></font><font face="Calibri"><font style="font-size: 11pt" color="#1e4e79">The information in this weblog is provided “AS IS” with no warranties, and confers no rights. This weblog does not represent the thoughts, intentions, plans or strategies of my employer. It is solely my opinion. Feel free to challenge me, disagree with me, or tell me I’m completely nuts in the comments section of each blog entry, but I reserve the right to delete any comment for any reason whatsoever (abusive, profane, rude, or anonymous comments) – so keep it polite, please.</font></font></p> <span style="list-style-type: disc; font-family: ; white-space: normal; word-spacing: 0px; text-transform: none; color: ; text-align: left; widows: 1; letter-spacing: normal; line-height: normal; text-indent: 0px; -webkit-text-stroke-width: 0px">   <br /></span>  <div id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:966c1b0d-7490-4feb-b016-4c8016e6444c" class="wlWriterEditableSmartContent" style="float: none; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px">Technorati Tags: <a href="https://technorati.com/tags/SQL" rel="tag">SQL</a>,<a href="https://technorati.com/tags/SQL+Server+2012" rel="tag">SQL Server 2012</a>,<a href="https://technorati.com/tags/SQL+Server+2014" rel="tag">SQL Server 2014</a>,<a href="https://technorati.com/tags/SQL+2012" rel="tag">SQL 2012</a>,<a href="https://technorati.com/tags/SQL+2014" rel="tag">SQL 2014</a>,<a href="https://technorati.com/tags/Memory" rel="tag">Memory</a>,<a href="https://technorati.com/tags/Memory+architecture" rel="tag">Memory architecture</a>,<a href="https://technorati.com/tags/in-depth+memory" rel="tag">in-depth memory</a>,<a href="https://technorati.com/tags/SQL+Server+engine" rel="tag">SQL Server engine</a>,<a href="https://technorati.com/tags/workspaces" rel="tag">workspaces</a>,<a href="https://technorati.com/tags/any+size+allocator" rel="tag">any size allocator</a>,<a href="https://technorati.com/tags/fragment+manager" rel="tag">fragment manager</a>,<a href="https://technorati.com/tags/Top+level+block+allocator" rel="tag">Top level block allocator</a>,<a href="https://technorati.com/tags/SQL+2012+memory+mangement" rel="tag">SQL 2012 memory mangement</a>,<a href="https://technorati.com/tags/SQL+2014+memory+management" rel="tag">SQL 2014 memory management</a></div>]]></content:encoded>
    </item>
    <item>
      <title>An interesting issue with Peer to Peer Replication</title>
      <link>https://docs.microsoft.com/archive/blogs/sqljourney/an-interesting-issue-with-peer-to-peer-replication</link>
      <pubDate>Tue, 01 Oct 2013 00:24:00 GMT</pubDate>
      <dc:creator><![CDATA[HarshDeep_Singh]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/sqljourney/2013/10/01/an-interesting-issue-with-peer-to-peer-replication/</guid>
      <description><![CDATA[I recently ran into an interesting issue when setting up Peer 2 Peer Replication across 3 instances....]]></description>
      <content:encoded><![CDATA[<p><font color="#004080" size="3" face="Calibri">I recently ran into an interesting issue when setting up Peer 2 Peer Replication across 3 instances. </font></p>  <p><font color="#004080" size="3" face="Calibri">The primary instance was SM-UTSQL, where we configured a Peer-to-Peer publication named &quot;PUBLISH1&quot; on the database &quot;DDS-TRANS&quot;. Next, we proceeded to configure Peer-to-Peer topology (right-click on publication, click on &quot;Configure Peer-To-Peer topology&quot;), and added the other 2 instances to the topology. After this, we clicked on the primary node and selected &quot;Connect to all displayed nodes&quot; :</font></p>  <p>&#160;</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/51/72/metablogapi/6457.image_69B3A8A8.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-51-72-metablogapi/6457.image_5F00_69B3A8A8.png"><img title="image" style="display: inline; background-image: none;" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/51/72/metablogapi/1220.image_thumb_747390AE.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-51-72-metablogapi/1220.image_5F00_thumb_5F00_747390AE.png" width="354" height="183" /></a></p>  <p><font color="#004080" size="3" face="Calibri">We then went ahead through the UI and configured the replication. However, when we checked in object explorer, we saw that on the Primary instance (SM-UTSQL), under replication-&gt;Publish1, we could see both the Peer nodes SO-UTSQL and ST-UTSQL as subscribers, but on SO-UTSQL and ST-UTSQL, we could see on SM-UTSQL as the subscriber for the publication i.e. SO-UTSQL and ST-UTSQL did not recognize each other as subscribers. </font></p>  <p><font color="#004080" size="3" face="Calibri">We tried to add the missing subscriber through the new subscriptions wizard, but got the following error:</font></p>  <p><font size="2" face="Calibri">TITLE: New Subscription Wizard</font></p>  <p><font size="2" face="Calibri">------------------------------</font></p>  <p><font size="2" face="Calibri">SQL Server could not create a subscription for Subscriber 'ST-UTSQL'.</font></p>  <p><font size="2" face="Calibri">------------------------------</font></p>  <p><font size="2" face="Calibri">ADDITIONAL INFORMATION:</font></p>  <p><font size="2" face="Calibri">An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)</font></p>  <p><font size="2" face="Calibri">------------------------------</font></p>  <p><font size="2" face="Calibri">Peer-to-peer publications only support a '@sync_type' parameter value of 'replication support only', 'initialize with backup' or 'initialize from lsn'.</font></p>  <p><font size="2" face="Calibri">The subscription could not be found.</font></p>  <p><font size="2" face="Calibri">Changed database context to 'DDS_TRANS'. (Microsoft SQL Server, Error: 21679)</font></p>  <p><font size="2" face="Calibri">For help, click: </font><a href="https://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&amp;ProdVer=10.50.4000&amp;EvtSrc=MSSQLServer&amp;EvtID=21679&amp;LinkId=20476"><font size="2" face="Calibri">https://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&amp;ProdVer=10.50.4000&amp;EvtSrc=MSSQLServer&amp;EvtID=21679&amp;LinkId=20476</font></a></p>  <p><font size="2" face="Calibri">------------------------------</font></p>  <p><font size="2" face="Calibri">BUTTONS:</font></p>  <p><font size="2" face="Calibri">OK</font></p>  <p><font size="2" face="Calibri">------------------------------</font></p>  <p>&#160;</p>  <p><font color="#004080" size="3" face="Calibri">The resolution? Here are the steps: </font></p>  <ol>   <li><font color="#004080" size="3" face="Calibri">Navigate to the replication tab in object explorer on the Primary instance (where you can see both subscriptions under the publication, SM-UTSQL in our case). </font></li>    <li><font color="#004080" size="3" face="Calibri">Right click on the publication and select generate scripts, and select the &quot;To Create or enable the components&quot; radio button. </font></li>    <li><font color="#004080" size="3" face="Calibri">In the resulting script, navigate to the bottom. Here, you will see 2 sets of &quot;sp_addsubscription&quot; and &quot;sp_addpushsubscription_agent&quot; calls:       <br /></font></li>   <font style="font-size: 11pt;"></font>    <p style="margin: 0in 0in 0in 0.375in; list-style-type: disc;"><font size="3" face="Calibri"></font></p>    <p style="margin: 0in 0in 0in 0.375in; list-style-type: disc;"><font size="3" face="Calibri">-- Adding the transactional subscriptions</font></p>   <font size="3" face="Calibri"></font>    <p style="margin: 0in 0in 0in 0.375in; list-style-type: disc;"><font size="3" face="Calibri">use [DDS_TRANS]</font></p>   <font size="3" face="Calibri"></font>    <p style="margin: 0in 0in 0in 0.375in; list-style-type: disc;"><font face="Calibri"><font size="3"><span><strong>exec sp_addsubscription</strong></span> @publication = N'PUBLISH1', <span style="background-image: none; background-attachment: scroll; background-repeat: repeat; background-size: auto; background-origin: padding-box; background-clip: border-box; mso-highlight: yellow;"><font style="background-color: rgb(255, 255, 0);">@subscriber = N'SO</font><font style="background-color: rgb(255, 255, 0);">-UTSQL</font></span><font style="background-color: rgb(255, 255, 0);">'</font>, @destination_db = N'DDS_TRANS', @subscription_type = N'Push', @sync_type = N'replication support only', @article = N'all', @update_mode = N'read only', @subscriber_type = 0</font></font></p>   <font size="3" face="Calibri"></font>    <p style="margin: 0in 0in 0in 0.375in; list-style-type: disc;"><font face="Calibri"><font size="3"><span><strong>exec sp_addpushsubscription_agent</strong></span> @publication = N'PUBLISH1', <font style="background-color: rgb(255, 255, 0);">@subscriber = N'SO-UTSQL</font>', @subscriber_db = N'DDS_TRANS', @job_login = N'dds\dtsql.admin', <span style="background-image: none; background-attachment: scroll; background-repeat: repeat; background-size: auto; background-origin: padding-box; background-clip: border-box; mso-highlight: yellow;"><font style="background-color: rgb(255, 255, 0);">@job_password = null</font></span>, @subscriber_security_mode = 1, @frequency_type = 64, @frequency_interval = 1, @frequency_relative_interval = 1, @frequency_recurrence_factor = 0, @frequency_subday = 4, @frequency_subday_interval = 5, @active_start_time_of_day = 0, @active_end_time_of_day = 235959, @active_start_date = 0, @active_end_date = 0, @dts_package_location = N'Distributor'</font></font></p>   <font size="3" face="Calibri"></font>    <p style="margin: 0in 0in 0in 0.375in; list-style-type: disc;"><font size="3" face="Calibri">GO</font></p>   <font size="3" face="Calibri"></font>    <p style="margin: 0in 0in 0in 0.375in; list-style-type: disc;"><font size="3" face="Calibri">&#160;</font></p>   <font size="3" face="Calibri"></font>    <p style="margin: 0in 0in 0in 0.375in; list-style-type: disc;"><font size="3" face="Calibri">use [DDS_TRANS]</font></p>   <font size="3" face="Calibri"></font>    <p style="margin: 0in 0in 0in 0.375in; list-style-type: disc;"><font face="Calibri"><font size="3"><span><strong>exec sp_addsubscription</strong></span> @publication = N'PUBLISH1', <span style="background-image: none; background-attachment: scroll; background-repeat: repeat; background-size: auto; background-origin: padding-box; background-clip: border-box; mso-highlight: yellow;"><font style="background-color: rgb(255, 255, 0);">@subscriber =</font><font style="background-color: rgb(255, 255, 0);"> </font><font style="background-color: rgb(255, 255, 0);">N'ST-UTSQL</font></span><font style="background-color: rgb(255, 255, 0);">'</font>, @destination_db = N'DDS_TRANS', @subscription_type = N'Push', @sync_type = N'replication support only', @article = N'all', @update_mode = N'read only', @subscriber_type = 0</font></font></p>    <p style="margin: 0in 0in 0in 0.375in; list-style-type: disc;"><font face="Calibri"><font size="3"><span><strong>exec sp_addpushsubscription_agent</strong></span> @publication = N'PUBLISH1', <font style="background-color: rgb(255, 255, 0);">@subscriber = N'ST-UTSQL</font>', @subscriber_db = N'DDS_TRANS', @job_login = N'dds\dtsql.admin', <span style="background-image: none; background-attachment: scroll; background-repeat: repeat; background-size: auto; background-origin: padding-box; background-clip: border-box; mso-highlight: yellow;"><font style="background-color: rgb(255, 255, 0);">@job_password = null</font></span>, @subscriber_security_mode = 1, @frequency_type = 64, @frequency_interval = 1, @frequency_relative_interval = 1, @frequency_recurrence_factor = 0, @frequency_subday = 4, @frequency_subday_interval = 5, @active_start_time_of_day = 0, @active_end_time_of_day = 235959, @active_start_date = 0, @active_end_date = 0, @dts_package_location = N'Distributor'</font></font></p>   <font size="3" face="Calibri"></font>    <p style="margin: 0in 0in 0in 0.375in; list-style-type: disc;"></p>   <font style="font-size: 12pt;">     <p style="margin: 0in 0in 0in 0.375in; list-style-type: disc;"><font face="Calibri">GO</font>        <br /></p>      <p style="margin: 0in 0in 0in 0.375in; list-style-type: disc;">&#160;</p>   </font><font style="font-size: 11pt;"></font>    <li><font color="#004080" size="3" face="Calibri">Copy these commands over, provide the value for the @job_password parameter (password for the login used to configure replication, reflected in the @job_login parameter), and run the appropriate set on the 2 subscribers. For example, we ran the first set of commands (@subscriber=N'SO-UTSQL') on ST-UTSQL instance, and the second set(@subscriber=N'ST-UTSQL') on the SO-UTSQL instance.       <br /></font></li> </ol> <font style="font-size: 11pt;"></font>  <p style="margin: 0in; list-style-type: disc;"><font style="font-size: 11pt;" color="#004080">And voila, the subscriptions were created and syncing. </font></p> <font style="font-size: 11pt;"></font><font color="#004080"></font>  <p style="margin: 0in; list-style-type: disc;"><font style="font-size: 11pt;" color="#004080">&#160;</font></p> <font style="font-size: 11pt;"></font><font color="#004080"></font>  <p style="margin: 0in; list-style-type: disc;"><font style="font-size: 11pt;"><font color="#004080">Hope this helped you. Comments and feedback are welcome. </font></font></p>  <br clear="all" /><font style="font-size: 11pt;"></font>]]></content:encoded>
    </item>
    <item>
      <title>Something to watch out for when using IS_MEMBER() in TSQL</title>
      <link>https://docs.microsoft.com/archive/blogs/sqljourney/something-to-watch-out-for-when-using-is_member-in-tsql</link>
      <pubDate>Mon, 05 Aug 2013 10:44:00 GMT</pubDate>
      <dc:creator><![CDATA[HarshDeep_Singh]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/sqljourney/2013/08/05/something-to-watch-out-for-when-using-is_member-in-tsql/</guid>
      <description><![CDATA[I recently worked on an interesting issue with my good friend Igor (@sqlsantos), where we were...]]></description>
      <content:encoded><![CDATA[<font style="font-size: 11pt;"><p style="margin: 0in; list-style-type: disc;"><span><font size="3" face="Calibri"><font color="#004080">I recently worked on an interesting issue with my good friend Igor (@sqlsantos), where we were facing performance issues with a piece of code that used the</font> </font></span><a style="cursor: auto;" href="https://msdn.microsoft.com/en-us/library/ms186271.aspx"><span><font size="3" face="Calibri"><u>IS_MEMBER</u></font></span></a><span><font size="3" face="Calibri"> <font color="#004080">() function. Basically, the IS_MEMBER function is used to find out whether the current user (windows/sql login used for the current session) is a member of the specified Windows group or SQL server database role. </font></font></span></p><font color="#004080" size="3" face="Calibri"></font><p style="margin: 0in; list-style-type: disc;"><font color="#004080" size="3" face="Calibri">     <br clear="all">In the specified code, the IS_MEMBER function was being used to determine the windows group membership of the windows login. The windows groups were segregated according to geographical areas, and based on the user's group membership, the result set was filtered to show rows for only those geographical areas for which the user was a member of the corresponding groups in Active Directory.      <br clear="all">      <br clear="all"></font></p><font style="font-size: 11pt;"></font><p style="margin: 0in; list-style-type: disc;"><font color="#004080" size="3" face="Calibri">Here's an example of a piece of code where we perform this check:</font></p><font color="#004080" size="3" face="Calibri"></font><p lang="en-US" style="margin: 0in 0in 0in 0.375in; list-style-type: disc;"><font color="#000000" size="3" face="Calibri">With SalesOrgCTE AS(</font></p><font color="#000000" size="3" face="Calibri"></font><p lang="en-US" style="margin: 0in 0in 0in 0.375in; list-style-type: disc;"><font color="#000000" size="3" face="Calibri">SELECT</font></p><font color="#000000" size="3" face="Calibri"></font><p lang="en-US" style="margin: 0in 0in 0in 0.375in; list-style-type: disc;"><font color="#000000" size="3" face="Calibri">&nbsp; MinSalesOrg, MaxSalesOrg</font></p><font color="#000000" size="3" face="Calibri"></font><p lang="en-US" style="margin: 0in 0in 0in 0.375in; list-style-type: disc;"><font color="#000000" size="3" face="Calibri">FROM</font></p><font color="#000000" size="3" face="Calibri"></font><p lang="en-US" style="margin: 0in 0in 0in 0.375in; list-style-type: disc;"><font color="#000000" size="3" face="Calibri">&nbsp; RAuthorized WITH (NOLOCK)</font></p><font color="#000000" size="3" face="Calibri"></font><p lang="en-US" style="margin: 0in 0in 0in 0.375in; list-style-type: disc;"><font color="#000000" size="3" face="Calibri">WHERE</font></p><font color="#000000" size="3" face="Calibri"></font><p lang="en-US" style="margin: 0in 0in 0in 0.375in; list-style-type: disc;"><font color="#000000" size="3" face="Calibri">&nbsp; IS_MEMBER([Group]) = 1</font></p><font color="#000000" size="3" face="Calibri"></font><p lang="en-US" style="margin: 0in 0in 0in 0.375in; list-style-type: disc;"><font color="#000000" size="3" face="Calibri">)</font></p><br clear="all"><font style="font-size: 11pt;"></font><p style="margin: 0in; list-style-type: disc;"><font style="font-size: 12pt;" color="#004080" face="Calibri">The problem was that the complete procedure where we were using IS_MEMBER was taking several minutes to complete, for a table where the max result set cardinality was in the range of 18000-20000. We noticed the following wait types while the procedure was executing:</font></p><font style="font-size: 11pt;"></font><font color="#004080" face="Calibri"></font><p lang="en-US" style="margin: 0in; list-style-type: disc;"><font style="font-size: 12pt;" color="#004080" face="Calibri">PREEMPTIVE_OS_AUTHORIZATIONOPS</font></p><font style="font-size: 11pt;"></font><font color="#004080" face="Calibri"></font><p lang="en-US" style="margin: 0in; list-style-type: disc;"><font style="font-size: 12pt;" color="#004080" face="Calibri">PREEMPTIVE_OS_LOOKUPACCOUNTSID</font></p><br clear="all"><font style="font-size: 11pt;"></font><font color="#004080" face="Calibri"></font><p style="margin: 0in; list-style-type: disc;"><font style="font-size: 12pt;"><font color="#004080" face="Calibri">I did some research on these waits, and found that since both of these are related to the communication/validation from Active Directory, they lie outside of SQL server, and there's no changes we can do from a configuration standpoint to help reduce/eliminate these waits.</font> </font></p><br clear="all"><font style="font-size: 11pt;"></font><p style="margin: 0in; list-style-type: disc;"><font style="font-size: 12pt;" color="#004080" face="Calibri">Next, we studied the code, broke it down and tested the performance of the various sections that used the IS_MEMBER function, and found that the main section responsible for the execution time was the "WHERE" condition where we were using the result set of the code mentioned above. This is what the "WHERE" clause looked like:</font></p><font style="font-size: 11pt;"></font><font color="#004080" face="Calibri"></font><blockquote>   <p lang="en-US" style="margin: 0in; list-style-type: disc;"><font style="font-size: 12pt;" color="#000000" face="Calibri">(SELECT</font></p>   <font style="font-size: 11pt;"></font><font color="#000000" face="Calibri"></font>    <p lang="en-US" style="margin: 0in; list-style-type: disc;"><font style="font-size: 12pt;" color="#000000" face="Calibri">&nbsp; COUNT(*)</font></p>   <font style="font-size: 11pt;"></font><font color="#000000" face="Calibri"></font>    <p lang="en-US" style="margin: 0in; list-style-type: disc;"><font style="font-size: 12pt;" color="#000000" face="Calibri">FROM</font></p>   <font style="font-size: 11pt;"></font><font color="#000000" face="Calibri"></font>    <p lang="en-US" style="margin: 0in; list-style-type: disc;"><font style="font-size: 12pt;" color="#000000" face="Calibri">&nbsp; SalesOrgCTE</font></p>   <font style="font-size: 11pt;"></font><font color="#000000" face="Calibri"></font>    <p lang="en-US" style="margin: 0in; list-style-type: disc;"><font style="font-size: 12pt;" color="#000000" face="Calibri">WHERE</font></p>   <font style="font-size: 11pt;"></font><font color="#000000" face="Calibri"></font>    <p lang="en-US" style="margin: 0in; list-style-type: disc;"><font style="font-size: 12pt;" color="#000000" face="Calibri">&nbsp; SORGNBR BETWEEN MinSalesOrg AND MaxSalesOrg) &gt; 0</font></p> </blockquote><br clear="all"><font style="font-size: 11pt;"></font><p lang="en-US" style="margin: 0in; list-style-type: disc;"><font style="font-size: 12pt;" color="#004080" face="Calibri">Notice that in this code, we've asked SQL to check the value of SORGNBR for each row, and if it's between MinSalesORG and MaxSalesOrg, then add it to the rowcount. We observed that due to this design, it had to make a trip to AD for validating each row, which meant quite a long time for a 18000-20000 row result set, which was responsible for the slow performance of the procedure. </font></p><font style="font-size: 11pt;"></font><font color="#004080" face="Calibri"></font><br clear="all"><font style="font-size: 11pt;"></font><font color="#004080" face="Calibri"></font><p lang="en-US" style="margin: 0in; list-style-type: disc;"><font style="font-size: 12pt;" color="#004080" face="Calibri">We did some more research with different approaches for the where clause, and the combined efforts of myself, Igor and his team resulted in the following where clause whose performance was acceptable:</font></p><p lang="en-US" style="margin: 0in; list-style-type: disc;"><font style="font-size: 12pt;"></font></p><font style="font-size: 11pt;"></font><p lang="en-US" style="margin: 0in 0in 0in 0.375in; list-style-type: disc;"><font style="font-size: 12pt;" color="#000000" face="Calibri">WHERE</font></p><font style="font-size: 11pt;"></font><font color="#000000" face="Calibri"></font><p lang="en-US" style="margin: 0in 0in 0in 0.375in; list-style-type: disc;"><font style="font-size: 12pt;" color="#000000" face="Calibri">SORGNBR IN </font></p><font style="font-size: 11pt;"></font><font color="#000000" face="Calibri"></font><p lang="en-US" style="margin: 0in 0in 0in 0.375in; list-style-type: disc;"><font style="font-size: 12pt;" color="#000000" face="Calibri">(</font></p><font style="font-size: 11pt;"></font><font color="#000000" face="Calibri"></font><p lang="en-US" style="margin: 0in 0in 0in 0.375in; list-style-type: disc;"><font style="font-size: 12pt;" color="#000000" face="Calibri">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SELECT MinSalesOrg FROM SalesOrgCTE</font></p><font style="font-size: 11pt;"></font><font color="#000000" face="Calibri"></font><p lang="en-US" style="margin: 0in 0in 0in 0.375in; list-style-type: disc;"><font style="font-size: 12pt;" color="#000000" face="Calibri">)</font></p><font style="font-size: 11pt;"></font><font color="#000000" face="Calibri"></font><p lang="en-US" style="margin: 0in 0in 0in 0.375in; list-style-type: disc;"><font style="font-size: 12pt;" color="#000000" face="Calibri">AND SORGNBR IN </font></p><font style="font-size: 11pt;"></font><font color="#000000" face="Calibri"></font><p lang="en-US" style="margin: 0in 0in 0in 0.375in; list-style-type: disc;"><font style="font-size: 12pt;" color="#000000" face="Calibri">(</font></p><font style="font-size: 11pt;"></font><font color="#000000" face="Calibri"></font><p lang="en-US" style="margin: 0in 0in 0in 0.375in; list-style-type: disc;"><font style="font-size: 12pt;" color="#000000" face="Calibri">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SELECT MaxSalesOrg FROM SalesOrgCTE</font></p><font style="font-size: 11pt;"></font><font color="#000000" face="Calibri"></font><p lang="en-US" style="margin: 0in 0in 0in 0.375in; list-style-type: disc;"><font style="font-size: 12pt;" color="#000000" face="Calibri">)</font></p><font style="font-size: 11pt;"></font><font style="font-size: 11pt;"></font><br clear="all"><p lang="en-US" style="margin: 0in; list-style-type: disc;"><font style="font-size: 12pt;" color="#004080" face="Calibri">If you look carefully, you'll notice that in this code snippet, we'll need to communicate with AD only twice, thereby improving the performance of the procedure as a whole. </font></p><font style="font-size: 11pt;"></font><font color="#004080" face="Calibri"></font><br clear="all"><p lang="en-US" style="margin: 0in; list-style-type: disc;"><font style="font-size: 12pt;"><font color="#004080" face="Calibri">Summing up: The importance of writing good code cannot be over-emphasized. It's good coding practices like this that lead to performance gains most of the time.</font> </font></p><br clear="all"><p lang="en-US" style="margin: 0in; list-style-type: disc;"><font style="font-size: 12pt;" color="#004080"></font><font style="font-size: 12pt;"><font color="#004080" face="Calibri">Hope this helps.</font> </font></p><br clear="all"><font style="font-size: 11pt;"></font></font>
]]></content:encoded>
    </item>
    <item>
      <title>When using SSL, SQL Failover Cluster Instance fails to start with error 17182</title>
      <link>https://docs.microsoft.com/archive/blogs/sqljourney/when-using-ssl-sql-failover-cluster-instance-fails-to-start-with-error-17182</link>
      <pubDate>Mon, 22 Jul 2013 14:02:00 GMT</pubDate>
      <dc:creator><![CDATA[HarshDeep_Singh]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/sqljourney/2013/07/22/when-using-ssl-sql-failover-cluster-instance-fails-to-start-with-error-17182/</guid>
      <description><![CDATA[I recently worked on an interesting issue with a SQL Server Failover Cluster Instance (FCI). We...]]></description>
      <content:encoded><![CDATA[<font style="font-size: 11pt;"></font>  <p style="margin: 0in; list-style-type: disc;"><font style="font-size: 12pt;" color="#004080" face="Times New Roman">I recently worked on an interesting issue with a SQL Server Failover Cluster Instance (FCI). We were trying to use an SSL certificate on the instance, and we followed these steps:     <br /></font></p> <font style="font-size: 11pt;"></font><font color="#004080" face="Times New Roman"></font>  <ol style="margin-top: 0in; margin-bottom: 0in; margin-left: 0.375in; unicode-bidi: embed; direction: ltr;" type="1"><font color="#004080"><font face="Times New Roman"><font style="font-size: 12pt;"></font></font></font>    <li style="margin-top: 0px; margin-bottom: 0px; vertical-align: middle;" value="value"><font style="font-size: 12pt;"><span><font color="#004080" face="Times New Roman">Made sure the certificate was requested according to the requirements defined </font></span><a style="cursor: auto;" href="https://www.technet.microsoft.com/en-us/library/ms189067(v=SQL.105).aspx"><span><font face="Times New Roman">here</font></span></a></font><span><font style="font-size: 12pt;">. </font></span></li>   <font style="font-size: 12pt;"></font>    <li style="margin-top: 0px; margin-bottom: 0px; vertical-align: middle;"><span><font style="font-size: 12pt;" color="#004080" face="Times New Roman">Loaded the certificate into the Personal store of the computer account across all the nodes</font></span></li>   <font style="font-size: 12pt;"></font><font color="#004080" face="Times New Roman"></font>    <li style="margin-top: 0px; margin-bottom: 0px; vertical-align: middle;"><span><font style="font-size: 12pt;" color="#004080" face="Times New Roman">Copied the thumbprint of the certificate, eliminated the spaces, and pasted it into the value field HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL10.CLUSTEST\MSSQLServer\Certificate key. Please note that this was a SQL 2008 instance named &quot;CLUSTEST&quot;</font></span></li>   <font style="font-size: 12pt;"></font></ol> <font style="font-size: 11pt;"></font><font color="#004080" face="Times New Roman"></font>  <p style="margin: 0in; list-style-type: disc;"><font style="font-size: 12pt;" color="#004080" face="Times New Roman">&#160;</font></p> <font style="font-size: 11pt;"></font><font color="#004080" face="Times New Roman"></font>  <p style="margin: 0in; list-style-type: disc;"><font style="font-size: 12pt;"><font color="#004080" face="Times New Roman">However, when we restarted SQL Server after performing these changes, it failed. In the errorlog, we saw these messages: </font></font></p>  <p>2013-07-21 14:06:11.54 spid19s&#160;&#160;&#160;&#160; Error: 17182, Severity: 16, State: 1.</p>  <p>2013-07-21 14:06:11.54 spid19s&#160;&#160;&#160;&#160; TDSSNIClient initialization failed with error 0xd, status code 0x38. Reason: An error occurred while obtaining or using the certificate for SSL. Check settings in Configuration Manager. The data is invalid. </p>  <p>2013-07-21 14:06:11.54 spid19s&#160;&#160;&#160;&#160; Error: 17182, Severity: 16, State: 1.</p>  <p>2013-07-21 14:06:11.54 spid19s&#160;&#160;&#160;&#160; TDSSNIClient initialization failed with error 0xd, status code 0x1. Reason: Initialization failed with an infrastructure error. Check for previous errors. The data is invalid. </p>  <p>2013-07-21 14:06:11.54 spid19s&#160;&#160;&#160;&#160; Error: 17826, Severity: 18, State: 3.</p>  <p>2013-07-21 14:06:11.54 spid19s&#160;&#160;&#160;&#160; Could not start the network library because of an internal error in the network library. To determine the cause, review the errors immediately preceding this one in the error log.</p>  <p>2013-07-21 14:06:11.54 spid19s&#160;&#160;&#160;&#160; Error: 17120, Severity: 16, State: 1.</p>  <p>2013-07-21 14:06:11.54 spid19s&#160;&#160;&#160;&#160; SQL Server could not spawn FRunCommunicationsManager thread. Check the SQL Server error log and the Windows event logs for information about possible related problems.</p> <font style="font-size: 11pt;"></font>  <p style="margin: 0in; list-style-type: disc;"><font style="font-size: 12pt;" color="#004080" face="Times New Roman">I checked and made sure the certificate was okay, and that it was loaded properly. Then, I noticed something interesting. After copying the thumbprint to a text file, I got a Unicode to ANSI conversion warning when I tried to save the file in txt format:</font></p>  <p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/51/72/metablogapi/4188.image_37FEA32F.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-51-72-metablogapi/4188.image_5F00_37FEA32F.png"><img title="image" style="display: inline; background-image: none;" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/51/72/metablogapi/0841.image_thumb_675018B9.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-51-72-metablogapi/0841.image_5F00_thumb_5F00_675018B9.png" width="397" height="171" /></a></p> <font style="font-size: 11pt;"></font>  <p style="margin: 0in; list-style-type: disc;">&#160;</p> <font style="font-size: 12pt;" color="#004080" face="Times New Roman">   <p style="margin: 0in; list-style-type: disc;">This is expected, since the default format for notepad is indeed ANSI. I went ahead and clicked OK. When we reopened the file, we saw a &quot;?&quot; at the beginning, which basically meant that there was a Unicode character at the beginning of the string. We followed these steps to resolve the issue:     <br />      <br clear="all" /></p> </font><font style="font-size: 11pt;"></font><font color="#004080" face="Times New Roman"></font>  <ol style="margin-top: 0in; margin-bottom: 0in; margin-left: 0.375in; unicode-bidi: embed; direction: ltr;" type="1"><font face="Times New Roman"><font color="#004080"><font style="font-size: 12pt;"></font></font></font>    <li style="margin-top: 0px; margin-bottom: 0px; vertical-align: middle;" value="value"><span><font style="font-size: 12pt;" color="#004080" face="Times New Roman">Eliminated the Unicode character from the thumbprint</font></span></li>   <font style="font-size: 12pt;"></font><font color="#004080" face="Times New Roman"></font>    <li style="margin-top: 0px; margin-bottom: 0px; vertical-align: middle;"><span><font style="font-size: 12pt;" color="#004080" face="Times New Roman">Converted all the alphabetical characters in the thumbprint to Caps. </font></span></li>   <font style="font-size: 12pt;"></font><font color="#004080" face="Times New Roman"></font>    <li style="margin-top: 0px; margin-bottom: 0px; vertical-align: middle;"><span><font style="font-size: 12pt;" color="#004080" face="Times New Roman">Eliminated the spaces from the thumbprint</font></span></li>   <font style="font-size: 12pt;"></font><font color="#004080" face="Times New Roman"></font>    <li style="margin-top: 0px; margin-bottom: 0px; vertical-align: middle;"><span><font style="font-size: 12pt;" color="#004080" face="Times New Roman">Saved this thumbprint to the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL10.CLUSTEST\MSSQLServer\Certificate key.</font></span></li>   <font style="font-size: 12pt;"></font></ol> <font style="font-size: 11pt;"></font><font color="#004080" face="Times New Roman"></font>  <p style="margin: 0in 0in 0in 0.375in; list-style-type: disc;"><font style="font-size: 12pt;" color="#004080" face="Times New Roman">&#160;</font></p> <font style="font-size: 11pt;"></font><font color="#004080" face="Times New Roman"></font>  <p style="margin: 0in; list-style-type: disc;"><font style="font-size: 12pt;" color="#004080" face="Times New Roman">The instance came online just fine this time.</font></p> <font style="font-size: 11pt;"></font><font color="#004080" face="Times New Roman"></font>  <p style="margin: 0in; list-style-type: disc;"><span style="mso-spacerun: yes;"><font style="font-size: 12pt;" color="#004080" face="Times New Roman">&#160;</font></span></p> <font style="font-size: 11pt;"></font><font color="#004080" face="Times New Roman"></font>  <p style="margin: 0in; list-style-type: disc;"><font style="font-size: 12pt;"><font color="#004080" face="Times New Roman">Hope this helps.</font> </font></p>  <p style="margin: 0in; list-style-type: disc;"><font size="3"></font></p>  <br clear="all" />  <p style="margin: 0in; list-style-type: disc;"></p> <font style="font-size: 11pt;"></font>]]></content:encoded>
    </item>
    <item>
      <title>SQL 2012 Availability Group does not come up on one instance</title>
      <link>https://docs.microsoft.com/archive/blogs/sqljourney/sql-2012-alwayson-availability-group-does-not-come-up-on-one-instance</link>
      <pubDate>Mon, 15 Jul 2013 16:19:00 GMT</pubDate>
      <dc:creator><![CDATA[HarshDeep_Singh]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/sqljourney/2013/07/15/sql-2012-availability-group-does-not-come-up-on-one-instance/</guid>
      <description><![CDATA[I recently came across this interesting issue with SQL 2012 Always on Availability Groups, wherein...]]></description>
      <content:encoded><![CDATA[<p style="margin: 0in"><span style="font-size: 11pt;color: #004080">I recently came across this interesting issue with SQL 2012 Always on Availability Groups, wherein after the network and IP were changed, the AG would not come up on one of the instances. </span></p>
<p style="margin: 0in"><span style="font-size: 11pt;color: #004080"> </span></p>
<p style="margin: 0in"><span style="font-size: 11pt;color: #004080">We checked the errorlogs on the server, found the following successful stacks for the failovers that had been attempted for the successful instance:</span></p>
&lt;

2013-01-30 13:03:21.09 spid1347 The state of the local availability replica in availability group 'SQL2012CLUS02' has changed from 'NOT_AVAILABLE' to 'RESOLVING_NORMAL'. The replica state changed because of either a startup, a failover, a communication issue, or a cluster error. For more information, see the availability group dashboard, SQL Server error log, Windows Server Failover Cluster management console or Windows Server Failover Cluster log.

2013-01-30 13:03:21.66 spid135 AlwaysOn: The local replica of availability group 'SQL2012CLUS02' is preparing to transition to the primary role in response to a request from the Windows Server Failover Clustering (WSFC) cluster. This is an informational message only. No user action is required.

2013-01-30 13:03:21.69 spid135 The state of the local availability replica in availability group 'SQL2012CLUS02' has changed from 'RESOLVING_NORMAL' to 'PRIMARY_PENDING'. The replica state changed because of either a startup, a failover, a communication issue, or a cluster error. For more information, see the availability group dashboard, SQL Server error log, Windows Server Failover Cluster management console or Windows Server Failover Cluster log.

2013-01-30 13:03:21.70 Server The Service Broker endpoint is in disabled or stopped state.

2013-01-30 13:03:21.72 Server The Service Broker endpoint is in disabled or stopped state.

2013-01-30 13:03:21.82 Server The state of the local availability replica in availability group 'SQL2012CLUS02' has changed from 'PRIMARY_PENDING' to 'PRIMARY_NORMAL'. The replica state changed because of either a startup, a failover, a communication issue, or a cluster error. For more information, see the availability group dashboard, SQL Server error log, Windows Server Failover Cluster management console or Windows Server Failover Cluster log.

2013-01-30 13:03:21.82 Server The Service Broker endpoint is in disabled or stopped state.

2013-01-30 13:04:15.72 spid50s A connection for availability group 'SQL2012CLUS02' from availability replica 'CTGDNAV' with id [E4A205DD-0098-481F-94F4-B15ABDC3BAD1] to 'CDGI-SQLPROD-02' with id [58F02E10-68CB-4EB2-B517-60306BCC0E72] has been successfully established. This is an informational message only. No user action is required.

&gt;
<p style="margin: 0in"><span style="font-size: 11pt;color: #004080">And</span></p>
&lt;

2013-01-30 13:04:36.51 spid754 AlwaysOn: The local replica of availability group 'SQL2012CLUS02' is preparing to transition to the resolving role in response to a request from the Windows Server Failover Clustering (WSFC) cluster. This is an informational message only. No user action is required.

2013-01-30 13:04:36.51 spid754 The state of the local availability replica in availability group 'SQL2012CLUS02' has changed from 'PRIMARY_NORMAL' to 'RESOLVING_NORMAL'. The replica state changed because of either a startup, a failover, a communication issue, or a cluster error. For more information, see the availability group dashboard, SQL Server error log, Windows Server Failover Cluster management console or Windows Server Failover Cluster log.

2013-01-30 13:04:36.52 Server The Service Broker endpoint is in disabled or stopped state.

2013-01-30 13:04:38.62 spid305 AlwaysOn: The local replica of availability group 'SQL2012CLUS02' is preparing to transition to the primary role in response to a request from the Windows Server Failover Clustering (WSFC) cluster. This is an informational message only. No user action is required.

2013-01-30 13:04:38.97 spid305 The state of the local availability replica in availability group 'SQL2012CLUS02' has changed from 'RESOLVING_NORMAL' to 'PRIMARY_PENDING'. The replica state changed because of either a startup, a failover, a communication issue, or a cluster error. For more information, see the availability group dashboard, SQL Server error log, Windows Server Failover Cluster management console or Windows Server Failover Cluster log.

2013-01-30 13:04:38.97 Server The Service Broker endpoint is in disabled or stopped state.

2013-01-30 13:04:39.13 Server The state of the local availability replica in availability group 'SQL2012CLUS02' has changed from 'PRIMARY_PENDING' to 'PRIMARY_NORMAL'. The replica state changed because of either a startup, a failover, a communication issue, or a cluster error. For more information, see the availability group dashboard, SQL Server error log, Windows Server Failover Cluster management console or Windows Server Failover Cluster log.

2013-01-30 13:04:39.14 Server The Service Broker endpoint is in disabled or stopped state.

2013-01-30 13:04:46.01 spid30s A connection for availability group 'SQL2012CLUS02' from availability replica 'CTGDNAV' with id [E4A205DD-0098-481F-94F4-B15ABDC3BAD1] to 'CDGI-SQLPROD-02' with id [58F02E10-68CB-4EB2-B517-60306BCC0E72] has been successfully established. This is an informational message only. No user action is required.

&gt;
<p style="margin: 0in"><span style="font-size: 11pt;color: #004080">We then checked the critical events for the AG in failover cluster manager, this was all i could find:</span></p>
<p style="margin: 0in"><span style="font-size: 11pt;color: #004080">Cluster resource 'SQL2012CLUS02' in clustered service or application 'SQL2012CLUS02' failed.</span></p>
<p style="margin: 0in"><span style="font-size: 11pt;color: #004080"> </span></p>
<p style="margin: 0in"><span style="font-size: 11pt;color: #004080">I then collected the errorlog for the CDGI-SQLPROD-02 instance, and found this:</span></p>
2013-01-30 13:04:14.890 spid1535 The state of the local availability replica in availability group 'SQL2012CLUS02' has changed from 'NOT_AVAILABLE' to 'RESOLVING_NORMAL'. The replica state changed because of either a startup, a failover, a communication issue, or a cluster error. For more

2013-01-30 13:04:15.580 spid1536s The state of the local availability replica in availability group 'SQL2012CLUS02' has changed from 'RESOLVING_NORMAL' to 'SECONDARY_NORMAL'. The replica state changed because of either a startup, a failover, a communication issue, or a cluster error. For m

2013-01-30 13:04:15.890 spid43s A connection for availability group 'SQL2012CLUS02' from availability replica 'CDGI-SQLPROD-02' with id [58F02E10-68CB-4EB2-B517-60306BCC0E72] to 'CTGDNAV' with id [E4A205DD-0098-481F-94F4-B15ABDC3BAD1] has been successfully established. This is an infor

2013-01-30 13:04:36.370 spid1540 The state of the local availability replica in availability group 'SQL2012CLUS02' has changed from 'SECONDARY_NORMAL' to 'RESOLVING_PENDING_FAILOVER'. The replica state changed because of either a startup, a failover, a communication issue, or a cluster er

2013-01-30 13:04:38.080 Logon Error: 18456, Severity: 14, State: 5.

2013-01-30 13:04:38.080 Logon Login failed for user 'CLT-SQLPROD-02$'. Reason: Could not find a login matching the name provided. [CLIENT: &lt;local machine&gt;]

&nbsp;
<p style="margin: 0in"><span style="font-size: 11pt;color: #004080">We can clearly see that the Login failure seems to be responsible for the failed failover of the AG. I tried adding the login manually, and restarted the instance, but the failover still failed. I then checked the event logs on CDGI-SQLPROD-02, found just this:</span></p>
Log Name: Application

Source: MSSQLSERVER

Date: 1/30/2013 4:54:43 PM

Event ID: 35206

Task Category: Server

Level: Information

Keywords: Classic

User: N/A

Computer: CDGI-SQLPROD-02.CLT.com

Description:

A connection timeout has occurred on a previously established connection to availability replica 'CTGDNAV' with id [E4A205DD-0098-481F-94F4-B15ABDC3BAD1]. Either a networking or a firewall issue exists or the availability replica has transitioned to the resolving role.
<p style="margin: 0in"><span style="font-size: 11pt;color: #004080">And then this:</span></p>
Log Name: Application

Source: MSSQLSERVER

Date: 1/30/2013 4:54:33 PM

Event ID: 18456

Task Category: Logon

Level: Information

Keywords: Classic,Audit Failure

User: SYSTEM

Computer: CDGI-SQLPROD-02.CLT.com

Description:

Login failed for user 'CLT-SQLPROD-02$'. Reason: Could not find a login matching the name provided. [CLIENT: &lt;local machine&gt;]
<p style="margin: 0in"><span style="font-size: 11pt;color: #004080">The interesting thing here is that the connection attempt seems to be coming from the OS on the same box. I then captured a Profiler trace to confirm, and saw this:</span></p>
<p style="margin: 0in"><span style="font-size: 11pt;color: #004080"> </span></p>
<p style="margin: 0in"><span style="font-size: 11pt;color: #004080">Looked at the profiler trace, found the login error event:</span></p>
ErrorLog 2013-01-31 11:21:30.55 Logon Error: 18456, Severity: 14, State: 5.

2013-01-31 11:21:30.55 Logon Login failed for user 'CLT-SQLPROD-02$'. Reason: Could not find a login matching the name provided. [CLIENT: &lt;local machine&gt;]

Microsoft® Windows® Operating System CDGI-SQLPROD-02$ 3828 86 2013-01-31 11:21:30.550 1 master 18456 26102 CDGI-SQLPROD-02 CLT0 CDGI-SQLPROD-02 CLTCDGI-SQLPROD-02$ 5 14

EventLog Login failed for user 'CLTCDGI-SQLPROD-02$'. Reason: Could not find a login matching the name provided. [CLIENT: &lt;local machine&gt;] Microsoft® Windows® Operating System CDGI-SQLPROD-02$ 3828 86 2013-01-31 11:21:30.550 0X184800000E0000001000000043004400470049002D00530051004C00500052004F0044002D00300032000000070000006D00610073007400650072000000 1 master 18456 26103 CDGI-SQLPROD-02 CLT0 CDGI-SQLPROD-02 CLTCDGI-SQLPROD-02$ 5 14

Audit Login Failed Login failed for user 'CLTCDGI-SQLPROD-02$'. Reason: Could not find a login matching the name provided. [CLIENT: &lt;local machine&gt;] Microsoft® Windows® Operating System CDGI-SQLPROD-02$ CLTCDGI-SQLPROD-02$ 3828 86 2013-01-31 11:21:30.550 1 master 18456 26104 1 - Nonpooled CDGI-SQLPROD-02 CLT 0 CDGI-SQLPROD-02 CLTCDGI-SQLPROD-02$ 5 0 1 - Non-DAC

User Error Message Login failed for user 'CLTCDGI-SQLPROD-02$'. Microsoft® Windows® Operating System CDGI-SQLPROD-02$ 3828 86 2013-01-31 11:21:30.550 1 master 18456 26105 CDGI-SQLPROD-02 CLT 0 CDGI-SQLPROD-02 CLTCDGI-SQLPROD-02$ 1 1 0 14
<p style="margin: 0in"><span style="font-size: 11pt;color: #004080">The profiler trace confirms our hunch. We then proceeded to run the following commands to add local system as a sysadmin on the problem instance:</span></p>
<p style="margin: 0in"><span style="font-size: 11pt;color: #004080"> </span></p>
<p style="margin: 0in"><span style="font-size: 11pt;color: #004080">USE [master]</span></p>
<p style="margin: 0in"><span style="font-size: 11pt;color: #004080">GO</span></p>
<p style="margin: 0in"><span style="font-size: 11pt;color: #004080"> </span></p>
<p style="margin: 0in"><span style="font-size: 11pt;color: #004080">/****** Object:  Login [NT AUTHORITYSYSTEM]    Script Date: 01-02-2013 03:31:56 ******/</span></p>
<p style="margin: 0in"><span style="font-size: 11pt;color: #004080">CREATE LOGIN [NT AUTHORITYSYSTEM] FROM WINDOWS WITH DEFAULT_DATABASE=[master], </span></p>
<p style="margin: 0in"><span style="font-size: 11pt;color: #004080">DEFAULT_LANGUAGE=[us_english]</span></p>
<p style="margin: 0in"><span style="font-size: 11pt;color: #004080">GO</span></p>
<p style="margin: 0in"><span style="font-size: 11pt;color: #004080"> </span></p>
<p style="margin: 0in"><span style="font-size: 11pt;color: #004080">GO</span></p>
<p style="margin: 0in"><span style="font-size: 11pt;color: #004080">ALTER SERVER ROLE [sysadmin] ADD MEMBER [NT AUTHORITYsystem]</span></p>
<p style="margin: 0in"><span style="font-size: 11pt;color: #004080">GO</span></p>
<p style="margin: 0in"><span style="font-size: 11pt;color: #004080"> </span></p>
<p style="margin: 0in"><span style="font-size: 11pt;color: #004080">After this, the failover worked perfectly fine. </span></p>
<p style="margin: 0in"><span style="font-size: 11pt;color: #004080"> </span></p>
<p style="margin: 0in"><span style="font-size: 11pt"><span style="color: #004080">Hope this helps.</span> </span></p>]]></content:encoded>
    </item>
    <item>
      <title>SQL Server patch fails with "Could not find any resources appropriate for the specified culture or the neutral culture"</title>
      <link>https://docs.microsoft.com/archive/blogs/sqljourney/sql-server-patch-fails-with-could-not-find-any-resources-appropriate-for-the-specified-culture-or-the-neutral-culture</link>
      <pubDate>Wed, 12 Jun 2013 15:52:00 GMT</pubDate>
      <dc:creator><![CDATA[HarshDeep_Singh]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/sqljourney/2013/06/12/sql-server-patch-fails-with-could-not-find-any-resources-appropriate-for-the-specified-culture-or-the-neutral-culture/</guid>
      <description><![CDATA[I recently worked on a number of issues where SQL Server Service Pack/patch installation would fail,...]]></description>
      <content:encoded><![CDATA[<font style="font-size: 11pt;"><p style="margin: 0in; list-style-type: disc;"><font style="font-size: 12pt;"><font color="#004080" face="Times New Roman"></font></font></p><p style="margin: 0in; list-style-type: disc;"><font style="font-size: 12pt;"><font color="#004080" face="Times New Roman">I recently worked on a number of issues where SQL Server Service Pack/patch installation would fail, and we would see this error in the relevant Detail.txt (located in C:Program FilesMicrosoft SQL Server100Setup BootstrapLog&lt;Date time of the installation attempt&gt; for SQL 2008/2008 R2):</font>      <br>&nbsp;</font></p><font style="font-size: 11pt;"></font><p style="margin: 0in; list-style-type: disc;"><font size="2" face="Times New Roman">2013-04-07 20:14:07 Slp: Package sql_bids_Cpu64: - The path of cached MSI package is: C:WindowsInstaller5c23b5e.msi . The RTM product version is: 10.50.1600.1</font></p><font size="2" face="Times New Roman"></font><p style="margin: 0in; list-style-type: disc;"><font size="2" face="Times New Roman">2013-04-07 20:14:07 Slp: Error: Action "Microsoft.SqlServer.Configuration.SetupExtension.InitializeUIDataAction" threw an exception during execution.</font></p><font size="2" face="Times New Roman"></font><p style="margin: 0in; list-style-type: disc;"><font size="2" face="Times New Roman">2013-04-07 20:14:13 Slp: Received request to add the following file to Watson reporting: C:UserskalerahulAppDataLocalTemp2tmpCC09.tmp</font></p><font size="2" face="Times New Roman"></font><p style="margin: 0in; list-style-type: disc;"><font size="2" face="Times New Roman">2013-04-07 20:14:13 Slp: The following is an exception stack listing the exceptions in outermost to innermost order</font></p><font size="2" face="Times New Roman"></font><p style="margin: 0in; list-style-type: disc;"><font size="2" face="Times New Roman">2013-04-07 20:14:13 Slp: Inner exceptions are being indented</font></p><font size="2" face="Times New Roman"></font><p style="margin: 0in; list-style-type: disc;"><font size="2" face="Times New Roman">2013-04-07 20:14:13 Slp: </font></p><font size="2" face="Times New Roman"></font><p style="margin: 0in; list-style-type: disc;"><font size="2" face="Times New Roman">2013-04-07 20:14:13 Slp: Exception type: System.Resources.MissingManifestResourceException</font></p><font size="2" face="Times New Roman"></font><p style="margin: 0in; list-style-type: disc;"><font size="2" face="Times New Roman">2013-04-07 20:14:13 Slp:<span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp;&nbsp; </span>Message: </font></p><font size="2" face="Times New Roman"></font><p style="margin: 0in; list-style-type: disc;"><font size="2" face="Times New Roman">2013-04-07 20:14:13 Slp:<span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><font style="background-color: rgb(255, 255, 0);">Could not find any resources appropriate for the specified culture or the neutral culture.<span style="mso-spacerun: yes;">&nbsp; </span>Make sure "Errors.resources" was correctly embedded or linked into assembly "Microsoft.SqlServer.Discovery" at compile time, or that all the satellite assemblies required are loadable and fully signed.</font></font></p><font size="2" face="Times New Roman"></font><p style="margin: 0in; list-style-type: disc;"><font size="2" face="Times New Roman">2013-04-07 20:14:13 Slp:<span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp;&nbsp; </span>Stack: </font></p><font size="2" face="Times New Roman"></font><p style="margin: 0in; list-style-type: disc;"><font size="2" face="Times New Roman">2013-04-07 20:14:13 Slp:<span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>at System.Resources.ResourceManager.InternalGetResourceSet(CultureInfo culture, Boolean createIfNotExists, Boolean tryParents)</font></p><font size="2" face="Times New Roman"></font><p style="margin: 0in; list-style-type: disc;"><font size="2" face="Times New Roman">2013-04-07 20:14:13 Slp:<span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>at System.Resources.ResourceManager.GetObject(String name, CultureInfo culture, Boolean wrapUnmanagedMemStream)</font></p><font size="2" face="Times New Roman"></font><p style="margin: 0in; list-style-type: disc;"><font size="2" face="Times New Roman">2013-04-07 20:14:13 Slp:<span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>at Microsoft.SqlServer.Discovery.MsiException.GetErrorMessage(Int32 errorNumber, CultureInfo culture)</font></p><font size="2" face="Times New Roman"></font><p style="margin: 0in; list-style-type: disc;"><font size="2" face="Times New Roman">2013-04-07 20:14:13 Slp:<span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>at Microsoft.SqlServer.Discovery.MsiException.GetErrorMessage(MsiRecord errorRecord, CultureInfo culture)</font></p><font size="2" face="Times New Roman"></font><p style="margin: 0in; list-style-type: disc;"><font size="2" face="Times New Roman">2013-04-07 20:14:13 Slp:<span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>at Microsoft.SqlServer.Discovery.MsiException.get_Message()</font></p><font size="2" face="Times New Roman"></font><p style="margin: 0in; list-style-type: disc;"><font size="2" face="Times New Roman">2013-04-07 20:14:13 Slp:<span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>at System.Exception.ToString()</font></p><font size="2" face="Times New Roman"></font><p style="margin: 0in; list-style-type: disc;"><font size="2" face="Times New Roman">2013-04-07 20:14:13 Slp:<span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>at System.Exception.ToString()</font></p><font size="2" face="Times New Roman"></font><p style="margin: 0in; list-style-type: disc;"><font size="2" face="Times New Roman">2013-04-07 20:14:13 Slp:<span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>at System.Exception.ToString()</font></p><font size="2" face="Times New Roman"></font><p style="margin: 0in; list-style-type: disc;"><font size="2" face="Times New Roman">2013-04-07 20:14:13 Slp:<span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>at Microsoft.SqlServer.Setup.Chainer.Workflow.ActionEngine.RunActionQueue()</font></p><font size="2" face="Times New Roman"></font><p style="margin: 0in; list-style-type: disc;"><font size="2" face="Times New Roman">2013-04-07 20:14:13 Slp:<span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>at Microsoft.SqlServer.Setup.Chainer.Workflow.Workflow.RunWorkflow(WorkflowObject workflowObject, HandleInternalException exceptionHandler)</font></p><font size="2" face="Times New Roman"></font><p style="margin: 0in; list-style-type: disc;"><font size="2" face="Times New Roman">2013-04-07 20:14:13 Slp:<span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>at Microsoft.SqlServer.Chainer.Setup.Setup.RunRequestedWorkflow()</font></p><font size="2" face="Times New Roman"></font><p style="margin: 0in; list-style-type: disc;"><font size="2" face="Times New Roman">2013-04-07 20:14:13 Slp:<span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>at Microsoft.SqlServer.Chainer.Setup.Setup.Run()</font></p><font size="2" face="Times New Roman"></font><p style="margin: 0in; list-style-type: disc;"><font size="2" face="Times New Roman">2013-04-07 20:14:13 Slp:<span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>at Microsoft.SqlServer.Chainer.Setup.Setup.Start()</font></p><font size="2" face="Times New Roman"></font><p style="margin: 0in; list-style-type: disc;"><font size="2" face="Times New Roman">2013-04-07 20:14:13 Slp:<span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>at Microsoft.SqlServer.Chainer.Setup.Setup.Main()</font></p><font style="font-size: 11pt;"></font><p style="margin: 0in; list-style-type: disc;"><font style="font-size: 12pt;">&nbsp;</font></p><font style="font-size: 11pt;"></font><p style="margin: 0in; list-style-type: disc;"><span><font color="#004080" size="3" face="Times New Roman">Now that's a weird and hard to understand error, isn't it? However, look closely at what the setup is trying to do, and you will see that it's trying to access the following file from the installer cache:       <br></font></span><span><span style="mso-spacerun: yes;"><font color="#004080" size="3" face="Times New Roman">&nbsp;</font></span><font color="#004080" size="3" face="Times New Roman">C:WindowsInstaller5c23b5e.msi       <br></font></span><font color="#004080" size="3" face="Times New Roman">&nbsp;</font></p><font color="#004080" size="3" face="Times New Roman"></font><p style="margin: 0in; list-style-type: disc;"><font color="#004080" size="3" face="Times New Roman">Open the installer cache and try to install the msi manually. If it succeeds, try running the patch setup again and it should proceed beyond the error this time. If the msi setup fails, then you will need to troubleshoot that first, before the patch setup proceeds further. This behaviour is expected, in that the service pack setup will try to access the msi's (Microsoft Installer files, installed with the base installation of SQL) and msp's (Microsoft Patch files, installed by Service packs, CU's and hotfixes) of each of the installed components of SQL Server. If it's unable to access/run any of these, the Service pack setup will fail. </font></p><p style="margin: 0in; list-style-type: disc;"><font color="#004080" size="3" face="Times New Roman"></font></p><p style="margin: 0in; list-style-type: disc;">&nbsp;</p><p style="margin: 0in; list-style-type: disc;"><font color="#004080" size="3" face="Times New Roman">Hope this helps.</font> </p><p style="margin: 0in; list-style-type: disc;">&nbsp;</p><p style="margin: 0in; list-style-type: disc;"></p><font style="font-size: 11pt;"></font></font>
]]></content:encoded>
    </item>
    <item>
      <title>How To: Troubleshooting SQL Server I/O bottlenecks</title>
      <link>https://docs.microsoft.com/archive/blogs/sqljourney/how-to-troubleshooting-sql-server-io-bottlenecks</link>
      <pubDate>Mon, 03 Jun 2013 17:01:00 GMT</pubDate>
      <dc:creator><![CDATA[HarshDeep_Singh]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/sqljourney/2013/06/03/how-to-troubleshooting-sql-server-io-bottlenecks/</guid>
      <description><![CDATA[One of the most common reason for server performance issues with respect to SQL Server is the...]]></description>
      <content:encoded><![CDATA[<p style="margin: 0in; list-style-type: disc;"><span style="color: #004080; font-size: 10pt;">One of the most common reason for server performance issues with respect to SQL Server is the presence of an I/O bottleneck on the system. When I say I/O bottleneck, it can mean issues like slow disks, other processes hogging I/O, out-dated drivers, etc. In this blog, I will seek to outline the approach for identifying and troubleshooting I/O bottlenecks on SQL Server. </span><p style="margin: 0in; list-style-type: disc;"><span style="color: #004080; font-size: 10pt;">&nbsp;</span></p><p style="margin: 0in; list-style-type: disc;"><span><span style="color: #004080; font-size: small;"><strong><span style="text-decoration: underline;">The Symptoms</span></strong></span></span></p><p style="margin: 0in; list-style-type: disc;"><span style="color: #004080; font-size: 10pt;">&nbsp;</span></p><p style="margin: 0in; list-style-type: disc;"><span style="color: #004080; font-size: 10pt;">The following are the most common symptoms of an I/O bottleneck on the SQL Server machine:</span></p><ul>
<li>
<div style="margin-top: 0px; margin-bottom: 0px; vertical-align: middle;"><span><span style="color: #004080; font-size: 10pt;">You see a lot of threads waiting on one or more of the following waits:</span></span></div>
</li>
<ul style="margin-top: 0in; margin-bottom: 0in; margin-left: 0.375in; unicode-bidi: embed; direction: ltr;" type="disc">
<li style="margin-top: 0px; margin-bottom: 0px; vertical-align: middle;"><span><span style="color: #004080; font-size: 10pt;">PAGEIOLATCH_*</span></span></li>
<li style="margin-top: 0px; margin-bottom: 0px; vertical-align: middle;"><span><span style="color: #004080; font-size: 10pt;">WRITELOG</span></span></li>
<li style="margin-top: 0px; margin-bottom: 0px; vertical-align: middle;"><span><span style="color: #004080; font-size: 10pt;">TRACEWRITE</span></span></li>
<li style="margin-top: 0px; margin-bottom: 0px; vertical-align: middle;"><span><span style="color: #004080; font-size: 10pt;">SQLTRACE_FILE_WRITE_IO_COMPLETION</span></span></li>
<li style="margin-top: 0px; margin-bottom: 0px; vertical-align: middle;"><span><span style="color: #004080; font-size: 10pt;">ASYNC_IO_COMPLETION</span></span></li>
<li style="margin-top: 0px; margin-bottom: 0px; vertical-align: middle;"><span><span style="color: #004080; font-size: 10pt;">IO_COMPLETION</span></span></li>
<li style="margin-top: 0px; margin-bottom: 0px; vertical-align: middle;"><span style="color: #004080;"><span><span style="font-size: 10pt;">LOGBUFFER <br></span></span><span style="font-size: 11pt;">&nbsp;</span></span></li>
</ul>
<li style="margin-top: 0px; margin-bottom: 0px; vertical-align: middle;"><span><span style="color: #004080; font-size: 10pt;">You see the famous "I/O taking longer than 15 seconds" messages in the SQL Server errorlogs:&nbsp; </span></span><span style="font-size: 10pt;"> <br>2012-11-11 00:21:25.26 spid1 SQL Server has encountered 192 occurrence(s) of IO requests taking longer than 15 seconds to complete on file [E:SEDATAstressdb5.ndf] in database [stressdb] (7). The OS file handle is 0x00000000000074D4. The offset of the latest long IO is:0x00000000022000&rdquo;.</span></li>
</ul><p style="margin: 0in; list-style-type: disc;"><span style="font-size: 10pt;">&nbsp;</span></p><p style="margin: 0in; list-style-type: disc;"><span><span style="color: #004080; font-size: small;"><strong><span style="text-decoration: underline;">Troubleshooting</span></strong></span></span></p><p style="margin: 0in; list-style-type: disc;"><span style="color: #004080; font-size: 10pt;">&nbsp;</span></p><p style="margin: 0in; list-style-type: disc;"><span><span style="color: #004080; font-size: 10pt;"><strong><span style="text-decoration: underline;">Data Collection</span>:</strong></span></span></p><p style="margin: 0in; list-style-type: disc;">&nbsp;</p><p style="margin: 0in; list-style-type: disc;"><span style="color: #004080; font-size: 10pt;">If you see the symptoms outlined above quite frequently on your SQL Server installation, then it will be safe to draw the conclusion that your instance is suffering from a disk subsystem or I/O bottleneck. Let's look at the data collection and troubleshooting approach pertaining to the same:</span></p><ol>
<li>
<div style="margin-top: 0px; margin-bottom: 0px; vertical-align: middle;"><span><span style="color: #004080; font-size: 10pt;">Enable a custom Performance Monitor collector to capture all disk related counters. Just go to start-&gt;run, type perfmon, and hit ok. Next, go to Data Collector sets-&gt;User Defined, right click on User Defined, and click New-&gt; Data Collector set. <br> Note: The best thing about perfmon(apart from the fact that it is built into windows) is that it's a very lightweight diagnostic, and has negligible performance overhead/impact. <br> <br></span></span></div>
</li>
<li style="margin-top: 0px; margin-bottom: 0px; vertical-align: middle;"><span><span style="color: #004080; font-size: 10pt;">Give the data collector set a name, and select Create manually. Under type of data, select the "Create data logs" option, and check the Performance Counter checkbox under it. <br> <br></span></span></li>
<li style="margin-top: 0px; margin-bottom: 0px; vertical-align: middle;"><span><span style="color: #004080; font-size: 10pt;">Next, click on add performance counters, and select the "LogicalDisk", "Process" and "PhysicalDisk" groups, and select "All instances" for both before adding them. <br> <br></span></span></li>
<li style="margin-top: 0px; margin-bottom: 0px; vertical-align: middle;"><span><span style="color: #004080; font-size: 10pt;">After you have added the counters, you can also modify the sample interval. You might want to do this if you see spikes lasting less than 15 seconds, which is the default sample interval. I sometimes use an interval of 5 seconds when I want to closely monitor an environment . <br> <br></span></span></li>
<li style="margin-top: 0px; margin-bottom: 0px; vertical-align: middle;"><span><span style="color: #004080; font-size: 10pt;">Click on Finish and you will now see the new Data Collector set created under User Defined. <br> <br></span></span></li>
<li style="margin-top: 0px; margin-bottom: 0px; vertical-align: middle;"><span><span style="color: #004080; font-size: 10pt;">Next, right click on the Data Collector set you just created, and click start. </span></span></li>
</ol><p style="margin: 0in 0in 0in 0.375in; list-style-type: disc;" lang="en-US"><span style="color: #004080; font-size: 10pt;">&nbsp;</span></p><p style="margin: 0in 0in 0in 0.375in; list-style-type: disc;"><span style="color: #004080; font-size: 10pt;">I normally recommend my clients to run the perfmon collector set for at least one business day, so that it has captured data for the load exerted by at least one standard business cycle. </span></p><p style="margin: 0in 0in 0in 0.375in; list-style-type: disc;"><span style="color: #004080; font-size: 10pt;">&nbsp;</span></p><p style="margin: 0in; list-style-type: disc;">&nbsp;</p><p style="margin: 0in; list-style-type: disc;"><span><span style="color: #004080; font-size: 10pt;"><strong><span style="text-decoration: underline;">Analysis</span>:</strong></span></span></p><p style="margin: 0in; list-style-type: disc;">&nbsp;</p><p style="margin: 0in; list-style-type: disc;"><span style="color: #004080; font-size: 10pt;">Now that we have the data, we can start the analysis. After stopping the collector set, you can open the blg file generated (the path is displayed under the output column, on the right hand side in perfmon) using perfmon (a simple double click works, as the file type is associated with perfmon by default). Once open, is should have automatically loaded all the counters. Analysing with all the counters can be a bit cumbersome, so I would suggest that you first delete all the counters and then add specific counters one by one.</span></p><p style="margin: 0in; list-style-type: disc;"><span style="color: #004080; font-size: 10pt;"></span></p><p style="margin: 0in; list-style-type: disc;"><span style="color: #004080; font-size: 10pt;">I will list out the important counters here, along with their expected values:</span><span style="color: #004080; font-size: 10pt;">&nbsp;</span></p><ol>
<li>
<div style="margin-top: 0px; margin-bottom: 0px; vertical-align: middle;"><span style="font-size: 10pt;"><span><span style="color: #004080;"><strong>Process-&gt;IO Data Bytes/sec</strong>:</span></span><span style="color: #004080;"><span> This counter represents the average amount of IO Data bytes/sec spawned by each process. In conjunction with IO Other Bytes/sec, this counter can be used to determine the average IO per second as well as the total amount of IO spawned by each process during the capture. Check for the largest I/O consumers, and see if SQL is being starved of I/O due to some other process spawning a large amount of I/O on the system. <br></span>&nbsp;</span></span></div>
</li>
<li style="margin-top: 0px; margin-bottom: 0px; vertical-align: middle;"><span style="font-size: 10pt;"><span><span style="color: #004080;"><strong>Process-&gt; IO Other Bytes/sec</strong></span></span><span style="color: #004080;"><span>: This counter represents the non-data IO spawned by each process during the capture. Usually, the amount of non-data IO is very low as compared to data IO. Use the total of both IO Data Bytes and IO other bytes to determine the total amount of IO spawned by each process during the capture. Check for the largest I/O consumers, and see if SQL is being starved of I/O due to some other process spawning a large amount of I/O on the system. <br></span>&nbsp;</span></span></li>
<li style="margin-top: 0px; margin-bottom: 0px; vertical-align: middle;"><span style="font-size: 10pt;"><span><span style="color: #004080;"><strong>Physical Disk/Logical Disk-&gt;Avg. Disk Sec/Read</strong></span></span><span style="color: #004080;"><span>: This counter signifies the average amount of time, in ms, that it takes for a read I/O request to be serviced for each physical/logical disk. An average of less than 10 ms (0.010) is good, and between 10-15 ms (0.010-0.015) is acceptable, but anything beyond 15 ms (0.015) is a cause for concern. <br></span>&nbsp;</span></span></li>
<li style="margin-top: 0px; margin-bottom: 0px; vertical-align: middle;"><span style="color: #004080;"><span style="font-size: 10pt;"><span><strong>Physical Disk/Logical Disk-&gt;Avg. Disk Sec/Write</strong></span></span><span><span style="font-size: 10pt;">: This counter signifies the average amount of time, in ms, that it takes for a write I/O request to be serviced for each physical/logical disk. An average of less than 10 ms (0.010) is good, and between 10-15 ms (0.010-0.015) is acceptable, but anything beyond 15 ms (0.015) is a cause for concern.</span><span style="mso-spacerun: yes;"><span style="font-size: 10pt;">&nbsp;&nbsp; <br> <br></span></span></span></span></li>
<li style="margin-top: 0px; margin-bottom: 0px; vertical-align: middle;"><span style="color: #004080;"><span style="font-size: 10pt;"><span><strong>Physical Disk/Logical Disk-&gt;Disk Bytes/Sec</strong></span></span><span><span style="font-size: 10pt;">: This counter represents, in bytes, the throughput of your I/O subsystem for each physical/logical disk. Look for the max value for each disk, and divide it by 1024 twice to get the max throughput in MB for the disk. SAN's generally start from 200-250 MB/s these days. If you see that the throughput is lower than the specifications for the disk, it's not necessarily a cause for concern. Check this counter in conjunction with the Avg Disk Sec/Read or Avg Disk Sec/Write counters (depending on the wait/symptom you see in SQL), and see the latency at the time of the maximum throughput. If the latency is green, then it just means that SQL spawned I/O that was less the disk throughput capacity, and was easily handled by the disk. <br> <br></span></span></span></li>
<li style="margin-top: 0px; margin-bottom: 0px; vertical-align: middle;"><span style="color: #004080;"><span style="font-size: 10pt;"><span><strong>Physical Disk/Logical Disk-&gt;Avg. Disk Queue Length</strong></span></span><span><span style="font-size: 10pt;">: This counter represents the average number of I/O's pending in the I/O queue for each physical/logical disk. Generally, if the average is greater than 2 per spindle, it's a cause for concern. Please note that I mentioned the acceptable threshold as 2 per spindle. Most SAN&rsquo;s these days have multiple spindles. So, for example, if your SAN has 4 spindles, the acceptable threshold for Avg Disk Queue Length would be 8. <br>Check the other counters to confirm. <br> <br></span></span></span></li>
<li style="margin-top: 0px; margin-bottom: 0px; vertical-align: middle;"><span style="font-size: 10pt;"><span><span style="color: #004080;"><strong>Physical Disk/Logical Disk-&gt;Split IO/Sec</strong>:</span></span><span style="color: #004080;"><span> This counter indicates the I/O's for which the Operating System had to make more than one command call, grouped by physical/logical disk. This happens if the IO request touches data on non-contiguous file segments. It's a good indicator of file/volume fragmentation. <br> <br></span></span></span></li>
<li style="margin-top: 0px; margin-bottom: 0px; vertical-align: middle;"><span style="color: #004080;"><span style="font-size: 10pt;"><span><strong>Physical Disk/Logical Disk-&gt;%Disk Time</strong>: </span></span><span><span style="font-size: 10pt;">This counter is a general mark of how busy the physical/logical disk is. Actually, it is nothing more than the &ldquo;Avg. Disk Queue Length&rdquo; counter multiplied by 100. It is the same value displayed in a different scale. This is the reason you can see the %Disk Time going greater than 100, as explained in the KB </span></span></span><span style="font-size: small;"><a href="https://support.microsoft.com/kb/310067"><span style="text-decoration: underline;">https://support.microsoft.com/kb/310067</span></a><span style="color: #004080;">. It basically means that the Avg. Disk Queue Length was greater than 1 during that time. If you've captured the perfmon for a long period (a few hours or a complete business day), and you see the %Disk Time to be greater than 80%, it's generally indicative of a disk bottleneck, and you should take a closer look at the other counters to arrive at a logical conclusion. </span></span><span> <br></span><span style="color: #004080; font-size: 10pt;">&nbsp;</span></li>
</ol><p style="margin: 0in; list-style-type: disc;"><span style="color: #004080; font-size: 10pt;">It's important to keep 2 things in mind. One, make sure your data capture is not skewed or biased in any way (for example, do not run a capture at the time of a monthly data load or something). Second, make sure you correlate the numbers reflected across the various counters to arrive at the overall picture of how your disks are doing. </span></p><p style="margin: 0in; list-style-type: disc;"><span style="color: #004080; font-size: 10pt;">&nbsp;</span></p><p style="margin: 0in; list-style-type: disc;"><span style="color: #004080; font-size: 10pt;">Most of the time, I see that people are surprised when they are told that there are I/O issues on the system. Their typical response is "But, it's been working just fine for x years, how can it create a bottleneck now?". The answer lies within the question itself. When the server was initially configured, the disk resources were sufficient for the load on the server. However, with time, it's inevitable that the business grows as a whole, and so do the number of transactions, as well as the overall load. As a result, there comes a day when the load breaches that threshold, and the disk resources on the server are no longer sufficient to handle it. If you come to office one fine day, see high latency on the disks during normal working hours, and are sure that</span></p><ul>
<li>
<div style="margin-top: 0px; margin-bottom: 0px; vertical-align: middle;"><span><span style="color: #004080; font-size: 10pt;">No special/additional workloads are running on SQL</span></span></div>
</li>
<li>
<div style="margin-top: 0px; margin-bottom: 0px; vertical-align: middle;"><span><span style="color: #004080; font-size: 10pt;">No other process on the server is spawning excessive I/O,</span></span></div>
</li>
<li>
<div style="margin-top: 0px; margin-bottom: 0px; vertical-align: middle;"><span><span style="color: #004080; font-size: 10pt;">Nothing changed on the server in the past 24 hours (like a software installation, patching, reboot, etc.)</span></span></div>
</li>
<li>
<div style="margin-top: 0px; margin-bottom: 0px; vertical-align: middle;"><span><span style="color: #004080; font-size: 10pt;">All the BIOS and disk drivers on the server are up to date, </span></span></div>
</li>
</ul><p style="margin: 0in; list-style-type: disc;"><br><span style="color: #004080; font-size: 10pt;"> Then it's highly likely that the load on your server has breached this threshold, and you should think about asking your disk vendor(s) for a disk upgrade (after having them check the existing system once for latency and throughput, of course). Another potential root cause that can cause high latency is that your disk drivers and/or BIOS are out of date. I would strongly recommend checking periodically for updates to all the drivers on the machine, as well as the BIOS. </span></p><p style="margin: 0in; list-style-type: disc;"><span style="color: #004080; font-size: 10pt;">&nbsp;</span></p><p style="margin: 0in; list-style-type: disc;"><span style="font-size: 10pt;"><span style="color: #004080;">Hope this helps. As always, comments, feedbacks and suggestions are welcome.</span> </span></p><p style="margin: 0in; list-style-type: disc;">&nbsp;</p><p style="margin: 0in; list-style-type: disc;"><span style="font-size: 10pt;">&nbsp;</span></p></p>
]]></content:encoded>
    </item>
    <item>
      <title>An interesting issue with SQL Server Script upgrade mode</title>
      <link>https://docs.microsoft.com/archive/blogs/sqljourney/an-interesting-issue-with-sql-server-script-upgrade-mode</link>
      <pubDate>Mon, 15 Apr 2013 01:08:00 GMT</pubDate>
      <dc:creator><![CDATA[HarshDeep_Singh]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/sqljourney/2013/04/15/an-interesting-issue-with-sql-server-script-upgrade-mode/</guid>
      <description><![CDATA[Here's another common issue that I've seen quite a few people run into of late. When you run a patch...]]></description>
      <content:encoded><![CDATA[<font style="font-size: 11pt;"><p style="margin: 0in; list-style-type: disc;"><font style="font-size: 12pt;" color="#004080" face="Calibri">Here's another common issue that I've seen quite a few people run into of late. </font></p><font style="font-size: 11pt;"></font><font color="#004080" face="Calibri"></font><p style="margin: 0in; list-style-type: disc;"><font style="font-size: 12pt;" color="#004080" face="Calibri">When you run a patch against SQL Server, the patch installs successfully, but on restart, SQL goes into "script upgrade mode" and you're unable to connect to it. Upon looking at the errorlog, you see something like this:</font></p><font style="font-size: 11pt;"></font><p style="margin: 0in; list-style-type: disc;"><font style="font-size: 12pt;">&nbsp;</font></p><font style="font-size: 11pt;"></font><p lang="en-US" style="margin: 0in; list-style-type: disc;"><font size="2" face="Calibri">2012-08-23 03:43:38.29 spid7s&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Error: 5133, Severity: 16, State: 1.</font></p><font size="2" face="Calibri"></font><p lang="en-US" style="margin: 0in; list-style-type: disc;"><span><font size="2" face="Calibri">2012-08-23 03:43:38.29 spid7s&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Directory lookup for the file "D:SQLDatatemp_MS_AgentSigningCertificate_database.mdf" failed with the operating system error 2(The system cannot find the file specified.).</font></span></p><font size="2" face="Calibri"></font><p lang="en-US" style="margin: 0in; list-style-type: disc;"><font size="2" face="Calibri">2012-08-23 03:43:38.29 spid7s&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Error: 1802, Severity: 16, State: 1.</font></p><font size="2" face="Calibri"></font><p lang="en-US" style="margin: 0in; list-style-type: disc;"><font size="2" face="Calibri">2012-08-23 03:43:38.29 spid7s&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CREATE DATABASE failed. Some file names listed could not be created. Check related errors.</font></p><font size="2" face="Calibri"></font><p lang="en-US" style="margin: 0in; list-style-type: disc;"><font size="2" face="Calibri">2012-08-23 03:43:38.31 spid7s&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Error: 912, Severity: 21, State: 2.</font></p><font size="2" face="Calibri"></font><p lang="en-US" style="margin: 0in; list-style-type: disc;"><font size="2" face="Calibri">2012-08-23 03:43:38.31 spid7s&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Script level upgrade for database 'master' failed because upgrade step 'sqlagent100_msdb_upgrade.sql' encountered error 598, state 1, severity 25. This is a serious error condition which might interfere with regular operation and the database will be taken offline. If the error happened during upgrade of the 'master' database, it will prevent the entire SQL Server instance from starting. Examine the previous errorlog entries for errors, take the appropriate corrective actions and re-start the database so that the script upgrade steps run to completion.</font></p><font size="2" face="Calibri"></font><p lang="en-US" style="margin: 0in; list-style-type: disc;"><font size="2" face="Calibri">2012-08-23 03:43:38.31 spid7s&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Error: 3417, Severity: 21, State: 3.</font></p><font size="2" face="Calibri"></font><p lang="en-US" style="margin: 0in; list-style-type: disc;"><font size="2" face="Calibri">2012-08-23 03:43:38.31 spid7s&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Cannot recover the master database. SQL Server is unable to run. Restore master from a full backup, repair it, or rebuild it. For more information about how to rebuild the master database, see SQL Server Books Online.</font></p><font style="font-size: 11pt;"></font><p style="margin: 0in; list-style-type: disc;"><font style="font-size: 12pt;">&nbsp;</font></p><font style="font-size: 11pt;"></font><p style="margin: 0in; list-style-type: disc;"><font style="font-size: 12pt;" color="#004080" face="Calibri">Script upgrade means that when SQL is restarted for the first time after the application of the patch, the upgrade scripts are run against each system db (to upgrade the system tables, views, etc. ). During this process, SQL Server attempts to create this mdf file in the default data location, and if the path is not available, then we get this error. Most of the time, it's a result of the data having been moved to a different folder, and the original Default Data path being no longer available. </font></p><font style="font-size: 11pt;"></font><font color="#004080" face="Calibri"></font><p style="margin: 0in; list-style-type: disc;"><font style="font-size: 12pt;" color="#004080" face="Calibri">The default data path can be checked from the following registry key (for a default SQL 2008 instance):</font></p><font style="font-size: 11pt;"></font><font color="#004080" face="Calibri"></font><p style="margin: 0in; list-style-type: disc;"><font style="font-size: 12pt;" color="#004080" face="Calibri">HKEY_LOCAL_MACHINESoftwareMicrosoftMicrosoft SQL ServerMSSQL10.MSSQLSERVERMSSQLServer</font></p><font style="font-size: 11pt;"></font><font color="#004080" face="Calibri"></font><p style="margin: 0in; list-style-type: disc;"><font style="font-size: 12pt;" color="#004080" face="Calibri">The Mssqlserver key will have a string entry named "DefaultData". If you see a location here that's no longer available, please change it to the current data location (alternatively, you can also "recreate" the default data path mentioned in the string value).</font></p><p style="margin: 0in; list-style-type: disc;"><font style="font-size: 12pt;" color="#004080" face="Calibri">If you do not see the key, check for the please check the HKEY_LOCAL_MACHINESOFTWAREMicrosoftMicrosoft SQL ServerMSSQL10.&lt;instance name&gt;Setup key, and see if you can spot the SQLDataRoot key there. Check to see if this key has the path mentioned above, and if so, update it to the current path. </font></p><p style="margin: 0in; list-style-type: disc;"></p><br><p style="margin: 0in; list-style-type: disc;"><font color="#004080" size="3" face="Calibri">If the path is correct, then one of the following conditions holds true:</font></p><p style="margin: 0in; list-style-type: disc;"><span lang="EN" style='color: rgb(0, 64, 128); font-family: "Calibri","sans-serif"; mso-ansi-language: en;'></span><span lang="EN" style='color: rgb(0, 64, 128); font-family: "Calibri","sans-serif"; mso-ansi-language: en;'></span></p><br><p style="margin: 0in; list-style-type: disc;"><span lang="EN" style='color: rgb(0, 64, 128); font-family: "Calibri","sans-serif"; mso-ansi-language: en;'><font size="3">1. The relevant drive is not added as a resource to the SQL Server group in Failover cluster manager. </font></span></p><p style="margin: 0in; list-style-type: disc;"><span lang="EN" style='color: rgb(0, 64, 128); font-family: "Calibri","sans-serif"; mso-ansi-language: en;'></span><font size="3"><span lang="EN" style='color: rgb(0, 64, 128); font-family: "Calibri","sans-serif"; mso-ansi-language: en;'>2. The SQL Server resource does not have a dependency on the specified drive.        <br style="mso-special-character: line-break;"></span></font></p><br><p style="margin: 0in; list-style-type: disc;"><font size="3"><span lang="EN" style='color: rgb(0, 64, 128); font-family: "Calibri","sans-serif"; mso-ansi-language: en;'>After this, restart SQL Server and the script upgrade should complete successfully this time. Hope this helps.</span></font><span lang="EN" style="mso-ansi-language: en;">      <p></p>   </span></p><p style="margin: 0in; list-style-type: disc;"><font style="font-size: 12pt;"></font></p><br clear="all"><br clear="all"><br clear="all"></font>
]]></content:encoded>
    </item>
    <item>
      <title>Why the service account format matters for upgrades</title>
      <link>https://docs.microsoft.com/archive/blogs/sqljourney/why-the-service-account-format-matters-for-upgrades</link>
      <pubDate>Mon, 01 Apr 2013 20:25:00 GMT</pubDate>
      <dc:creator><![CDATA[HarshDeep_Singh]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/sqljourney/2013/04/01/why-the-service-account-format-matters-for-upgrades/</guid>
      <description><![CDATA[&nbsp;I've seen this issue a few times in the past few months, so decided to blog about this. When...]]></description>
      <content:encoded><![CDATA[<p>&nbsp;<font color="#004080" size="2"></font><p style="margin: 0in; list-style-type: disc;"><font color="#004080" size="2">I've seen this issue a few times in the past few months, so decided to blog about this. When upgrading from SQL 2005 to SQL 2008/SQL 2008 R2 (or even from SQL 2008 to SQL 2008 R2), you might face an error with the in-place upgrade. </font></p><font color="#004080" size="2"></font><p style="margin: 0in; list-style-type: disc;"><font color="#004080" size="2">Open the setup logs folder (located in C:Program filesMicrosoft SQL Server&lt;Version -100 for 2008 and 2008 r2&gt;Setup BootstrapLog folder by default), and look for a folder with the datetime of the upgrade attempt. Inside this folder, look for a file named "Detail.txt". </font></p><font color="#004080" size="2"></font><p style="margin: 0in; list-style-type: disc;"><font face="Calibri"><font size="2"><font color="#004080" face="Segoe UI">Looking inside the detail.txt file, check for the following stack:</font> </font></font></p><p style="margin: 0in; list-style-type: disc;"><font size="2" face="Calibri"></font></p><font size="2" face="Calibri"></font><p style="margin: 0in; list-style-type: disc;"><span style="background-image: none; background-attachment: scroll; background-repeat: repeat; background-size: auto; background-origin: padding-box; background-clip: border-box; mso-highlight: yellow;"><font style="background-color: rgb(255, 255, 0);" size="2" face="Calibri">2013-01-21 11:16:42 Slp: Sco: Attempting to check if container 'WinNT://Harsh2k8,computer' of user account exists</font></span></p><font style="background-color: rgb(255, 255, 0);" size="2" face="Calibri"></font><p style="margin: 0in; list-style-type: disc;"><span style="background-image: none; background-attachment: scroll; background-repeat: repeat; background-size: auto; background-origin: padding-box; background-clip: border-box; mso-highlight: yellow;"><font style="background-color: rgb(255, 255, 0);" size="2" face="Calibri">2013-01-21 11:16:42 Slp: Sco: User srv_sql@contoso.test wasn't located</font></span></p><font style="background-color: rgb(255, 255, 0);" size="2" face="Calibri"></font><p style="margin: 0in; list-style-type: disc;"><span style="background-image: none; background-attachment: scroll; background-repeat: repeat; background-size: auto; background-origin: padding-box; background-clip: border-box; mso-highlight: yellow;"><font style="background-color: rgb(255, 255, 0);" size="2" face="Calibri">2013-01-21 11:16:42 Slp: Sco: User srv_sql@contoso.test doesn't exist</font></span></p><font size="2" face="Calibri"></font><p style="margin: 0in; list-style-type: disc;"><font size="2" face="Calibri">2013-01-21 11:16:42 SQLBrowser: SQL Server Browser Install for feature 'SQL_Browser_Redist_SqlBrowser_Cpu32' generated exception, and will invoke retry option.<span style="mso-spacerun: yes;">&nbsp; </span>The exception: Microsoft.SqlServer.Configuration.Sco.ScoException: The specified user 'srv_sql@contoso.test' does not exist.</font></p><font size="2" face="Calibri"></font><p style="margin: 0in; list-style-type: disc;"><font size="2"><font face="Calibri"><span style="mso-spacerun: yes;">&nbsp;&nbsp; </span>at Microsoft.SqlServer.Configuration.Sco.UserGroup.AddUser(String userName)</font></font></p><font size="2" face="Calibri"></font><p style="margin: 0in; list-style-type: disc;"><font size="2"><font face="Calibri"><span style="mso-spacerun: yes;">&nbsp;&nbsp; </span>at Microsoft.SqlServer.Configuration.SqlBrowser.SqlBrowserPrivateConfig.AddAccountToGroup(SqlBrowserPublicConfig publicConfigSqlBrowser)</font></font></p><font size="2" face="Calibri"></font><p style="margin: 0in; list-style-type: disc;"><font size="2"><font face="Calibri"><span style="mso-spacerun: yes;">&nbsp;&nbsp; </span>at Microsoft.SqlServer.Configuration.SqlBrowser.SqlBrowserPrivateConfig.UpdateAccountIfNeeded(SqlBrowserPublicConfig publicConfigSqlBrowser)</font></font></p><font size="2" face="Calibri"></font><p style="margin: 0in; list-style-type: disc;"><font size="2"><font face="Calibri"><span style="mso-spacerun: yes;">&nbsp;&nbsp; </span>at Microsoft.SqlServer.Configuration.SqlBrowser.SqlBrowserPrivateConfig.ConfigUserProperties(SqlBrowserPublicConfig publicConfigSqlBrowser)</font></font></p><font size="2" face="Calibri"></font><p style="margin: 0in; list-style-type: disc;"><font size="2"><font face="Calibri"><span style="mso-spacerun: yes;">&nbsp;&nbsp; </span>at Microsoft.SqlServer.Configuration.SqlBrowser.SqlBrowserPrivateConfig.ExecConfigNonRC(SqlBrowserPublicConfig publicConfigSqlBrowser)</font></font></p><font size="2" face="Calibri"></font><p style="margin: 0in; list-style-type: disc;"><font size="2"><font face="Calibri"><span style="mso-spacerun: yes;">&nbsp;&nbsp; </span>at Microsoft.SqlServer.Configuration.SqlBrowser.SqlBrowserPrivateConfig.SelectAndExecTiming(ConfigActionTiming timing, Dictionary`2 actionData, PublicConfigurationBase spcbPublicConfig)</font></font></p><font size="2" face="Calibri"></font><p style="margin: 0in; list-style-type: disc;"><font size="2"><font face="Calibri"><span style="mso-spacerun: yes;">&nbsp;&nbsp; </span>at Microsoft.SqlServer.Configuration.SqlBrowser.SqlBrowserPrivateConfigBase.ExecWithRetry(ConfigActionTiming timing, Dictionary`2 actionData, PublicConfigurationBase spcbPublicConfig).</font></font></p><font size="2" face="Calibri"></font><p style="margin: 0in; list-style-type: disc;"><font size="2" face="Calibri">2013-01-21 11:16:42 SQLBrowser: The last attempted operation: Adding account 'srv_sql@contoso.test' to the SQL Server Browser service group 'SQLServer2005SQLBrowserUser$Harsh2k8'..</font></p><font size="2" face="Calibri"></font><p style="margin: 0in; list-style-type: disc;"><font size="2" face="Calibri">&nbsp;</font></p><font size="2" face="Calibri"></font><p style="margin: 0in; list-style-type: disc;"><font size="2"><font color="#004080"><span>The key thing here is the message "</span><strong><span>Attempting to check if container </span><span>WinNT://Harsh2k8, computer of user account exists</span></strong><span>". </span><span>If you see this message, go to the SQL Server configuration manager, right click on the offending service mentioned in the detail.txt, open the properties window and navigate to the "Log On" tab. Check the format of the service account here. It should be in the format <strong>domainusername</strong>. Change this to <strong>username@domain</strong>, and type in the password. </span></font></font><font color="#004080" size="2">After this, restart the SQL Service to make sure the changes have taken effect. </font></p><font color="#004080" size="2"></font><p style="margin: 0in; list-style-type: disc;"><font color="#004080" size="2">Try the setup again, and it should work this time. </font></p><font color="#004080" size="2"></font><p style="margin: 0in; list-style-type: disc;"><font color="#004080" size="2">&nbsp;</font></p><font color="#004080" size="2"></font><p style="margin: 0in; list-style-type: disc;"><font color="#004080" size="2">Hope this helps.</font> </p><p style="margin: 0in; list-style-type: disc;">&nbsp;</p><p style="margin: 0in; list-style-type: disc;"></p><font style="font-size: 11pt;"></font></p>
]]></content:encoded>
    </item>
    <item>
      <title>An in-depth look at SQL Server Memory–Part 3</title>
      <link>https://docs.microsoft.com/archive/blogs/sqljourney/an-in-depth-look-at-sql-server-memorypart-3</link>
      <pubDate>Fri, 15 Mar 2013 11:59:00 GMT</pubDate>
      <dc:creator><![CDATA[HarshDeep_Singh]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/sqljourney/2013/03/15/an-in-depth-look-at-sql-server-memorypart-3/</guid>
      <description><![CDATA[In part 1 and part 2 of the series, we talked about the memory architecture and the Procedure Cache...]]></description>
      <content:encoded><![CDATA[<p><span style='mso-fareast-font-family: "Times New Roman"; mso-bidi-font-family: "Times New Roman"; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-fareast-language: en-in;'><font style="font-size: 12pt;" color="#004080">In <a href="https://blogs.msdn.com/b/sqljourney/archive/2012/12/17/an-in-depth-look-at-sql-server-memory-part-1.aspx"><u>part 1</u></a> and <a href="https://blogs.msdn.com/b/sqljourney/archive/2013/02/13/an-in-depth-look-at-sql-server-memory-part-2.aspx"><u>part 2</u></a> of the series, we talked about the memory architecture and the Procedure Cache respectively. In this third and final instalment of the SQL Server Memory series, I will look to focus on troubleshooting SQL Server Memory pressure issues. </font></span><font style="font-size: 12pt;"></font><font color="#004080"></font><p class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: normal; list-style-type: disc;"><span style='mso-fareast-font-family: "Times New Roman"; mso-bidi-font-family: "Times New Roman"; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-fareast-language: en-in;'><font style="font-size: 12pt;" color="#004080">&nbsp;</font></span></p><font style="font-size: 12pt;"></font><font color="#004080"></font><p class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: normal; list-style-type: disc;"><span style='mso-fareast-font-family: "Times New Roman"; mso-bidi-font-family: "Times New Roman"; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-fareast-language: en-in;'><font style="font-size: 12pt;" color="#004080">Before we start on the troubleshooting part though, we need to determine the type of memory pressure that we're seeing here. I've tried to list those down here:</font></span></p><p class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: normal; list-style-type: disc;"><span style='mso-fareast-font-family: "Times New Roman"; mso-bidi-font-family: "Times New Roman"; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-fareast-language: en-in;'></span></p><font style="font-size: 12pt;"></font><font color="#004080"></font><blockquote>   <p class="MsoNormal" style="margin: 0cm 0cm 0pt 27pt; line-height: normal; text-indent: -18pt; vertical-align: middle; list-style-type: disc; mso-list: l7 level1 lfo1; tab-stops: list 36.0pt;"><font color="#004080"><span style="mso-fareast-font-family: calibri; mso-bidi-font-family: calibri; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-fareast-language: en-in;"><span style="mso-list: ignore;"><font style="font-size: 12pt;">1.</font><span style="line-height: normal; font-size-adjust: none; font-stretch: normal;"><font style="font-size: 7pt;">&nbsp;&nbsp;&nbsp;&nbsp; </font></span></span></span><b><u><span style='mso-fareast-font-family: "Times New Roman"; mso-bidi-font-family: "Times New Roman"; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-fareast-language: en-in;'><font style="font-size: 12pt;">External Physical Memory pressure</font></span></u></b><span style='mso-fareast-font-family: "Times New Roman"; mso-bidi-font-family: "Times New Roman"; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-fareast-language: en-in;'><font style="font-size: 12pt;"> - Overall RAM pressure on the server. We need to find the largest consumers of memory (might be SQL), and try to reduce their consumption. It might also be that the system is provided with RAM inadequate for the workload it's running. </font></span></font></p>    <p class="MsoNormal" style="margin: 0cm 0cm 0pt 27pt; line-height: normal; text-indent: -18pt; vertical-align: middle; list-style-type: disc; mso-list: l7 level1 lfo1; tab-stops: list 36.0pt;"><font color="#004080" size="3"><span style='mso-fareast-font-family: "Times New Roman"; mso-bidi-font-family: "Times New Roman"; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-fareast-language: en-in;'></span></font></p>   <font style="font-size: 12pt;"></font><font color="#004080"></font>    <p class="MsoNormal" style="margin: 0cm 0cm 0pt 27pt; line-height: normal; text-indent: -18pt; vertical-align: middle; list-style-type: disc; mso-list: l7 level1 lfo1; tab-stops: list 36.0pt;"><font color="#004080"><span style="mso-fareast-font-family: calibri; mso-bidi-font-family: calibri; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-fareast-language: en-in;"><span style="mso-list: ignore;"><font style="font-size: 12pt;">2.</font><span style="line-height: normal; font-size-adjust: none; font-stretch: normal;"><font style="font-size: 7pt;">&nbsp;&nbsp;&nbsp;&nbsp; </font></span></span></span><b><u><span style='mso-fareast-font-family: "Times New Roman"; mso-bidi-font-family: "Times New Roman"; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-fareast-language: en-in;'><font style="font-size: 12pt;">Internal Physical Memory pressure</font></span></u></b><span style='mso-fareast-font-family: "Times New Roman"; mso-bidi-font-family: "Times New Roman"; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-fareast-language: en-in;'><font style="font-size: 12pt;"> - Memory Pressure on specific components of SQL Server. Can be a result of External Physical Memory pressure, or of one of the components hogging too much memory. </font></span></font></p>    <p class="MsoNormal" style="margin: 0cm 0cm 0pt 27pt; line-height: normal; text-indent: -18pt; vertical-align: middle; list-style-type: disc; mso-list: l7 level1 lfo1; tab-stops: list 36.0pt;"><font color="#004080" size="3"><span style='mso-fareast-font-family: "Times New Roman"; mso-bidi-font-family: "Times New Roman"; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-fareast-language: en-in;'></span></font></p>   <font style="font-size: 12pt;"></font><font color="#004080"></font>    <p class="MsoNormal" style="margin: 0cm 0cm 0pt 27pt; line-height: normal; text-indent: -18pt; vertical-align: middle; list-style-type: disc; mso-list: l7 level1 lfo1; tab-stops: list 36.0pt;"><font color="#004080"><span style="mso-fareast-font-family: calibri; mso-bidi-font-family: calibri; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-fareast-language: en-in;"><span style="mso-list: ignore;"><font style="font-size: 12pt;">3.</font><span style="line-height: normal; font-size-adjust: none; font-stretch: normal;"><font style="font-size: 7pt;">&nbsp;&nbsp;&nbsp;&nbsp; </font></span></span></span><b><u><span style='mso-fareast-font-family: "Times New Roman"; mso-bidi-font-family: "Times New Roman"; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-fareast-language: en-in;'><font style="font-size: 12pt;">Internal Virtual Memory pressure</font></span></u></b><span style='mso-fareast-font-family: "Times New Roman"; mso-bidi-font-family: "Times New Roman"; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-fareast-language: en-in;'><font style="font-size: 12pt;"> - VAS pressure on SQL server. Mostly seen only on 32 bit (X86) systems these days (X64 has 8 TB of VAS, whereas X86 only had 4 GB. Refer to Part 1 for details). </font></span></font></p>    <p class="MsoNormal" style="margin: 0cm 0cm 0pt 27pt; line-height: normal; text-indent: -18pt; vertical-align: middle; list-style-type: disc; mso-list: l7 level1 lfo1; tab-stops: list 36.0pt;"><font color="#004080" size="3"><span style='mso-fareast-font-family: "Times New Roman"; mso-bidi-font-family: "Times New Roman"; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-fareast-language: en-in;'></span></font></p>   <font style="font-size: 12pt;"></font><font color="#004080"></font>    <p class="MsoNormal" style="margin: 0cm 0cm 0pt 27pt; line-height: normal; text-indent: -18pt; vertical-align: middle; list-style-type: disc; mso-list: l7 level1 lfo1; tab-stops: list 36.0pt;"><font color="#004080"><span style="mso-fareast-font-family: calibri; mso-bidi-font-family: calibri; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-fareast-language: en-in;"><span style="mso-list: ignore;"><font style="font-size: 12pt;">4.</font><span style="line-height: normal; font-size-adjust: none; font-stretch: normal;"><font style="font-size: 7pt;">&nbsp;&nbsp;&nbsp;&nbsp; </font></span></span></span><b><u><span style='mso-fareast-font-family: "Times New Roman"; mso-bidi-font-family: "Times New Roman"; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-fareast-language: en-in;'><font style="font-size: 12pt;">External Virtual Memory pressure</font></span></u></b></font><span style='mso-fareast-font-family: "Times New Roman"; mso-bidi-font-family: "Times New Roman"; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-fareast-language: en-in;'><font style="font-size: 12pt;"><font color="#004080"> - Page file pressure on the OS. SQL Server does not recognize or respond to this kind of pressure.</font> </font></span></p> </blockquote><font style="font-size: 12pt;"></font><p class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: normal; list-style-type: disc;"><span style='mso-fareast-font-family: "Times New Roman"; mso-bidi-font-family: "Times New Roman"; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-fareast-language: en-in;'><font style="font-size: 12pt;">&nbsp;</font></span></p><font style="font-size: 12pt;"></font><p class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: normal; list-style-type: disc;"><b><u><span style='mso-fareast-font-family: "Times New Roman"; mso-bidi-font-family: "Times New Roman"; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-fareast-language: en-in;'><font style="font-size: 14pt;" color="#004080">Troubleshooting</font></span></u></b><span style='mso-fareast-font-family: "Times New Roman"; mso-bidi-font-family: "Times New Roman"; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-fareast-language: en-in;'></span></p><font style="font-size: 12pt;"></font><font color="#004080"></font><p class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: normal; list-style-type: disc;"><span style='mso-fareast-font-family: "Times New Roman"; mso-bidi-font-family: "Times New Roman"; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-fareast-language: en-in;'><font style="font-size: 12pt;" color="#004080">Now for getting our hands dirty. When you suspect memory pressure on a server, I would recommend checking the following things, in order:</font></span></p><font style="font-size: 12pt;"></font><font color="#004080"></font><p class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: normal; list-style-type: disc;"><span style='mso-fareast-font-family: "Times New Roman"; mso-bidi-font-family: "Times New Roman"; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-fareast-language: en-in;'><font style="font-size: 12pt;" color="#004080">&nbsp;</font></span></p><font style="font-size: 12pt;"></font><font color="#004080"></font><blockquote>   <p class="MsoNormal" style="margin: 0cm 0cm 0pt 27pt; line-height: normal; text-indent: -18pt; vertical-align: middle; list-style-type: disc; mso-list: l6 level1 lfo2; tab-stops: list 36.0pt;"><font color="#004080"><span style="mso-fareast-font-family: calibri; mso-bidi-font-family: calibri; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-fareast-language: en-in;"><span style="mso-list: ignore;"><font style="font-size: 12pt;">1.</font><span style="line-height: normal; font-size-adjust: none; font-stretch: normal;"><font style="font-size: 7pt;">&nbsp;&nbsp;&nbsp;&nbsp; </font></span></span></span><span style='mso-fareast-font-family: "Times New Roman"; mso-bidi-font-family: "Times New Roman"; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-fareast-language: en-in;'><font style="font-size: 12pt;">Log in to the server, and take a look at the performance tab of the Task Manager. Do you see the overall memory usage on the server getting perilously close to the total RAM installed on the box? If so, it's probable that we're seeing External Physical Memory pressure. </font></span></font></p>   <font style="font-size: 12pt;"></font><font color="#004080"></font>    <p class="MsoNormal" style="margin: 0cm 0cm 0pt 27pt; line-height: normal; text-indent: -18pt; vertical-align: middle; list-style-type: disc; mso-list: l6 level1 lfo2; tab-stops: list 36.0pt;"><span style="mso-fareast-font-family: calibri; mso-bidi-font-family: calibri; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-fareast-language: en-in;"><span style="mso-list: ignore;"><font color="#004080"><font style="font-size: 12pt;">2.</font><span style="line-height: normal; font-size-adjust: none; font-stretch: normal;"><font style="font-size: 7pt;">&nbsp;&nbsp;&nbsp;&nbsp; </font></span></font></span></span><span style='mso-fareast-font-family: "Times New Roman"; mso-bidi-font-family: "Times New Roman"; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-fareast-language: en-in;'><font style="font-size: 12pt;"><font color="#004080">Next, look at the Processes tab, and see which of the processes is using the maximum amount of RAM. Again, for SQL, the true usage might not reflect in the Working set if LPIM is enabled (i.e. SQL is using AWE API's to allocate memory). To check SQL's total memory consumption, you can run the following query from inside SQL (valid from SQL 2008 onwards):            <br></font>          <br>select physical_memory_in_use_kb/(1024) as sql_physical_mem_in_use_mb,</font></span></p> </blockquote><font style="font-size: 12pt;"></font><blockquote>   <p class="MsoNormal" style="margin: 0cm 0cm 0pt 27pt; line-height: normal; list-style-type: disc;"><span style='mso-fareast-font-family: "Times New Roman"; mso-bidi-font-family: "Times New Roman"; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-fareast-language: en-in;'><font style="font-size: 12pt;">locked_page_allocations_kb/(1024) as awe_memory_mb,</font></span></p>   <font style="font-size: 12pt;"></font>    <p class="MsoNormal" style="margin: 0cm 0cm 0pt 27pt; line-height: normal; list-style-type: disc;"><span style='mso-fareast-font-family: "Times New Roman"; mso-bidi-font-family: "Times New Roman"; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-fareast-language: en-in;'><font style="font-size: 12pt;">total_virtual_address_space_kb/(1024) as max_vas_mb,</font></span></p>   <font style="font-size: 12pt;"></font>    <p class="MsoNormal" style="margin: 0cm 0cm 0pt 27pt; line-height: normal; list-style-type: disc;"><span style='mso-fareast-font-family: "Times New Roman"; mso-bidi-font-family: "Times New Roman"; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-fareast-language: en-in;'><font style="font-size: 12pt;">virtual_address_space_committed_kb/(1024) as sql_committed_mb,</font></span></p>   <font style="font-size: 12pt;"></font>    <p class="MsoNormal" style="margin: 0cm 0cm 0pt 27pt; line-height: normal; list-style-type: disc;"><span style='mso-fareast-font-family: "Times New Roman"; mso-bidi-font-family: "Times New Roman"; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-fareast-language: en-in;'><font style="font-size: 12pt;">memory_utilization_percentage as working_set_percentage,</font></span></p>   <font style="font-size: 12pt;"></font>    <p class="MsoNormal" style="margin: 0cm 0cm 0pt 27pt; line-height: normal; list-style-type: disc;"><span style='mso-fareast-font-family: "Times New Roman"; mso-bidi-font-family: "Times New Roman"; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-fareast-language: en-in;'><font style="font-size: 12pt;">virtual_address_space_available_kb/(1024) as vas_available_mb,</font></span></p>   <font style="font-size: 12pt;"></font>    <p class="MsoNormal" style="margin: 0cm 0cm 0pt 27pt; line-height: normal; list-style-type: disc;"><span style='mso-fareast-font-family: "Times New Roman"; mso-bidi-font-family: "Times New Roman"; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-fareast-language: en-in;'><font style="font-size: 12pt;">process_physical_memory_low as is_there_external_pressure,</font></span></p>   <font style="font-size: 12pt;"></font>    <p class="MsoNormal" style="margin: 0cm 0cm 0pt 27pt; line-height: normal; list-style-type: disc;"><span style='mso-fareast-font-family: "Times New Roman"; mso-bidi-font-family: "Times New Roman"; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-fareast-language: en-in;'><font style="font-size: 12pt;">process_virtual_memory_low as is_there_vas_pressure</font></span></p>   <font style="font-size: 12pt;"></font>    <p class="MsoNormal" style="margin: 0cm 0cm 0pt 27pt; line-height: normal; list-style-type: disc;"><span style='mso-fareast-font-family: "Times New Roman"; mso-bidi-font-family: "Times New Roman"; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-fareast-language: en-in;'><font style="font-size: 12pt;">from sys.dm_os_process_memory</font></span></p>   <font style="font-size: 12pt;"></font>    <p class="MsoNormal" style="margin: 0cm 0cm 0pt 27pt; line-height: normal; list-style-type: disc;"><span style='mso-fareast-font-family: "Times New Roman"; mso-bidi-font-family: "Times New Roman"; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-fareast-language: en-in;'><font style="font-size: 12pt;">Go          <br>          <br><font color="#004080">For SQL installations prior to 2008 (valid for 2008 and 2008 R2 as well), you can run DBCC Memorystatus, and take the total of VM Committed and AWE Allocated from the memory manager section to get a rough idea of the amount of memory being used by SQL Server.            <br>&nbsp; </font></font></span></p> </blockquote><font style="font-size: 12pt;"></font><font color="#004080"></font><blockquote>   <p class="MsoNormal" style="margin: 0cm 0cm 0pt 27pt; line-height: normal; text-indent: -18pt; vertical-align: middle; list-style-type: disc; mso-list: l3 level1 lfo3; tab-stops: list 36.0pt;"><span style="mso-fareast-font-family: calibri; mso-bidi-font-family: calibri; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-fareast-language: en-in;"><span style="mso-list: ignore;"><font color="#004080"><font style="font-size: 12pt;">3.</font><span style="line-height: normal; font-size-adjust: none; font-stretch: normal;"><font style="font-size: 7pt;">&nbsp;&nbsp;&nbsp;&nbsp; </font></span></font></span></span><span style='mso-fareast-font-family: "Times New Roman"; mso-bidi-font-family: "Times New Roman"; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-fareast-language: en-in;'><font style="font-size: 12pt;"><font color="#004080">Next, compare this with the total amount of RAM installed on the server. If SQL seems to be taking most of the memory, or at least, much more than it should, then we need to focus our attentions on SQL Server. The exact specifics will vary according to the environment, and factors such as whether it is a dedicated SQL server box, number of instances of SQL Server running on the server, etc. In case you have multiple instances of SQL Server, it will be best to start with the instance consuming the maximum amount of memory (or the maximum deviation from "what it should be consuming"), tune it and then move on to the next one.</font><span style="mso-spacerun: yes;">&nbsp; </span>          <br>&nbsp;</font></span></p> </blockquote><font style="font-size: 12pt;"></font><blockquote>   <p class="MsoNormal" style="margin: 0cm 0cm 0pt 27pt; line-height: normal; text-indent: -18pt; vertical-align: middle; list-style-type: disc; mso-list: l3 level1 lfo3; tab-stops: list 36.0pt;"><span style="mso-fareast-font-family: calibri; mso-bidi-font-family: calibri; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-fareast-language: en-in;"><span style="mso-list: ignore;"><font style="font-size: 12pt;" color="#004080">4.</font><span style="line-height: normal; font-size-adjust: none; font-stretch: normal;"><font style="font-size: 7pt;">&nbsp;&nbsp;&nbsp;&nbsp; </font></span></span></span><span style='mso-fareast-font-family: "Times New Roman"; mso-bidi-font-family: "Times New Roman"; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-fareast-language: en-in;'><font style="font-size: 12pt;" color="#004080">One of the first things to check should be the value of the "max server memory" setting for SQL Server. You can check this by turning on the 'show advanced options' setting of sp_configure, or by right clicking on the instance in Object Explorer in SSMS, selecting properties, and navigating to the "memory" tab. If the value is "</font></span><font style="font-size: 12pt;"><b><span lang="EN-US" style='mso-ansi-language: en-us; mso-fareast-font-family: "Times New Roman"; mso-bidi-font-family: "Times New Roman"; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-fareast-language: en-in;'><font color="#004080">2147483647</font></span></b><span lang="EN-US" style='mso-ansi-language: en-us; mso-fareast-font-family: "Times New Roman"; mso-bidi-font-family: "Times New Roman"; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-fareast-language: en-in;'><font color="#004080">", this means that the setting has been left to default, and has not been set since the instance was installed. It's absolutely vital to set the max server memory setting to an optimal value. A general rule of thumb that you can use to set a starting value is as follows:            <br>Total server memory - (Memory for other applications/instances+ OS memory)             <br>The recommendation for the OS memory value is around 3-4 GB on 64 bit systems, and 1-2 GB on 32 bit systems. Please note that this is only a recommendation for the starting<span style="mso-spacerun: yes;">&nbsp; </span>value. You need to fine tune it based on observations w.r.t performance of both SQL and other applications (if any) on the server.             <br></font></span></font><span style='mso-fareast-font-family: "Times New Roman"; mso-bidi-font-family: "Times New Roman"; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-fareast-language: en-in;'><font style="font-size: 12pt;">&nbsp;</font></span></p> </blockquote><font style="font-size: 12pt;"></font><blockquote>   <p class="MsoNormal" style="margin: 0cm 0cm 0pt 27pt; line-height: normal; text-indent: -18pt; vertical-align: middle; list-style-type: disc; mso-list: l3 level1 lfo3; tab-stops: list 36.0pt;"><span lang="EN-US" style="mso-ansi-language: en-us; mso-fareast-font-family: calibri; mso-bidi-font-family: calibri; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-fareast-language: en-in;"><span style="mso-list: ignore;"><font style="font-size: 12pt;" color="#004080">5.</font><span style="line-height: normal; font-size-adjust: none; font-stretch: normal;"><font style="font-size: 7pt;">&nbsp;&nbsp;&nbsp;&nbsp; </font></span></span></span><span lang="EN-US" style='mso-ansi-language: en-us; mso-fareast-font-family: "Times New Roman"; mso-bidi-font-family: "Times New Roman"; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-fareast-language: en-in;'><font style="font-size: 12pt;"><font color="#004080">Once you've determined that the max server memory is set properly, the next step is to find out which component within SQL is consuming the most memory. The best place to start is, quite obviously, the good old "DBCC Memorystatus" command, unless you're using NUMA, in which case, it will be best to use perfmon counters to track page allocations across NUMA nodes, as outlined </font><a style="cursor: auto;" href="https://blogs.msdn.com/b/psssql/archive/2009/05/15/how-it-works-dbcc-memorystatus-locked-pages-allocated-and-singlepageallocator-values.aspx"><span><u><font color="#0000ff">here</font></u></span></a><font color="#004080">.            <br>I will try to break down most of the major components in the DBCC Memorystatus output here (I would recommend reading KB </font><a style="cursor: auto;" href="https://support.microsoft.com/kb/907877"><span><font color="#004080">907877</font></span></a><font color="#004080"> as a primer before this):            <br>            <br></font></font></span></p>   <font style="font-size: 12pt;"></font>    <p class="MsoNormal" style="margin: 0cm 0cm 0pt 54pt; line-height: normal; text-indent: -54pt; vertical-align: middle; list-style-type: disc; mso-list: l3 level2 lfo4; tab-stops: list 72.0pt; mso-text-indent-alt: -18.0pt;"><span lang="EN-US" style="mso-ansi-language: en-us; mso-fareast-font-family: calibri; mso-bidi-font-family: calibri; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-fareast-language: en-in;"><span style="mso-list: ignore;"><span style="line-height: normal; font-size-adjust: none; font-stretch: normal;"><font style="font-size: 7pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <font color="#004080"></font></font></span><font color="#004080"><font style="font-size: 12pt;">I.</font><span style="line-height: normal; font-size-adjust: none; font-stretch: normal;"><font style="font-size: 7pt;">&nbsp;&nbsp;&nbsp;&nbsp; </font></span></font></span></span><span lang="EN-US" style='mso-ansi-language: en-us; mso-fareast-font-family: "Times New Roman"; mso-bidi-font-family: "Times New Roman"; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-fareast-language: en-in;'><font style="font-size: 12pt;" color="#004080">First up is the memory manager section. As discussed earlier, this section contains details about the overall memory comsumption of SQL Server. An example:          <br></font></span></p> </blockquote><font style="font-size: 12pt;"></font><font color="#004080"></font><blockquote>   <p class="MsoNormal" style="margin: 0cm 0cm 0pt 54pt; line-height: normal; list-style-type: disc;"><span lang="EN-US" style='mso-ansi-language: en-us; mso-fareast-font-family: "Times New Roman"; mso-bidi-font-family: "Times New Roman"; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-fareast-language: en-in;'><font style="font-size: 12pt;" color="#004080">Memory Manager<span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>KB</font></span></p>   <font style="font-size: 12pt;"></font><font color="#004080"></font>    <p class="MsoNormal" style="margin: 0cm 0cm 0pt 54pt; line-height: normal; list-style-type: disc;"><span lang="EN-US" style='mso-ansi-language: en-us; mso-fareast-font-family: "Times New Roman"; mso-bidi-font-family: "Times New Roman"; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-fareast-language: en-in;'><font style="font-size: 12pt;" color="#004080">---------------------------------------- -----------</font></span></p>   <font style="font-size: 12pt;"></font><font color="#004080"></font>    <p class="MsoNormal" style="margin: 0cm 0cm 0pt 54pt; line-height: normal; list-style-type: disc;"><span lang="EN-US" style='mso-ansi-language: en-us; mso-fareast-font-family: "Times New Roman"; mso-bidi-font-family: "Times New Roman"; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-fareast-language: en-in;'><font style="font-size: 12pt;" color="#004080">VM Reserved<span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>4059416</font></span></p>   <font style="font-size: 12pt;"></font><font color="#004080"></font>    <p class="MsoNormal" style="margin: 0cm 0cm 0pt 54pt; line-height: normal; list-style-type: disc;"><span lang="EN-US" style='mso-ansi-language: en-us; mso-fareast-font-family: "Times New Roman"; mso-bidi-font-family: "Times New Roman"; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-fareast-language: en-in;'><font style="font-size: 12pt;" color="#004080">VM Committed<span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>43040</font></span></p>   <font style="font-size: 12pt;"></font><font color="#004080"></font>    <p class="MsoNormal" style="margin: 0cm 0cm 0pt 54pt; line-height: normal; list-style-type: disc;"><span lang="EN-US" style='mso-ansi-language: en-us; mso-fareast-font-family: "Times New Roman"; mso-bidi-font-family: "Times New Roman"; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-fareast-language: en-in;'><font style="font-size: 12pt;" color="#004080">Locked Pages Allocated<span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>41600</font></span></p>   <font style="font-size: 12pt;"></font><font color="#004080"></font>    <p class="MsoNormal" style="margin: 0cm 0cm 0pt 54pt; line-height: normal; list-style-type: disc;"><span lang="EN-US" style='mso-ansi-language: en-us; mso-fareast-font-family: "Times New Roman"; mso-bidi-font-family: "Times New Roman"; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-fareast-language: en-in;'><font style="font-size: 12pt;" color="#004080">Reserved Memory<span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>1024</font></span></p>   <font style="font-size: 12pt;"></font><font color="#004080"></font>    <p class="MsoNormal" style="margin: 0cm 0cm 0pt 54pt; line-height: normal; list-style-type: disc;"><span lang="EN-US" style='mso-ansi-language: en-us; mso-fareast-font-family: "Times New Roman"; mso-bidi-font-family: "Times New Roman"; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-fareast-language: en-in;'><font style="font-size: 12pt;" color="#004080">Reserved Memory In Use<span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>0</font></span></p> </blockquote><font style="font-size: 12pt;"></font><p class="MsoNormal" style="margin: 0cm 0cm 0pt 54pt; line-height: normal; list-style-type: disc;"><span lang="EN-US" style='mso-ansi-language: en-us; mso-fareast-font-family: "Times New Roman"; mso-bidi-font-family: "Times New Roman"; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-fareast-language: en-in;'><font style="font-size: 12pt;">&nbsp;</font></span></p><font style="font-size: 12pt;"></font><blockquote>   <p class="MsoNormal" style="margin: 0cm 0cm 0pt 54pt; line-height: normal; text-indent: -54pt; vertical-align: middle; list-style-type: disc; mso-list: l2 level1 lfo5; tab-stops: list 36.0pt; mso-text-indent-alt: -18.0pt;"><span lang="EN-US" style="mso-ansi-language: en-us; mso-fareast-font-family: calibri; mso-bidi-font-family: calibri; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-fareast-language: en-in;"><span style="mso-list: ignore;"><span style="line-height: normal; font-size-adjust: none; font-stretch: normal;"><font style="font-size: 7pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </font></span><font style="font-size: 12pt;" color="#004080">II. </font></span></span><span lang="EN-US" style='mso-ansi-language: en-us; mso-fareast-font-family: "Times New Roman"; mso-bidi-font-family: "Times New Roman"; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-fareast-language: en-in;'><font style="font-size: 12pt;" color="#004080">Next, we have the memory nodes, starting with 0. As I mentioned, because there is a known issue with the way dbcc memorystatus displays the distribution of allocations across memory nodes, it is best to study the distribution through the SQL Server performance counters. Here's a sample query:          <br>&nbsp;</font></span></p>   <font style="font-size: 12pt;"></font><font color="#004080"></font><font style="font-size: 11pt;"></font>    <p lang="en-US" style="margin: 0in 0in 0in 0.75in; list-style-type: disc;"><span><font style="font-size: 12pt;">select</font></span><font style="font-size: 12pt;"><span>&nbsp;</span><span>*</span><span>&nbsp;</span><span>from</span><span>&nbsp;</span><span>sys</span><span>.</span></font><span><font style="font-size: 12pt;">dm_os_performance_counters</font></span></p>   <font style="font-size: 11pt;"></font>    <p lang="en-US" style="margin: 0in 0in 0in 0.75in; list-style-type: disc;"><span><font style="font-size: 12pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </font></span><font style="font-size: 12pt;"><span>where</span><span>&nbsp;</span><span>object_name</span><span>&nbsp;</span><span>like</span><span>&nbsp;</span><span>'%Buffer Node%'          <br></span>&nbsp;</font></p> </blockquote><font style="font-size: 11pt;"></font><font style="font-size: 12pt;"></font><blockquote>   <p class="MsoNormal" style="margin: 0cm 0cm 0pt 54pt; line-height: normal; text-indent: -54pt; vertical-align: middle; list-style-type: disc; mso-list: l0 level1 lfo6; tab-stops: list 36.0pt; mso-text-indent-alt: -18.0pt;"><span lang="EN-US" style="mso-ansi-language: en-us; mso-fareast-font-family: calibri; mso-bidi-font-family: calibri; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-fareast-language: en-in;"><span style="mso-list: ignore;"><span style="line-height: normal; font-size-adjust: none; font-stretch: normal;"><font style="font-size: 7pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </font></span><font style="font-size: 12pt;" color="#004080">III. </font></span></span><span lang="EN-US" style='mso-ansi-language: en-us; mso-fareast-font-family: "Times New Roman"; mso-bidi-font-family: "Times New Roman"; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-fareast-language: en-in;'><font style="font-size: 12pt;" color="#004080">Next, we have the clerks. I've tried to outline the not so obvious ones in this table, along with their uses:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </font></span></p> </blockquote><div style="list-style-type: disc; direction: ltr;">&nbsp;</div><blockquote>   <div style="list-style-type: disc; direction: ltr;">     <table style="border: 1pt solid rgb(163, 163, 163); margin-left: 0.708in; border-collapse: collapse; direction: ltr;" cellspacing="0" cellpadding="0" width="447" border="1" valign="top"><tbody>         <tr>           <td style="padding: 4pt; border: 1pt solid rgb(163, 163, 163); vertical-align: top;" width="193"><font style="font-size: 11pt;"></font>              <p lang="en-US" style="margin: 0in;"><span><font style="font-size: 11pt;" color="#004080">Clerk Name</font></span></p>             <font style="font-size: 11pt;"></font></td>            <td style="padding: 4pt; border: 1pt solid rgb(163, 163, 163); vertical-align: top;" width="252"><font style="font-size: 11pt;"></font>              <p lang="en-US" style="margin: 0in;"><span><font style="font-size: 11pt;" color="#004080">Used for</font></span></p>             <font style="font-size: 11pt;"></font></td>         </tr>          <tr>           <td style="padding: 4pt; border: 1pt solid rgb(163, 163, 163); vertical-align: top;" width="193"><font style="font-size: 11pt;"></font>              <p lang="en-US" style="margin: 0in;"><font style="font-size: 11pt;" color="#004080">MEMORYCLERK_SQLUTILITIES</font></p>             <font style="font-size: 11pt;"></font></td>            <td style="padding: 4pt; border: 1pt solid rgb(163, 163, 163); vertical-align: top;" width="252"><font color="#004080"><font style="font-size: 11pt;"></font></font>              <p lang="en-US" style="margin: 0in;"><font style="font-size: 11pt;" color="#004080">Database mirroring, backups, etc.</font></p>             <font style="font-size: 11pt;"></font></td>         </tr>          <tr>           <td style="padding: 4pt; border: 1pt solid rgb(163, 163, 163); vertical-align: top;" width="193"><font style="font-size: 11pt;"></font>              <p lang="en-US" style="margin: 0in;"><font style="font-size: 11pt;" color="#004080">MEMORYCLERK_SQLXP</font></p>             <font style="font-size: 11pt;"></font></td>            <td style="padding: 4pt; border: 1pt solid rgb(163, 163, 163); vertical-align: top;" width="252"><font color="#004080"><font style="font-size: 11pt;"></font></font>              <p lang="en-US" style="margin: 0in;"><font style="font-size: 11pt;" color="#004080">Extended Stored Procedures (loaded into SQL Server)</font></p>             <font style="font-size: 11pt;"></font></td>         </tr>          <tr>           <td style="padding: 4pt; border: 1pt solid rgb(163, 163, 163); vertical-align: top;" width="193"><font style="font-size: 11pt;"></font>              <p lang="en-US" style="margin: 0in;"><font style="font-size: 11pt;" color="#004080">MEMORYCLERK_XE, MEMORYCLERK_XE_BUFFER</font></p>             <font style="font-size: 11pt;"></font></td>            <td style="padding: 4pt; border: 1pt solid rgb(163, 163, 163); vertical-align: top;" width="252"><font color="#004080"><font style="font-size: 11pt;"></font></font>              <p lang="en-US" style="margin: 0in;"><font style="font-size: 11pt;" color="#004080">Extended Events</font></p>             <font style="font-size: 11pt;"></font></td>         </tr>       </tbody></table>   </div> </blockquote><div style="list-style-type: disc; direction: ltr;"><font style="font-size: 11pt;"></font></div><font style="font-size: 11pt;"></font><font style="font-size: 12pt;"></font><font color="#004080"></font><blockquote>   <p class="MsoNormal" style="margin: 0cm 0cm 0pt 54pt; line-height: normal; list-style-type: disc;"><span lang="EN-US" style='mso-ansi-language: en-us; mso-fareast-font-family: "Times New Roman"; mso-bidi-font-family: "Times New Roman"; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-fareast-language: en-in;'><font style="font-size: 11pt;"><font color="#004080">If you see any of the clerks hogging memory, then you need to focus on that, and try and narrow down the possible causes.</font> </font></span></p>   <font style="font-size: 12pt;"></font>    <p class="MsoNormal" style="margin: 0cm 0cm 0pt 54pt; line-height: normal; list-style-type: disc;"><span lang="EN-US" style='mso-ansi-language: en-us; mso-fareast-font-family: "Times New Roman"; mso-bidi-font-family: "Times New Roman"; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-fareast-language: en-in;'><font style="font-size: 11pt;">&nbsp;</font></span></p>   <font style="font-size: 12pt;"></font>    <p class="MsoNormal" style="margin: 0cm 0cm 0pt 54pt; line-height: normal; list-style-type: disc;"><span lang="EN-US" style='mso-ansi-language: en-us; mso-fareast-font-family: "Times New Roman"; mso-bidi-font-family: "Times New Roman"; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-fareast-language: en-in;'><font style="font-size: 11pt;" color="#004080">Another thing to watch out for is high values for the multipage allocator. If you see any clerk with extremely high values for multipage allocator, it means that the non-Bpool area is growing due to one of the following:</font></span></p> </blockquote><font style="font-size: 12pt;"></font><font color="#004080"></font><blockquote>   <p class="MsoNormal" style="margin: 0cm 0cm 0pt 81pt; line-height: normal; text-indent: -81pt; vertical-align: middle; list-style-type: disc; mso-list: l4 level1 lfo7; tab-stops: list 36.0pt; mso-text-indent-alt: -18.0pt;"><font color="#004080"><span lang="EN-US" style="mso-ansi-language: en-us; mso-fareast-font-family: calibri; mso-bidi-font-family: calibri; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-fareast-language: en-in;"><span style="mso-list: ignore;"><span style="line-height: normal; font-size-adjust: none; font-stretch: normal;"><font style="font-size: 7pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </font></span><font style="font-size: 11pt;">i.</font><span style="line-height: normal; font-size-adjust: none; font-stretch: normal;"><font style="font-size: 7pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </font></span></span></span><b><span lang="EN-US" style='mso-ansi-language: en-us; mso-fareast-font-family: "Times New Roman"; mso-bidi-font-family: "Times New Roman"; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-fareast-language: en-in;'><font style="font-size: 11pt;">CLR Code</font></span></b><span lang="EN-US" style='mso-ansi-language: en-us; mso-fareast-font-family: "Times New Roman"; mso-bidi-font-family: "Times New Roman"; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-fareast-language: en-in;'><font style="font-size: 11pt;">: Check the errorlog for appdomain messages</font></span></font></p>   <font style="font-size: 12pt;"></font><font color="#004080"></font>    <p class="MsoNormal" style="margin: 0cm 0cm 0pt 81pt; line-height: normal; text-indent: -81pt; vertical-align: middle; list-style-type: disc; mso-list: l4 level1 lfo7; tab-stops: list 36.0pt; mso-text-indent-alt: -18.0pt;"><font color="#004080"><span lang="EN-US" style="mso-ansi-language: en-us; mso-fareast-font-family: calibri; mso-bidi-font-family: calibri; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-fareast-language: en-in;"><span style="mso-list: ignore;"><span style="line-height: normal; font-size-adjust: none; font-stretch: normal;"><font style="font-size: 7pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </font></span><font style="font-size: 11pt;">ii.</font><span style="line-height: normal; font-size-adjust: none; font-stretch: normal;"><font style="font-size: 7pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </font></span></span></span><b><span lang="EN-US" style='mso-ansi-language: en-us; mso-fareast-font-family: "Times New Roman"; mso-bidi-font-family: "Times New Roman"; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-fareast-language: en-in;'><font style="font-size: 11pt;">COM Objects</font></span></b><span lang="EN-US" style='mso-ansi-language: en-us; mso-fareast-font-family: "Times New Roman"; mso-bidi-font-family: "Times New Roman"; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-fareast-language: en-in;'><font style="font-size: 11pt;"> : Check the errorlog for sp_oacreate</font></span></font></p>   <font style="font-size: 12pt;"></font><font color="#004080"></font>    <p class="MsoNormal" style="margin: 0cm 0cm 0pt 81pt; line-height: normal; text-indent: -81pt; vertical-align: middle; list-style-type: disc; mso-list: l4 level1 lfo7; tab-stops: list 36.0pt; mso-text-indent-alt: -18.0pt;"><font color="#004080"><span lang="EN-US" style="mso-ansi-language: en-us; mso-fareast-font-family: calibri; mso-bidi-font-family: calibri; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-fareast-language: en-in;"><span style="mso-list: ignore;"><span style="line-height: normal; font-size-adjust: none; font-stretch: normal;"><font style="font-size: 7pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </font></span><font style="font-size: 11pt;">iii.</font><span style="line-height: normal; font-size-adjust: none; font-stretch: normal;"><font style="font-size: 7pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </font></span></span></span><b><span lang="EN-US" style='mso-ansi-language: en-us; mso-fareast-font-family: "Times New Roman"; mso-bidi-font-family: "Times New Roman"; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-fareast-language: en-in;'><font style="font-size: 11pt;">Linked servers</font></span></b><span lang="EN-US" style='mso-ansi-language: en-us; mso-fareast-font-family: "Times New Roman"; mso-bidi-font-family: "Times New Roman"; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-fareast-language: en-in;'><font style="font-size: 11pt;">: Can be checked using Object Explorer in SSMS</font></span></font></p>   <font style="font-size: 12pt;"></font><font color="#004080"></font>    <p class="MsoNormal" style="margin: 0cm 0cm 0pt 81pt; line-height: normal; text-indent: -81pt; vertical-align: middle; list-style-type: disc; mso-list: l4 level1 lfo7; tab-stops: list 36.0pt; mso-text-indent-alt: -18.0pt;"><font color="#004080"><span lang="EN-US" style="mso-ansi-language: en-us; mso-fareast-font-family: calibri; mso-bidi-font-family: calibri; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-fareast-language: en-in;"><span style="mso-list: ignore;"><span style="line-height: normal; font-size-adjust: none; font-stretch: normal;"><font style="font-size: 7pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </font></span><font style="font-size: 11pt;">iv.</font><span style="line-height: normal; font-size-adjust: none; font-stretch: normal;"><font style="font-size: 7pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </font></span></span></span><b><span lang="EN-US" style='mso-ansi-language: en-us; mso-fareast-font-family: "Times New Roman"; mso-bidi-font-family: "Times New Roman"; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-fareast-language: en-in;'><font style="font-size: 11pt;">Extended stored procedures</font></span></b><span lang="EN-US" style='mso-ansi-language: en-us; mso-fareast-font-family: "Times New Roman"; mso-bidi-font-family: "Times New Roman"; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-fareast-language: en-in;'><font style="font-size: 11pt;"> :<span style="mso-spacerun: yes;">&nbsp; </span>Check the errorlog for loading extended stored procedure messages. </font></span></font></p>    <p class="MsoNormal" style="margin: 0cm 0cm 0pt 81pt; line-height: normal; text-indent: -81pt; vertical-align: middle; list-style-type: disc; mso-list: l4 level1 lfo7; tab-stops: list 36.0pt; mso-text-indent-alt: -18.0pt;"><font color="#004080"><span lang="EN-US" style='mso-ansi-language: en-us; mso-fareast-font-family: "Times New Roman"; mso-bidi-font-family: "Times New Roman"; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-fareast-language: en-in;'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></font><font color="#004080"><span lang="EN-US" style='mso-ansi-language: en-us; mso-fareast-font-family: "Times New Roman"; mso-bidi-font-family: "Times New Roman"; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-fareast-language: en-in;'><font style="font-size: 11pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Alternatively, you can query the sys.extended_procedures view as well.</font></span></font></p>    <p class="MsoNormal" style="margin: 0cm 0cm 0pt 81pt; line-height: normal; text-indent: -81pt; vertical-align: middle; list-style-type: disc; mso-list: l4 level1 lfo7; tab-stops: list 36.0pt; mso-text-indent-alt: -18.0pt;"><font color="#004080"><span lang="EN-US" style='mso-ansi-language: en-us; mso-fareast-font-family: "Times New Roman"; mso-bidi-font-family: "Times New Roman"; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-fareast-language: en-in;'></span></font></p>   <font style="font-size: 12pt;"></font><font color="#004080"></font>    <p class="MsoNormal" style="margin: 0cm 0cm 0pt 81pt; line-height: normal; text-indent: -81pt; vertical-align: middle; list-style-type: disc; mso-list: l4 level1 lfo7; tab-stops: list 36.0pt; mso-text-indent-alt: -18.0pt;"><font color="#004080"><span lang="EN-US" style="mso-ansi-language: en-us; mso-fareast-font-family: calibri; mso-bidi-font-family: calibri; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-fareast-language: en-in;"><span style="mso-list: ignore;"><span style="line-height: normal; font-size-adjust: none; font-stretch: normal;"><font style="font-size: 7pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </font></span><font style="font-size: 11pt;">v.</font><span style="line-height: normal; font-size-adjust: none; font-stretch: normal;"><font style="font-size: 7pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </font></span></span></span><b><span lang="EN-US" style='mso-ansi-language: en-us; mso-fareast-font-family: "Times New Roman"; mso-bidi-font-family: "Times New Roman"; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-fareast-language: en-in;'><font style="font-size: 11pt;">Third party DLL's </font></span></b></font><span lang="EN-US" style='mso-ansi-language: en-us; mso-fareast-font-family: "Times New Roman"; mso-bidi-font-family: "Times New Roman"; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-fareast-language: en-in;'><font style="font-size: 11pt;" color="#004080">: Third party DLL's loaded into the SQL server process space. Run the following query to check:          <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; select * from sys.dm_os_loaded_modules where company &lt;&gt; 'Microsoft Corporation'           <br>&nbsp; </font></span></p> </blockquote><font style="font-size: 12pt;"></font><font color="#004080"></font><blockquote>   <p class="MsoNormal" style="margin: 0cm 0cm 0pt 81pt; line-height: normal; list-style-type: disc;"><span lang="EN-US" style='mso-ansi-language: en-us; mso-fareast-font-family: "Times New Roman"; mso-bidi-font-family: "Times New Roman"; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-fareast-language: en-in;'><font style="font-size: 11pt;" color="#004080">Here's a query to check for the biggest multipage consumers:</font></span></p>   <font style="font-size: 12pt;"></font><font color="#004080"></font>    <p class="MsoNormal" style="margin: 0cm 0cm 0pt 108pt; line-height: normal; list-style-type: disc;"><span style='mso-fareast-font-family: "Times New Roman"; mso-bidi-font-family: "Times New Roman"; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-fareast-language: en-in;'><font style="font-size: 11pt;" color="#004080">select type, name, sum(multi_pages_kb)/1024 as multi_pages_mb</font></span></p>   <font style="font-size: 12pt;"></font><font color="#004080"></font>    <p class="MsoNormal" style="margin: 0cm 0cm 0pt 108pt; line-height: normal; list-style-type: disc;"><span style='mso-fareast-font-family: "Times New Roman"; mso-bidi-font-family: "Times New Roman"; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-fareast-language: en-in;'><font style="font-size: 11pt;" color="#004080">from sys.dm_os_memory_clerks</font></span></p>   <font style="font-size: 12pt;"></font><font color="#004080"></font>    <p class="MsoNormal" style="margin: 0cm 0cm 0pt 108pt; line-height: normal; list-style-type: disc;"><span style='mso-fareast-font-family: "Times New Roman"; mso-bidi-font-family: "Times New Roman"; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-fareast-language: en-in;'><font style="font-size: 11pt;" color="#004080">where multi_pages_kb &gt; 0</font></span></p>   <font style="font-size: 12pt;"></font><font color="#004080"></font>    <p class="MsoNormal" style="margin: 0cm 0cm 0pt 108pt; line-height: normal; list-style-type: disc;"><span style='mso-fareast-font-family: "Times New Roman"; mso-bidi-font-family: "Times New Roman"; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-fareast-language: en-in;'><font style="font-size: 11pt;" color="#004080">group by type, name</font></span></p>   <font style="font-size: 12pt;"></font><font color="#004080"></font>    <p class="MsoNormal" style="margin: 0cm 0cm 0pt 108pt; line-height: normal; list-style-type: disc;"><span style='mso-fareast-font-family: "Times New Roman"; mso-bidi-font-family: "Times New Roman"; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-fareast-language: en-in;'><font style="font-size: 11pt;" color="#004080">order by multi_pages_mb desc</font></span></p> </blockquote><font style="font-size: 12pt;"></font><font color="#004080"></font><p class="MsoNormal" style="margin: 0cm 0cm 0pt 108pt; line-height: normal; list-style-type: disc;"><span style='mso-fareast-font-family: "Times New Roman"; mso-bidi-font-family: "Times New Roman"; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-fareast-language: en-in;'><font style="font-size: 11pt;" color="#004080">&nbsp;</font></span></p><font style="font-size: 12pt;"></font><font color="#004080"></font><blockquote>   <p class="MsoNormal" style="margin: 0cm 0cm 0pt 54pt; line-height: normal; list-style-type: disc;"><span lang="EN-US" style='mso-ansi-language: en-us; mso-fareast-font-family: "Times New Roman"; mso-bidi-font-family: "Times New Roman"; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-fareast-language: en-in;'><font style="font-size: 12pt;" color="#004080">Yet another symptom to watch out for is a high ratio of stolen pages from the Buffer Pool. You can check this in the 'Buffer Pool' section of the MEMORYSTATUS output. A sample:</font></span></p> </blockquote><font style="font-size: 12pt;"></font><blockquote>   <p class="MsoNormal" style="margin: 0cm 0cm 0pt 54pt; line-height: normal; list-style-type: disc;"><span lang="EN-US" style='mso-ansi-language: en-us; mso-fareast-font-family: "Times New Roman"; mso-bidi-font-family: "Times New Roman"; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-fareast-language: en-in;'><font style="font-size: 12pt;">Buffer Pool<span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>Value</font></span></p>   <font style="font-size: 12pt;"></font>    <p class="MsoNormal" style="margin: 0cm 0cm 0pt 54pt; line-height: normal; list-style-type: disc;"><span lang="EN-US" style='mso-ansi-language: en-us; mso-fareast-font-family: "Times New Roman"; mso-bidi-font-family: "Times New Roman"; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-fareast-language: en-in;'><font style="font-size: 12pt;">---------------------------------------- -----------</font></span></p>   <font style="font-size: 12pt;"></font>    <p class="MsoNormal" style="margin: 0cm 0cm 0pt 54pt; line-height: normal; list-style-type: disc;"><span lang="EN-US" style='mso-ansi-language: en-us; mso-fareast-font-family: "Times New Roman"; mso-bidi-font-family: "Times New Roman"; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-fareast-language: en-in;'><font style="font-size: 12pt;">Committed<span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>4448</font></span></p>   <font style="font-size: 12pt;"></font>    <p class="MsoNormal" style="margin: 0cm 0cm 0pt 54pt; line-height: normal; list-style-type: disc;"><span lang="EN-US" style='mso-ansi-language: en-us; mso-fareast-font-family: "Times New Roman"; mso-bidi-font-family: "Times New Roman"; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-fareast-language: en-in;'><font style="font-size: 12pt;">Target<span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>25600</font></span></p>   <font style="font-size: 12pt;"></font>    <p class="MsoNormal" style="margin: 0cm 0cm 0pt 54pt; line-height: normal; list-style-type: disc;"><span lang="EN-US" style='mso-ansi-language: en-us; mso-fareast-font-family: "Times New Roman"; mso-bidi-font-family: "Times New Roman"; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-fareast-language: en-in;'><font style="font-size: 12pt;">Database<span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>2075</font></span></p>   <font style="font-size: 12pt;"></font>    <p class="MsoNormal" style="margin: 0cm 0cm 0pt 54pt; line-height: normal; list-style-type: disc;"><span lang="EN-US" style='mso-ansi-language: en-us; mso-fareast-font-family: "Times New Roman"; mso-bidi-font-family: "Times New Roman"; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-fareast-language: en-in;'><font style="font-size: 12pt;">Dirty<span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>50</font></span></p>   <font style="font-size: 12pt;"></font>    <p class="MsoNormal" style="margin: 0cm 0cm 0pt 54pt; line-height: normal; list-style-type: disc;"><span lang="EN-US" style='mso-ansi-language: en-us; mso-fareast-font-family: "Times New Roman"; mso-bidi-font-family: "Times New Roman"; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-fareast-language: en-in;'><font style="font-size: 12pt;">In IO<span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>0</font></span></p>   <font style="font-size: 12pt;"></font>    <p class="MsoNormal" style="margin: 0cm 0cm 0pt 54pt; line-height: normal; list-style-type: disc;"><span lang="EN-US" style='mso-ansi-language: en-us; mso-fareast-font-family: "Times New Roman"; mso-bidi-font-family: "Times New Roman"; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-fareast-language: en-in;'><font style="font-size: 12pt;">Latched<span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>0</font></span></p>   <font style="font-size: 12pt;"></font>    <p class="MsoNormal" style="margin: 0cm 0cm 0pt 54pt; line-height: normal; list-style-type: disc;"><span lang="EN-US" style='mso-ansi-language: en-us; mso-fareast-font-family: "Times New Roman"; mso-bidi-font-family: "Times New Roman"; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-fareast-language: en-in;'><font style="font-size: 12pt;">Free<span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>791</font></span></p>   <font style="font-size: 12pt;"></font>    <p class="MsoNormal" style="margin: 0cm 0cm 0pt 54pt; line-height: normal; list-style-type: disc;"><span lang="EN-US" style='mso-ansi-language: en-us; mso-fareast-font-family: "Times New Roman"; mso-bidi-font-family: "Times New Roman"; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-fareast-language: en-in;'><font style="font-size: 12pt;">Stolen<span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>1582</font></span></p>   <font style="font-size: 12pt;"></font>    <p class="MsoNormal" style="margin: 0cm 0cm 0pt 54pt; line-height: normal; list-style-type: disc;"><span lang="EN-US" style='mso-ansi-language: en-us; mso-fareast-font-family: "Times New Roman"; mso-bidi-font-family: "Times New Roman"; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-fareast-language: en-in;'><font style="font-size: 12pt;">Reserved<span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>0</font></span></p>   <font style="font-size: 12pt;"></font>    <p class="MsoNormal" style="margin: 0cm 0cm 0pt 54pt; line-height: normal; list-style-type: disc;"><span lang="EN-US" style='mso-ansi-language: en-us; mso-fareast-font-family: "Times New Roman"; mso-bidi-font-family: "Times New Roman"; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-fareast-language: en-in;'><font style="font-size: 12pt;">Visible<span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>25600</font></span></p>   <font style="font-size: 12pt;"></font>    <p class="MsoNormal" style="margin: 0cm 0cm 0pt 54pt; line-height: normal; list-style-type: disc;"><span lang="EN-US" style='mso-ansi-language: en-us; mso-fareast-font-family: "Times New Roman"; mso-bidi-font-family: "Times New Roman"; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-fareast-language: en-in;'><font style="font-size: 12pt;">Stolen Potential<span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>22738</font></span></p>   <font style="font-size: 12pt;"></font>    <p class="MsoNormal" style="margin: 0cm 0cm 0pt 54pt; line-height: normal; list-style-type: disc;"><span lang="EN-US" style='mso-ansi-language: en-us; mso-fareast-font-family: "Times New Roman"; mso-bidi-font-family: "Times New Roman"; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-fareast-language: en-in;'><font style="font-size: 12pt;">Limiting Factor<span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>17</font></span></p>   <font style="font-size: 12pt;"></font>    <p class="MsoNormal" style="margin: 0cm 0cm 0pt 54pt; line-height: normal; list-style-type: disc;"><span lang="EN-US" style='mso-ansi-language: en-us; mso-fareast-font-family: "Times New Roman"; mso-bidi-font-family: "Times New Roman"; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-fareast-language: en-in;'><font style="font-size: 12pt;">Last OOM Factor<span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>0</font></span></p>   <font style="font-size: 12pt;"></font>    <p class="MsoNormal" style="margin: 0cm 0cm 0pt 54pt; line-height: normal; list-style-type: disc;"><span lang="EN-US" style='mso-ansi-language: en-us; mso-fareast-font-family: "Times New Roman"; mso-bidi-font-family: "Times New Roman"; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-fareast-language: en-in;'><font style="font-size: 12pt;">Last OS Error<span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>0</font></span></p>   <font style="font-size: 12pt;"></font>    <p class="MsoNormal" style="margin: 0cm 0cm 0pt 54pt; line-height: normal; list-style-type: disc;"><span lang="EN-US" style='mso-ansi-language: en-us; mso-fareast-font-family: "Times New Roman"; mso-bidi-font-family: "Times New Roman"; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-fareast-language: en-in;'><font style="font-size: 12pt;">Page Life Expectancy<span style="mso-spacerun: yes;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span>87529</font></span></p> </blockquote><font style="font-size: 12pt;"></font><blockquote>   <p class="MsoNormal" style="margin: 0cm 0cm 0pt 54pt; line-height: normal; list-style-type: disc;"><span lang="EN-US" style='mso-ansi-language: en-us; mso-fareast-font-family: "Times New Roman"; mso-bidi-font-family: "Times New Roman"; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-fareast-language: en-in;'><font style="font-size: 12pt;">         <br><font color="#004080">What this means is that Buffer Pool pages are being utilized for "other" uses, and not for holding data and index pages in the BPool. This can lead to performance issues and a crunch on the Bpool, thereby slowing down overall query performance (please refer to part 1 for consumers that "Steal" pages from the BPool). You can use the following query to check for the highest "Steal" consumers:</font></font></span></p> </blockquote><font style="font-size: 12pt;"></font><blockquote>   <p class="MsoNormal" style="margin: 0cm 0cm 0pt 81pt; line-height: normal; list-style-type: disc;"><span style='mso-fareast-font-family: "Times New Roman"; mso-bidi-font-family: "Times New Roman"; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-fareast-language: en-in;'><font style="font-size: 11pt;">select type, name, sum((single_pages_kb*1024)/8192) as stolen_pages</font></span></p>   <font style="font-size: 12pt;"></font>    <p class="MsoNormal" style="margin: 0cm 0cm 0pt 81pt; line-height: normal; list-style-type: disc;"><span style='mso-fareast-font-family: "Times New Roman"; mso-bidi-font-family: "Times New Roman"; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-fareast-language: en-in;'><font style="font-size: 11pt;">from sys.dm_os_memory_clerks</font></span></p>   <font style="font-size: 12pt;"></font>    <p class="MsoNormal" style="margin: 0cm 0cm 0pt 81pt; line-height: normal; list-style-type: disc;"><span style='mso-fareast-font-family: "Times New Roman"; mso-bidi-font-family: "Times New Roman"; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-fareast-language: en-in;'><font style="font-size: 11pt;">where single_pages_kb &gt; 0</font></span></p>   <font style="font-size: 12pt;"></font>    <p class="MsoNormal" style="margin: 0cm 0cm 0pt 81pt; line-height: normal; list-style-type: disc;"><span style='mso-fareast-font-family: "Times New Roman"; mso-bidi-font-family: "Times New Roman"; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-fareast-language: en-in;'><font style="font-size: 11pt;">group by type, name</font></span></p>   <font style="font-size: 12pt;"></font>    <p class="MsoNormal" style="margin: 0cm 0cm 0pt 81pt; line-height: normal; list-style-type: disc;"><span style='mso-fareast-font-family: "Times New Roman"; mso-bidi-font-family: "Times New Roman"; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-fareast-language: en-in;'><font style="font-size: 11pt;">order by stolen_pages desc</font></span></p> </blockquote><font style="font-size: 12pt;"></font><p class="MsoNormal" style="margin: 0cm 0cm 0pt 54pt; line-height: normal; list-style-type: disc;"><span lang="EN-US" style='mso-ansi-language: en-us; mso-fareast-font-family: "Times New Roman"; mso-bidi-font-family: "Times New Roman"; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-fareast-language: en-in;'><font style="font-size: 12pt;">&nbsp;</font></span></p><font style="font-size: 12pt;"></font><blockquote>   <p class="MsoNormal" style="margin: 0cm 0cm 0pt 54pt; line-height: normal; text-indent: -54pt; vertical-align: middle; list-style-type: disc; mso-list: l1 level1 lfo8; tab-stops: list 36.0pt; mso-text-indent-alt: -18.0pt;"><span lang="EN-US" style="mso-ansi-language: en-us; mso-fareast-font-family: calibri; mso-bidi-font-family: calibri; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-fareast-language: en-in;"><span style="mso-list: ignore;"><span style="line-height: normal; font-size-adjust: none; font-stretch: normal;"><font style="font-size: 7pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <font color="#004080">&nbsp; </font></font></span><font style="font-size: 12pt;" color="#004080">IV.&nbsp;&nbsp; </font></span></span><span lang="EN-US" style='mso-ansi-language: en-us; mso-fareast-font-family: "Times New Roman"; mso-bidi-font-family: "Times New Roman"; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-fareast-language: en-in;'><font style="font-size: 12pt;"><font color="#004080">Next, we have the stores namely, Cachestore, Userstore and Objectstore. Please refer to part 1 for how and by which component these clerks are used. You can use the following queries to check for the biggest Cachestores, Userstores and Objectstores respectively:            <br></font>&nbsp; </font></span></p> </blockquote><font style="font-size: 12pt;"></font><blockquote>   <p class="MsoNormal" style="margin: 0cm 0cm 0pt 81pt; line-height: normal; list-style-type: disc;"><span style='mso-fareast-font-family: "Times New Roman"; mso-bidi-font-family: "Times New Roman"; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-fareast-language: en-in;'><font style="font-size: 11pt;">select name, type, (SUM(single_pages_kb)+SUM(multi_pages_kb))/1024</font></span></p>   <font style="font-size: 12pt;"></font>    <p class="MsoNormal" style="margin: 0cm 0cm 0pt 81pt; line-height: normal; list-style-type: disc;"><span style='mso-fareast-font-family: "Times New Roman"; mso-bidi-font-family: "Times New Roman"; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-fareast-language: en-in;'><font style="font-size: 11pt;">as store_size_mb</font></span></p>   <font style="font-size: 12pt;"></font>    <p class="MsoNormal" style="margin: 0cm 0cm 0pt 81pt; line-height: normal; list-style-type: disc;"><span style='mso-fareast-font-family: "Times New Roman"; mso-bidi-font-family: "Times New Roman"; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-fareast-language: en-in;'><font style="font-size: 11pt;">from sys.dm_os_memory_cache_counters</font></span></p>   <font style="font-size: 12pt;"></font>    <p class="MsoNormal" style="margin: 0cm 0cm 0pt 81pt; line-height: normal; list-style-type: disc;"><span style='mso-fareast-font-family: "Times New Roman"; mso-bidi-font-family: "Times New Roman"; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-fareast-language: en-in;'><font style="font-size: 11pt;">where type like 'CACHESTORE%'</font></span></p>   <font style="font-size: 12pt;"></font>    <p class="MsoNormal" style="margin: 0cm 0cm 0pt 81pt; line-height: normal; list-style-type: disc;"><span style='mso-fareast-font-family: "Times New Roman"; mso-bidi-font-family: "Times New Roman"; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-fareast-language: en-in;'><font style="font-size: 11pt;">group by name, type</font></span></p>   <font style="font-size: 12pt;"></font>    <p class="MsoNormal" style="margin: 0cm 0cm 0pt 81pt; line-height: normal; list-style-type: disc;"><span style='mso-fareast-font-family: "Times New Roman"; mso-bidi-font-family: "Times New Roman"; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-fareast-language: en-in;'><font style="font-size: 11pt;">order by store_size_mb desc</font></span></p>   <font style="font-size: 12pt;"></font>    <p class="MsoNormal" style="margin: 0cm 0cm 0pt 81pt; line-height: normal; list-style-type: disc;"><span style='mso-fareast-font-family: "Times New Roman"; mso-bidi-font-family: "Times New Roman"; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-fareast-language: en-in;'><font style="font-size: 11pt;">go</font></span></p>   <font style="font-size: 12pt;"></font>    <p class="MsoNormal" style="margin: 0cm 0cm 0pt 81pt; line-height: normal; list-style-type: disc;"><span style='mso-fareast-font-family: "Times New Roman"; mso-bidi-font-family: "Times New Roman"; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-fareast-language: en-in;'><font style="font-size: 11pt;">&nbsp;</font></span></p>   <font style="font-size: 12pt;"></font>    <p class="MsoNormal" style="margin: 0cm 0cm 0pt 81pt; line-height: normal; list-style-type: disc;"><span style='mso-fareast-font-family: "Times New Roman"; mso-bidi-font-family: "Times New Roman"; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-fareast-language: en-in;'><font style="font-size: 11pt;">select name, type, (SUM(single_pages_kb)+SUM(multi_pages_kb))/1024</font></span></p>   <font style="font-size: 12pt;"></font>    <p class="MsoNormal" style="margin: 0cm 0cm 0pt 81pt; line-height: normal; list-style-type: disc;"><span style='mso-fareast-font-family: "Times New Roman"; mso-bidi-font-family: "Times New Roman"; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-fareast-language: en-in;'><font style="font-size: 11pt;">as store_size_mb</font></span></p>   <font style="font-size: 12pt;"></font>    <p class="MsoNormal" style="margin: 0cm 0cm 0pt 81pt; line-height: normal; list-style-type: disc;"><span style='mso-fareast-font-family: "Times New Roman"; mso-bidi-font-family: "Times New Roman"; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-fareast-language: en-in;'><font style="font-size: 11pt;">from sys.dm_os_memory_cache_counters</font></span></p>   <font style="font-size: 12pt;"></font>    <p class="MsoNormal" style="margin: 0cm 0cm 0pt 81pt; line-height: normal; list-style-type: disc;"><span style='mso-fareast-font-family: "Times New Roman"; mso-bidi-font-family: "Times New Roman"; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-fareast-language: en-in;'><font style="font-size: 11pt;">where type like 'USERSTORE%'</font></span></p>   <font style="font-size: 12pt;"></font>    <p class="MsoNormal" style="margin: 0cm 0cm 0pt 81pt; line-height: normal; list-style-type: disc;"><span style='mso-fareast-font-family: "Times New Roman"; mso-bidi-font-family: "Times New Roman"; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-fareast-language: en-in;'><font style="font-size: 11pt;">group by name, type</font></span></p>   <font style="font-size: 12pt;"></font>    <p class="MsoNormal" style="margin: 0cm 0cm 0pt 81pt; line-height: normal; list-style-type: disc;"><span style='mso-fareast-font-family: "Times New Roman"; mso-bidi-font-family: "Times New Roman"; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-fareast-language: en-in;'><font style="font-size: 11pt;">order by store_size_mb desc</font></span></p>   <font style="font-size: 12pt;"></font>    <p class="MsoNormal" style="margin: 0cm 0cm 0pt 81pt; line-height: normal; list-style-type: disc;"><span style='mso-fareast-font-family: "Times New Roman"; mso-bidi-font-family: "Times New Roman"; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-fareast-language: en-in;'><font style="font-size: 11pt;">go</font></span></p>   <font style="font-size: 12pt;"></font>    <p class="MsoNormal" style="margin: 0cm 0cm 0pt 81pt; line-height: normal; list-style-type: disc;"><span style='mso-fareast-font-family: "Times New Roman"; mso-bidi-font-family: "Times New Roman"; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-fareast-language: en-in;'><font style="font-size: 11pt;">&nbsp;</font></span></p>   <font style="font-size: 12pt;"></font>    <p class="MsoNormal" style="margin: 0cm 0cm 0pt 81pt; line-height: normal; list-style-type: disc;"><span style='mso-fareast-font-family: "Times New Roman"; mso-bidi-font-family: "Times New Roman"; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-fareast-language: en-in;'><font style="font-size: 11pt;">select name, type, (SUM(single_pages_kb)+SUM(multi_pages_kb))/1024</font></span></p>   <font style="font-size: 12pt;"></font>    <p class="MsoNormal" style="margin: 0cm 0cm 0pt 81pt; line-height: normal; list-style-type: disc;"><span style='mso-fareast-font-family: "Times New Roman"; mso-bidi-font-family: "Times New Roman"; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-fareast-language: en-in;'><font style="font-size: 11pt;">as store_size_mb</font></span></p>   <font style="font-size: 12pt;"></font>    <p class="MsoNormal" style="margin: 0cm 0cm 0pt 81pt; line-height: normal; list-style-type: disc;"><span style='mso-fareast-font-family: "Times New Roman"; mso-bidi-font-family: "Times New Roman"; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-fareast-language: en-in;'><font style="font-size: 11pt;">from sys.dm_os_memory_clerks</font></span></p>   <font style="font-size: 12pt;"></font>    <p class="MsoNormal" style="margin: 0cm 0cm 0pt 81pt; line-height: normal; list-style-type: disc;"><span style='mso-fareast-font-family: "Times New Roman"; mso-bidi-font-family: "Times New Roman"; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-fareast-language: en-in;'><font style="font-size: 11pt;">where type like 'OBJECTSTORE%'</font></span></p>   <font style="font-size: 12pt;"></font>    <p class="MsoNormal" style="margin: 0cm 0cm 0pt 81pt; line-height: normal; list-style-type: disc;"><span style='mso-fareast-font-family: "Times New Roman"; mso-bidi-font-family: "Times New Roman"; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-fareast-language: en-in;'><font style="font-size: 11pt;">group by name, type</font></span></p>   <font style="font-size: 12pt;"></font>    <p class="MsoNormal" style="margin: 0cm 0cm 0pt 81pt; line-height: normal; list-style-type: disc;"><span style='mso-fareast-font-family: "Times New Roman"; mso-bidi-font-family: "Times New Roman"; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-fareast-language: en-in;'><font style="font-size: 11pt;">order by store_size_mb desc</font></span></p>   <font style="font-size: 12pt;"></font>    <p class="MsoNormal" style="margin: 0cm 0cm 0pt 81pt; line-height: normal; list-style-type: disc;"><span style='mso-fareast-font-family: "Times New Roman"; mso-bidi-font-family: "Times New Roman"; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-fareast-language: en-in;'><font style="font-size: 11pt;">go</font></span></p> </blockquote><font style="font-size: 12pt;"></font><p class="MsoNormal" style="margin: 0cm 0cm 0pt 81pt; line-height: normal; list-style-type: disc;"><span lang="EN-US" style='mso-ansi-language: en-us; mso-fareast-font-family: "Times New Roman"; mso-bidi-font-family: "Times New Roman"; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-fareast-language: en-in;'><font style="font-size: 12pt;">&nbsp;</font></span></p><font style="font-size: 12pt;"></font><blockquote>   <p class="MsoNormal" style="margin: 0cm 0cm 0pt 54pt; line-height: normal; text-indent: -54pt; vertical-align: middle; list-style-type: disc; mso-list: l5 level1 lfo9; tab-stops: list 36.0pt; mso-text-indent-alt: -18.0pt;"><span lang="EN-US" style="mso-ansi-language: en-us; mso-fareast-font-family: calibri; mso-bidi-font-family: calibri; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-fareast-language: en-in;"><span style="mso-list: ignore;"><span style="line-height: normal; font-size-adjust: none; font-stretch: normal;"><font style="font-size: 7pt;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <font color="#004080">&nbsp;</font></font></span><font style="font-size: 12pt;"><font color="#004080">V</font>.&nbsp;&nbsp; </font></span></span><span lang="EN-US" style='mso-ansi-language: en-us; mso-fareast-font-family: "Times New Roman"; mso-bidi-font-family: "Times New Roman"; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-fareast-language: en-in;'><font style="font-size: 12pt;"><font color="#004080">Next, we have the gateways. The concept of gateways was introduced to throttle the use of query compilation memory. In plain english, this means that we did not want to allow too many queries with a high requirement for compilation memory to be running at the same time, as this would lead to consequences like internal memory pressure (i.e. one of the components of the buffer pool growing and creating pressure on other components).            <br>            <br> The concept basically works like this: When a query starts execution, it will start with a small amount of memory. As its consumption grows, it will cross the threshold for the small gateway, and must wait to acquire it. The gateway is basically implemented through a semaphore, which means that it will allow upto a certain number of threads to acquire it, and make threads beyond the limit wait. As the memory consumption for the query grows, it must acquire the medium and big gateways before being allowed to continue execution. The exact thresholds depend on factors like total memory on the server, SQL Max server memory sitting, memory architecture (x86 or x64), load on the server, etc.             <br></font>          <br><font color="#004080">The number of queries allowed at each of the gateways described in the following table:</font></font></span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </p> </blockquote><p>&nbsp;&nbsp;&nbsp;&nbsp; <font style="font-size: 12pt;"></font><font style="font-size: 12pt;"></font><font style="font-size: 12pt;"></font><font style="font-size: 12pt;"></font><font color="#004080"></font><font style="font-size: 12pt;"></font><font color="#004080"></font><font style="font-size: 12pt;"></font><font style="font-size: 12pt;"></font><font style="font-size: 12pt;"></font><font style="font-size: 12pt;"></font><font color="#004080"></font><font style="font-size: 12pt;"></font><font color="#004080"></font><font style="font-size: 12pt;"></font><font style="font-size: 12pt;"></font><font style="font-size: 12pt;"></font><font style="font-size: 12pt;"></font><font color="#004080"></font><font style="font-size: 12pt;"></font><font color="#004080"></font><font style="font-size: 12pt;"></font><font style="font-size: 12pt;"></font><font style="font-size: 12pt;"></font><font style="font-size: 12pt;"></font><font color="#004080"></font><font style="font-size: 12pt;"></font><font color="#004080"></font><font style="font-size: 12pt;"></font><font style="font-size: 12pt;"></font>  </p><table class="MsoNormalTable" style="border: currentcolor; margin-left: 78pt; list-style-type: disc; border-collapse: collapse; mso-border-alt: solid #a3a3a3 1.0pt; mso-yfti-tbllook: 1184; mso-padding-alt: 0cm 0cm 0cm 0cm;" cellspacing="0" cellpadding="0" border="1"><tbody>     <tr style="mso-yfti-irow: 0; mso-yfti-firstrow: yes;">       <td style="padding: 4pt; border: 1pt solid rgb(163, 163, 163);" valign="top" width="69"><font style="font-size: 12pt;"></font>          <p class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: normal;"><b><span lang="EN-US" style='mso-ansi-language: en-us; mso-fareast-font-family: "Times New Roman"; mso-bidi-font-family: "Times New Roman"; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-fareast-language: en-in;'><font style="font-size: 12pt;" color="#004080">Gateway</font></span></b><span lang="EN-US" style='mso-ansi-language: en-us; mso-fareast-font-family: "Times New Roman"; mso-bidi-font-family: "Times New Roman"; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-fareast-language: en-in;'></span></p>         <font style="font-size: 12pt;"></font></td>        <td style="border-width: 1pt 1pt 1pt medium; border-style: solid solid solid none; border-color: rgb(163, 163, 163) rgb(163, 163, 163) rgb(163, 163, 163) currentcolor; padding: 4pt; mso-border-left-alt: solid #a3a3a3 1.0pt;" valign="top" width="105"><font color="#004080"><font style="font-size: 12pt;"></font></font>          <p class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: normal;"><b><span lang="EN-US" style='mso-ansi-language: en-us; mso-fareast-font-family: "Times New Roman"; mso-bidi-font-family: "Times New Roman"; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-fareast-language: en-in;'><font style="font-size: 12pt;" color="#004080">Dynamic/Static</font></span></b><span lang="EN-US" style='mso-ansi-language: en-us; mso-fareast-font-family: "Times New Roman"; mso-bidi-font-family: "Times New Roman"; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-fareast-language: en-in;'></span></p>         <font style="font-size: 12pt;"></font></td>        <td style="border-width: 1pt 1pt 1pt medium; border-style: solid solid solid none; border-color: rgb(163, 163, 163) rgb(163, 163, 163) rgb(163, 163, 163) currentcolor; padding: 4pt; mso-border-left-alt: solid #a3a3a3 1.0pt;" valign="top" width="318"><font color="#004080"><font style="font-size: 12pt;"></font></font>          <p class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: normal;"><b><span lang="EN-US" style='mso-ansi-language: en-us; mso-fareast-font-family: "Times New Roman"; mso-bidi-font-family: "Times New Roman"; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-fareast-language: en-in;'><font style="font-size: 12pt;" color="#004080">Config Value</font></span></b><span lang="EN-US" style='mso-ansi-language: en-us; mso-fareast-font-family: "Times New Roman"; mso-bidi-font-family: "Times New Roman"; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-fareast-language: en-in;'></span></p>         <font style="font-size: 12pt;"></font></td>     </tr>      <tr style="mso-yfti-irow: 1;">       <td style="border-width: medium 1pt 1pt; border-style: none solid solid; border-color: currentcolor rgb(163, 163, 163) rgb(163, 163, 163); padding: 4pt; mso-border-top-alt: solid #a3a3a3 1.0pt;" valign="top" width="69"><font style="font-size: 12pt;"></font>          <p class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: normal;"><span lang="EN-US" style='mso-ansi-language: en-us; mso-fareast-font-family: "Times New Roman"; mso-bidi-font-family: "Times New Roman"; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-fareast-language: en-in;'><font style="font-size: 12pt;" color="#004080">Small</font></span></p>         <font style="font-size: 12pt;"></font></td>        <td style="border-width: medium 1pt 1pt medium; border-style: none solid solid none; border-color: currentcolor rgb(163, 163, 163) rgb(163, 163, 163) currentcolor; padding: 4pt; mso-border-left-alt: solid #a3a3a3 1.0pt; mso-border-top-alt: solid #a3a3a3 1.0pt;" valign="top" width="105"><font color="#004080"><font style="font-size: 12pt;"></font></font>          <p class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: normal;"><span lang="EN-US" style='mso-ansi-language: en-us; mso-fareast-font-family: "Times New Roman"; mso-bidi-font-family: "Times New Roman"; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-fareast-language: en-in;'><font style="font-size: 12pt;" color="#004080">Dynamic</font></span></p>         <font style="font-size: 12pt;"></font></td>        <td style="border-width: medium 1pt 1pt medium; border-style: none solid solid none; border-color: currentcolor rgb(163, 163, 163) rgb(163, 163, 163) currentcolor; padding: 4pt; mso-border-left-alt: solid #a3a3a3 1.0pt; mso-border-top-alt: solid #a3a3a3 1.0pt;" valign="top" width="318"><font color="#004080"><font style="font-size: 12pt;"></font></font>          <p class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: normal;"><span lang="EN-US" style='mso-ansi-language: en-us; mso-fareast-font-family: "Times New Roman"; mso-bidi-font-family: "Times New Roman"; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-fareast-language: en-in;'><font style="font-size: 12pt;" color="#004080">Default is (no. of CPU's SQL sees * 4)</font></span></p>         <font style="font-size: 12pt;"></font></td>     </tr>      <tr style="mso-yfti-irow: 2;">       <td style="border-width: medium 1pt 1pt; border-style: none solid solid; border-color: currentcolor rgb(163, 163, 163) rgb(163, 163, 163); padding: 4pt; mso-border-top-alt: solid #a3a3a3 1.0pt;" valign="top" width="69"><font style="font-size: 12pt;"></font>          <p class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: normal;"><span lang="EN-US" style='mso-ansi-language: en-us; mso-fareast-font-family: "Times New Roman"; mso-bidi-font-family: "Times New Roman"; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-fareast-language: en-in;'><font style="font-size: 12pt;" color="#004080">Medium</font></span></p>         <font style="font-size: 12pt;"></font></td>        <td style="border-width: medium 1pt 1pt medium; border-style: none solid solid none; border-color: currentcolor rgb(163, 163, 163) rgb(163, 163, 163) currentcolor; padding: 4pt; mso-border-left-alt: solid #a3a3a3 1.0pt; mso-border-top-alt: solid #a3a3a3 1.0pt;" valign="top" width="105"><font color="#004080"><font style="font-size: 12pt;"></font></font>          <p class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: normal;"><span lang="EN-US" style='mso-ansi-language: en-us; mso-fareast-font-family: "Times New Roman"; mso-bidi-font-family: "Times New Roman"; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-fareast-language: en-in;'><font style="font-size: 12pt;" color="#004080">Static</font></span></p>         <font style="font-size: 12pt;"></font></td>        <td style="border-width: medium 1pt 1pt medium; border-style: none solid solid none; border-color: currentcolor rgb(163, 163, 163) rgb(163, 163, 163) currentcolor; padding: 4pt; mso-border-left-alt: solid #a3a3a3 1.0pt; mso-border-top-alt: solid #a3a3a3 1.0pt;" valign="top" width="318"><font color="#004080"><font style="font-size: 12pt;"></font></font>          <p class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: normal;"><span lang="EN-US" style='mso-ansi-language: en-us; mso-fareast-font-family: "Times New Roman"; mso-bidi-font-family: "Times New Roman"; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-fareast-language: en-in;'><font style="font-size: 12pt;"><font color="#004080">Number of CPU's SQL sees.</font> </font></span></p>         <font style="font-size: 12pt;"></font></td>     </tr>      <tr style="mso-yfti-irow: 3; mso-yfti-lastrow: yes;">       <td style="border-width: medium 1pt 1pt; border-style: none solid solid; border-color: currentcolor rgb(163, 163, 163) rgb(163, 163, 163); padding: 4pt; mso-border-top-alt: solid #a3a3a3 1.0pt;" valign="top" width="69"><font style="font-size: 12pt;"></font>          <p class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: normal;"><span lang="EN-US" style='mso-ansi-language: en-us; mso-fareast-font-family: "Times New Roman"; mso-bidi-font-family: "Times New Roman"; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-fareast-language: en-in;'><font style="font-size: 12pt;" color="#004080">Large</font></span></p>         <font style="font-size: 12pt;"></font></td>        <td style="border-width: medium 1pt 1pt medium; border-style: none solid solid none; border-color: currentcolor rgb(163, 163, 163) rgb(163, 163, 163) currentcolor; padding: 4pt; mso-border-left-alt: solid #a3a3a3 1.0pt; mso-border-top-alt: solid #a3a3a3 1.0pt;" valign="top" width="105"><font color="#004080"><font style="font-size: 12pt;"></font></font>          <p class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: normal;"><span lang="EN-US" style='mso-ansi-language: en-us; mso-fareast-font-family: "Times New Roman"; mso-bidi-font-family: "Times New Roman"; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-fareast-language: en-in;'><font style="font-size: 12pt;" color="#004080">Static</font></span></p>         <font style="font-size: 12pt;"></font></td>        <td style="border-width: medium 1pt 1pt medium; border-style: none solid solid none; border-color: currentcolor rgb(163, 163, 163) rgb(163, 163, 163) currentcolor; padding: 4pt; mso-border-left-alt: solid #a3a3a3 1.0pt; mso-border-top-alt: solid #a3a3a3 1.0pt;" valign="top" width="318"><font color="#004080"><font style="font-size: 12pt;"></font></font>          <p class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: normal;"><span lang="EN-US" style='mso-ansi-language: en-us; mso-fareast-font-family: "Times New Roman"; mso-bidi-font-family: "Times New Roman"; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-fareast-language: en-in;'><font style="font-size: 12pt;" color="#004080">1 per instance</font></span></p>         <font style="font-size: 12pt;"></font></td>     </tr>   </tbody></table><blockquote>   <p>&nbsp;</p> </blockquote><font style="font-size: 12pt;"></font><blockquote>   <p class="MsoNormal" style="margin: 0cm 0cm 0pt 54pt; line-height: normal; list-style-type: disc;"><span lang="EN-US" style='mso-ansi-language: en-us; mso-fareast-font-family: "Times New Roman"; mso-bidi-font-family: "Times New Roman"; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-fareast-language: en-in;'><font style="font-size: 12pt;"><font color="#004080">So if you see a large number of queries waiting on the large gateway, it means that you need to see why there are so many queries requiring large amounts of memory, and try to tune those queries. Such queries will show up with<span style="mso-spacerun: yes;">&nbsp; </span>RESOURCE_SEMAPHORE_QUERY_COMPILE or RESOURCE_SEMAPHORE wait types in sysprocesses, sys.dm_exec_requests, etc.</font> </font></span></p> </blockquote><font style="font-size: 12pt;"></font><p class="MsoNormal" style="margin: 0cm 0cm 0pt 54pt; line-height: normal; list-style-type: disc;"><span lang="EN-US" style='mso-ansi-language: en-us; mso-fareast-font-family: "Times New Roman"; mso-bidi-font-family: "Times New Roman"; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-fareast-language: en-in;'><font style="font-size: 12pt;">&nbsp;</font></span></p><font style="font-size: 12pt;"></font><blockquote>   <p class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: normal; list-style-type: disc;"><span lang="EN-US" style='mso-ansi-language: en-us; mso-fareast-font-family: "Times New Roman"; mso-bidi-font-family: "Times New Roman"; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-fareast-language: en-in;'><font style="font-size: 12pt;" color="#004080">I am listing down some DMV's that might come in handy for SQL Server Memory Troubleshooting:</font></span></p>   <font style="font-size: 12pt;"></font><font color="#004080"></font>    <p class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: normal; list-style-type: disc;"><span lang="EN-US" style='mso-ansi-language: en-us; mso-fareast-font-family: "Times New Roman"; mso-bidi-font-family: "Times New Roman"; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-fareast-language: en-in;'><font style="font-size: 12pt;" color="#004080"><strong>Sysprocesses</strong></font></span></p>   <font style="font-size: 12pt;"></font><font color="#004080"><strong></strong></font>    <p class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: normal; list-style-type: disc;"><span lang="EN-US" style='mso-ansi-language: en-us; mso-fareast-font-family: "Times New Roman"; mso-bidi-font-family: "Times New Roman"; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-fareast-language: en-in;'><font style="font-size: 12pt;" color="#004080"><strong>Sys.dm_exec_requests</strong></font></span></p>   <font style="font-size: 12pt;"></font><font color="#004080"></font>    <p class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: normal; list-style-type: disc;"><span style='mso-fareast-font-family: "Times New Roman"; mso-bidi-font-family: "Times New Roman"; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-fareast-language: en-in;'><font style="font-size: 12pt;" color="#004080"><strong>Sys.dm_os_process_memory</strong>: Usage above. </font></span></p>   <font style="font-size: 12pt;"></font><font color="#004080"></font>    <p class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: normal; list-style-type: disc;"><span lang="EN-US" style='mso-ansi-language: en-us; mso-fareast-font-family: "Times New Roman"; mso-bidi-font-family: "Times New Roman"; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-fareast-language: en-in;'><font style="font-size: 12pt;" color="#004080"><strong>Sys.dm_os_sys_memory</strong>: Will give you the overall memory picture for the server</font></span></p>   <font style="font-size: 12pt;"></font><font color="#004080"></font>    <p class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: normal; list-style-type: disc;"><span style='mso-fareast-font-family: "Times New Roman"; mso-bidi-font-family: "Times New Roman"; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-fareast-language: en-in;'><font style="font-size: 12pt;" color="#004080"><strong>Sys.dm_os_sys_info</strong>: Can be used to check OS level information like hyperthread ratio, CPU Ticks, OS Quantum, etc. </font></span></p>   <font style="font-size: 12pt;"></font><font color="#004080"></font>    <p class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: normal; list-style-type: disc;"><span lang="EN-US" style='mso-ansi-language: en-us; mso-fareast-font-family: "Times New Roman"; mso-bidi-font-family: "Times New Roman"; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-fareast-language: en-in;'><font style="font-size: 12pt;" color="#004080"><strong>Sys.dm_os_virtual_address_dump</strong>: Used to check for VAS usage (reservations). The following query will give you VAS usage in descending order of reservations:</font></span></p> </blockquote><font style="font-size: 12pt;"></font><p class="MsoNormal" style="margin: 0cm 0cm 0pt 27pt; line-height: normal; list-style-type: disc;"><span style='mso-fareast-font-family: "Times New Roman"; mso-bidi-font-family: "Times New Roman"; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-fareast-language: en-in;'><font style="font-size: 11pt;">&nbsp;</font></span></p><font style="font-size: 12pt;"></font><blockquote>   <p class="MsoNormal" style="margin: 0cm 0cm 0pt 27pt; line-height: normal; list-style-type: disc;"><span style='mso-fareast-font-family: "Times New Roman"; mso-bidi-font-family: "Times New Roman"; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-fareast-language: en-in;'><font style="font-size: 11pt;">with vasummary(Size,reserved,free) as (select size = vadump.size,</font></span></p>   <font style="font-size: 12pt;"></font>    <p class="MsoNormal" style="margin: 0cm 0cm 0pt 27pt; line-height: normal; list-style-type: disc;"><span style='mso-fareast-font-family: "Times New Roman"; mso-bidi-font-family: "Times New Roman"; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-fareast-language: en-in;'><font style="font-size: 11pt;">reserved = SUM(case(convert(int, vadump.base) ^ 0)<span style="mso-spacerun: yes;">&nbsp; </span>when 0 then 0 else 1 end),</font></span></p>   <font style="font-size: 12pt;"></font>    <p class="MsoNormal" style="margin: 0cm 0cm 0pt 27pt; line-height: normal; list-style-type: disc;"><span style='mso-fareast-font-family: "Times New Roman"; mso-bidi-font-family: "Times New Roman"; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-fareast-language: en-in;'><font style="font-size: 11pt;">free = SUM(case(convert(int, vadump.base) ^ 0x0) when 0 then 1 else 0 end)</font></span></p>   <font style="font-size: 12pt;"></font>    <p class="MsoNormal" style="margin: 0cm 0cm 0pt 27pt; line-height: normal; list-style-type: disc;"><span style='mso-fareast-font-family: "Times New Roman"; mso-bidi-font-family: "Times New Roman"; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-fareast-language: en-in;'><font style="font-size: 11pt;">from</font></span></p>   <font style="font-size: 12pt;"></font>    <p class="MsoNormal" style="margin: 0cm 0cm 0pt 27pt; line-height: normal; list-style-type: disc;"><span style='mso-fareast-font-family: "Times New Roman"; mso-bidi-font-family: "Times New Roman"; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-fareast-language: en-in;'><font style="font-size: 11pt;">(select CONVERT(varbinary, sum(region_size_in_bytes)) as size,</font></span></p>   <font style="font-size: 12pt;"></font>    <p class="MsoNormal" style="margin: 0cm 0cm 0pt 27pt; line-height: normal; list-style-type: disc;"><span style='mso-fareast-font-family: "Times New Roman"; mso-bidi-font-family: "Times New Roman"; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-fareast-language: en-in;'><font style="font-size: 11pt;">region_allocation_base_address as base</font></span></p>   <font style="font-size: 12pt;"></font>    <p class="MsoNormal" style="margin: 0cm 0cm 0pt 27pt; line-height: normal; list-style-type: disc;"><span style='mso-fareast-font-family: "Times New Roman"; mso-bidi-font-family: "Times New Roman"; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-fareast-language: en-in;'><font style="font-size: 11pt;">from sys.dm_os_virtual_address_dump</font></span></p>   <font style="font-size: 12pt;"></font>    <p class="MsoNormal" style="margin: 0cm 0cm 0pt 27pt; line-height: normal; list-style-type: disc;"><span style='mso-fareast-font-family: "Times New Roman"; mso-bidi-font-family: "Times New Roman"; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-fareast-language: en-in;'><font style="font-size: 11pt;">where region_allocation_base_address&lt;&gt; 0x0</font></span></p>   <font style="font-size: 12pt;"></font>    <p class="MsoNormal" style="margin: 0cm 0cm 0pt 27pt; line-height: normal; list-style-type: disc;"><span style='mso-fareast-font-family: "Times New Roman"; mso-bidi-font-family: "Times New Roman"; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-fareast-language: en-in;'><font style="font-size: 11pt;">group by region_allocation_base_address</font></span></p>   <font style="font-size: 12pt;"></font>    <p class="MsoNormal" style="margin: 0cm 0cm 0pt 27pt; line-height: normal; list-style-type: disc;"><span style='mso-fareast-font-family: "Times New Roman"; mso-bidi-font-family: "Times New Roman"; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-fareast-language: en-in;'><font style="font-size: 11pt;">UNION(</font></span></p>   <font style="font-size: 12pt;"></font>    <p class="MsoNormal" style="margin: 0cm 0cm 0pt 27pt; line-height: normal; list-style-type: disc;"><span style='mso-fareast-font-family: "Times New Roman"; mso-bidi-font-family: "Times New Roman"; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-fareast-language: en-in;'><font style="font-size: 11pt;">select CONVERT(varbinary, region_size_in_bytes),</font></span></p>   <font style="font-size: 12pt;"></font>    <p class="MsoNormal" style="margin: 0cm 0cm 0pt 27pt; line-height: normal; list-style-type: disc;"><span style='mso-fareast-font-family: "Times New Roman"; mso-bidi-font-family: "Times New Roman"; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-fareast-language: en-in;'><font style="font-size: 11pt;">region_allocation_base_address</font></span></p>   <font style="font-size: 12pt;"></font>    <p class="MsoNormal" style="margin: 0cm 0cm 0pt 27pt; line-height: normal; list-style-type: disc;"><span style='mso-fareast-font-family: "Times New Roman"; mso-bidi-font-family: "Times New Roman"; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-fareast-language: en-in;'><font style="font-size: 11pt;">from sys.dm_os_virtual_address_dump</font></span></p>   <font style="font-size: 12pt;"></font>    <p class="MsoNormal" style="margin: 0cm 0cm 0pt 27pt; line-height: normal; list-style-type: disc;"><span style='mso-fareast-font-family: "Times New Roman"; mso-bidi-font-family: "Times New Roman"; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-fareast-language: en-in;'><font style="font-size: 11pt;">where region_allocation_base_address = 0x0)</font></span></p>   <font style="font-size: 12pt;"></font>    <p class="MsoNormal" style="margin: 0cm 0cm 0pt 27pt; line-height: normal; list-style-type: disc;"><span style='mso-fareast-font-family: "Times New Roman"; mso-bidi-font-family: "Times New Roman"; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-fareast-language: en-in;'><font style="font-size: 11pt;">)</font></span></p>   <font style="font-size: 12pt;"></font>    <p class="MsoNormal" style="margin: 0cm 0cm 0pt 27pt; line-height: normal; list-style-type: disc;"><span style='mso-fareast-font-family: "Times New Roman"; mso-bidi-font-family: "Times New Roman"; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-fareast-language: en-in;'><font style="font-size: 11pt;">as vadump</font></span></p>   <font style="font-size: 12pt;"></font>    <p class="MsoNormal" style="margin: 0cm 0cm 0pt 27pt; line-height: normal; list-style-type: disc;"><span style='mso-fareast-font-family: "Times New Roman"; mso-bidi-font-family: "Times New Roman"; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-fareast-language: en-in;'><font style="font-size: 11pt;">group by size)</font></span></p>   <font style="font-size: 12pt;"></font>    <p class="MsoNormal" style="margin: 0cm 0cm 0pt 27pt; line-height: normal; list-style-type: disc;"><span style='mso-fareast-font-family: "Times New Roman"; mso-bidi-font-family: "Times New Roman"; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-fareast-language: en-in;'><font style="font-size: 11pt;">select * from vasummary order by reserved desc</font></span></p>   <font style="font-size: 12pt;"></font>    <p class="MsoNormal" style="margin: 0cm 0cm 0pt 27pt; line-height: normal; list-style-type: disc;"><span style='mso-fareast-font-family: "Times New Roman"; mso-bidi-font-family: "Times New Roman"; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-fareast-language: en-in;'><font style="font-size: 11pt;">go</font></span></p> </blockquote><font style="font-size: 12pt;"></font><p class="MsoNormal" style="margin: 0cm 0cm 0pt 27pt; line-height: normal; list-style-type: disc;"><span lang="EN-US" style='mso-ansi-language: en-us; mso-fareast-font-family: "Times New Roman"; mso-bidi-font-family: "Times New Roman"; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-fareast-language: en-in;'><font style="font-size: 12pt;">&nbsp;</font></span></p><font style="font-size: 12pt;"></font><blockquote>   <p class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: normal; list-style-type: disc;"><span lang="EN-US" style='mso-ansi-language: en-us; mso-fareast-font-family: "Times New Roman"; mso-bidi-font-family: "Times New Roman"; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-fareast-language: en-in;'><font style="font-size: 12pt;" color="#004080"><strong>Sys.dm_os_memory_clerks</strong> (Usage above) </font></span></p>   <font style="font-size: 12pt;"></font><font color="#004080"></font>    <p class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: normal; list-style-type: disc;"><span lang="EN-US" style='mso-ansi-language: en-us; mso-fareast-font-family: "Times New Roman"; mso-bidi-font-family: "Times New Roman"; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-fareast-language: en-in;'><font style="font-size: 12pt;" color="#004080"><strong>Sys.dm_os_memory_nodes</strong>: Just a select * would suffice. This DMV has one row for each memory node. </font></span></p>   <font style="font-size: 12pt;"></font><font color="#004080"></font>    <p class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: normal; list-style-type: disc;"><span lang="EN-US" style='mso-ansi-language: en-us; mso-fareast-font-family: "Times New Roman"; mso-bidi-font-family: "Times New Roman"; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-fareast-language: en-in;'><font style="font-size: 12pt;" color="#004080"><strong>Sys.dm_os_memory_cache_counters</strong>: Used above to find the size of the cachestores. Another sample query would be</font></span></p>   <font style="font-size: 12pt;"></font><font color="#004080"></font><font color="#000000"><span style='mso-fareast-font-family: "Times New Roman"; mso-bidi-font-family: "Times New Roman"; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-fareast-language: en-in;'><font style="font-size: 11pt;">select (single_pages_kb+multi_pages_kb) as memusage,* from Sys.dm_os_memory_cache_counters order by memusage desc</font></span><font style="font-size: 12pt;"></font> </font>    <p class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: normal; list-style-type: disc;"><span lang="EN-US" style='mso-ansi-language: en-us; mso-fareast-font-family: "Times New Roman"; mso-bidi-font-family: "Times New Roman"; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-fareast-language: en-in;'><font style="font-size: 12pt;" color="#004080">&nbsp;</font></span></p>    <p class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: normal; list-style-type: disc;"><span lang="EN-US" style='mso-ansi-language: en-us; mso-fareast-font-family: "Times New Roman"; mso-bidi-font-family: "Times New Roman"; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-fareast-language: en-in;'><font color="#004080" size="3">Once you have narrowed down the primary consumer and the specific component which is causing a memory bottleneck, the resolution steps should be fairly simple. For example, if you see some poorly written code, you can hound the developers to tune it. For other processes hogging memory at the OS Level, you will need to investigate them. For high consumption by a particular clerk, check the corresponding components. An example would be, say,&nbsp; in case of high usage by the SQLUtilities clerk, one of the first things you need to check if there is any Mirroring set up on the instance, and if it&rsquo;s working properly. </font></span></p>    <p class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: normal; list-style-type: disc;"><span lang="EN-US" style='mso-ansi-language: en-us; mso-fareast-font-family: "Times New Roman"; mso-bidi-font-family: "Times New Roman"; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-fareast-language: en-in;'><font color="#004080" size="3"></font></span></p>    <p class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: normal; list-style-type: disc;"><span lang="EN-US" style='mso-ansi-language: en-us; mso-fareast-font-family: "Times New Roman"; mso-bidi-font-family: "Times New Roman"; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-fareast-language: en-in;'><font color="#004080" size="3">Another thing I would strongly recommend would be to watch out for memory related KB articles, and make sure you have the relevant fixes applied. </font></span></p>    <p class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: normal; list-style-type: disc;"><span lang="EN-US" style='mso-ansi-language: en-us; mso-fareast-font-family: "Times New Roman"; mso-bidi-font-family: "Times New Roman"; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-fareast-language: en-in;'><font color="#004080" size="3"></font></span></p>   <font style="font-size: 12pt;"></font><font color="#004080"></font>    <p class="MsoNormal" style="margin: 0cm 0cm 0pt; line-height: normal; list-style-type: disc;"><span lang="EN-US" style='mso-ansi-language: en-us; mso-fareast-font-family: "Times New Roman"; mso-bidi-font-family: "Times New Roman"; mso-ascii-font-family: calibri; mso-hansi-font-family: calibri; mso-fareast-language: en-in;'><font style="font-size: 12pt;"><font color="#004080">Hope this helps. Any feedback, questions or comments are welcome.</font> </font></span></p> </blockquote><font style="font-size: 12pt;"></font><p class="MsoNormal" style="margin: 0cm 0cm 8pt; line-height: 12pt; list-style-type: disc;"><font style="font-size: 11pt;">&nbsp;</font></p><font style="font-size: 12pt;"></font></p>
]]></content:encoded>
    </item>
  </channel>
</rss>