<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>John Morehouse</title>
    <link>https://johnmorehouse.com/</link>
    <description>Recent content on John Morehouse</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en-us</language>
    <lastBuildDate>Mon, 17 Aug 2026 09:00:00 -0400</lastBuildDate>
    <atom:link href="https://johnmorehouse.com/rss.xml" rel="self" type="application/rss&#43;xml" />
    <item>
      <title>The Magic Behind ADR: My 8KB Talk</title>
      <link>https://johnmorehouse.com/2026/08/i-am-speaking-at-8kb/</link>
      <pubDate>Mon, 17 Aug 2026 09:00:00 -0400</pubDate>
      <guid>https://johnmorehouse.com/2026/08/i-am-speaking-at-8kb/</guid>
      <description>&lt;p&gt;This week, I am honored to be speaking at the most excellent &lt;a href=&#34;https://eightkb.online&#34;&gt;8KB conference&lt;/a&gt;.  If you aren&amp;rsquo;t aware of this conference, it&amp;rsquo;s ran by several members of the SQL Community.  It is designed to be a deep dive internals conference.  While it started out as internals of SQL Server, over the years it has grown and expanded into other concepts so if you like nerding out to technology, this is a conference that you do not want to miss.&lt;/p&gt;&#xA;&lt;p&gt;Plus, it&amp;rsquo;s free to attend as everything is online!  This years schedule is set to knock your socks off, plus you&amp;rsquo;ll get to hear me speak!&lt;/p&gt;&#xA;&lt;!-- more --&gt;&#xA;&lt;h3 id=&#34;check-out-this-schedule&#34;&gt;Check out this schedule&lt;/h3&gt;&#xA;&lt;p&gt;&lt;img src=&#34;https://johnmorehouse.com/images/2026/08/8kb-schedule.png&#34; alt=&#34;8kb Conference Schedule for 2026&#34;&gt;&#xA;&lt;/p&gt;&#xA;&lt;p&gt;That schedule is chaulked full of deep-dive goodness and even though I&amp;quot;m speaking, I&amp;rsquo;ll be attending all of them to learn all that I can!&lt;/p&gt;&#xA;&lt;h3 id=&#34;my-session&#34;&gt;My Session&lt;/h3&gt;&#xA;&lt;p&gt;I&amp;rsquo;m going to be doing a deep dive into the internals of how Accelerated Database Recovery (ADR) works.  ADR was originally released with Azure SQL Database and subsequently SQL Server 2019.  It&amp;rsquo;s a phenomal feature that, in my opinion, was one of those game changers that really helped to improve the life of database administrators everywhere.&lt;/p&gt;&#xA;&lt;p&gt;Here&amp;rsquo;s my abstract -&lt;/p&gt;&#xA;&lt;h4 id=&#34;accelerated-database-recovery---a-deep-dive-behind-the-magic&#34;&gt;Accelerated Database Recovery - A Deep Dive Behind the Magic&lt;/h4&gt;&#xA;&lt;p&gt;We have all heard the stories. Horror story after horror story being regaled from database administrators all over the world of waiting for hours or sometimes days for a rollback operation to complete. DBA&amp;rsquo;s hoping beyond hope that the rollback finishes soon before someone else gets the notion to reboot the server.&lt;/p&gt;&#xA;&lt;p&gt;With the release of SQL Server 2019, a new talisman was conjured that will save us all from hearing about future horror stories. Accelerated Database Recovery or also known as &amp;ldquo;ADR&amp;rdquo;. This new mystical feature changes the way transaction rollback performs and will undoubtedly prove invaluable in your arsenals of magical tricks!&lt;/p&gt;&#xA;&lt;p&gt;In this session, we&amp;rsquo;ll show you the secret behind it!&lt;/p&gt;&#xA;&lt;p&gt;You will -&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Learn about new components of the transaction log&lt;/li&gt;&#xA;&lt;li&gt;Discover the magic behind ADR&lt;/li&gt;&#xA;&lt;li&gt;Determine when you wouldn&amp;rsquo;t want to implement it&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;Don&amp;rsquo;t be the protagonist in a rollback horror story! After all, the time you save might be your own!&lt;/p&gt;&#xA;&lt;h3 id=&#34;come-join-us&#34;&gt;Come join us&lt;/h3&gt;&#xA;&lt;p&gt;If you want to nerd out on the internals of things, make sure you register!&lt;/p&gt;&#xA;&lt;p&gt;I&amp;rsquo;ll see you online on Thursday @ 1730 UTC (1:30PM EST)!&lt;/p&gt;&#xA;</description>
      <content:encoded>&lt;p&gt;This week, I am honored to be speaking at the most excellent &lt;a href=&#34;https://eightkb.online&#34;&gt;8KB conference&lt;/a&gt;.  If you aren&amp;rsquo;t aware of this conference, it&amp;rsquo;s ran by several members of the SQL Community.  It is designed to be a deep dive internals conference.  While it started out as internals of SQL Server, over the years it has grown and expanded into other concepts so if you like nerding out to technology, this is a conference that you do not want to miss.&lt;/p&gt;&#xA;&lt;p&gt;Plus, it&amp;rsquo;s free to attend as everything is online!  This years schedule is set to knock your socks off, plus you&amp;rsquo;ll get to hear me speak!&lt;/p&gt;&#xA;&lt;!-- more --&gt;&#xA;&lt;h3 id=&#34;check-out-this-schedule&#34;&gt;Check out this schedule&lt;/h3&gt;&#xA;&lt;p&gt;&lt;img src=&#34;https://johnmorehouse.com/images/2026/08/8kb-schedule.png&#34; alt=&#34;8kb Conference Schedule for 2026&#34;&gt;&#xA;&lt;/p&gt;&#xA;&lt;p&gt;That schedule is chaulked full of deep-dive goodness and even though I&amp;quot;m speaking, I&amp;rsquo;ll be attending all of them to learn all that I can!&lt;/p&gt;&#xA;&lt;h3 id=&#34;my-session&#34;&gt;My Session&lt;/h3&gt;&#xA;&lt;p&gt;I&amp;rsquo;m going to be doing a deep dive into the internals of how Accelerated Database Recovery (ADR) works.  ADR was originally released with Azure SQL Database and subsequently SQL Server 2019.  It&amp;rsquo;s a phenomal feature that, in my opinion, was one of those game changers that really helped to improve the life of database administrators everywhere.&lt;/p&gt;&#xA;&lt;p&gt;Here&amp;rsquo;s my abstract -&lt;/p&gt;&#xA;&lt;h4 id=&#34;accelerated-database-recovery---a-deep-dive-behind-the-magic&#34;&gt;Accelerated Database Recovery - A Deep Dive Behind the Magic&lt;/h4&gt;&#xA;&lt;p&gt;We have all heard the stories. Horror story after horror story being regaled from database administrators all over the world of waiting for hours or sometimes days for a rollback operation to complete. DBA&amp;rsquo;s hoping beyond hope that the rollback finishes soon before someone else gets the notion to reboot the server.&lt;/p&gt;&#xA;&lt;p&gt;With the release of SQL Server 2019, a new talisman was conjured that will save us all from hearing about future horror stories. Accelerated Database Recovery or also known as &amp;ldquo;ADR&amp;rdquo;. This new mystical feature changes the way transaction rollback performs and will undoubtedly prove invaluable in your arsenals of magical tricks!&lt;/p&gt;&#xA;&lt;p&gt;In this session, we&amp;rsquo;ll show you the secret behind it!&lt;/p&gt;&#xA;&lt;p&gt;You will -&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Learn about new components of the transaction log&lt;/li&gt;&#xA;&lt;li&gt;Discover the magic behind ADR&lt;/li&gt;&#xA;&lt;li&gt;Determine when you wouldn&amp;rsquo;t want to implement it&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;Don&amp;rsquo;t be the protagonist in a rollback horror story! After all, the time you save might be your own!&lt;/p&gt;&#xA;&lt;h3 id=&#34;come-join-us&#34;&gt;Come join us&lt;/h3&gt;&#xA;&lt;p&gt;If you want to nerd out on the internals of things, make sure you register!&lt;/p&gt;&#xA;&lt;p&gt;I&amp;rsquo;ll see you online on Thursday @ 1730 UTC (1:30PM EST)!&lt;/p&gt;&#xA;</content:encoded>
    </item>
    <item>
      <title>SSMS Needs Improved Visual Indicators for Contained Availability Groups</title>
      <link>https://johnmorehouse.com/2026/08/ssms-needs-improved-visual-indicators-for-contained-availability-groups/</link>
      <pubDate>Mon, 03 Aug 2026 09:00:00 -0400</pubDate>
      <guid>https://johnmorehouse.com/2026/08/ssms-needs-improved-visual-indicators-for-contained-availability-groups/</guid>
      <description>&lt;p&gt;As I&amp;rsquo;ve been spending more time working with Contained Availability Groups (CAGs), I&amp;rsquo;ve run into something that I think is an issue as they become more prevelant in the wild. To be honest, I do not have a lot of clients running CAG&amp;rsquo;s so I do not know how wide spread they might be but this is something I noticed.&lt;/p&gt;&#xA;&lt;p&gt;To be blunt, it&amp;rsquo;s an SSMS problem.  Specifically, there is no obvious visual indicator that tells me whether I&amp;rsquo;m connected to a SQL Server instance or connected to a Contained Availability Group. The icons within SSMS are the same regardless of which context you are connected to.&lt;/p&gt;&#xA;&lt;!-- more --&gt;&#xA;&lt;p&gt;Below is an example of a connection to a CAG and you can see that the icons are the exact same as if you connected to the instance itself.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img src=&#34;https://johnmorehouse.com/images/2026/05/contained-ag-contained-connection-view.png&#34; alt=&#34;Contained availability group listener connection context&#34;&gt;&#xA;&lt;/p&gt;&#xA;&lt;p&gt;Because of that, I&amp;rsquo;ve submitted a suggestion to Microsoft:&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://developercommunity.microsoft.com/t/Object-Explorer-lacks-visual-indicator-f/11099498?entry=suggestion&#34;&gt;https://developercommunity.microsoft.com/t/Object-Explorer-lacks-visual-indicator-f/11099498?entry=suggestion&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;Ironically, Allan Hirt of Microsoft, who if you know him is just flat out a good human being and fantastic technologist, recently posted a question on LinkedIn regarding improving high availability within SQL Server. I sent him the feedback link, but I think this is one of those things that would definitely help this.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img src=&#34;https://johnmorehouse.com/images/2026/08/allan-hirt-linkedin.png&#34; alt=&#34;Allan Hirt&amp;rsquo;s LinkedIn Post&#34;&gt;&#xA;&lt;/p&gt;&#xA;&lt;p&gt;If you want to give Allan feedback, here&amp;rsquo;s his &lt;a href=&#34;https://www.linkedin.com/posts/allanhirt_sqlserver-azuresql-availability-share-7484978165119991808-PD1d/?utm_source=share&amp;amp;utm_medium=member_desktop&amp;amp;rcm=ACoAAAA0yDkBxi4z411v2ImL4DFk4HAacW5CUOc&#34;&gt;post&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;h2 id=&#34;why-this-matters&#34;&gt;Why This Matters&lt;/h2&gt;&#xA;&lt;p&gt;One of the key concepts behind Contained Availability Groups is that they introduce their own contained versions of &lt;code&gt;master&lt;/code&gt; and &lt;code&gt;msdb&lt;/code&gt;. This allows logins, SQL Agent jobs, credentials, and other traditionally instance-level objects to move with the availability group.&lt;/p&gt;&#xA;&lt;p&gt;The problem is that when you&amp;rsquo;re working in SQL Server Management Studio, the Object Explorer experience looks almost identical whether you&amp;rsquo;re connected to:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;A traditional SQL Server instance&lt;/li&gt;&#xA;&lt;li&gt;A listener for a Contained Availability Group&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;The only clue is often the server name you used when connecting.  As a secondary issue, when utilizing CAG&amp;rsquo;s, the naming convention of the listener is going to be important to ensure clarity when connecting.&lt;/p&gt;&#xA;&lt;h2 id=&#34;a-real-world-scenario&#34;&gt;A Real-World Scenario&lt;/h2&gt;&#xA;&lt;p&gt;Imagine you&amp;rsquo;re troubleshooting an Availability Group and have multiple Object Explorer windows open.&lt;/p&gt;&#xA;&lt;p&gt;One window is connected directly to the SQL Server instance.&lt;/p&gt;&#xA;&lt;p&gt;Another is connected to the Contained AG listener.&lt;/p&gt;&#xA;&lt;p&gt;You expand Security and see Logins.&lt;/p&gt;&#xA;&lt;p&gt;You expand SQL Server Agent and see Jobs.&lt;/p&gt;&#xA;&lt;p&gt;Everything looks normal.&lt;/p&gt;&#xA;&lt;p&gt;But are you looking at the instance-level objects or the contained objects?&lt;/p&gt;&#xA;&lt;p&gt;Without stopping and carefully checking your connection, it&amp;rsquo;s easy to lose track.  This is going to be even more so if you have to manage a large SQL Server estate, ie: 1000&amp;rsquo;s of SQL Server instances, potentially many all having contained availability groups.&lt;/p&gt;&#xA;&lt;p&gt;Even worse, you could create a login or SQL Agent job in the wrong location and not realize it until a failover occurs.&lt;/p&gt;&#xA;&lt;h2 id=&#34;what-id-like-to-see&#34;&gt;What I&amp;rsquo;d Like to See&lt;/h2&gt;&#xA;&lt;p&gt;I don&amp;rsquo;t think this requires a major redesign.&lt;/p&gt;&#xA;&lt;p&gt;A few simple changes could make a huge difference, like&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;A distinct icon for Contained Availability Group connections&lt;/li&gt;&#xA;&lt;li&gt;A different color scheme in Object Explorer&lt;/li&gt;&#xA;&lt;li&gt;A visual badge or label indicating &amp;ldquo;Contained AG&amp;rdquo;&lt;/li&gt;&#xA;&lt;li&gt;A status bar indicator similar to what Azure Data Studio (Long Live ADS!) uses for different connection types&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;Anything that immediately tells the user:&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;You are connected to a Contained Availability Group, not the SQL Server instance.&lt;/p&gt;&lt;/blockquote&gt;&#xA;&lt;p&gt;Any one of the changes listed above would be better than what it is now.&lt;/p&gt;&#xA;&lt;h2 id=&#34;what-do-you-think&#34;&gt;What Do You Think?&lt;/h2&gt;&#xA;&lt;p&gt;Have you started using Contained Availability Groups yet? If so, have you found yourself double-checking whether you&amp;rsquo;re connected to the instance or the AG?&lt;/p&gt;&#xA;&lt;p&gt;I&amp;rsquo;d be interested to hear how others are handling this today, and if you agree, I&amp;rsquo;d appreciate an upvote on the suggestion.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://developercommunity.microsoft.com/t/Object-Explorer-lacks-visual-indicator-f/11099498?entry=suggestion&#34;&gt;https://developercommunity.microsoft.com/t/Object-Explorer-lacks-visual-indicator-f/11099498?entry=suggestion&lt;/a&gt;&lt;/p&gt;&#xA;</description>
      <content:encoded>&lt;p&gt;As I&amp;rsquo;ve been spending more time working with Contained Availability Groups (CAGs), I&amp;rsquo;ve run into something that I think is an issue as they become more prevelant in the wild. To be honest, I do not have a lot of clients running CAG&amp;rsquo;s so I do not know how wide spread they might be but this is something I noticed.&lt;/p&gt;&#xA;&lt;p&gt;To be blunt, it&amp;rsquo;s an SSMS problem.  Specifically, there is no obvious visual indicator that tells me whether I&amp;rsquo;m connected to a SQL Server instance or connected to a Contained Availability Group. The icons within SSMS are the same regardless of which context you are connected to.&lt;/p&gt;&#xA;&lt;!-- more --&gt;&#xA;&lt;p&gt;Below is an example of a connection to a CAG and you can see that the icons are the exact same as if you connected to the instance itself.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img src=&#34;https://johnmorehouse.com/images/2026/05/contained-ag-contained-connection-view.png&#34; alt=&#34;Contained availability group listener connection context&#34;&gt;&#xA;&lt;/p&gt;&#xA;&lt;p&gt;Because of that, I&amp;rsquo;ve submitted a suggestion to Microsoft:&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://developercommunity.microsoft.com/t/Object-Explorer-lacks-visual-indicator-f/11099498?entry=suggestion&#34;&gt;https://developercommunity.microsoft.com/t/Object-Explorer-lacks-visual-indicator-f/11099498?entry=suggestion&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;Ironically, Allan Hirt of Microsoft, who if you know him is just flat out a good human being and fantastic technologist, recently posted a question on LinkedIn regarding improving high availability within SQL Server. I sent him the feedback link, but I think this is one of those things that would definitely help this.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img src=&#34;https://johnmorehouse.com/images/2026/08/allan-hirt-linkedin.png&#34; alt=&#34;Allan Hirt&amp;rsquo;s LinkedIn Post&#34;&gt;&#xA;&lt;/p&gt;&#xA;&lt;p&gt;If you want to give Allan feedback, here&amp;rsquo;s his &lt;a href=&#34;https://www.linkedin.com/posts/allanhirt_sqlserver-azuresql-availability-share-7484978165119991808-PD1d/?utm_source=share&amp;amp;utm_medium=member_desktop&amp;amp;rcm=ACoAAAA0yDkBxi4z411v2ImL4DFk4HAacW5CUOc&#34;&gt;post&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;h2 id=&#34;why-this-matters&#34;&gt;Why This Matters&lt;/h2&gt;&#xA;&lt;p&gt;One of the key concepts behind Contained Availability Groups is that they introduce their own contained versions of &lt;code&gt;master&lt;/code&gt; and &lt;code&gt;msdb&lt;/code&gt;. This allows logins, SQL Agent jobs, credentials, and other traditionally instance-level objects to move with the availability group.&lt;/p&gt;&#xA;&lt;p&gt;The problem is that when you&amp;rsquo;re working in SQL Server Management Studio, the Object Explorer experience looks almost identical whether you&amp;rsquo;re connected to:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;A traditional SQL Server instance&lt;/li&gt;&#xA;&lt;li&gt;A listener for a Contained Availability Group&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;The only clue is often the server name you used when connecting.  As a secondary issue, when utilizing CAG&amp;rsquo;s, the naming convention of the listener is going to be important to ensure clarity when connecting.&lt;/p&gt;&#xA;&lt;h2 id=&#34;a-real-world-scenario&#34;&gt;A Real-World Scenario&lt;/h2&gt;&#xA;&lt;p&gt;Imagine you&amp;rsquo;re troubleshooting an Availability Group and have multiple Object Explorer windows open.&lt;/p&gt;&#xA;&lt;p&gt;One window is connected directly to the SQL Server instance.&lt;/p&gt;&#xA;&lt;p&gt;Another is connected to the Contained AG listener.&lt;/p&gt;&#xA;&lt;p&gt;You expand Security and see Logins.&lt;/p&gt;&#xA;&lt;p&gt;You expand SQL Server Agent and see Jobs.&lt;/p&gt;&#xA;&lt;p&gt;Everything looks normal.&lt;/p&gt;&#xA;&lt;p&gt;But are you looking at the instance-level objects or the contained objects?&lt;/p&gt;&#xA;&lt;p&gt;Without stopping and carefully checking your connection, it&amp;rsquo;s easy to lose track.  This is going to be even more so if you have to manage a large SQL Server estate, ie: 1000&amp;rsquo;s of SQL Server instances, potentially many all having contained availability groups.&lt;/p&gt;&#xA;&lt;p&gt;Even worse, you could create a login or SQL Agent job in the wrong location and not realize it until a failover occurs.&lt;/p&gt;&#xA;&lt;h2 id=&#34;what-id-like-to-see&#34;&gt;What I&amp;rsquo;d Like to See&lt;/h2&gt;&#xA;&lt;p&gt;I don&amp;rsquo;t think this requires a major redesign.&lt;/p&gt;&#xA;&lt;p&gt;A few simple changes could make a huge difference, like&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;A distinct icon for Contained Availability Group connections&lt;/li&gt;&#xA;&lt;li&gt;A different color scheme in Object Explorer&lt;/li&gt;&#xA;&lt;li&gt;A visual badge or label indicating &amp;ldquo;Contained AG&amp;rdquo;&lt;/li&gt;&#xA;&lt;li&gt;A status bar indicator similar to what Azure Data Studio (Long Live ADS!) uses for different connection types&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;Anything that immediately tells the user:&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;You are connected to a Contained Availability Group, not the SQL Server instance.&lt;/p&gt;&lt;/blockquote&gt;&#xA;&lt;p&gt;Any one of the changes listed above would be better than what it is now.&lt;/p&gt;&#xA;&lt;h2 id=&#34;what-do-you-think&#34;&gt;What Do You Think?&lt;/h2&gt;&#xA;&lt;p&gt;Have you started using Contained Availability Groups yet? If so, have you found yourself double-checking whether you&amp;rsquo;re connected to the instance or the AG?&lt;/p&gt;&#xA;&lt;p&gt;I&amp;rsquo;d be interested to hear how others are handling this today, and if you agree, I&amp;rsquo;d appreciate an upvote on the suggestion.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://developercommunity.microsoft.com/t/Object-Explorer-lacks-visual-indicator-f/11099498?entry=suggestion&#34;&gt;https://developercommunity.microsoft.com/t/Object-Explorer-lacks-visual-indicator-f/11099498?entry=suggestion&lt;/a&gt;&lt;/p&gt;&#xA;</content:encoded>
    </item>
    <item>
      <title>Contained Availability Groups: Issues to Watch Out For</title>
      <link>https://johnmorehouse.com/2026/06/contained-availability-groups-issues-to-watch-out-for/</link>
      <pubDate>Mon, 15 Jun 2026 09:00:00 -0400</pubDate>
      <guid>https://johnmorehouse.com/2026/06/contained-availability-groups-issues-to-watch-out-for/</guid>
      <description>&lt;p&gt;Contained availability groups solve some real operational problems, especially around logins, jobs, permissions, and supporting metadata. They can reduce drift between replicas and make failover cleaner.&lt;/p&gt;&#xA;&lt;p&gt;That does not mean they are magic.&lt;/p&gt;&#xA;&lt;p&gt;Like most SQL Server features, contained availability groups come with details that matter. The feature can absolutely help, but it needs to be designed, tested, and operated with the right expectations.&lt;/p&gt;&#xA;&lt;h3 id=&#34;connection-context-matters&#34;&gt;Connection context matters&lt;/h3&gt;&#xA;&lt;p&gt;The first thing to watch is how you connect.&lt;/p&gt;&#xA;&lt;p&gt;To use the contained environment, you need to connect through the contained AG listener or connect directly to a database that belongs to the contained AG. If you connect to the SQL Server instance name, you are working in the instance context, not the contained AG context.&lt;/p&gt;&#xA;&lt;p&gt;That distinction matters because the contained &lt;code&gt;master&lt;/code&gt; and &lt;code&gt;msdb&lt;/code&gt; only show up when you are in the contained AG context.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img src=&#34;https://johnmorehouse.com/images/2026/05/contained-ag-listener-context.png&#34; alt=&#34;Contained availability group listener connection context&#34;&gt;&#xA;&lt;/p&gt;&#xA;&lt;p&gt;If your application, maintenance process, deployment script, or DBA session connects to the wrong endpoint, you may create objects in the wrong place. That can lead to the same kind of drift contained availability groups are supposed to reduce.&lt;/p&gt;&#xA;&lt;p&gt;In a future post, I have a solution that will help eliminate this particular issue.&lt;/p&gt;&#xA;&lt;h3 id=&#34;contained-system-databases-start-mostly-empty&#34;&gt;Contained system databases start mostly empty&lt;/h3&gt;&#xA;&lt;p&gt;The contained system databases are separate databases. They are not copies of the instance-level &lt;code&gt;master&lt;/code&gt; and &lt;code&gt;msdb&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;p&gt;That is important. Existing local users, jobs, permissions, and configurations do not automatically appear inside the contained AG. You need to create the required objects inside the contained environment or move them there intentionally.&lt;/p&gt;&#xA;&lt;p&gt;This can be a good thing because it keeps the contained AG cleaner. It can also surprise you if you expect everything from the instance to already exist inside the contained system databases.&lt;/p&gt;&#xA;&lt;p&gt;Another potential downside is if you have a large number of objects, like agent jobs, that the application depends on, you must redeploy all of the jobs within the context of the contained avaialbility group. This intital setup might be cumbersome and taxing depending on the volume of objects to be deployed.&lt;/p&gt;&#xA;&lt;h3 id=&#34;additional-backups-required&#34;&gt;Additional Backups Required&lt;/h3&gt;&#xA;&lt;p&gt;Each contained availability group will have two additional databases to maintain, namely &lt;code&gt;master&lt;/code&gt; and &lt;code&gt;msdb&lt;/code&gt; that is associted with that group.  If you have multiple contained AG&amp;rsquo;s on an instance, you&amp;rsquo;ll have two additional databases for each group, which means more backups and database maintenance to orchestrate.&lt;/p&gt;&#xA;&lt;p&gt;While this shouldn&amp;rsquo;t be a major issue, it&amp;rsquo;s worth noting as something to account.&lt;/p&gt;&#xA;&lt;h3 id=&#34;security-is-not-automatic-isolation&#34;&gt;Security is not automatic isolation&lt;/h3&gt;&#xA;&lt;p&gt;Contained availability groups help keep application-related objects with the AG, but they are not a security boundary by themselves.&lt;/p&gt;&#xA;&lt;p&gt;You still need to design permissions carefully. Server-level access, sysadmin membership, endpoint permissions, service accounts, linked servers, credentials, certificates, and other external dependencies still require attention.&lt;/p&gt;&#xA;&lt;p&gt;Also remember that sysadmin logins from the parent instance are copied into the contained AG &lt;code&gt;master&lt;/code&gt; during creation. That may be exactly what you expect, but it should not be ignored.&lt;/p&gt;&#xA;&lt;h3 id=&#34;feature-support-has-limits&#34;&gt;Feature support has limits&lt;/h3&gt;&#xA;&lt;p&gt;Some features have special considerations with contained availability groups. Others are not supported in certain configurations.&lt;/p&gt;&#xA;&lt;p&gt;Items to review before putting things into production include:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;TDE&lt;/li&gt;&#xA;&lt;li&gt;CDC&lt;/li&gt;&#xA;&lt;li&gt;log shipping&lt;/li&gt;&#xA;&lt;li&gt;Resource Governor&lt;/li&gt;&#xA;&lt;li&gt;distributed availability groups&lt;/li&gt;&#xA;&lt;li&gt;SQL Server Replication&lt;/li&gt;&#xA;&lt;li&gt;contained system database restore procedures&lt;/li&gt;&#xA;&lt;li&gt;re-seeding a contained availability group&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;SQL Server 2025 also adds more contained AG capability, including distributed availability group support between contained AGs and the ability, starting with SQL Server 2025 CU1, to enable database creation or restore inside a contained AG session for appropriately privileged users.&lt;/p&gt;&#xA;&lt;p&gt;That is useful progress, but it also reinforces the point: check the version, check the documentation, and test the exact configuration you plan to run.&lt;/p&gt;&#xA;&lt;h3 id=&#34;seeding-deserves-attention&#34;&gt;Seeding deserves attention&lt;/h3&gt;&#xA;&lt;p&gt;Adding a replica to a traditional Availability Group can be straightforward for the user databases, especially with automatic seeding. The harder part is remembering all the instance-level extras that the application depends on.&lt;/p&gt;&#xA;&lt;p&gt;Contained availability groups reduce that pain because the contained system databases are seeded to new replicas and changes replicate just like the other databases in the AG. That makes replica onboarding more predictable because the supporting metadata can come along with the availability group instead of being rebuilt by hand on each instance.&lt;/p&gt;&#xA;&lt;p&gt;There are still details to plan for, especially around larger databases and synchronization choices. Re-seeding a contained availability group also requires care and special commands, so this is not something I would treat casually in production.&lt;/p&gt;&#xA;&lt;h3 id=&#34;summary&#34;&gt;Summary&lt;/h3&gt;&#xA;&lt;p&gt;Contained availability groups can make Availability Group operations cleaner, but they do not remove the need for design discipline and careful planning. The most important things to watch are connection context, object placement, feature support, and testing.&lt;/p&gt;&#xA;&lt;p&gt;If you are already using Availability Groups and you have ever had to troubleshoot a failed login, missing job, mismatched permission, or forgotten &lt;code&gt;msdb&lt;/code&gt; object after failover, contained availability groups are worth a serious look. Just make sure the implementation is tested as thoroughly as the idea sounds promising.&lt;/p&gt;</description>
      <content:encoded>&lt;p&gt;Contained availability groups solve some real operational problems, especially around logins, jobs, permissions, and supporting metadata. They can reduce drift between replicas and make failover cleaner.&lt;/p&gt;&#xA;&lt;p&gt;That does not mean they are magic.&lt;/p&gt;&#xA;&lt;p&gt;Like most SQL Server features, contained availability groups come with details that matter. The feature can absolutely help, but it needs to be designed, tested, and operated with the right expectations.&lt;/p&gt;&#xA;&lt;h3 id=&#34;connection-context-matters&#34;&gt;Connection context matters&lt;/h3&gt;&#xA;&lt;p&gt;The first thing to watch is how you connect.&lt;/p&gt;&#xA;&lt;p&gt;To use the contained environment, you need to connect through the contained AG listener or connect directly to a database that belongs to the contained AG. If you connect to the SQL Server instance name, you are working in the instance context, not the contained AG context.&lt;/p&gt;&#xA;&lt;p&gt;That distinction matters because the contained &lt;code&gt;master&lt;/code&gt; and &lt;code&gt;msdb&lt;/code&gt; only show up when you are in the contained AG context.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img src=&#34;https://johnmorehouse.com/images/2026/05/contained-ag-listener-context.png&#34; alt=&#34;Contained availability group listener connection context&#34;&gt;&#xA;&lt;/p&gt;&#xA;&lt;p&gt;If your application, maintenance process, deployment script, or DBA session connects to the wrong endpoint, you may create objects in the wrong place. That can lead to the same kind of drift contained availability groups are supposed to reduce.&lt;/p&gt;&#xA;&lt;p&gt;In a future post, I have a solution that will help eliminate this particular issue.&lt;/p&gt;&#xA;&lt;h3 id=&#34;contained-system-databases-start-mostly-empty&#34;&gt;Contained system databases start mostly empty&lt;/h3&gt;&#xA;&lt;p&gt;The contained system databases are separate databases. They are not copies of the instance-level &lt;code&gt;master&lt;/code&gt; and &lt;code&gt;msdb&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;p&gt;That is important. Existing local users, jobs, permissions, and configurations do not automatically appear inside the contained AG. You need to create the required objects inside the contained environment or move them there intentionally.&lt;/p&gt;&#xA;&lt;p&gt;This can be a good thing because it keeps the contained AG cleaner. It can also surprise you if you expect everything from the instance to already exist inside the contained system databases.&lt;/p&gt;&#xA;&lt;p&gt;Another potential downside is if you have a large number of objects, like agent jobs, that the application depends on, you must redeploy all of the jobs within the context of the contained avaialbility group. This intital setup might be cumbersome and taxing depending on the volume of objects to be deployed.&lt;/p&gt;&#xA;&lt;h3 id=&#34;additional-backups-required&#34;&gt;Additional Backups Required&lt;/h3&gt;&#xA;&lt;p&gt;Each contained availability group will have two additional databases to maintain, namely &lt;code&gt;master&lt;/code&gt; and &lt;code&gt;msdb&lt;/code&gt; that is associted with that group.  If you have multiple contained AG&amp;rsquo;s on an instance, you&amp;rsquo;ll have two additional databases for each group, which means more backups and database maintenance to orchestrate.&lt;/p&gt;&#xA;&lt;p&gt;While this shouldn&amp;rsquo;t be a major issue, it&amp;rsquo;s worth noting as something to account.&lt;/p&gt;&#xA;&lt;h3 id=&#34;security-is-not-automatic-isolation&#34;&gt;Security is not automatic isolation&lt;/h3&gt;&#xA;&lt;p&gt;Contained availability groups help keep application-related objects with the AG, but they are not a security boundary by themselves.&lt;/p&gt;&#xA;&lt;p&gt;You still need to design permissions carefully. Server-level access, sysadmin membership, endpoint permissions, service accounts, linked servers, credentials, certificates, and other external dependencies still require attention.&lt;/p&gt;&#xA;&lt;p&gt;Also remember that sysadmin logins from the parent instance are copied into the contained AG &lt;code&gt;master&lt;/code&gt; during creation. That may be exactly what you expect, but it should not be ignored.&lt;/p&gt;&#xA;&lt;h3 id=&#34;feature-support-has-limits&#34;&gt;Feature support has limits&lt;/h3&gt;&#xA;&lt;p&gt;Some features have special considerations with contained availability groups. Others are not supported in certain configurations.&lt;/p&gt;&#xA;&lt;p&gt;Items to review before putting things into production include:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;TDE&lt;/li&gt;&#xA;&lt;li&gt;CDC&lt;/li&gt;&#xA;&lt;li&gt;log shipping&lt;/li&gt;&#xA;&lt;li&gt;Resource Governor&lt;/li&gt;&#xA;&lt;li&gt;distributed availability groups&lt;/li&gt;&#xA;&lt;li&gt;SQL Server Replication&lt;/li&gt;&#xA;&lt;li&gt;contained system database restore procedures&lt;/li&gt;&#xA;&lt;li&gt;re-seeding a contained availability group&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;SQL Server 2025 also adds more contained AG capability, including distributed availability group support between contained AGs and the ability, starting with SQL Server 2025 CU1, to enable database creation or restore inside a contained AG session for appropriately privileged users.&lt;/p&gt;&#xA;&lt;p&gt;That is useful progress, but it also reinforces the point: check the version, check the documentation, and test the exact configuration you plan to run.&lt;/p&gt;&#xA;&lt;h3 id=&#34;seeding-deserves-attention&#34;&gt;Seeding deserves attention&lt;/h3&gt;&#xA;&lt;p&gt;Adding a replica to a traditional Availability Group can be straightforward for the user databases, especially with automatic seeding. The harder part is remembering all the instance-level extras that the application depends on.&lt;/p&gt;&#xA;&lt;p&gt;Contained availability groups reduce that pain because the contained system databases are seeded to new replicas and changes replicate just like the other databases in the AG. That makes replica onboarding more predictable because the supporting metadata can come along with the availability group instead of being rebuilt by hand on each instance.&lt;/p&gt;&#xA;&lt;p&gt;There are still details to plan for, especially around larger databases and synchronization choices. Re-seeding a contained availability group also requires care and special commands, so this is not something I would treat casually in production.&lt;/p&gt;&#xA;&lt;h3 id=&#34;summary&#34;&gt;Summary&lt;/h3&gt;&#xA;&lt;p&gt;Contained availability groups can make Availability Group operations cleaner, but they do not remove the need for design discipline and careful planning. The most important things to watch are connection context, object placement, feature support, and testing.&lt;/p&gt;&#xA;&lt;p&gt;If you are already using Availability Groups and you have ever had to troubleshoot a failed login, missing job, mismatched permission, or forgotten &lt;code&gt;msdb&lt;/code&gt; object after failover, contained availability groups are worth a serious look. Just make sure the implementation is tested as thoroughly as the idea sounds promising.&lt;/p&gt;</content:encoded>
    </item>
    <item>
      <title>Contained Availability Groups: Jobs and Security Objects</title>
      <link>https://johnmorehouse.com/2026/06/contained-availability-groups-jobs-and-security-objects/</link>
      <pubDate>Mon, 08 Jun 2026 09:00:00 -0400</pubDate>
      <guid>https://johnmorehouse.com/2026/06/contained-availability-groups-jobs-and-security-objects/</guid>
      <description>&lt;p&gt;In the first post, I introduced contained availability groups and how they bring contained versions of &lt;code&gt;master&lt;/code&gt; and &lt;code&gt;msdb&lt;/code&gt; along with the Availability Group. That matters because many applications depend on more than just user databases.&lt;/p&gt;&#xA;&lt;p&gt;Two of the biggest wins are SQL Agent jobs and security objects.&lt;/p&gt;&#xA;&lt;p&gt;If you have supported traditional Availability Groups for any length of time, you have probably run into this. The database fails over just fine, but a job is missing, a login has a different SID, a permission was never deployed, or something in &lt;code&gt;msdb&lt;/code&gt; was only created on the old primary.&lt;/p&gt;&#xA;&lt;p&gt;That is where contained availability groups can make life better.&lt;/p&gt;&#xA;&lt;h3 id=&#34;jobs-that-follow-the-primary&#34;&gt;Jobs that follow the primary&lt;/h3&gt;&#xA;&lt;p&gt;SQL Agent jobs are one of those sneaky things that can make failovers messy.&lt;/p&gt;&#xA;&lt;p&gt;In a traditional AG design, you often create the same job on every replica, then add logic to make sure it only does real work on the primary. It works, but it is one more moving part. It also means job changes have to be deployed consistently to every instance. In environments that have a large SQL Server estate, this can become cumbersome and time consuming. There are ways to automate some of this through scripting languages such as PowerShell or dbatools, but it is still something you have to own.&lt;/p&gt;&#xA;&lt;p&gt;With a contained availability group, jobs created in the contained AG context belong to the contained AG. Those jobs run on the primary replica only. When the AG fails over, the job definition is already present in the contained &lt;code&gt;msdb&lt;/code&gt;, and the job can run on the new primary.&lt;/p&gt;&#xA;&lt;p&gt;That is a big quality-of-life improvement for jobs that are part of normal operations.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img src=&#34;https://johnmorehouse.com/images/2026/05/contained-ag-job-follows-primary.png&#34; alt=&#34;SQL Agent job visible with the contained availability group primary&#34;&gt;&#xA;&lt;/p&gt;&#xA;&lt;p&gt;In this example, the contained AG job &lt;code&gt;Test1&lt;/code&gt; is present where it needs to be for the primary workload. After failover, the job definition is part of the contained &lt;code&gt;msdb&lt;/code&gt;, so it is not another separate object you have to remember to create on the new primary.&lt;/p&gt;&#xA;&lt;h3 id=&#34;security-objects-benefit-too&#34;&gt;Security objects benefit too&lt;/h3&gt;&#xA;&lt;p&gt;Jobs are easy to see, but security objects are just as important.&lt;/p&gt;&#xA;&lt;p&gt;Traditional Availability Groups synchronize user databases, but server-level objects are outside that boundary. That means logins, permissions, certificates, credentials, and other supporting objects may still require manual synchronization depending on how the application is built.&lt;/p&gt;&#xA;&lt;p&gt;Contained availability groups give you a contained &lt;code&gt;master&lt;/code&gt;, which means application-specific logins and permissions can live with the AG instead of being treated as separate instance-level configuration. That makes failover cleaner because the login and permission model is tied more closely to the application workload.&lt;/p&gt;&#xA;&lt;p&gt;This is especially helpful when:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;the application uses SQL authentication&lt;/li&gt;&#xA;&lt;li&gt;multiple AGs host different applications on the same SQL Server instances&lt;/li&gt;&#xA;&lt;li&gt;security needs to be managed closer to the workload boundary&lt;/li&gt;&#xA;&lt;li&gt;failover testing keeps finding missing logins or permissions&lt;/li&gt;&#xA;&lt;li&gt;operational teams want less drift between replicas&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h3 id=&#34;a-cleaner-operational-model&#34;&gt;A cleaner operational model&lt;/h3&gt;&#xA;&lt;p&gt;For me, the value here is not just that these objects synchronize. The bigger value is that ownership gets cleaner.&lt;/p&gt;&#xA;&lt;p&gt;The application is not just a database. It is the database, the logins, the jobs, the permissions, the supporting metadata, and the connection endpoint. Contained availability groups give us a way to keep more of that application shape together.&lt;/p&gt;&#xA;&lt;p&gt;That can reduce the number of post-failover surprises. It can also reduce the amount of custom scripting required to keep replicas aligned.&lt;/p&gt;&#xA;&lt;h3 id=&#34;still-test-it&#34;&gt;Still test it&lt;/h3&gt;&#xA;&lt;p&gt;Contained availability groups help, but they do not remove the need for testing. You still need to validate the failover path, confirm the application connects through the right listener, and verify the jobs and security objects behave the way you expect after the primary moves.&lt;/p&gt;&#xA;&lt;p&gt;That testing is where the feature starts to prove its value. If the database moves and the application still has the logins, permissions, and jobs it needs, that is a much better day for everyone.&lt;/p&gt;&#xA;&lt;p&gt;In the next post, I will cover issues to watch out for with contained availability groups, because there are a few details that deserve attention before you roll this into production.&lt;/p&gt;</description>
      <content:encoded>&lt;p&gt;In the first post, I introduced contained availability groups and how they bring contained versions of &lt;code&gt;master&lt;/code&gt; and &lt;code&gt;msdb&lt;/code&gt; along with the Availability Group. That matters because many applications depend on more than just user databases.&lt;/p&gt;&#xA;&lt;p&gt;Two of the biggest wins are SQL Agent jobs and security objects.&lt;/p&gt;&#xA;&lt;p&gt;If you have supported traditional Availability Groups for any length of time, you have probably run into this. The database fails over just fine, but a job is missing, a login has a different SID, a permission was never deployed, or something in &lt;code&gt;msdb&lt;/code&gt; was only created on the old primary.&lt;/p&gt;&#xA;&lt;p&gt;That is where contained availability groups can make life better.&lt;/p&gt;&#xA;&lt;h3 id=&#34;jobs-that-follow-the-primary&#34;&gt;Jobs that follow the primary&lt;/h3&gt;&#xA;&lt;p&gt;SQL Agent jobs are one of those sneaky things that can make failovers messy.&lt;/p&gt;&#xA;&lt;p&gt;In a traditional AG design, you often create the same job on every replica, then add logic to make sure it only does real work on the primary. It works, but it is one more moving part. It also means job changes have to be deployed consistently to every instance. In environments that have a large SQL Server estate, this can become cumbersome and time consuming. There are ways to automate some of this through scripting languages such as PowerShell or dbatools, but it is still something you have to own.&lt;/p&gt;&#xA;&lt;p&gt;With a contained availability group, jobs created in the contained AG context belong to the contained AG. Those jobs run on the primary replica only. When the AG fails over, the job definition is already present in the contained &lt;code&gt;msdb&lt;/code&gt;, and the job can run on the new primary.&lt;/p&gt;&#xA;&lt;p&gt;That is a big quality-of-life improvement for jobs that are part of normal operations.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img src=&#34;https://johnmorehouse.com/images/2026/05/contained-ag-job-follows-primary.png&#34; alt=&#34;SQL Agent job visible with the contained availability group primary&#34;&gt;&#xA;&lt;/p&gt;&#xA;&lt;p&gt;In this example, the contained AG job &lt;code&gt;Test1&lt;/code&gt; is present where it needs to be for the primary workload. After failover, the job definition is part of the contained &lt;code&gt;msdb&lt;/code&gt;, so it is not another separate object you have to remember to create on the new primary.&lt;/p&gt;&#xA;&lt;h3 id=&#34;security-objects-benefit-too&#34;&gt;Security objects benefit too&lt;/h3&gt;&#xA;&lt;p&gt;Jobs are easy to see, but security objects are just as important.&lt;/p&gt;&#xA;&lt;p&gt;Traditional Availability Groups synchronize user databases, but server-level objects are outside that boundary. That means logins, permissions, certificates, credentials, and other supporting objects may still require manual synchronization depending on how the application is built.&lt;/p&gt;&#xA;&lt;p&gt;Contained availability groups give you a contained &lt;code&gt;master&lt;/code&gt;, which means application-specific logins and permissions can live with the AG instead of being treated as separate instance-level configuration. That makes failover cleaner because the login and permission model is tied more closely to the application workload.&lt;/p&gt;&#xA;&lt;p&gt;This is especially helpful when:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;the application uses SQL authentication&lt;/li&gt;&#xA;&lt;li&gt;multiple AGs host different applications on the same SQL Server instances&lt;/li&gt;&#xA;&lt;li&gt;security needs to be managed closer to the workload boundary&lt;/li&gt;&#xA;&lt;li&gt;failover testing keeps finding missing logins or permissions&lt;/li&gt;&#xA;&lt;li&gt;operational teams want less drift between replicas&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h3 id=&#34;a-cleaner-operational-model&#34;&gt;A cleaner operational model&lt;/h3&gt;&#xA;&lt;p&gt;For me, the value here is not just that these objects synchronize. The bigger value is that ownership gets cleaner.&lt;/p&gt;&#xA;&lt;p&gt;The application is not just a database. It is the database, the logins, the jobs, the permissions, the supporting metadata, and the connection endpoint. Contained availability groups give us a way to keep more of that application shape together.&lt;/p&gt;&#xA;&lt;p&gt;That can reduce the number of post-failover surprises. It can also reduce the amount of custom scripting required to keep replicas aligned.&lt;/p&gt;&#xA;&lt;h3 id=&#34;still-test-it&#34;&gt;Still test it&lt;/h3&gt;&#xA;&lt;p&gt;Contained availability groups help, but they do not remove the need for testing. You still need to validate the failover path, confirm the application connects through the right listener, and verify the jobs and security objects behave the way you expect after the primary moves.&lt;/p&gt;&#xA;&lt;p&gt;That testing is where the feature starts to prove its value. If the database moves and the application still has the logins, permissions, and jobs it needs, that is a much better day for everyone.&lt;/p&gt;&#xA;&lt;p&gt;In the next post, I will cover issues to watch out for with contained availability groups, because there are a few details that deserve attention before you roll this into production.&lt;/p&gt;</content:encoded>
    </item>
    <item>
      <title>Introduction to Contained Availability Groups</title>
      <link>https://johnmorehouse.com/2026/06/introduction-to-contained-availability-groups/</link>
      <pubDate>Mon, 01 Jun 2026 10:15:00 -0400</pubDate>
      <guid>https://johnmorehouse.com/2026/06/introduction-to-contained-availability-groups/</guid>
      <description>&lt;p&gt;Availability Groups have been one of the best high availability and disaster recovery options in SQL Server for a long time. They let us move a group of user databases together, keep replicas synchronized, offload some read-only workloads, and give applications a listener instead of a single server name.&lt;/p&gt;&#xA;&lt;p&gt;That works great until the application needs more than just the user databases.&lt;/p&gt;&#xA;&lt;p&gt;What about the logins? SQL Agent jobs? Permissions? Objects that live in &lt;code&gt;master&lt;/code&gt; or &lt;code&gt;msdb&lt;/code&gt;? In a traditional Availability Group, those objects are still tied to each SQL Server instance. That means DBAs have to keep them synchronized manually across replicas. Miss one login, job, credential, or permission and the failover might technically succeed while the application still has a very bad day.&lt;/p&gt;&#xA;&lt;p&gt;That is the problem contained availability groups are trying to solve.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img src=&#34;https://johnmorehouse.com/images/2026/05/contained-ag-availability-databases.png&#34; alt=&#34;Contained availability group with user and contained system databases&#34;&gt;&#xA;&lt;/p&gt;&#xA;&lt;h3 id=&#34;what-is-a-contained-availability-group&#34;&gt;What is a contained availability group?&lt;/h3&gt;&#xA;&lt;p&gt;A contained availability group is still an Always On Availability Group, but it adds a contained execution environment around the databases in the group. Instead of only synchronizing user databases, SQL Server also creates AG-specific system databases for &lt;code&gt;master&lt;/code&gt; and &lt;code&gt;msdb&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;p&gt;For example, if the availability group is named &lt;code&gt;ReliableAG&lt;/code&gt;, SQL Server creates system databases named something like:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;code&gt;ReliableAG_master&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;ReliableAG_msdb&lt;/code&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;When you connect through the contained AG listener, those contained system databases appear as &lt;code&gt;master&lt;/code&gt; and &lt;code&gt;msdb&lt;/code&gt; inside that connection context. That is the key difference. The application can connect to the listener and work inside the contained availability group environment instead of depending on the instance-level &lt;code&gt;master&lt;/code&gt; and &lt;code&gt;msdb&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;p&gt;Microsoft&amp;rsquo;s documentation describes contained availability groups as supporting metadata objects such as users, logins, permissions, SQL Agent jobs, and specialized contained system databases at the AG level. You can read more in the Microsoft Learn article, &lt;a href=&#34;https://learn.microsoft.com/en-us/sql/database-engine/availability-groups/windows/contained-availability-groups-overview?view=sql-server-ver17&#34;&gt;What is a contained availability group?&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;h3 id=&#34;contained-master-and-msdb&#34;&gt;Contained master and msdb&lt;/h3&gt;&#xA;&lt;p&gt;The biggest feature is right there in the name: containment.&lt;/p&gt;&#xA;&lt;p&gt;Traditional Availability Groups protect the user databases, but a lot of application behavior depends on objects outside those databases. Contained availability groups include their own &lt;code&gt;master&lt;/code&gt; and &lt;code&gt;msdb&lt;/code&gt; databases so those supporting objects can move with the AG.&lt;/p&gt;&#xA;&lt;p&gt;That means you can create objects while connected to the contained availability group, and those objects are replicated across the replicas. After a failover, the new primary already has the contained metadata needed by the application.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img src=&#34;https://johnmorehouse.com/images/2026/05/contained-ag-synchronized-system-databases.png&#34; alt=&#34;Contained availability group system databases synchronized in SSMS&#34;&gt;&#xA;&lt;/p&gt;&#xA;&lt;p&gt;Those contained system databases are not just a logical idea in SSMS. They have physical database files, too. In the data folder, you can see the contained AG-specific &lt;code&gt;master&lt;/code&gt; and &lt;code&gt;msdb&lt;/code&gt; data and log files alongside the instance-level system database files.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img src=&#34;https://johnmorehouse.com/images/2026/05/contained-ag-system-files.png&#34; alt=&#34;Contained availability group system database files&#34;&gt;&#xA;&lt;/p&gt;&#xA;&lt;h3 id=&#34;cleaner-listener-based-experience&#34;&gt;Cleaner listener-based experience&lt;/h3&gt;&#xA;&lt;p&gt;Contained availability groups make the listener more important than ever.&lt;/p&gt;&#xA;&lt;p&gt;To use the contained environment, connect through the contained AG listener or connect directly to a database in the contained AG. If you connect to the SQL Server instance name, you are working in the instance context. If you connect through the contained AG listener, you are working in the contained AG context.&lt;/p&gt;&#xA;&lt;p&gt;That distinction immensely matters.&lt;/p&gt;&#xA;&lt;p&gt;When connected through the contained AG listener:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;code&gt;master&lt;/code&gt; maps to the contained AG &lt;code&gt;master&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;msdb&lt;/code&gt; maps to the contained AG &lt;code&gt;msdb&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;users see the databases in the contained AG plus &lt;code&gt;tempdb&lt;/code&gt; as well as &lt;code&gt;model&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;contained logins and permissions are available after failover&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;Notice the difference in what is visible when connecting through the listener. The connection is scoped to the contained AG environment, so the view of the world is much smaller and more application-focused.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img src=&#34;https://johnmorehouse.com/images/2026/05/contained-ag-contained-connection-view.png&#34; alt=&#34;Contained availability group contained connection database view&#34;&gt;&#xA;&lt;/p&gt;&#xA;&lt;h3 id=&#34;summary&#34;&gt;Summary&lt;/h3&gt;&#xA;&lt;p&gt;Contained availability groups are not a replacement for good Availability Group design, but they do help move more of the application context into the same failover boundary as the user databases. That is a big deal.&lt;/p&gt;&#xA;&lt;p&gt;In the next post, I will dig into the objects that benefit the most from contained availability groups: SQL Agent jobs, logins, users, and permissions.&lt;/p&gt;</description>
      <content:encoded>&lt;p&gt;Availability Groups have been one of the best high availability and disaster recovery options in SQL Server for a long time. They let us move a group of user databases together, keep replicas synchronized, offload some read-only workloads, and give applications a listener instead of a single server name.&lt;/p&gt;&#xA;&lt;p&gt;That works great until the application needs more than just the user databases.&lt;/p&gt;&#xA;&lt;p&gt;What about the logins? SQL Agent jobs? Permissions? Objects that live in &lt;code&gt;master&lt;/code&gt; or &lt;code&gt;msdb&lt;/code&gt;? In a traditional Availability Group, those objects are still tied to each SQL Server instance. That means DBAs have to keep them synchronized manually across replicas. Miss one login, job, credential, or permission and the failover might technically succeed while the application still has a very bad day.&lt;/p&gt;&#xA;&lt;p&gt;That is the problem contained availability groups are trying to solve.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img src=&#34;https://johnmorehouse.com/images/2026/05/contained-ag-availability-databases.png&#34; alt=&#34;Contained availability group with user and contained system databases&#34;&gt;&#xA;&lt;/p&gt;&#xA;&lt;h3 id=&#34;what-is-a-contained-availability-group&#34;&gt;What is a contained availability group?&lt;/h3&gt;&#xA;&lt;p&gt;A contained availability group is still an Always On Availability Group, but it adds a contained execution environment around the databases in the group. Instead of only synchronizing user databases, SQL Server also creates AG-specific system databases for &lt;code&gt;master&lt;/code&gt; and &lt;code&gt;msdb&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;p&gt;For example, if the availability group is named &lt;code&gt;ReliableAG&lt;/code&gt;, SQL Server creates system databases named something like:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;code&gt;ReliableAG_master&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;ReliableAG_msdb&lt;/code&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;When you connect through the contained AG listener, those contained system databases appear as &lt;code&gt;master&lt;/code&gt; and &lt;code&gt;msdb&lt;/code&gt; inside that connection context. That is the key difference. The application can connect to the listener and work inside the contained availability group environment instead of depending on the instance-level &lt;code&gt;master&lt;/code&gt; and &lt;code&gt;msdb&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;p&gt;Microsoft&amp;rsquo;s documentation describes contained availability groups as supporting metadata objects such as users, logins, permissions, SQL Agent jobs, and specialized contained system databases at the AG level. You can read more in the Microsoft Learn article, &lt;a href=&#34;https://learn.microsoft.com/en-us/sql/database-engine/availability-groups/windows/contained-availability-groups-overview?view=sql-server-ver17&#34;&gt;What is a contained availability group?&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;h3 id=&#34;contained-master-and-msdb&#34;&gt;Contained master and msdb&lt;/h3&gt;&#xA;&lt;p&gt;The biggest feature is right there in the name: containment.&lt;/p&gt;&#xA;&lt;p&gt;Traditional Availability Groups protect the user databases, but a lot of application behavior depends on objects outside those databases. Contained availability groups include their own &lt;code&gt;master&lt;/code&gt; and &lt;code&gt;msdb&lt;/code&gt; databases so those supporting objects can move with the AG.&lt;/p&gt;&#xA;&lt;p&gt;That means you can create objects while connected to the contained availability group, and those objects are replicated across the replicas. After a failover, the new primary already has the contained metadata needed by the application.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img src=&#34;https://johnmorehouse.com/images/2026/05/contained-ag-synchronized-system-databases.png&#34; alt=&#34;Contained availability group system databases synchronized in SSMS&#34;&gt;&#xA;&lt;/p&gt;&#xA;&lt;p&gt;Those contained system databases are not just a logical idea in SSMS. They have physical database files, too. In the data folder, you can see the contained AG-specific &lt;code&gt;master&lt;/code&gt; and &lt;code&gt;msdb&lt;/code&gt; data and log files alongside the instance-level system database files.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img src=&#34;https://johnmorehouse.com/images/2026/05/contained-ag-system-files.png&#34; alt=&#34;Contained availability group system database files&#34;&gt;&#xA;&lt;/p&gt;&#xA;&lt;h3 id=&#34;cleaner-listener-based-experience&#34;&gt;Cleaner listener-based experience&lt;/h3&gt;&#xA;&lt;p&gt;Contained availability groups make the listener more important than ever.&lt;/p&gt;&#xA;&lt;p&gt;To use the contained environment, connect through the contained AG listener or connect directly to a database in the contained AG. If you connect to the SQL Server instance name, you are working in the instance context. If you connect through the contained AG listener, you are working in the contained AG context.&lt;/p&gt;&#xA;&lt;p&gt;That distinction immensely matters.&lt;/p&gt;&#xA;&lt;p&gt;When connected through the contained AG listener:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;code&gt;master&lt;/code&gt; maps to the contained AG &lt;code&gt;master&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;msdb&lt;/code&gt; maps to the contained AG &lt;code&gt;msdb&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;users see the databases in the contained AG plus &lt;code&gt;tempdb&lt;/code&gt; as well as &lt;code&gt;model&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;contained logins and permissions are available after failover&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;Notice the difference in what is visible when connecting through the listener. The connection is scoped to the contained AG environment, so the view of the world is much smaller and more application-focused.&lt;/p&gt;&#xA;&lt;p&gt;&lt;img src=&#34;https://johnmorehouse.com/images/2026/05/contained-ag-contained-connection-view.png&#34; alt=&#34;Contained availability group contained connection database view&#34;&gt;&#xA;&lt;/p&gt;&#xA;&lt;h3 id=&#34;summary&#34;&gt;Summary&lt;/h3&gt;&#xA;&lt;p&gt;Contained availability groups are not a replacement for good Availability Group design, but they do help move more of the application context into the same failover boundary as the user databases. That is a big deal.&lt;/p&gt;&#xA;&lt;p&gt;In the next post, I will dig into the objects that benefit the most from contained availability groups: SQL Agent jobs, logins, users, and permissions.&lt;/p&gt;</content:encoded>
    </item>
    <item>
      <title>Using IP4.me For Dynamic IPs</title>
      <link>https://johnmorehouse.com/2026/05/using-ip4.me-for-dynamic-ips/</link>
      <pubDate>Mon, 18 May 2026 09:00:00 -0400</pubDate>
      <guid>https://johnmorehouse.com/2026/05/using-ip4.me-for-dynamic-ips/</guid>
      <description>&lt;p&gt;Every now and then, you run into a situation where you just need to know one thing:&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;What is my public IP address right now?&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;Seems simple—but when you need to automate it (scripts, monitoring, firewall updates, etc.), it’s not always as straightforward as opening a browser and Googling “what’s my IP.”&lt;/p&gt;&#xA;&lt;p&gt;I ran into this issue at a client who had two different ISP providing internet services to their office.  This means that when pushing SQL Server backups directly to an Azure blob storage account, I had to dynamically determine what public IP address traffic was traversing at the current moment in time.&lt;/p&gt;&#xA;&lt;p&gt;It&amp;rsquo;s also worth noting the storage account has two shared access signature (SAS) token, one token configured to allow one of the public IP addresses. This ensured that the container only allowed traffic from the appropriate IP addresses.&lt;/p&gt;&#xA;&lt;h2 id=&#34;what-is-ip4me&#34;&gt;What is ip4.me?&lt;/h2&gt;&#xA;&lt;p&gt;ip4.me is a simple API endpoint that returns your public IPv4 address. No authentication. No complex setup. Just a quick HTTP call and you get what you need.&lt;/p&gt;&#xA;&lt;p&gt;Example: &lt;a href=&#34;https://ip4only.me/api/&#34;&gt;https://ip4only.me/api/&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;Call it, and it returns a response that includes your public IP address in plain text.&lt;/p&gt;&#xA;&lt;h2 id=&#34;why-use-it&#34;&gt;Why Use It?&lt;/h2&gt;&#xA;&lt;p&gt;There are plenty of ways to get your public IP, but ip4.me checks a lot of boxes:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Simple – no API keys, no SDKs&lt;/li&gt;&#xA;&lt;li&gt;Fast – minimal response overhead&lt;/li&gt;&#xA;&lt;li&gt;Script-friendly – works cleanly with PowerShell, Bash, etc.&lt;/li&gt;&#xA;&lt;li&gt;Reliable enough for automation scenarios&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;If you&amp;rsquo;re building automation around networking, firewall rules, or in my case, pushing SQL backup files to a blob storage account, this is exactly the kind of tool you want.&lt;/p&gt;&#xA;&lt;h2 id=&#34;powershell-example&#34;&gt;PowerShell Example&lt;/h2&gt;&#xA;&lt;p&gt;Here’s a quick PowerShell script to call the API and extract just the IP address:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-powershell&#34; data-lang=&#34;powershell&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;$response = Invoke-RestMethod -Uri &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;https://ip4only.me/api/&amp;#34;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;# The response comes back as a comma-separated string&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;# Example: &amp;#34;IPv4,1.2.3.4,v1.0,,,&amp;#34;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;$ip = ($response -split &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;,&amp;#39;&lt;/span&gt;)[&lt;span style=&#34;color:#ae81ff&#34;&gt;1&lt;/span&gt;]&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Write-Output $ip&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Once the public IP address is determined, I could dynamically build the URL path for the backup path.&lt;/p&gt;&#xA;&lt;h2 id=&#34;summary&#34;&gt;Summary&lt;/h2&gt;&#xA;&lt;p&gt;ip4.me does exactly one thing—returns your public IP—and it does it well. When you combine it with a quick script, you’ve got a reliable way to plug that information into whatever workflow you’re building.&lt;/p&gt;&#xA;</description>
      <content:encoded>&lt;p&gt;Every now and then, you run into a situation where you just need to know one thing:&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;What is my public IP address right now?&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;Seems simple—but when you need to automate it (scripts, monitoring, firewall updates, etc.), it’s not always as straightforward as opening a browser and Googling “what’s my IP.”&lt;/p&gt;&#xA;&lt;p&gt;I ran into this issue at a client who had two different ISP providing internet services to their office.  This means that when pushing SQL Server backups directly to an Azure blob storage account, I had to dynamically determine what public IP address traffic was traversing at the current moment in time.&lt;/p&gt;&#xA;&lt;p&gt;It&amp;rsquo;s also worth noting the storage account has two shared access signature (SAS) token, one token configured to allow one of the public IP addresses. This ensured that the container only allowed traffic from the appropriate IP addresses.&lt;/p&gt;&#xA;&lt;h2 id=&#34;what-is-ip4me&#34;&gt;What is ip4.me?&lt;/h2&gt;&#xA;&lt;p&gt;ip4.me is a simple API endpoint that returns your public IPv4 address. No authentication. No complex setup. Just a quick HTTP call and you get what you need.&lt;/p&gt;&#xA;&lt;p&gt;Example: &lt;a href=&#34;https://ip4only.me/api/&#34;&gt;https://ip4only.me/api/&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;Call it, and it returns a response that includes your public IP address in plain text.&lt;/p&gt;&#xA;&lt;h2 id=&#34;why-use-it&#34;&gt;Why Use It?&lt;/h2&gt;&#xA;&lt;p&gt;There are plenty of ways to get your public IP, but ip4.me checks a lot of boxes:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Simple – no API keys, no SDKs&lt;/li&gt;&#xA;&lt;li&gt;Fast – minimal response overhead&lt;/li&gt;&#xA;&lt;li&gt;Script-friendly – works cleanly with PowerShell, Bash, etc.&lt;/li&gt;&#xA;&lt;li&gt;Reliable enough for automation scenarios&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;If you&amp;rsquo;re building automation around networking, firewall rules, or in my case, pushing SQL backup files to a blob storage account, this is exactly the kind of tool you want.&lt;/p&gt;&#xA;&lt;h2 id=&#34;powershell-example&#34;&gt;PowerShell Example&lt;/h2&gt;&#xA;&lt;p&gt;Here’s a quick PowerShell script to call the API and extract just the IP address:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-powershell&#34; data-lang=&#34;powershell&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;$response = Invoke-RestMethod -Uri &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#34;https://ip4only.me/api/&amp;#34;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;# The response comes back as a comma-separated string&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;# Example: &amp;#34;IPv4,1.2.3.4,v1.0,,,&amp;#34;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;$ip = ($response -split &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;,&amp;#39;&lt;/span&gt;)[&lt;span style=&#34;color:#ae81ff&#34;&gt;1&lt;/span&gt;]&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Write-Output $ip&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Once the public IP address is determined, I could dynamically build the URL path for the backup path.&lt;/p&gt;&#xA;&lt;h2 id=&#34;summary&#34;&gt;Summary&lt;/h2&gt;&#xA;&lt;p&gt;ip4.me does exactly one thing—returns your public IP—and it does it well. When you combine it with a quick script, you’ve got a reliable way to plug that information into whatever workflow you’re building.&lt;/p&gt;&#xA;</content:encoded>
    </item>
    <item>
      <title>Moving away from Wordpress and Into Azure Static Web Apps with Hugo</title>
      <link>https://johnmorehouse.com/2026/05/moving-away-from-wordpress-and-into-azure-static-web-apps-with-hugo/</link>
      <pubDate>Mon, 11 May 2026 09:00:00 -0400</pubDate>
      <guid>https://johnmorehouse.com/2026/05/moving-away-from-wordpress-and-into-azure-static-web-apps-with-hugo/</guid>
      <description>&lt;p&gt;For years, my website lived on a fairly typical stack—WordPress hosted through GoDaddy. It worked. It was easy. And like most things that “just work,” I didn’t think too hard about it… until I did.&lt;/p&gt;&#xA;&lt;p&gt;At some point, I started asking a simple question: &lt;em&gt;Why am I paying this much for something that gives me this much grief?&lt;/em&gt;&lt;/p&gt;&#xA;&lt;p&gt;That question turned into a full migration—away from WordPress and into a static site powered by Hugo and hosted on Azure Static Web Apps. I&amp;rsquo;ll tell you why in a moment.&lt;/p&gt;&#xA;&lt;p&gt;First, huge shout out to &lt;a href=&#34;https://bobpusateri.com&#34;&gt;Bob Pusateri&lt;/a&gt;, &lt;a href=&#34;https://www.nocentino.com&#34;&gt;Anthony Nocentino&lt;/a&gt;, and &lt;a href=&#34;https://kendralittle.com&#34;&gt;Kendra Little&lt;/a&gt;. Bob and Kendra both have blog posts about how to do the migration itself and I&amp;rsquo;ve always like the way Anthony&amp;rsquo;s site looked so mine is somewhat modeled after his.&lt;/p&gt;&#xA;&lt;p&gt;If you are considering making the same move, I highly recommend reading Bob and Kendra&amp;rsquo;s posts about it.&lt;/p&gt;&#xA;&lt;h2 id=&#34;cost-paying-for-what-i-actually-use&#34;&gt;Cost: Paying for What I Actually Use&lt;/h2&gt;&#xA;&lt;p&gt;Let’s start with the obvious one—cost.&lt;/p&gt;&#xA;&lt;p&gt;With WordPress hosting, you’re paying for:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Compute (even when idle)&lt;/li&gt;&#xA;&lt;li&gt;Storage&lt;/li&gt;&#xA;&lt;li&gt;Database (MySQL)&lt;/li&gt;&#xA;&lt;li&gt;Managed platform overhead&lt;/li&gt;&#xA;&lt;li&gt;Add-ons, backups, security features, etc.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;And if you&amp;rsquo;re like me, your blog isn’t exactly hammering CPUs 24/7.&lt;/p&gt;&#xA;&lt;p&gt;Moving to a static site flipped that model completely:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;No database&lt;/li&gt;&#xA;&lt;li&gt;No server to manage&lt;/li&gt;&#xA;&lt;li&gt;No runtime compute for page rendering&lt;/li&gt;&#xA;&lt;li&gt;Built once, served everywhere via CDN&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;With Azure Static Web Apps, I’m pretty much paying &lt;em&gt;next to nothing&lt;/em&gt; for a site that performs better and scales automatically. For a simple personal blog site, that’s a no-brainer.  Thankfully Azure offers up a free tier, with limits, for a static web app.  Free is better than $250+ in annual costs.&lt;/p&gt;&#xA;&lt;h2 id=&#34;security-shrinking-the-attack-surface&#34;&gt;Security: Shrinking the Attack Surface&lt;/h2&gt;&#xA;&lt;p&gt;This one was a bigger deal than I initially gave it credit for.&lt;/p&gt;&#xA;&lt;p&gt;WordPress is powerful—but it’s also a &lt;strong&gt;huge attack surface&lt;/strong&gt;:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Plugins (some well-maintained… some not)&lt;/li&gt;&#xA;&lt;li&gt;Themes&lt;/li&gt;&#xA;&lt;li&gt;PHP runtime&lt;/li&gt;&#xA;&lt;li&gt;Database exposure&lt;/li&gt;&#xA;&lt;li&gt;Admin login endpoints constantly getting hit&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;Even with good hygiene, you’re always one outdated plugin away from a bad day.  More than once I had to deal with malicous actors causing issues with the site to the point where for a couple of years I paid for extra security through GoDaddy.  At the time, I didn&amp;rsquo;t have the patience to deal with it but the security service wasn&amp;rsquo;t cheap and that was in addition to the hosting costs.&lt;/p&gt;&#xA;&lt;p&gt;With a static site:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;No backend runtime&lt;/li&gt;&#xA;&lt;li&gt;No database&lt;/li&gt;&#xA;&lt;li&gt;No login surface&lt;/li&gt;&#xA;&lt;li&gt;No plugin vulnerabilities&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;The result? A dramatically reduced risk profile plus I get to sleep easier knowning that I don&amp;rsquo;t have worry about a hacker doing bad things to my blog site.&lt;/p&gt;&#xA;&lt;p&gt;Azure Static Web Apps also bakes in:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;HTTPS by default&lt;/li&gt;&#xA;&lt;li&gt;Global CDN distribution&lt;/li&gt;&#xA;&lt;li&gt;Free SSL Certificates from Azure (huge win)&lt;/li&gt;&#xA;&lt;li&gt;Tight integration with GitHub for controlled deployments.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;From a security standpoint, this felt like going from “actively defending” to “just not being a target.”  This was a major reason for the migration.&lt;/p&gt;&#xA;&lt;p&gt;Let&amp;rsquo;s not even mention running outdated PHP because the theme I used couldn&amp;rsquo;t handle newer versions.  Yup, we&amp;rsquo;re not going to discuss that.&lt;/p&gt;&#xA;&lt;p&gt;Another security aspect that I think can be often missed, DNS.  I use Cloudflare as a DNS proxy to my sites.  Cloudflare provides a free teir web application firewall (WAF) that has basic features.  Prior to the move, I was having issues between Cloudflare and GoDaddy.  After the move, traffic seamlessly flows Cloudflare now and I am getting decent metrics without having to configure extra plugins.&lt;/p&gt;&#xA;&lt;h2 id=&#34;speed-its-not-even-close&#34;&gt;Speed: It’s Not Even Close&lt;/h2&gt;&#xA;&lt;p&gt;This is where things get fun.&lt;/p&gt;&#xA;&lt;p&gt;WordPress:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Page request hits server&lt;/li&gt;&#xA;&lt;li&gt;PHP executes&lt;/li&gt;&#xA;&lt;li&gt;Database queried&lt;/li&gt;&#xA;&lt;li&gt;HTML generated&lt;/li&gt;&#xA;&lt;li&gt;Response returned&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;Static site:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Prebuilt HTML served directly from edge locations&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;There’s no comparison.  Zero.  After the move, my site went from “kinda of fast” to &lt;em&gt;almost instant&lt;/em&gt;. Pages load from a CDN edge node, not a centralized server trying to build content on the fly.&lt;/p&gt;&#xA;&lt;p&gt;For a technical audience, performance matters—even on a blog. And frankly, it just feels better.&lt;/p&gt;&#xA;&lt;h2 id=&#34;learning--staying-relevant&#34;&gt;Learning &amp;amp; Staying Relevant&lt;/h2&gt;&#xA;&lt;p&gt;This was probably the most important reason—and the one that’s easy to overlook.&lt;/p&gt;&#xA;&lt;p&gt;I spend a lot of time working with data platforms, Azure, and modern architectures. It didn’t feel right that my personal site was stuck on a traditional hosting model I hadn’t questioned in years.&lt;/p&gt;&#xA;&lt;p&gt;Moving to Hugo + Azure Static Web Apps forced me to:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Think in a Git-driven workflow&lt;/li&gt;&#xA;&lt;li&gt;Embrace infrastructure as code (lightweight, but still there)&lt;/li&gt;&#xA;&lt;li&gt;Understand how static hosting integrates with Azure&lt;/li&gt;&#xA;&lt;li&gt;Work with build/deploy pipelines (GitHub Actions)&lt;/li&gt;&#xA;&lt;li&gt;Revisit how content is structured and delivered&lt;/li&gt;&#xA;&lt;li&gt;Work with DNS and domain names in Azure&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;It wasn’t just a migration—it was a small but meaningful modernization exercise that taught me new things.  Truth be told, I&amp;rsquo;m still learning things about this new platform but I look forward to future challenges.&lt;/p&gt;&#xA;&lt;h2 id=&#34;the-trade-offs-because-there-are-always-trade-offs&#34;&gt;The Trade-Offs (Because There Are Always Trade-Offs)&lt;/h2&gt;&#xA;&lt;p&gt;This isn’t a perfect solution for everyone.&lt;/p&gt;&#xA;&lt;p&gt;What I gave up:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;WYSIWYG editing&lt;/li&gt;&#xA;&lt;li&gt;Plugin ecosystem&lt;/li&gt;&#xA;&lt;li&gt;Dynamic content without extra work&lt;/li&gt;&#xA;&lt;li&gt;“Log in and update” simplicity&lt;/li&gt;&#xA;&lt;li&gt;Native tools to manage comments &amp;amp; subscriptions&lt;/li&gt;&#xA;&lt;li&gt;Easily schedule posts &amp;amp; share to social media outlets&lt;/li&gt;&#xA;&lt;li&gt;Email subscription capabilities&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;What I gained:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Control&lt;/li&gt;&#xA;&lt;li&gt;Better Performance&lt;/li&gt;&#xA;&lt;li&gt;Increased Security&lt;/li&gt;&#xA;&lt;li&gt;Signifcant Cost efficiency&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;For me, that trade was absolutely worth it.  I can work on adding the other things as I go.&lt;/p&gt;&#xA;&lt;h2 id=&#34;summary&#34;&gt;Summary&lt;/h2&gt;&#xA;&lt;p&gt;Moving off WordPress wasn’t about chasing trends necessarily, it was an exercise in learning something new while helping to save costs.&lt;/p&gt;&#xA;&lt;p&gt;If your site is:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Mostly content-driven&lt;/li&gt;&#xA;&lt;li&gt;Doesn’t need dynamic features&lt;/li&gt;&#xA;&lt;li&gt;Doesn’t justify ongoing hosting costs&lt;/li&gt;&#xA;&lt;li&gt;And you’re comfortable working in code…&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;Then a static site approach using Hugo and Azure Static Web Apps is worth a serious look. At the very least, it’ll make you rethink what your website actually needs—and what you’ve just been tolerating. In the end if it helps to save you a few bucks along the way, even better.&lt;/p&gt;&#xA;</description>
      <content:encoded>&lt;p&gt;For years, my website lived on a fairly typical stack—WordPress hosted through GoDaddy. It worked. It was easy. And like most things that “just work,” I didn’t think too hard about it… until I did.&lt;/p&gt;&#xA;&lt;p&gt;At some point, I started asking a simple question: &lt;em&gt;Why am I paying this much for something that gives me this much grief?&lt;/em&gt;&lt;/p&gt;&#xA;&lt;p&gt;That question turned into a full migration—away from WordPress and into a static site powered by Hugo and hosted on Azure Static Web Apps. I&amp;rsquo;ll tell you why in a moment.&lt;/p&gt;&#xA;&lt;p&gt;First, huge shout out to &lt;a href=&#34;https://bobpusateri.com&#34;&gt;Bob Pusateri&lt;/a&gt;, &lt;a href=&#34;https://www.nocentino.com&#34;&gt;Anthony Nocentino&lt;/a&gt;, and &lt;a href=&#34;https://kendralittle.com&#34;&gt;Kendra Little&lt;/a&gt;. Bob and Kendra both have blog posts about how to do the migration itself and I&amp;rsquo;ve always like the way Anthony&amp;rsquo;s site looked so mine is somewhat modeled after his.&lt;/p&gt;&#xA;&lt;p&gt;If you are considering making the same move, I highly recommend reading Bob and Kendra&amp;rsquo;s posts about it.&lt;/p&gt;&#xA;&lt;h2 id=&#34;cost-paying-for-what-i-actually-use&#34;&gt;Cost: Paying for What I Actually Use&lt;/h2&gt;&#xA;&lt;p&gt;Let’s start with the obvious one—cost.&lt;/p&gt;&#xA;&lt;p&gt;With WordPress hosting, you’re paying for:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Compute (even when idle)&lt;/li&gt;&#xA;&lt;li&gt;Storage&lt;/li&gt;&#xA;&lt;li&gt;Database (MySQL)&lt;/li&gt;&#xA;&lt;li&gt;Managed platform overhead&lt;/li&gt;&#xA;&lt;li&gt;Add-ons, backups, security features, etc.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;And if you&amp;rsquo;re like me, your blog isn’t exactly hammering CPUs 24/7.&lt;/p&gt;&#xA;&lt;p&gt;Moving to a static site flipped that model completely:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;No database&lt;/li&gt;&#xA;&lt;li&gt;No server to manage&lt;/li&gt;&#xA;&lt;li&gt;No runtime compute for page rendering&lt;/li&gt;&#xA;&lt;li&gt;Built once, served everywhere via CDN&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;With Azure Static Web Apps, I’m pretty much paying &lt;em&gt;next to nothing&lt;/em&gt; for a site that performs better and scales automatically. For a simple personal blog site, that’s a no-brainer.  Thankfully Azure offers up a free tier, with limits, for a static web app.  Free is better than $250+ in annual costs.&lt;/p&gt;&#xA;&lt;h2 id=&#34;security-shrinking-the-attack-surface&#34;&gt;Security: Shrinking the Attack Surface&lt;/h2&gt;&#xA;&lt;p&gt;This one was a bigger deal than I initially gave it credit for.&lt;/p&gt;&#xA;&lt;p&gt;WordPress is powerful—but it’s also a &lt;strong&gt;huge attack surface&lt;/strong&gt;:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Plugins (some well-maintained… some not)&lt;/li&gt;&#xA;&lt;li&gt;Themes&lt;/li&gt;&#xA;&lt;li&gt;PHP runtime&lt;/li&gt;&#xA;&lt;li&gt;Database exposure&lt;/li&gt;&#xA;&lt;li&gt;Admin login endpoints constantly getting hit&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;Even with good hygiene, you’re always one outdated plugin away from a bad day.  More than once I had to deal with malicous actors causing issues with the site to the point where for a couple of years I paid for extra security through GoDaddy.  At the time, I didn&amp;rsquo;t have the patience to deal with it but the security service wasn&amp;rsquo;t cheap and that was in addition to the hosting costs.&lt;/p&gt;&#xA;&lt;p&gt;With a static site:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;No backend runtime&lt;/li&gt;&#xA;&lt;li&gt;No database&lt;/li&gt;&#xA;&lt;li&gt;No login surface&lt;/li&gt;&#xA;&lt;li&gt;No plugin vulnerabilities&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;The result? A dramatically reduced risk profile plus I get to sleep easier knowning that I don&amp;rsquo;t have worry about a hacker doing bad things to my blog site.&lt;/p&gt;&#xA;&lt;p&gt;Azure Static Web Apps also bakes in:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;HTTPS by default&lt;/li&gt;&#xA;&lt;li&gt;Global CDN distribution&lt;/li&gt;&#xA;&lt;li&gt;Free SSL Certificates from Azure (huge win)&lt;/li&gt;&#xA;&lt;li&gt;Tight integration with GitHub for controlled deployments.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;From a security standpoint, this felt like going from “actively defending” to “just not being a target.”  This was a major reason for the migration.&lt;/p&gt;&#xA;&lt;p&gt;Let&amp;rsquo;s not even mention running outdated PHP because the theme I used couldn&amp;rsquo;t handle newer versions.  Yup, we&amp;rsquo;re not going to discuss that.&lt;/p&gt;&#xA;&lt;p&gt;Another security aspect that I think can be often missed, DNS.  I use Cloudflare as a DNS proxy to my sites.  Cloudflare provides a free teir web application firewall (WAF) that has basic features.  Prior to the move, I was having issues between Cloudflare and GoDaddy.  After the move, traffic seamlessly flows Cloudflare now and I am getting decent metrics without having to configure extra plugins.&lt;/p&gt;&#xA;&lt;h2 id=&#34;speed-its-not-even-close&#34;&gt;Speed: It’s Not Even Close&lt;/h2&gt;&#xA;&lt;p&gt;This is where things get fun.&lt;/p&gt;&#xA;&lt;p&gt;WordPress:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Page request hits server&lt;/li&gt;&#xA;&lt;li&gt;PHP executes&lt;/li&gt;&#xA;&lt;li&gt;Database queried&lt;/li&gt;&#xA;&lt;li&gt;HTML generated&lt;/li&gt;&#xA;&lt;li&gt;Response returned&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;Static site:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Prebuilt HTML served directly from edge locations&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;There’s no comparison.  Zero.  After the move, my site went from “kinda of fast” to &lt;em&gt;almost instant&lt;/em&gt;. Pages load from a CDN edge node, not a centralized server trying to build content on the fly.&lt;/p&gt;&#xA;&lt;p&gt;For a technical audience, performance matters—even on a blog. And frankly, it just feels better.&lt;/p&gt;&#xA;&lt;h2 id=&#34;learning--staying-relevant&#34;&gt;Learning &amp;amp; Staying Relevant&lt;/h2&gt;&#xA;&lt;p&gt;This was probably the most important reason—and the one that’s easy to overlook.&lt;/p&gt;&#xA;&lt;p&gt;I spend a lot of time working with data platforms, Azure, and modern architectures. It didn’t feel right that my personal site was stuck on a traditional hosting model I hadn’t questioned in years.&lt;/p&gt;&#xA;&lt;p&gt;Moving to Hugo + Azure Static Web Apps forced me to:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Think in a Git-driven workflow&lt;/li&gt;&#xA;&lt;li&gt;Embrace infrastructure as code (lightweight, but still there)&lt;/li&gt;&#xA;&lt;li&gt;Understand how static hosting integrates with Azure&lt;/li&gt;&#xA;&lt;li&gt;Work with build/deploy pipelines (GitHub Actions)&lt;/li&gt;&#xA;&lt;li&gt;Revisit how content is structured and delivered&lt;/li&gt;&#xA;&lt;li&gt;Work with DNS and domain names in Azure&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;It wasn’t just a migration—it was a small but meaningful modernization exercise that taught me new things.  Truth be told, I&amp;rsquo;m still learning things about this new platform but I look forward to future challenges.&lt;/p&gt;&#xA;&lt;h2 id=&#34;the-trade-offs-because-there-are-always-trade-offs&#34;&gt;The Trade-Offs (Because There Are Always Trade-Offs)&lt;/h2&gt;&#xA;&lt;p&gt;This isn’t a perfect solution for everyone.&lt;/p&gt;&#xA;&lt;p&gt;What I gave up:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;WYSIWYG editing&lt;/li&gt;&#xA;&lt;li&gt;Plugin ecosystem&lt;/li&gt;&#xA;&lt;li&gt;Dynamic content without extra work&lt;/li&gt;&#xA;&lt;li&gt;“Log in and update” simplicity&lt;/li&gt;&#xA;&lt;li&gt;Native tools to manage comments &amp;amp; subscriptions&lt;/li&gt;&#xA;&lt;li&gt;Easily schedule posts &amp;amp; share to social media outlets&lt;/li&gt;&#xA;&lt;li&gt;Email subscription capabilities&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;What I gained:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Control&lt;/li&gt;&#xA;&lt;li&gt;Better Performance&lt;/li&gt;&#xA;&lt;li&gt;Increased Security&lt;/li&gt;&#xA;&lt;li&gt;Signifcant Cost efficiency&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;For me, that trade was absolutely worth it.  I can work on adding the other things as I go.&lt;/p&gt;&#xA;&lt;h2 id=&#34;summary&#34;&gt;Summary&lt;/h2&gt;&#xA;&lt;p&gt;Moving off WordPress wasn’t about chasing trends necessarily, it was an exercise in learning something new while helping to save costs.&lt;/p&gt;&#xA;&lt;p&gt;If your site is:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Mostly content-driven&lt;/li&gt;&#xA;&lt;li&gt;Doesn’t need dynamic features&lt;/li&gt;&#xA;&lt;li&gt;Doesn’t justify ongoing hosting costs&lt;/li&gt;&#xA;&lt;li&gt;And you’re comfortable working in code…&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;Then a static site approach using Hugo and Azure Static Web Apps is worth a serious look. At the very least, it’ll make you rethink what your website actually needs—and what you’ve just been tolerating. In the end if it helps to save you a few bucks along the way, even better.&lt;/p&gt;&#xA;</content:encoded>
    </item>
    <item>
      <title>Why You Need to Bring Your Own SQL Server Developer License for AWS RDS SQL Developer</title>
      <link>https://johnmorehouse.com/2026/03/why-you-need-to-bring-your-own-sql-server-developer-license-for-aws-rds-sql-developer/</link>
      <pubDate>Fri, 27 Mar 2026 00:00:00 +0000</pubDate>
      <guid>https://johnmorehouse.com/2026/03/why-you-need-to-bring-your-own-sql-server-developer-license-for-aws-rds-sql-developer/</guid>
      <description>&lt;p&gt;If you are planning to deploy Amazon RDS for SQL Server Developer Edition, one detail is easy to miss: this is not a license-included offering. You are expected to bring your own SQL Server Developer licensing entitlement when you create the instance. This little nugget of information came as a shock when I tried to build a Developer RDS instance.&lt;/p&gt;&#xA;&lt;p&gt;This matters because many teams probably assume &amp;ldquo;Developer Edition&amp;rdquo; means &amp;ldquo;free everywhere.&amp;rdquo; The software edition itself is free from Microsoft for development and test use, but that does &lt;strong&gt;not&lt;/strong&gt; mean AWS is packaging it as a standard license-included RDS option.&lt;/p&gt;&#xA;&lt;h2 id=&#34;the-short-version&#34;&gt;The short version&lt;/h2&gt;&#xA;&lt;p&gt;AWS supports SQL Server Developer Edition on RDS, but it does so through a custom engine version (CEV) model using your own installation media. In other words, AWS gives you the managed database platform, but you are responsible for the SQL Server Developer Edition entitlement and ongoing compliance.&lt;/p&gt;&#xA;&lt;p&gt;Let me say it again for those in the back, you are responsible for the appropriate useage of the SQL Server Developer license.  Use it wisely.&lt;/p&gt;&#xA;&lt;h2 id=&#34;why-aws-requires-bring-your-own-license&#34;&gt;Why AWS requires bring-your-own-license&lt;/h2&gt;&#xA;&lt;p&gt;There are two reasons behind this model:&lt;/p&gt;&#xA;&lt;h3 id=&#34;1-developer-edition-is-licensed-only-for-non-production-use&#34;&gt;1. Developer Edition is licensed only for non-production use&lt;/h3&gt;&#xA;&lt;p&gt;Microsoft positions SQL Server Developer Edition as a full-featured edition for development, testing, and demonstration scenarios. It includes Enterprise Edition capabilities, but it is not licensed for production workloads.&lt;/p&gt;&#xA;&lt;p&gt;Because the usage rights are restricted, AWS does not treat it like a standard production-ready, license-included RDS SKU. Instead, AWS requires customers to bring their own media and remain responsible for ensuring the environment is used only for non-production purposes.&lt;/p&gt;&#xA;&lt;h3 id=&#34;2-aws-exposes-it-through-rds-custom-engine-versions&#34;&gt;2. AWS exposes it through RDS custom engine versions&lt;/h3&gt;&#xA;&lt;p&gt;AWS documentation states that RDS for SQL Server Developer Edition is deployed by creating a custom engine version with your own installation media. That is a strong indication that this offering sits in a bring-your-own-binaries / bring-your-own-license model rather than the normal &amp;ldquo;AWS includes everything in the price&amp;rdquo; model.&lt;/p&gt;&#xA;&lt;p&gt;Practically, that means:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;You do not simply pick a license-included Developer Edition from the usual RDS edition list.&lt;/li&gt;&#xA;&lt;li&gt;You prepare and supply the SQL Server Developer Edition media.&lt;/li&gt;&#xA;&lt;li&gt;You own the responsibility for license compliance.&lt;/li&gt;&#xA;&lt;li&gt;You should treat the environment as strictly non-production.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;what-this-means-for-architecture-and-operations&#34;&gt;What this means for architecture and operations&lt;/h2&gt;&#xA;&lt;p&gt;If your goal is to spin up a lower-cost dev/test database with feature parity to Enterprise, this model can still be attractive. You get RDS-managed capabilities such as backups, patching, and monitoring while using Developer Edition for non-production workloads.&lt;/p&gt;&#xA;&lt;p&gt;But there are a few guardrails to keep in mind:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Do not use the instance for production traffic.&lt;/li&gt;&#xA;&lt;li&gt;Make sure internal teams understand that &amp;ldquo;Developer Edition&amp;rdquo; is a usage-limited entitlement, not a production license.&lt;/li&gt;&#xA;&lt;li&gt;Document the environment clearly as dev/test/non-prod.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;summary&#34;&gt;Summary&lt;/h2&gt;&#xA;&lt;p&gt;If you want to deploy AWS RDS for SQL Server Developer Edition, plan on bringing your own SQL Server Developer Edition licensing and installation media. AWS supports the platform, but it does not convert Developer Edition into a standard license-included RDS purchase.&lt;/p&gt;&#xA;&lt;p&gt;For many teams, that is perfectly fine for dev and test, essentially anything not production usage. The key is to go in with the right expectation: RDS manages the service, but you still own the SQL Server Developer Edition licensing boundary.&lt;/p&gt;&#xA;&lt;h2 id=&#34;references&#34;&gt;References&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/sqlserver-dev-edition.html&#34;&gt;AWS: Working with SQL Server Developer Edition on RDS for SQL Server&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://www.microsoft.com/en-us/licensing/product-licensing/sql-server/&#34;&gt;Microsoft: SQL Server licensing resources&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://learn.microsoft.com/en-us/sql/sql-server/azure-arc/manage-license-billing?view=sql-server-ver17&#34;&gt;Microsoft Learn: Manage SQL Server licensed for non-production use&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;</description>
      <content:encoded>&lt;p&gt;If you are planning to deploy Amazon RDS for SQL Server Developer Edition, one detail is easy to miss: this is not a license-included offering. You are expected to bring your own SQL Server Developer licensing entitlement when you create the instance. This little nugget of information came as a shock when I tried to build a Developer RDS instance.&lt;/p&gt;&#xA;&lt;p&gt;This matters because many teams probably assume &amp;ldquo;Developer Edition&amp;rdquo; means &amp;ldquo;free everywhere.&amp;rdquo; The software edition itself is free from Microsoft for development and test use, but that does &lt;strong&gt;not&lt;/strong&gt; mean AWS is packaging it as a standard license-included RDS option.&lt;/p&gt;&#xA;&lt;h2 id=&#34;the-short-version&#34;&gt;The short version&lt;/h2&gt;&#xA;&lt;p&gt;AWS supports SQL Server Developer Edition on RDS, but it does so through a custom engine version (CEV) model using your own installation media. In other words, AWS gives you the managed database platform, but you are responsible for the SQL Server Developer Edition entitlement and ongoing compliance.&lt;/p&gt;&#xA;&lt;p&gt;Let me say it again for those in the back, you are responsible for the appropriate useage of the SQL Server Developer license.  Use it wisely.&lt;/p&gt;&#xA;&lt;h2 id=&#34;why-aws-requires-bring-your-own-license&#34;&gt;Why AWS requires bring-your-own-license&lt;/h2&gt;&#xA;&lt;p&gt;There are two reasons behind this model:&lt;/p&gt;&#xA;&lt;h3 id=&#34;1-developer-edition-is-licensed-only-for-non-production-use&#34;&gt;1. Developer Edition is licensed only for non-production use&lt;/h3&gt;&#xA;&lt;p&gt;Microsoft positions SQL Server Developer Edition as a full-featured edition for development, testing, and demonstration scenarios. It includes Enterprise Edition capabilities, but it is not licensed for production workloads.&lt;/p&gt;&#xA;&lt;p&gt;Because the usage rights are restricted, AWS does not treat it like a standard production-ready, license-included RDS SKU. Instead, AWS requires customers to bring their own media and remain responsible for ensuring the environment is used only for non-production purposes.&lt;/p&gt;&#xA;&lt;h3 id=&#34;2-aws-exposes-it-through-rds-custom-engine-versions&#34;&gt;2. AWS exposes it through RDS custom engine versions&lt;/h3&gt;&#xA;&lt;p&gt;AWS documentation states that RDS for SQL Server Developer Edition is deployed by creating a custom engine version with your own installation media. That is a strong indication that this offering sits in a bring-your-own-binaries / bring-your-own-license model rather than the normal &amp;ldquo;AWS includes everything in the price&amp;rdquo; model.&lt;/p&gt;&#xA;&lt;p&gt;Practically, that means:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;You do not simply pick a license-included Developer Edition from the usual RDS edition list.&lt;/li&gt;&#xA;&lt;li&gt;You prepare and supply the SQL Server Developer Edition media.&lt;/li&gt;&#xA;&lt;li&gt;You own the responsibility for license compliance.&lt;/li&gt;&#xA;&lt;li&gt;You should treat the environment as strictly non-production.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;what-this-means-for-architecture-and-operations&#34;&gt;What this means for architecture and operations&lt;/h2&gt;&#xA;&lt;p&gt;If your goal is to spin up a lower-cost dev/test database with feature parity to Enterprise, this model can still be attractive. You get RDS-managed capabilities such as backups, patching, and monitoring while using Developer Edition for non-production workloads.&lt;/p&gt;&#xA;&lt;p&gt;But there are a few guardrails to keep in mind:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Do not use the instance for production traffic.&lt;/li&gt;&#xA;&lt;li&gt;Make sure internal teams understand that &amp;ldquo;Developer Edition&amp;rdquo; is a usage-limited entitlement, not a production license.&lt;/li&gt;&#xA;&lt;li&gt;Document the environment clearly as dev/test/non-prod.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;summary&#34;&gt;Summary&lt;/h2&gt;&#xA;&lt;p&gt;If you want to deploy AWS RDS for SQL Server Developer Edition, plan on bringing your own SQL Server Developer Edition licensing and installation media. AWS supports the platform, but it does not convert Developer Edition into a standard license-included RDS purchase.&lt;/p&gt;&#xA;&lt;p&gt;For many teams, that is perfectly fine for dev and test, essentially anything not production usage. The key is to go in with the right expectation: RDS manages the service, but you still own the SQL Server Developer Edition licensing boundary.&lt;/p&gt;&#xA;&lt;h2 id=&#34;references&#34;&gt;References&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/sqlserver-dev-edition.html&#34;&gt;AWS: Working with SQL Server Developer Edition on RDS for SQL Server&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://www.microsoft.com/en-us/licensing/product-licensing/sql-server/&#34;&gt;Microsoft: SQL Server licensing resources&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://learn.microsoft.com/en-us/sql/sql-server/azure-arc/manage-license-billing?view=sql-server-ver17&#34;&gt;Microsoft Learn: Manage SQL Server licensed for non-production use&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;</content:encoded>
    </item>
    <item>
      <title>SQL Server 2022: ADR Cleaner Pool Limitations</title>
      <link>https://johnmorehouse.com/2026/03/sql-server-2022-adr-cleaner-pool-limitations/</link>
      <pubDate>Wed, 18 Mar 2026 00:00:00 +0000</pubDate>
      <guid>https://johnmorehouse.com/2026/03/sql-server-2022-adr-cleaner-pool-limitations/</guid>
      <description>&lt;p&gt;I firmly believe that no single individual will ever know everything about SQL Server. I’m constantly learning—often even in areas where I once felt confident in my expertise. Recently, I was discussing accelerated database recovery (ADR) with fellow MVP Ben Miller, specifically the cleaner thread pool introduced in SQL Server 2022.&lt;/p&gt;&#xA;&lt;h3 id=&#34;cleaner-backstory&#34;&gt;Cleaner Backstory&lt;/h3&gt;&#xA;&lt;p&gt;Accelerated database recovery was introduced in SQL Server 2019. It brought with it a relatively new concept: the Persisted Version Store (PVS). The PVS retains full row versions when DML operations occur. Combined with structural changes at the page level, ADR enables near-instantaneous rollback of transactions and improves failover and startup times.&lt;/p&gt;&#xA;&lt;p&gt;As row versions age out, however, they must be removed from the version store. In SQL Server 2019, this cleanup process was handled by a single-threaded cleaner—shared across all databases on the instance.&lt;/p&gt;&#xA;&lt;p&gt;To be clear, this meant one thread for all ADR-enabled databases, not one thread per database.&lt;/p&gt;&#xA;&lt;p&gt;In environments with multiple highly transactional databases using ADR, this single-threaded cleaner could become a bottleneck and could struggle to keep up.&lt;/p&gt;&#xA;&lt;h3 id=&#34;newly-improved-pool&#34;&gt;Newly Improved Pool&lt;/h3&gt;&#xA;&lt;p&gt;SQL Server 2022 introduces a cleaner thread pool, significantly improving performance. While the cleaner remains asynchronous—as it was in SQL Server 2019—it can now leverage multiple threads, which are configurable within defined limits.&lt;/p&gt;&#xA;&lt;h3 id=&#34;cleaner-thread-pool&#34;&gt;Cleaner Thread Pool&lt;/h3&gt;&#xA;&lt;p&gt;By default, the cleaner thread count is set to 1, maintaining the same behavior as SQL Server 2019. However, in SQL Server 2022 and later, you can adjust the number of cleaner threads using a simple T-SQL command:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-sql&#34; data-lang=&#34;sql&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;EXEC&lt;/span&gt; sp_configure &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;ADR Cleaner Thread Count&amp;#39;&lt;/span&gt;, &lt;span style=&#34;color:#ae81ff&#34;&gt;6&lt;/span&gt;;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;RECONFIGURE;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;GO&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This example configures the cleaner to use six threads.&lt;/p&gt;&#xA;&lt;p&gt;The recommended approach is to start with a small number of threads and gradually increase based on observed performance. The upper bound should not exceed the number of logical CPU cores available to the SQL Server instance. Even if you configure more threads than cores, SQL Server will not utilize more threads than there are available cores.&lt;/p&gt;&#xA;&lt;p&gt;In practice, rather than immediately scaling to a high number (e.g., 128 threads on a 128-core system), it’s better to start conservatively—such as 2, 4, 6, or 8 threads—and adjust incrementally based on workload and monitoring data.&lt;/p&gt;&#xA;&lt;h3 id=&#34;summary&#34;&gt;Summary&lt;/h3&gt;&#xA;&lt;p&gt;Accelerated database recovery is a game-changing feature for database administrators. Its introduction in SQL Server 2019 removed much of the anxiety associated with rolling back long-running transactions. However, the single-threaded cleaner introduced a potential performance limitation in high-throughput environments.&lt;/p&gt;&#xA;&lt;p&gt;With SQL Server 2022, the configurable cleaner thread pool provides greater control over PVS maintenance, helping reduce version store bloat and ensuring the system can keep pace with modern, highly transactional workloads.&lt;/p&gt;</description>
      <content:encoded>&lt;p&gt;I firmly believe that no single individual will ever know everything about SQL Server. I’m constantly learning—often even in areas where I once felt confident in my expertise. Recently, I was discussing accelerated database recovery (ADR) with fellow MVP Ben Miller, specifically the cleaner thread pool introduced in SQL Server 2022.&lt;/p&gt;&#xA;&lt;h3 id=&#34;cleaner-backstory&#34;&gt;Cleaner Backstory&lt;/h3&gt;&#xA;&lt;p&gt;Accelerated database recovery was introduced in SQL Server 2019. It brought with it a relatively new concept: the Persisted Version Store (PVS). The PVS retains full row versions when DML operations occur. Combined with structural changes at the page level, ADR enables near-instantaneous rollback of transactions and improves failover and startup times.&lt;/p&gt;&#xA;&lt;p&gt;As row versions age out, however, they must be removed from the version store. In SQL Server 2019, this cleanup process was handled by a single-threaded cleaner—shared across all databases on the instance.&lt;/p&gt;&#xA;&lt;p&gt;To be clear, this meant one thread for all ADR-enabled databases, not one thread per database.&lt;/p&gt;&#xA;&lt;p&gt;In environments with multiple highly transactional databases using ADR, this single-threaded cleaner could become a bottleneck and could struggle to keep up.&lt;/p&gt;&#xA;&lt;h3 id=&#34;newly-improved-pool&#34;&gt;Newly Improved Pool&lt;/h3&gt;&#xA;&lt;p&gt;SQL Server 2022 introduces a cleaner thread pool, significantly improving performance. While the cleaner remains asynchronous—as it was in SQL Server 2019—it can now leverage multiple threads, which are configurable within defined limits.&lt;/p&gt;&#xA;&lt;h3 id=&#34;cleaner-thread-pool&#34;&gt;Cleaner Thread Pool&lt;/h3&gt;&#xA;&lt;p&gt;By default, the cleaner thread count is set to 1, maintaining the same behavior as SQL Server 2019. However, in SQL Server 2022 and later, you can adjust the number of cleaner threads using a simple T-SQL command:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-sql&#34; data-lang=&#34;sql&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;EXEC&lt;/span&gt; sp_configure &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;ADR Cleaner Thread Count&amp;#39;&lt;/span&gt;, &lt;span style=&#34;color:#ae81ff&#34;&gt;6&lt;/span&gt;;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;RECONFIGURE;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;GO&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;This example configures the cleaner to use six threads.&lt;/p&gt;&#xA;&lt;p&gt;The recommended approach is to start with a small number of threads and gradually increase based on observed performance. The upper bound should not exceed the number of logical CPU cores available to the SQL Server instance. Even if you configure more threads than cores, SQL Server will not utilize more threads than there are available cores.&lt;/p&gt;&#xA;&lt;p&gt;In practice, rather than immediately scaling to a high number (e.g., 128 threads on a 128-core system), it’s better to start conservatively—such as 2, 4, 6, or 8 threads—and adjust incrementally based on workload and monitoring data.&lt;/p&gt;&#xA;&lt;h3 id=&#34;summary&#34;&gt;Summary&lt;/h3&gt;&#xA;&lt;p&gt;Accelerated database recovery is a game-changing feature for database administrators. Its introduction in SQL Server 2019 removed much of the anxiety associated with rolling back long-running transactions. However, the single-threaded cleaner introduced a potential performance limitation in high-throughput environments.&lt;/p&gt;&#xA;&lt;p&gt;With SQL Server 2022, the configurable cleaner thread pool provides greater control over PVS maintenance, helping reduce version store bloat and ensuring the system can keep pace with modern, highly transactional workloads.&lt;/p&gt;</content:encoded>
    </item>
    <item>
      <title>Azure SQL Managed Instance Next-Gen:  Bring on the IOPS</title>
      <link>https://johnmorehouse.com/2026/01/azure-sql-managed-instance-next-gen-bring-on-the-iops/</link>
      <pubDate>Mon, 12 Jan 2026 14:00:30 +0000</pubDate>
      <guid>https://johnmorehouse.com/2026/01/azure-sql-managed-instance-next-gen-bring-on-the-iops/</guid>
      <description>&lt;p&gt;If you&amp;rsquo;ve used Azure SQL Managed Instance General Purpose, you know the drill: to boost memory or I/O, you had to scale the whole instance, paying for extra CPU you might not need&amp;mdash;and hoping the upgrade fixed the bottleneck. It worked but wasn&amp;rsquo;t elegant and could be slow or awkward. Scaling sometimes took hours when time was of the essence. The Next-Gen Azure SQL Managed Instance marks a major shift from the old model. It was way overdue.&lt;/p&gt;&#xA;&lt;h3 id=&#34;what-is-next-gen-mi&#34;&gt;What is Next-Gen MI?&lt;/h3&gt;&#xA;&lt;p&gt;Azure SQL Managed Instance Next-Gen is a major architectural upgrade that leverages Azure Elastic SAN to deliver improved storage performance. It delivers faster I/O, improved stability, and higher limits&amp;mdash;supporting up to 500 databases, for example. While the managed instance retains its familiar interface, its performance has improved considerably.&lt;/p&gt;&#xA;&lt;h3 id=&#34;new-feature---iops-slider&#34;&gt;New feature - IOPS Slider&lt;/h3&gt;&#xA;&lt;p&gt;With Elastic SAN, you can directly set the I/O your instance needs. If your workload hits PAGEIOLATCH waits (meaning queries wait for disk reads), or log writes stall, or queries degrade under concurrency, it&amp;rsquo;s possible that you have hit an I/O ceiling (the system can&amp;rsquo;t handle more input/output per second). Instead of paying for more storage or a larger SKU, we can now just increase IOPS with the Next-gen platform. This saves costs; previously, you had to add CPU or storage to increase throughput. Adjusting IOPS is also in place operation&amp;mdash;no failover, so no outage.  Obtaining more IOPS used to need SAN tuning, new LUNs, performance tuning, or talking to your storage team. Now it&amp;rsquo;s a slider in the Azure portal. Pro tip: If you&amp;rsquo;re currently on General Purpose and experiencing disk latency, increasing the database file size will give you higher IOPS, improving performance.&lt;/p&gt;&#xA;&lt;h3 id=&#34;costs&#34;&gt;Costs&lt;/h3&gt;&#xA;&lt;p&gt;You get a default IOPS amount based on storage size. For example, 1 TB of storage includes 3,000 IOPS. Depending on the regional storage price per GB, 1 extra IOPS costs that price divided by 3. If storage is 0.115 per GB, 1 IOPS costs 0.038. So, in this region, 1,000 extra IOPS equals $38/month ($0.038 per IOPS x 1,000). $38 per month for an extra 1,000 IOPS?  Yes please.&lt;/p&gt;&#xA;&lt;h3 id=&#34;limitations&#34;&gt;Limitations&lt;/h3&gt;&#xA;&lt;p&gt;While this new IOPS capability is worth investigating, there is an upper limit you cannot exceed.  This ceiling is limited by the number of cores that you have, which I find unfortunate.   I have expressed to the MI team at Microsoft that, ideally, the number of IOPS should not be constrained by anything and that, if I want 8 cores and all the IOPS possible, I should be able to pay for them. Currently, this capability is not possible.  I&amp;rsquo;m hopeful that this constraint will be removed sometime in the future. However, for now, the IOPS ceiling is 1600 IOPS per core.   You can do the math.&lt;/p&gt;&#xA;&lt;h3 id=&#34;a-real-world-example&#34;&gt;A Real-World Example&lt;/h3&gt;&#xA;&lt;p&gt;I helped a client move from on-premises to Azure using SQL Managed Instance. We began with General Purpose, but after scaling and hitting latency issues, switching to Next-gen brought immediate improvement.  This allowed them to -&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Keep vCores where they are.&lt;/li&gt;&#xA;&lt;li&gt;Add IOPS at minimal cost.&lt;/li&gt;&#xA;&lt;li&gt;See immediate latency improvement.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;All this took just a few clicks in the Azure portal to get my client a better solution.&lt;/p&gt;&#xA;&lt;h3 id=&#34;summary&#34;&gt;Summary&lt;/h3&gt;&#xA;&lt;p&gt;Next-Gen SQL Managed Instance provides consistent reliability and enhanced performance, without incurring high costs.&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Better granular control.&lt;/li&gt;&#xA;&lt;li&gt;Increased flexibility.&lt;/li&gt;&#xA;&lt;li&gt;Performance optimization is now both straightforward and cost-efficient.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;This improved architecture provides database administrators with operational control similar to on-premises environments, integrated into a managed service.  I am glad that Microsoft is improving Azure SQL Managed Instance, and I hope to see continued progress in this direction. Are you using MI currently?  Have you switched to Next-gen? If so, what was your experience?  Let me know in the comments!&lt;/p&gt;</description>
      <content:encoded>&lt;p&gt;If you&amp;rsquo;ve used Azure SQL Managed Instance General Purpose, you know the drill: to boost memory or I/O, you had to scale the whole instance, paying for extra CPU you might not need&amp;mdash;and hoping the upgrade fixed the bottleneck. It worked but wasn&amp;rsquo;t elegant and could be slow or awkward. Scaling sometimes took hours when time was of the essence. The Next-Gen Azure SQL Managed Instance marks a major shift from the old model. It was way overdue.&lt;/p&gt;&#xA;&lt;h3 id=&#34;what-is-next-gen-mi&#34;&gt;What is Next-Gen MI?&lt;/h3&gt;&#xA;&lt;p&gt;Azure SQL Managed Instance Next-Gen is a major architectural upgrade that leverages Azure Elastic SAN to deliver improved storage performance. It delivers faster I/O, improved stability, and higher limits&amp;mdash;supporting up to 500 databases, for example. While the managed instance retains its familiar interface, its performance has improved considerably.&lt;/p&gt;&#xA;&lt;h3 id=&#34;new-feature---iops-slider&#34;&gt;New feature - IOPS Slider&lt;/h3&gt;&#xA;&lt;p&gt;With Elastic SAN, you can directly set the I/O your instance needs. If your workload hits PAGEIOLATCH waits (meaning queries wait for disk reads), or log writes stall, or queries degrade under concurrency, it&amp;rsquo;s possible that you have hit an I/O ceiling (the system can&amp;rsquo;t handle more input/output per second). Instead of paying for more storage or a larger SKU, we can now just increase IOPS with the Next-gen platform. This saves costs; previously, you had to add CPU or storage to increase throughput. Adjusting IOPS is also in place operation&amp;mdash;no failover, so no outage.  Obtaining more IOPS used to need SAN tuning, new LUNs, performance tuning, or talking to your storage team. Now it&amp;rsquo;s a slider in the Azure portal. Pro tip: If you&amp;rsquo;re currently on General Purpose and experiencing disk latency, increasing the database file size will give you higher IOPS, improving performance.&lt;/p&gt;&#xA;&lt;h3 id=&#34;costs&#34;&gt;Costs&lt;/h3&gt;&#xA;&lt;p&gt;You get a default IOPS amount based on storage size. For example, 1 TB of storage includes 3,000 IOPS. Depending on the regional storage price per GB, 1 extra IOPS costs that price divided by 3. If storage is 0.115 per GB, 1 IOPS costs 0.038. So, in this region, 1,000 extra IOPS equals $38/month ($0.038 per IOPS x 1,000). $38 per month for an extra 1,000 IOPS?  Yes please.&lt;/p&gt;&#xA;&lt;h3 id=&#34;limitations&#34;&gt;Limitations&lt;/h3&gt;&#xA;&lt;p&gt;While this new IOPS capability is worth investigating, there is an upper limit you cannot exceed.  This ceiling is limited by the number of cores that you have, which I find unfortunate.   I have expressed to the MI team at Microsoft that, ideally, the number of IOPS should not be constrained by anything and that, if I want 8 cores and all the IOPS possible, I should be able to pay for them. Currently, this capability is not possible.  I&amp;rsquo;m hopeful that this constraint will be removed sometime in the future. However, for now, the IOPS ceiling is 1600 IOPS per core.   You can do the math.&lt;/p&gt;&#xA;&lt;h3 id=&#34;a-real-world-example&#34;&gt;A Real-World Example&lt;/h3&gt;&#xA;&lt;p&gt;I helped a client move from on-premises to Azure using SQL Managed Instance. We began with General Purpose, but after scaling and hitting latency issues, switching to Next-gen brought immediate improvement.  This allowed them to -&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Keep vCores where they are.&lt;/li&gt;&#xA;&lt;li&gt;Add IOPS at minimal cost.&lt;/li&gt;&#xA;&lt;li&gt;See immediate latency improvement.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;All this took just a few clicks in the Azure portal to get my client a better solution.&lt;/p&gt;&#xA;&lt;h3 id=&#34;summary&#34;&gt;Summary&lt;/h3&gt;&#xA;&lt;p&gt;Next-Gen SQL Managed Instance provides consistent reliability and enhanced performance, without incurring high costs.&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Better granular control.&lt;/li&gt;&#xA;&lt;li&gt;Increased flexibility.&lt;/li&gt;&#xA;&lt;li&gt;Performance optimization is now both straightforward and cost-efficient.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;This improved architecture provides database administrators with operational control similar to on-premises environments, integrated into a managed service.  I am glad that Microsoft is improving Azure SQL Managed Instance, and I hope to see continued progress in this direction. Are you using MI currently?  Have you switched to Next-gen? If so, what was your experience?  Let me know in the comments!&lt;/p&gt;</content:encoded>
    </item>
    <item>
      <title>SQL Server 2025 Developer Edition - One size fits all</title>
      <link>https://johnmorehouse.com/2026/01/sql-server-2025-developer-edition-one-size-fits-all/</link>
      <pubDate>Mon, 05 Jan 2026 14:00:04 +0000</pubDate>
      <guid>https://johnmorehouse.com/2026/01/sql-server-2025-developer-edition-one-size-fits-all/</guid>
      <description>&lt;p&gt;Microsoft has released SQL Server 2025, bringing big improvements to its main database engine. This version focuses on AI features and better performance, aiming to meet the needs of today&amp;rsquo;s applications, from critical business systems to cloud-connected setups.&lt;/p&gt;&#xA;&lt;h3 id=&#34;finally-new-developer-editions&#34;&gt;Finally: New Developer Editions&lt;/h3&gt;&#xA;&lt;p&gt;For years, Microsoft received feedback about a major gap in its licensing. The Developer edition always matched the Enterprise edition, letting developers use all features for free. But many organizations use the Standard edition in production, which sometimes caused issues. Now, Microsoft has split the Developer Edition into two: Standard Developer and Enterprise Developer.&#xA;:::&lt;/p&gt;&#xA;&lt;p&gt;One of the most requested features in SQL Server 2025 is the formal split of the Developer edition into two distinct development-only editions:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;strong&gt;Standard Developer Edition&lt;/strong&gt; matches the features of SQL Server 2025 Standard edition and is licensed only for development and testing. Apps built with this edition can move to Standard production environments without any missing features.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Enterprise Developer Edition&lt;/strong&gt; has all the features of SQL Server 2025 Enterprise edition and is also for development and testing only. It lets developers build and test with the full Enterprise feature set, so everything works smoothly when moving to Enterprise production.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;::: {}&#xA;Remember, both editions are free as long as you use them for non-production work. Using them in production breaks the license terms and could lead to extra fees, so stick to non-production environments.&#xA;:::&lt;/p&gt;&#xA;&lt;h3 id=&#34;standard-edition-improvements&#34;&gt;Standard Edition Improvements&lt;/h3&gt;&#xA;&lt;p&gt;::: {}&#xA;The Standard edition also got some extra benefits in SQL Server 2025. Here are the three biggest improvements, in my view:&#xA;:::&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Increased compute limits &amp;mdash; up to 32 cores and 256 GB of buffer pool memory.  Who doesn&amp;rsquo;t love higher hardware ceilings?  Yes please!&lt;/li&gt;&#xA;&lt;li&gt;Resource Governor improvements, including better control over tempdb, help manage workloads more effectively. This is a big benefit for Standard edition users, making it easier to fine-tune performance for customer needs.&lt;/li&gt;&#xA;&lt;li&gt;Optimized locking - this offers an improved transaction locking mechanism, signficantly reducing locking and block issues within concurrent transactions.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;There a multitude of new features released within SQL Server 2025 so be sure to check out all the new features to see what your organization can take advantage of! Check out this &lt;a href=&#34;https://learn.microsoft.com/en-us/sql/sql-server/what-s-new-in-sql-server-2025?view=sql-server-ver17&#34;&gt;Microsoft Learn article&lt;/a&gt; to see more!&lt;/p&gt;&#xA;&lt;h3 id=&#34;summary&#34;&gt;Summary&lt;/h3&gt;&#xA;&lt;p&gt;SQL Server 2025 brings the data platform up to date for modern applications, with new developer options, AI, better performance, and cloud features. The new developer editions help reduce risk and cost while streamlining development efforts. I think this release is a big step forward for Microsoft&amp;rsquo;s platform and am excited to see what Microsoft brings to the platform next! What is your favorite new feature of SQL Server 2025?  Leave a comment below and let me know!&lt;/p&gt;</description>
      <content:encoded>&lt;p&gt;Microsoft has released SQL Server 2025, bringing big improvements to its main database engine. This version focuses on AI features and better performance, aiming to meet the needs of today&amp;rsquo;s applications, from critical business systems to cloud-connected setups.&lt;/p&gt;&#xA;&lt;h3 id=&#34;finally-new-developer-editions&#34;&gt;Finally: New Developer Editions&lt;/h3&gt;&#xA;&lt;p&gt;For years, Microsoft received feedback about a major gap in its licensing. The Developer edition always matched the Enterprise edition, letting developers use all features for free. But many organizations use the Standard edition in production, which sometimes caused issues. Now, Microsoft has split the Developer Edition into two: Standard Developer and Enterprise Developer.&#xA;:::&lt;/p&gt;&#xA;&lt;p&gt;One of the most requested features in SQL Server 2025 is the formal split of the Developer edition into two distinct development-only editions:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;strong&gt;Standard Developer Edition&lt;/strong&gt; matches the features of SQL Server 2025 Standard edition and is licensed only for development and testing. Apps built with this edition can move to Standard production environments without any missing features.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Enterprise Developer Edition&lt;/strong&gt; has all the features of SQL Server 2025 Enterprise edition and is also for development and testing only. It lets developers build and test with the full Enterprise feature set, so everything works smoothly when moving to Enterprise production.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;::: {}&#xA;Remember, both editions are free as long as you use them for non-production work. Using them in production breaks the license terms and could lead to extra fees, so stick to non-production environments.&#xA;:::&lt;/p&gt;&#xA;&lt;h3 id=&#34;standard-edition-improvements&#34;&gt;Standard Edition Improvements&lt;/h3&gt;&#xA;&lt;p&gt;::: {}&#xA;The Standard edition also got some extra benefits in SQL Server 2025. Here are the three biggest improvements, in my view:&#xA;:::&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Increased compute limits &amp;mdash; up to 32 cores and 256 GB of buffer pool memory.  Who doesn&amp;rsquo;t love higher hardware ceilings?  Yes please!&lt;/li&gt;&#xA;&lt;li&gt;Resource Governor improvements, including better control over tempdb, help manage workloads more effectively. This is a big benefit for Standard edition users, making it easier to fine-tune performance for customer needs.&lt;/li&gt;&#xA;&lt;li&gt;Optimized locking - this offers an improved transaction locking mechanism, signficantly reducing locking and block issues within concurrent transactions.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;There a multitude of new features released within SQL Server 2025 so be sure to check out all the new features to see what your organization can take advantage of! Check out this &lt;a href=&#34;https://learn.microsoft.com/en-us/sql/sql-server/what-s-new-in-sql-server-2025?view=sql-server-ver17&#34;&gt;Microsoft Learn article&lt;/a&gt; to see more!&lt;/p&gt;&#xA;&lt;h3 id=&#34;summary&#34;&gt;Summary&lt;/h3&gt;&#xA;&lt;p&gt;SQL Server 2025 brings the data platform up to date for modern applications, with new developer options, AI, better performance, and cloud features. The new developer editions help reduce risk and cost while streamlining development efforts. I think this release is a big step forward for Microsoft&amp;rsquo;s platform and am excited to see what Microsoft brings to the platform next! What is your favorite new feature of SQL Server 2025?  Leave a comment below and let me know!&lt;/p&gt;</content:encoded>
    </item>
    <item>
      <title>Merry Christmas</title>
      <link>https://johnmorehouse.com/2025/12/merry-christmas-3/</link>
      <pubDate>Thu, 25 Dec 2025 11:00:12 +0000</pubDate>
      <guid>https://johnmorehouse.com/2025/12/merry-christmas-3/</guid>
      <description>&lt;p&gt;&lt;img src=&#34;https://johnmorehouse.com/images/2025/12/fig-21-12-2025_17-56-09-300x180.jpg&#34; alt=&#34;Alt&#34;&gt;&#xA;&lt;/p&gt;&#xA;&lt;p&gt;Today is Christmas and while I do not expect anybody to actual be reading today, here it is nonetheless.&lt;/p&gt;&#xA;&lt;p&gt;I wish you and your family as many blessing as possible and all the good tidings during this holiday seasons.   The year 2026 is almost upon us so I hope that 2025 was good for you &amp;amp; family, and I look forward to seeing what the new year brings.&lt;/p&gt;&#xA;&lt;p&gt;May the holidays bring you peace and joy!&lt;/p&gt;&#xA;</description>
      <content:encoded>&lt;p&gt;&lt;img src=&#34;https://johnmorehouse.com/images/2025/12/fig-21-12-2025_17-56-09-300x180.jpg&#34; alt=&#34;Alt&#34;&gt;&#xA;&lt;/p&gt;&#xA;&lt;p&gt;Today is Christmas and while I do not expect anybody to actual be reading today, here it is nonetheless.&lt;/p&gt;&#xA;&lt;p&gt;I wish you and your family as many blessing as possible and all the good tidings during this holiday seasons.   The year 2026 is almost upon us so I hope that 2025 was good for you &amp;amp; family, and I look forward to seeing what the new year brings.&lt;/p&gt;&#xA;&lt;p&gt;May the holidays bring you peace and joy!&lt;/p&gt;&#xA;</content:encoded>
    </item>
    <item>
      <title>Stop Being Surprised by Your Azure Bill: Use Budgets</title>
      <link>https://johnmorehouse.com/2025/12/stop-being-surprised-by-your-azure-bill-use-budgets/</link>
      <pubDate>Mon, 22 Dec 2025 10:15:34 +0000</pubDate>
      <guid>https://johnmorehouse.com/2025/12/stop-being-surprised-by-your-azure-bill-use-budgets/</guid>
      <description>&lt;p&gt;When organizations migrate workloads to Azure, the focus is usually on architecture, performance, and security. Cost management &lt;em&gt;should&lt;/em&gt; be part of that conversation&amp;mdash;but in practice, it&amp;rsquo;s often treated as an afterthought. One of the most overlooked and underutilized tools in Azure is Budgets, despite the fact that it can prevent unpleasant billing surprises with minimal effort.&lt;/p&gt;&#xA;&lt;h3 id=&#34;the-problem-surprise-please-pay-your-bill&#34;&gt;The Problem: &amp;ldquo;Surprise!! Please pay your bill.&amp;rdquo;&lt;/h3&gt;&#xA;&lt;p&gt;Azure&amp;rsquo;s consumption-based pricing is both a strength and a risk. Teams spin up resources quickly, environments grow, and before long the monthly invoice looks very different than expected. The most common pattern I see is:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Budgets are not configured; alerts are disabled (or non-existent) or sent to the wrong people&lt;/li&gt;&#xA;&lt;li&gt;Resource consumption skyrockets unbeknownst to anybody&lt;/li&gt;&#xA;&lt;li&gt;Very large bill shows up at the end of the month, mass chaos ensues&lt;/li&gt;&#xA;&lt;li&gt;Immediate cost reviews happen - &lt;em&gt;after&lt;/em&gt; the bill arrives&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;Of course, by this time, the damage is already done and it&amp;rsquo;s time to pay the piper.  Sometimes, just sometimes, Microsoft will forgive excessive bills depending on the circumstances , however, that is 100% not guaranteed and solely up to Microsoft discretion.&lt;/p&gt;&#xA;&lt;h3 id=&#34;what-azure-budgets-actually-do&#34; data-start=&#34;1217&#34; end=&#34;1251&#34;&gt;What Azure Budgets Actually Do&lt;/h3&gt;&#xA;&lt;p&gt;Azure Budgets allow you to define spending thresholds at multiple scopes&amp;mdash;subscription, resource group, or management group&amp;mdash;and trigger alerts when costs exceed defined percentages of that budget.&lt;/p&gt;&#xA;&lt;p&gt;Some key capabilities include:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Monthly, quarterly, or annual budget tracking&lt;/li&gt;&#xA;&lt;li&gt;Alerting at multiple defined thresholds&lt;/li&gt;&#xA;&lt;li&gt;Notifications sent to distribution lists or individuals&lt;/li&gt;&#xA;&lt;li&gt;Budgets based on actual or forecasted costs&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;Here is an example budget that I created for my tenant.  It&amp;rsquo;s set for 80% of the actual costs for a $1,000 monthly budget and it is configured to send me an email whenever I exceed $800.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://johnmorehouse.com/images/2025/12/budget_example_1.png&#34;&gt;&lt;img src=&#34;https://johnmorehouse.com/images/2025/12/budget_example_1-1024x661.png&#34; alt=&#34;&#34;&gt;&#xA;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;The overall process to setup the budget is pretty easy and straightforward.   If you want to read more on them, check out this &lt;a href=&#34;https://learn.microsoft.com/en-us/azure/cost-management-billing/manage/cost-management-budget-scenario&#34;&gt;Microsoft Learn Article&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;h3 id=&#34;budget-recommendations&#34; data-start=&#34;2219&#34; end=&#34;2385&#34;&gt;Budget Recommendations&lt;/h3&gt;&#xA;&lt;p&gt;If you&amp;rsquo;re just getting started&amp;mdash;or revisiting budgets&amp;mdash;this approach might work well for you, but feel free to adjust as necesary -&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;&lt;strong&gt;Create budgets at multiple levels&lt;/strong&gt;&lt;br&gt;&#xA;Start at the subscription level, then add resource-group budgets for major workloads.  This allows you to keep an eye on spend at various levels of the tenant.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;&lt;strong&gt;Set alerts before you hit the limit&lt;/strong&gt;&lt;br&gt;&#xA;For new workloads where costs are not yet realized, set limits lower to identify overruns sooner, such as 25%.  For stable workloads, you can push that limit up to a higher boundary, like 80%.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;&lt;strong&gt;Notify groups, not individuals&lt;/strong&gt;&lt;br&gt;&#xA;People change roles. Distribution lists don&amp;rsquo;t.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;&lt;strong&gt;Pair budgets with automation&lt;/strong&gt;&lt;br&gt;&#xA;Alerts can trigger runbooks, emails, or even remediation actions.  Automations can manipulate resources to help reduce costs, such as shutting down virtual machines or scaling down other resources as appropriate.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;h3 id=&#34;summary&#34; data-start=&#34;3417&#34; end=&#34;3465&#34;&gt;Summary&lt;/h3&gt;&#xA;&lt;p&gt;Azure Budgets won&amp;rsquo;t optimize your environment for you&amp;mdash;but they &lt;em&gt;will&lt;/em&gt; tell you when something is going wrong, early enough to do something about it. That visibility is often the difference between a small correction and a painful post-mortem invoice from Microsoft. Budgets are one of the simplest controls you can put in place to help provide goverance&amp;mdash;and one of the most commonly overlooked.&lt;/p&gt;&#xA;&lt;p&gt;Are you using budgets in your environment?  Have a story where budgets saved you from a large Azure bill?  If so, drop me a comment and let me know!  Also stay tuned for a future posts where I investigate using Azure policies to enforce budgets!&lt;/p&gt;</description>
      <content:encoded>&lt;p&gt;When organizations migrate workloads to Azure, the focus is usually on architecture, performance, and security. Cost management &lt;em&gt;should&lt;/em&gt; be part of that conversation&amp;mdash;but in practice, it&amp;rsquo;s often treated as an afterthought. One of the most overlooked and underutilized tools in Azure is Budgets, despite the fact that it can prevent unpleasant billing surprises with minimal effort.&lt;/p&gt;&#xA;&lt;h3 id=&#34;the-problem-surprise-please-pay-your-bill&#34;&gt;The Problem: &amp;ldquo;Surprise!! Please pay your bill.&amp;rdquo;&lt;/h3&gt;&#xA;&lt;p&gt;Azure&amp;rsquo;s consumption-based pricing is both a strength and a risk. Teams spin up resources quickly, environments grow, and before long the monthly invoice looks very different than expected. The most common pattern I see is:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Budgets are not configured; alerts are disabled (or non-existent) or sent to the wrong people&lt;/li&gt;&#xA;&lt;li&gt;Resource consumption skyrockets unbeknownst to anybody&lt;/li&gt;&#xA;&lt;li&gt;Very large bill shows up at the end of the month, mass chaos ensues&lt;/li&gt;&#xA;&lt;li&gt;Immediate cost reviews happen - &lt;em&gt;after&lt;/em&gt; the bill arrives&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;Of course, by this time, the damage is already done and it&amp;rsquo;s time to pay the piper.  Sometimes, just sometimes, Microsoft will forgive excessive bills depending on the circumstances , however, that is 100% not guaranteed and solely up to Microsoft discretion.&lt;/p&gt;&#xA;&lt;h3 id=&#34;what-azure-budgets-actually-do&#34; data-start=&#34;1217&#34; end=&#34;1251&#34;&gt;What Azure Budgets Actually Do&lt;/h3&gt;&#xA;&lt;p&gt;Azure Budgets allow you to define spending thresholds at multiple scopes&amp;mdash;subscription, resource group, or management group&amp;mdash;and trigger alerts when costs exceed defined percentages of that budget.&lt;/p&gt;&#xA;&lt;p&gt;Some key capabilities include:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Monthly, quarterly, or annual budget tracking&lt;/li&gt;&#xA;&lt;li&gt;Alerting at multiple defined thresholds&lt;/li&gt;&#xA;&lt;li&gt;Notifications sent to distribution lists or individuals&lt;/li&gt;&#xA;&lt;li&gt;Budgets based on actual or forecasted costs&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;Here is an example budget that I created for my tenant.  It&amp;rsquo;s set for 80% of the actual costs for a $1,000 monthly budget and it is configured to send me an email whenever I exceed $800.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://johnmorehouse.com/images/2025/12/budget_example_1.png&#34;&gt;&lt;img src=&#34;https://johnmorehouse.com/images/2025/12/budget_example_1-1024x661.png&#34; alt=&#34;&#34;&gt;&#xA;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;The overall process to setup the budget is pretty easy and straightforward.   If you want to read more on them, check out this &lt;a href=&#34;https://learn.microsoft.com/en-us/azure/cost-management-billing/manage/cost-management-budget-scenario&#34;&gt;Microsoft Learn Article&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;h3 id=&#34;budget-recommendations&#34; data-start=&#34;2219&#34; end=&#34;2385&#34;&gt;Budget Recommendations&lt;/h3&gt;&#xA;&lt;p&gt;If you&amp;rsquo;re just getting started&amp;mdash;or revisiting budgets&amp;mdash;this approach might work well for you, but feel free to adjust as necesary -&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;&lt;strong&gt;Create budgets at multiple levels&lt;/strong&gt;&lt;br&gt;&#xA;Start at the subscription level, then add resource-group budgets for major workloads.  This allows you to keep an eye on spend at various levels of the tenant.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;&lt;strong&gt;Set alerts before you hit the limit&lt;/strong&gt;&lt;br&gt;&#xA;For new workloads where costs are not yet realized, set limits lower to identify overruns sooner, such as 25%.  For stable workloads, you can push that limit up to a higher boundary, like 80%.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;&lt;strong&gt;Notify groups, not individuals&lt;/strong&gt;&lt;br&gt;&#xA;People change roles. Distribution lists don&amp;rsquo;t.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;&lt;strong&gt;Pair budgets with automation&lt;/strong&gt;&lt;br&gt;&#xA;Alerts can trigger runbooks, emails, or even remediation actions.  Automations can manipulate resources to help reduce costs, such as shutting down virtual machines or scaling down other resources as appropriate.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;h3 id=&#34;summary&#34; data-start=&#34;3417&#34; end=&#34;3465&#34;&gt;Summary&lt;/h3&gt;&#xA;&lt;p&gt;Azure Budgets won&amp;rsquo;t optimize your environment for you&amp;mdash;but they &lt;em&gt;will&lt;/em&gt; tell you when something is going wrong, early enough to do something about it. That visibility is often the difference between a small correction and a painful post-mortem invoice from Microsoft. Budgets are one of the simplest controls you can put in place to help provide goverance&amp;mdash;and one of the most commonly overlooked.&lt;/p&gt;&#xA;&lt;p&gt;Are you using budgets in your environment?  Have a story where budgets saved you from a large Azure bill?  If so, drop me a comment and let me know!  Also stay tuned for a future posts where I investigate using Azure policies to enforce budgets!&lt;/p&gt;</content:encoded>
    </item>
    <item>
      <title>Streamlining Azure VM Moves Into Availability Zones</title>
      <link>https://johnmorehouse.com/2025/12/streamlining-azure-vm-moves-into-availability-zones/</link>
      <pubDate>Mon, 15 Dec 2025 10:15:37 +0000</pubDate>
      <guid>https://johnmorehouse.com/2025/12/streamlining-azure-vm-moves-into-availability-zones/</guid>
      <description>&lt;p&gt;One of the more frustrating aspects about creating an Azure virtual machine is that if you do not place it into an availability zone at deployment time, you&amp;rsquo;ve traditionally had to rebuild it later.   That usually meant starting from scratch or detaching the disks, creating a new VM, and reattaching them.  Neither option is not horribly impactful, but both can be inconvenient and time-consuming. Until now.&lt;/p&gt;&#xA;&lt;h3 id=&#34;things-have-changed&#34;&gt;Things Have Changed&lt;/h3&gt;&#xA;&lt;p&gt;While examining a virtual machine for a client, I discovered a new simpler method, move a virtual machine into a given availabilty zone with a few clicks of the mouse button.  With the appropriate permissions, Azure will assign a system-managed identity and then effectively copy the virtual machine into whichever zone you choose.  When the process completes, you&amp;rsquo;ll have two virtual machines:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;The original VM, left in a deallocated (stopped) state&lt;/li&gt;&#xA;&lt;li&gt;A new VM, running in the selected availability zone&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;Let&amp;rsquo;s walk through the process - In this exmaple,  I have a SQL Server Azure virtual machine in my tenant called &lt;strong&gt;SQL01&lt;/strong&gt;. As shown in the screenshot, the Availability + scaling section indicates that the VM is &lt;em&gt;not&lt;/em&gt; currently in an availability zone.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://johnmorehouse.com/images/2025/12/2025-12-11_16-02-53.png&#34;&gt;&lt;img src=&#34;https://johnmorehouse.com/images/2025/12/2025-12-11_16-02-53.png&#34; alt=&#34;&#34;&gt;&#xA;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;Click the &amp;ldquo;edit&amp;rdquo; link.   The next window will allow me to select which availability zone I want to place the machines into.   Keep in mind that each region offers three zones, each with independent power, cooling, and networking&amp;mdash;providing an additional layer of resiliency for your workloads.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://johnmorehouse.com/images/2025/12/2025-12-11_16-03-28.png&#34;&gt;&lt;img src=&#34;https://johnmorehouse.com/images/2025/12/2025-12-11_16-03-28.png&#34; alt=&#34;&#34;&gt;&#xA;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;In my case, I opted to place the virtual machine into Availability Zone 1.  It is worth noting that in order to faciliate this, a system assigned managed identity needs to be created on your behalf in order to access all of the resources within the subscription.  You&amp;rsquo;ll need to acknowledge this by checking the confirmation box.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://johnmorehouse.com/images/2025/12/2025-12-11_16-03-44.png&#34;&gt;&lt;img src=&#34;https://johnmorehouse.com/images/2025/12/2025-12-11_16-03-44-1024x52.png&#34; alt=&#34;&#34;&gt;&#xA;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;Once acknowledged, the process will begin to evaluate the resources and validate that it can be moved.  The portal walks you through a three step process and keeps you updated along the way.  Once all three steps are done, you will have an opportunity to review things and optionally modify some settings, including -&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Virtual machine name&lt;/li&gt;&#xA;&lt;li&gt;Network Interface Card (NIC)&lt;/li&gt;&#xA;&lt;li&gt;Virtual network (vnet) &amp;amp; subnet&lt;/li&gt;&#xA;&lt;li&gt;Network Security Group (NSG)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;This is a good moment to confirm everything is configured the way you want. Remember: Azure is creating a &lt;em&gt;new&lt;/em&gt; VM, so treat this like provisioning a fresh machine&amp;mdash;just with far fewer steps.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://johnmorehouse.com/images/2025/12/2025-12-11_16-06-43.png&#34;&gt;&lt;img src=&#34;https://johnmorehouse.com/images/2025/12/2025-12-11_16-06-43.png&#34; alt=&#34;&#34;&gt;&#xA;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;The source VM will be shut down during the move to prevent data loss. Since Azure is effectively copying the VM, it&amp;rsquo;s reasonable to assume snapshots are taken behind the scenes. You&amp;rsquo;ll need to confirm that you understand the VM will be stopped.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://johnmorehouse.com/images/2025/12/2025-12-11_16-06-57.png&#34;&gt;&lt;img src=&#34;https://johnmorehouse.com/images/2025/12/2025-12-11_16-06-57.png&#34; alt=&#34;&#34;&gt;&#xA;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;Once confirmed, just click Move and Azure will do the rest! When the process completes, you&amp;rsquo;ll see a summary showing that:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;The original VM is stopped and remains outside an availability zone&lt;/li&gt;&#xA;&lt;li&gt;The new VM (with the same name) is running in Zone 1&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://johnmorehouse.com/images/2025/12/2025-12-11_16-11-31.png&#34;&gt;&lt;img src=&#34;https://johnmorehouse.com/images/2025/12/2025-12-11_16-11-31.png&#34; alt=&#34;&#34;&gt;&#xA;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;Refreshing the Virtual Machine blade will show both VMs, each in their respective states.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://johnmorehouse.com/images/2025/12/2025-12-11_16-11-55.png&#34;&gt;&lt;img src=&#34;https://johnmorehouse.com/images/2025/12/2025-12-11_16-11-55.png&#34; alt=&#34;&#34;&gt;&#xA;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;Further more, if you look at the summary for the new virtual machine, it will confirm that it is now within Availability Zone 1.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://johnmorehouse.com/images/2025/12/2025-12-11_16-12-11.png&#34;&gt;&lt;img src=&#34;https://johnmorehouse.com/images/2025/12/2025-12-11_16-12-11.png&#34; alt=&#34;&#34;&gt;&#xA;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;summary&#34;&gt;Summary&lt;/h3&gt;&#xA;&lt;p&gt;Microsoft continues to quietly roll out improvements that make Azure administration smoother and more efficient. What used to be a somewhat tedious and manual process is now simpler. Being able to move an Azure virtual machine into an availability zone with just a few clicks is a nice enhancement. What do you think of this feature? Has it made your life easier? Share your thoughts in the comments&amp;mdash;I&amp;rsquo;d love to hear your experience.&lt;/p&gt;&#xA;</description>
      <content:encoded>&lt;p&gt;One of the more frustrating aspects about creating an Azure virtual machine is that if you do not place it into an availability zone at deployment time, you&amp;rsquo;ve traditionally had to rebuild it later.   That usually meant starting from scratch or detaching the disks, creating a new VM, and reattaching them.  Neither option is not horribly impactful, but both can be inconvenient and time-consuming. Until now.&lt;/p&gt;&#xA;&lt;h3 id=&#34;things-have-changed&#34;&gt;Things Have Changed&lt;/h3&gt;&#xA;&lt;p&gt;While examining a virtual machine for a client, I discovered a new simpler method, move a virtual machine into a given availabilty zone with a few clicks of the mouse button.  With the appropriate permissions, Azure will assign a system-managed identity and then effectively copy the virtual machine into whichever zone you choose.  When the process completes, you&amp;rsquo;ll have two virtual machines:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;The original VM, left in a deallocated (stopped) state&lt;/li&gt;&#xA;&lt;li&gt;A new VM, running in the selected availability zone&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;Let&amp;rsquo;s walk through the process - In this exmaple,  I have a SQL Server Azure virtual machine in my tenant called &lt;strong&gt;SQL01&lt;/strong&gt;. As shown in the screenshot, the Availability + scaling section indicates that the VM is &lt;em&gt;not&lt;/em&gt; currently in an availability zone.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://johnmorehouse.com/images/2025/12/2025-12-11_16-02-53.png&#34;&gt;&lt;img src=&#34;https://johnmorehouse.com/images/2025/12/2025-12-11_16-02-53.png&#34; alt=&#34;&#34;&gt;&#xA;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;Click the &amp;ldquo;edit&amp;rdquo; link.   The next window will allow me to select which availability zone I want to place the machines into.   Keep in mind that each region offers three zones, each with independent power, cooling, and networking&amp;mdash;providing an additional layer of resiliency for your workloads.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://johnmorehouse.com/images/2025/12/2025-12-11_16-03-28.png&#34;&gt;&lt;img src=&#34;https://johnmorehouse.com/images/2025/12/2025-12-11_16-03-28.png&#34; alt=&#34;&#34;&gt;&#xA;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;In my case, I opted to place the virtual machine into Availability Zone 1.  It is worth noting that in order to faciliate this, a system assigned managed identity needs to be created on your behalf in order to access all of the resources within the subscription.  You&amp;rsquo;ll need to acknowledge this by checking the confirmation box.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://johnmorehouse.com/images/2025/12/2025-12-11_16-03-44.png&#34;&gt;&lt;img src=&#34;https://johnmorehouse.com/images/2025/12/2025-12-11_16-03-44-1024x52.png&#34; alt=&#34;&#34;&gt;&#xA;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;Once acknowledged, the process will begin to evaluate the resources and validate that it can be moved.  The portal walks you through a three step process and keeps you updated along the way.  Once all three steps are done, you will have an opportunity to review things and optionally modify some settings, including -&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Virtual machine name&lt;/li&gt;&#xA;&lt;li&gt;Network Interface Card (NIC)&lt;/li&gt;&#xA;&lt;li&gt;Virtual network (vnet) &amp;amp; subnet&lt;/li&gt;&#xA;&lt;li&gt;Network Security Group (NSG)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;This is a good moment to confirm everything is configured the way you want. Remember: Azure is creating a &lt;em&gt;new&lt;/em&gt; VM, so treat this like provisioning a fresh machine&amp;mdash;just with far fewer steps.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://johnmorehouse.com/images/2025/12/2025-12-11_16-06-43.png&#34;&gt;&lt;img src=&#34;https://johnmorehouse.com/images/2025/12/2025-12-11_16-06-43.png&#34; alt=&#34;&#34;&gt;&#xA;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;The source VM will be shut down during the move to prevent data loss. Since Azure is effectively copying the VM, it&amp;rsquo;s reasonable to assume snapshots are taken behind the scenes. You&amp;rsquo;ll need to confirm that you understand the VM will be stopped.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://johnmorehouse.com/images/2025/12/2025-12-11_16-06-57.png&#34;&gt;&lt;img src=&#34;https://johnmorehouse.com/images/2025/12/2025-12-11_16-06-57.png&#34; alt=&#34;&#34;&gt;&#xA;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;Once confirmed, just click Move and Azure will do the rest! When the process completes, you&amp;rsquo;ll see a summary showing that:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;The original VM is stopped and remains outside an availability zone&lt;/li&gt;&#xA;&lt;li&gt;The new VM (with the same name) is running in Zone 1&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://johnmorehouse.com/images/2025/12/2025-12-11_16-11-31.png&#34;&gt;&lt;img src=&#34;https://johnmorehouse.com/images/2025/12/2025-12-11_16-11-31.png&#34; alt=&#34;&#34;&gt;&#xA;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;Refreshing the Virtual Machine blade will show both VMs, each in their respective states.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://johnmorehouse.com/images/2025/12/2025-12-11_16-11-55.png&#34;&gt;&lt;img src=&#34;https://johnmorehouse.com/images/2025/12/2025-12-11_16-11-55.png&#34; alt=&#34;&#34;&gt;&#xA;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;Further more, if you look at the summary for the new virtual machine, it will confirm that it is now within Availability Zone 1.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://johnmorehouse.com/images/2025/12/2025-12-11_16-12-11.png&#34;&gt;&lt;img src=&#34;https://johnmorehouse.com/images/2025/12/2025-12-11_16-12-11.png&#34; alt=&#34;&#34;&gt;&#xA;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;summary&#34;&gt;Summary&lt;/h3&gt;&#xA;&lt;p&gt;Microsoft continues to quietly roll out improvements that make Azure administration smoother and more efficient. What used to be a somewhat tedious and manual process is now simpler. Being able to move an Azure virtual machine into an availability zone with just a few clicks is a nice enhancement. What do you think of this feature? Has it made your life easier? Share your thoughts in the comments&amp;mdash;I&amp;rsquo;d love to hear your experience.&lt;/p&gt;&#xA;</content:encoded>
    </item>
    <item>
      <title>When the Internet Stumbles: Lessons from Cloudflare &amp; Azure Front Door Outages</title>
      <link>https://johnmorehouse.com/2025/12/when-the-internet-stumbles-lessons-from-cloudflare-azure-front-door-outages/</link>
      <pubDate>Mon, 08 Dec 2025 10:15:51 +0000</pubDate>
      <guid>https://johnmorehouse.com/2025/12/when-the-internet-stumbles-lessons-from-cloudflare-azure-front-door-outages/</guid>
      <description>&lt;p&gt;Recently, the world was reminded of just how fragile the internet can be.  Two well established cloud services, Cloudflare and Azure Front Door, both had simultaneous outages that caused major global havoc.    Major platforms like LinkedIn, Zoom, Canva, DoorDash, and even crypto exchanges such as Coinbase and Kraken were knocked offline due to these inital outages.  Even more recently Cloudflare had a secondary outage early Friday morning, December 5th, 2025. The cause of the inital outages?  Configuration changes.   Not malicious actors attempting to deliver cyberattacks, but instead it came from within each organization.  It is a testament to how system updates or even human error can cascade into a massive global downtime event. Due to these outages, organizations potentially lost millions of dollars due to lost transcations, decreased productivity as well as an untold impact to customer trust.&lt;/p&gt;&#xA;&lt;h2 id=&#34;what-do-you-do&#34;&gt;What do you do?&lt;/h2&gt;&#xA;&lt;p&gt;The question isn&amp;rsquo;t [&lt;em&gt;if&lt;/em&gt;] outages will happen again &amp;mdash; it&amp;rsquo;s [&lt;em&gt;when&lt;/em&gt;]. That&amp;rsquo;s why Denny Cherry &amp;amp; Associates Consulting (DCAC) is hosting a webinar on how to mitigate downtime from outages like these. In this session, myself along with Denny Cherry &amp;amp; Joey D&amp;rsquo;Antoni will walk through:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;What really happened during the outages&lt;/li&gt;&#xA;&lt;li&gt;Why organizations depend on Azure Front Door &amp;amp; Cloudflare&lt;/li&gt;&#xA;&lt;li&gt;Proven strategies to architect your web tier for resilience&amp;mdash;even when the front‑end proxy goes dark&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;Make sure to join us!! December 10th 10 AM PT / 1 PM ET - &lt;a href=&#34;https://events.teams.microsoft.com/event/06cb3467-00a3-49e8-82ef-32261994eb63@54a77e58-9bf9-4758-93c7-94cfd6f0567a&#34;&gt;Registration is Open!&lt;/a&gt; Don&amp;rsquo;t wait until the next outage leaves your business offline. Register now for the DCAC webinar and learn how to build resilience into your cloud infrastructure. Your customers expect reliability &amp;mdash; and with the right planning, you can deliver it even when the internet&amp;rsquo;s biggest players falter.  DCAC can help you get there.&lt;/p&gt;&#xA;</description>
      <content:encoded>&lt;p&gt;Recently, the world was reminded of just how fragile the internet can be.  Two well established cloud services, Cloudflare and Azure Front Door, both had simultaneous outages that caused major global havoc.    Major platforms like LinkedIn, Zoom, Canva, DoorDash, and even crypto exchanges such as Coinbase and Kraken were knocked offline due to these inital outages.  Even more recently Cloudflare had a secondary outage early Friday morning, December 5th, 2025. The cause of the inital outages?  Configuration changes.   Not malicious actors attempting to deliver cyberattacks, but instead it came from within each organization.  It is a testament to how system updates or even human error can cascade into a massive global downtime event. Due to these outages, organizations potentially lost millions of dollars due to lost transcations, decreased productivity as well as an untold impact to customer trust.&lt;/p&gt;&#xA;&lt;h2 id=&#34;what-do-you-do&#34;&gt;What do you do?&lt;/h2&gt;&#xA;&lt;p&gt;The question isn&amp;rsquo;t [&lt;em&gt;if&lt;/em&gt;] outages will happen again &amp;mdash; it&amp;rsquo;s [&lt;em&gt;when&lt;/em&gt;]. That&amp;rsquo;s why Denny Cherry &amp;amp; Associates Consulting (DCAC) is hosting a webinar on how to mitigate downtime from outages like these. In this session, myself along with Denny Cherry &amp;amp; Joey D&amp;rsquo;Antoni will walk through:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;What really happened during the outages&lt;/li&gt;&#xA;&lt;li&gt;Why organizations depend on Azure Front Door &amp;amp; Cloudflare&lt;/li&gt;&#xA;&lt;li&gt;Proven strategies to architect your web tier for resilience&amp;mdash;even when the front‑end proxy goes dark&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;Make sure to join us!! December 10th 10 AM PT / 1 PM ET - &lt;a href=&#34;https://events.teams.microsoft.com/event/06cb3467-00a3-49e8-82ef-32261994eb63@54a77e58-9bf9-4758-93c7-94cfd6f0567a&#34;&gt;Registration is Open!&lt;/a&gt; Don&amp;rsquo;t wait until the next outage leaves your business offline. Register now for the DCAC webinar and learn how to build resilience into your cloud infrastructure. Your customers expect reliability &amp;mdash; and with the right planning, you can deliver it even when the internet&amp;rsquo;s biggest players falter.  DCAC can help you get there.&lt;/p&gt;&#xA;</content:encoded>
    </item>
    <item>
      <title>Azure Networking: Designing for Change</title>
      <link>https://johnmorehouse.com/2025/09/azure-networking-designing-for-change/</link>
      <pubDate>Wed, 03 Sep 2025 13:45:07 +0000</pubDate>
      <guid>https://johnmorehouse.com/2025/09/azure-networking-designing-for-change/</guid>
      <description>&lt;p&gt;Failing to plan is planning to fail.&lt;/p&gt;&#xA;&lt;p&gt;When organizations first begin implementing Azure networking, the focus is often on the immediate requirements: connectivity, security, and performance for your databases and applications. While that is important, the reality is that your environment will change at some point in the future. Developers will deploy new resources, more users will connect, hybrid scenarios will evolve, and security needs will continue to grow and adapt.   If you only plan for today, you risk painting yourself into a corner tomorrow.&lt;/p&gt;&#xA;&lt;p&gt;The decisions you make now can drastically shape the future. Why not take advantage of that and lay down a foundation that can adapt when necessary?&lt;/p&gt;&#xA;&lt;p&gt;Quite often, I see a flat network topology, such as a single virtual network (vNet), regardless of the Azure resources deployed within it.  Or very wide subnets in terms of address spaces (do you really need 1000 IP addresses for VMs when you only have five VMs in total?), or a lack of consistent subnet naming.&lt;/p&gt;&#xA;&lt;p&gt;I&amp;rsquo;m only going to mention naming conventions because that is a whole other topic for discussion; however, get one before you start.  Even a simple one that can adapt will go a long way.&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Assume Things Will Change&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;In the cloud, change is not an exception &amp;mdash; it&amp;rsquo;s the rule. You will see workloads move, resources scaling, and newly deployed services. A design that looks perfect now may become limiting in six months, or sooner even.  For example, you may start with a single vNet topology, only to discover later that you need to add additional subscriptions in another region that requires connectivity. By assuming change will come, when I deploy new resources, I will avoid having to re-architect things.&lt;/p&gt;&#xA;&lt;h3 id=&#34;building-for-the-future&#34;&gt;&lt;strong&gt;Building for the Future&lt;/strong&gt;&lt;/h3&gt;&#xA;&lt;p&gt;&lt;strong&gt;Flexible Network Topologies&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;Start with patterns like hub-and-spoke that scale as your environment grows. Even if you don&amp;rsquo;t need multiple spokes today, laying the groundwork now ensures you can add them later without major redesigns.  In this case, I like to put infrastructure things into the hub (like vNets) and then application or database-specific things into another virtual network.  The two virtual networks can then be peered together so that things can communicate back and forth appropriately.&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Naming Convention&lt;/strong&gt; Even if you have a single virtual network, go ahead and name resources, as you will eventually have more than one.    I personally like to number my vNets 01, 02, 03, etc. (and other things) because it is then easy to quickly identify how many &amp;ldquo;things&amp;rdquo;, in this case virtual networks, I have deployed.  When I need to add others down the line, increment the end number to ensure consistency with current deployments.&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Keeping Things Seperate&lt;/strong&gt; Keeping things separate from the start will help to isolate them as well.  Isolation is another reason I like the hub and spoke model, regardless of the size of the environment. There is often a lack of network segmentation in the cloud, which, if exposed, can lead to serious attack vectors into your corporate environment.&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;The Unknown&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;No one can predict every future need, but you can prepare by:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Building modular and flexible network designs.&lt;/li&gt;&#xA;&lt;li&gt;Documenting your architecture and decisions.  Even if it is a small network, document the topology.  It will be helpful later.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;&lt;strong&gt;Summary&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;Azure networking is not a one-and-done exercise.  In my opinion, it is a dynamic entity that must grow and evolve with your organization. By designing with change in mind from the start, you position your environment to adapt smoothly rather than requiring painful overhauls.   Trust me, overhauling an Azure network can be tedious.  The best Azure networking strategies are those that anticipate tomorrow&amp;rsquo;s needs, not just today&amp;rsquo;s.&lt;/p&gt;&#xA;&lt;p&gt;Also, if you are new to Azure networking or even need to brush up on the best practices, you can check out Microsoft&amp;rsquo;s &lt;a href=&#34;https://learn.microsoft.com/en-us/azure/virtual-network/concepts-and-best-practices&#34;&gt;documentation&lt;/a&gt;.&lt;/p&gt;&#xA;</description>
      <content:encoded>&lt;p&gt;Failing to plan is planning to fail.&lt;/p&gt;&#xA;&lt;p&gt;When organizations first begin implementing Azure networking, the focus is often on the immediate requirements: connectivity, security, and performance for your databases and applications. While that is important, the reality is that your environment will change at some point in the future. Developers will deploy new resources, more users will connect, hybrid scenarios will evolve, and security needs will continue to grow and adapt.   If you only plan for today, you risk painting yourself into a corner tomorrow.&lt;/p&gt;&#xA;&lt;p&gt;The decisions you make now can drastically shape the future. Why not take advantage of that and lay down a foundation that can adapt when necessary?&lt;/p&gt;&#xA;&lt;p&gt;Quite often, I see a flat network topology, such as a single virtual network (vNet), regardless of the Azure resources deployed within it.  Or very wide subnets in terms of address spaces (do you really need 1000 IP addresses for VMs when you only have five VMs in total?), or a lack of consistent subnet naming.&lt;/p&gt;&#xA;&lt;p&gt;I&amp;rsquo;m only going to mention naming conventions because that is a whole other topic for discussion; however, get one before you start.  Even a simple one that can adapt will go a long way.&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Assume Things Will Change&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;In the cloud, change is not an exception &amp;mdash; it&amp;rsquo;s the rule. You will see workloads move, resources scaling, and newly deployed services. A design that looks perfect now may become limiting in six months, or sooner even.  For example, you may start with a single vNet topology, only to discover later that you need to add additional subscriptions in another region that requires connectivity. By assuming change will come, when I deploy new resources, I will avoid having to re-architect things.&lt;/p&gt;&#xA;&lt;h3 id=&#34;building-for-the-future&#34;&gt;&lt;strong&gt;Building for the Future&lt;/strong&gt;&lt;/h3&gt;&#xA;&lt;p&gt;&lt;strong&gt;Flexible Network Topologies&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;Start with patterns like hub-and-spoke that scale as your environment grows. Even if you don&amp;rsquo;t need multiple spokes today, laying the groundwork now ensures you can add them later without major redesigns.  In this case, I like to put infrastructure things into the hub (like vNets) and then application or database-specific things into another virtual network.  The two virtual networks can then be peered together so that things can communicate back and forth appropriately.&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Naming Convention&lt;/strong&gt; Even if you have a single virtual network, go ahead and name resources, as you will eventually have more than one.    I personally like to number my vNets 01, 02, 03, etc. (and other things) because it is then easy to quickly identify how many &amp;ldquo;things&amp;rdquo;, in this case virtual networks, I have deployed.  When I need to add others down the line, increment the end number to ensure consistency with current deployments.&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;Keeping Things Seperate&lt;/strong&gt; Keeping things separate from the start will help to isolate them as well.  Isolation is another reason I like the hub and spoke model, regardless of the size of the environment. There is often a lack of network segmentation in the cloud, which, if exposed, can lead to serious attack vectors into your corporate environment.&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;The Unknown&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;No one can predict every future need, but you can prepare by:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Building modular and flexible network designs.&lt;/li&gt;&#xA;&lt;li&gt;Documenting your architecture and decisions.  Even if it is a small network, document the topology.  It will be helpful later.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;&lt;strong&gt;Summary&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;Azure networking is not a one-and-done exercise.  In my opinion, it is a dynamic entity that must grow and evolve with your organization. By designing with change in mind from the start, you position your environment to adapt smoothly rather than requiring painful overhauls.   Trust me, overhauling an Azure network can be tedious.  The best Azure networking strategies are those that anticipate tomorrow&amp;rsquo;s needs, not just today&amp;rsquo;s.&lt;/p&gt;&#xA;&lt;p&gt;Also, if you are new to Azure networking or even need to brush up on the best practices, you can check out Microsoft&amp;rsquo;s &lt;a href=&#34;https://learn.microsoft.com/en-us/azure/virtual-network/concepts-and-best-practices&#34;&gt;documentation&lt;/a&gt;.&lt;/p&gt;&#xA;</content:encoded>
    </item>
    <item>
      <title>Exploring the Next Gen General Purpose Tier in Azure SQL Managed Instance</title>
      <link>https://johnmorehouse.com/2025/06/exploring-the-next-gen-general-purpose-tier-in-azure-sql-managed-instance/</link>
      <pubDate>Thu, 19 Jun 2025 10:05:33 +0000</pubDate>
      <guid>https://johnmorehouse.com/2025/06/exploring-the-next-gen-general-purpose-tier-in-azure-sql-managed-instance/</guid>
      <description>&lt;p&gt;In a recent video, I took a hands-on look at the Next Gen General Purpose service tier in Azure SQL Managed Instance&amp;mdash;and it brings some exciting advancements to the table!&lt;/p&gt;&#xA;&lt;p&gt;This update marks a significant evolution in the managed database space, offering improved performance, enhanced storage capabilities, and streamlined scaling for general-purpose workloads. Whether you&amp;rsquo;re migrating existing applications to Azure or architecting new cloud-native solutions, this tier is designed to meet modern demand with greater efficiency.&lt;/p&gt;&#xA;&lt;p&gt;One of the standout features I discussed and demo is the &lt;strong&gt;new memory slider capability that showcases how we can manage memory and optimize workloads&lt;/strong&gt;&amp;mdash; Available only in the premium series hardware, it&amp;rsquo;s definitely a feature worth looking at!&lt;/p&gt;&#xA;&lt;p&gt;If you&amp;rsquo;re working with Azure SQL Managed Instances or considering the move, I highly recommend checking out the video:&lt;/p&gt;&#xA;&lt;div style=&#34;position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden;&#34;&gt;&#xA;      &lt;iframe allow=&#34;accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share&#34; loading=&#34;eager&#34; referrerpolicy=&#34;strict-origin-when-cross-origin&#34; src=&#34;https://www.youtube.com/embed/rrqv2YxalGM?autoplay=0&amp;amp;controls=1&amp;amp;end=0&amp;amp;loop=0&amp;amp;mute=0&amp;amp;start=0&#34; style=&#34;position: absolute; top: 0; left: 0; width: 100%; height: 100%; border:0;&#34; title=&#34;YouTube video&#34;&gt;&lt;/iframe&gt;&#xA;    &lt;/div&gt;&#xA;&#xA;&lt;p&gt;Have thoughts, questions, or use cases to share? I&amp;rsquo;d love to hear how others are planning to incorporate the Next Gen GP tier into their data strategy!&lt;/p&gt;&#xA;</description>
      <content:encoded>&lt;p&gt;In a recent video, I took a hands-on look at the Next Gen General Purpose service tier in Azure SQL Managed Instance&amp;mdash;and it brings some exciting advancements to the table!&lt;/p&gt;&#xA;&lt;p&gt;This update marks a significant evolution in the managed database space, offering improved performance, enhanced storage capabilities, and streamlined scaling for general-purpose workloads. Whether you&amp;rsquo;re migrating existing applications to Azure or architecting new cloud-native solutions, this tier is designed to meet modern demand with greater efficiency.&lt;/p&gt;&#xA;&lt;p&gt;One of the standout features I discussed and demo is the &lt;strong&gt;new memory slider capability that showcases how we can manage memory and optimize workloads&lt;/strong&gt;&amp;mdash; Available only in the premium series hardware, it&amp;rsquo;s definitely a feature worth looking at!&lt;/p&gt;&#xA;&lt;p&gt;If you&amp;rsquo;re working with Azure SQL Managed Instances or considering the move, I highly recommend checking out the video:&lt;/p&gt;&#xA;&lt;div style=&#34;position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden;&#34;&gt;&#xA;      &lt;iframe allow=&#34;accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share&#34; loading=&#34;eager&#34; referrerpolicy=&#34;strict-origin-when-cross-origin&#34; src=&#34;https://www.youtube.com/embed/rrqv2YxalGM?autoplay=0&amp;amp;controls=1&amp;amp;end=0&amp;amp;loop=0&amp;amp;mute=0&amp;amp;start=0&#34; style=&#34;position: absolute; top: 0; left: 0; width: 100%; height: 100%; border:0;&#34; title=&#34;YouTube video&#34;&gt;&lt;/iframe&gt;&#xA;    &lt;/div&gt;&#xA;&#xA;&lt;p&gt;Have thoughts, questions, or use cases to share? I&amp;rsquo;d love to hear how others are planning to incorporate the Next Gen GP tier into their data strategy!&lt;/p&gt;&#xA;</content:encoded>
    </item>
    <item>
      <title>Implement a RAG Solution Using Azure SQL Database</title>
      <link>https://johnmorehouse.com/2024/11/implement-a-rag-solution-using-azure-sql-database/</link>
      <pubDate>Fri, 01 Nov 2024 10:25:39 +0000</pubDate>
      <guid>https://johnmorehouse.com/2024/11/implement-a-rag-solution-using-azure-sql-database/</guid>
      <description>&lt;p&gt;AI and ChatGPT are all the rage these days.  Seems like around every corner is another break-through in how we interact with data, regardless of if that data is structured or un-structured.  In my latest video, I dive into implementing a Retrieval-Augmented Generation (RAG) solution using Azure SQL Database! This advancement in vectors and embedding allows me to use my own data in conjunction with Open AI Azure Services and certain language models to create chatbots that know my data. In the video I briefly talk about some of the components of a RAG Solution and discuss at a high level of how the architecture looks.  I walk through a quick demonstration on how it works to showcase the usefulness and to provide an example what you can do with your data.    Microsoft is making good strides in making the journey to Open AI more accessible and this is just another step in the journey. If you are interested in making Open AI interact with your own data, make sure to check this video out. Azure SQL Database is helping to pave the way to smarter and better AI! &lt;div style=&#34;position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden;&#34;&gt;&#xA;      &lt;iframe allow=&#34;accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share&#34; loading=&#34;eager&#34; referrerpolicy=&#34;strict-origin-when-cross-origin&#34; src=&#34;https://www.youtube.com/embed/PcAKfg1yYOI?autoplay=0&amp;amp;controls=1&amp;amp;end=0&amp;amp;loop=0&amp;amp;mute=0&amp;amp;start=0&#34; style=&#34;position: absolute; top: 0; left: 0; width: 100%; height: 100%; border:0;&#34; title=&#34;YouTube video&#34;&gt;&lt;/iframe&gt;&#xA;    &lt;/div&gt;&#xA; Check it out and let me know what you think!&lt;/p&gt;&#xA;</description>
      <content:encoded>&lt;p&gt;AI and ChatGPT are all the rage these days.  Seems like around every corner is another break-through in how we interact with data, regardless of if that data is structured or un-structured.  In my latest video, I dive into implementing a Retrieval-Augmented Generation (RAG) solution using Azure SQL Database! This advancement in vectors and embedding allows me to use my own data in conjunction with Open AI Azure Services and certain language models to create chatbots that know my data. In the video I briefly talk about some of the components of a RAG Solution and discuss at a high level of how the architecture looks.  I walk through a quick demonstration on how it works to showcase the usefulness and to provide an example what you can do with your data.    Microsoft is making good strides in making the journey to Open AI more accessible and this is just another step in the journey. If you are interested in making Open AI interact with your own data, make sure to check this video out. Azure SQL Database is helping to pave the way to smarter and better AI! &lt;div style=&#34;position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden;&#34;&gt;&#xA;      &lt;iframe allow=&#34;accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share&#34; loading=&#34;eager&#34; referrerpolicy=&#34;strict-origin-when-cross-origin&#34; src=&#34;https://www.youtube.com/embed/PcAKfg1yYOI?autoplay=0&amp;amp;controls=1&amp;amp;end=0&amp;amp;loop=0&amp;amp;mute=0&amp;amp;start=0&#34; style=&#34;position: absolute; top: 0; left: 0; width: 100%; height: 100%; border:0;&#34; title=&#34;YouTube video&#34;&gt;&lt;/iframe&gt;&#xA;    &lt;/div&gt;&#xA; Check it out and let me know what you think!&lt;/p&gt;&#xA;</content:encoded>
    </item>
    <item>
      <title>Getting Started with Azure SQL Database - A Beginners Guide</title>
      <link>https://johnmorehouse.com/2024/09/getting-started-with-azure-sql-database-a-beginners-guide/</link>
      <pubDate>Tue, 24 Sep 2024 09:30:38 +0000</pubDate>
      <guid>https://johnmorehouse.com/2024/09/getting-started-with-azure-sql-database-a-beginners-guide/</guid>
      <description>&lt;p&gt;Years ago, I saw the wave of the future and that wave was Cloud.  The Cloud is not a fad and is not going away.  One of my favorite solutions is Azure SQL Database.  It&amp;rsquo;s flexibility, stability, and scalability make it a great solution for many organizations worldwide.   Recently I created a Beginners guide to Azure SQL Database.  In this quick 17-minute video I show you what is Azure SQL Database and go through some key offerings I think it brings to the table. &lt;div style=&#34;position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden;&#34;&gt;&#xA;      &lt;iframe allow=&#34;accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share&#34; loading=&#34;eager&#34; referrerpolicy=&#34;strict-origin-when-cross-origin&#34; src=&#34;https://www.youtube.com/embed/VybABqPwUNQ?autoplay=0&amp;amp;controls=1&amp;amp;end=0&amp;amp;loop=0&amp;amp;mute=0&amp;amp;start=0&#34; style=&#34;position: absolute; top: 0; left: 0; width: 100%; height: 100%; border:0;&#34; title=&#34;YouTube video&#34;&gt;&lt;/iframe&gt;&#xA;    &lt;/div&gt;&#xA; If you have not had an opportunity to explore Azure SQL Database, take a look at my video.  I&amp;rsquo;ll show you what you need to create one and then show you how it is done. Enjoy!&lt;/p&gt;&#xA;</description>
      <content:encoded>&lt;p&gt;Years ago, I saw the wave of the future and that wave was Cloud.  The Cloud is not a fad and is not going away.  One of my favorite solutions is Azure SQL Database.  It&amp;rsquo;s flexibility, stability, and scalability make it a great solution for many organizations worldwide.   Recently I created a Beginners guide to Azure SQL Database.  In this quick 17-minute video I show you what is Azure SQL Database and go through some key offerings I think it brings to the table. &lt;div style=&#34;position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden;&#34;&gt;&#xA;      &lt;iframe allow=&#34;accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share&#34; loading=&#34;eager&#34; referrerpolicy=&#34;strict-origin-when-cross-origin&#34; src=&#34;https://www.youtube.com/embed/VybABqPwUNQ?autoplay=0&amp;amp;controls=1&amp;amp;end=0&amp;amp;loop=0&amp;amp;mute=0&amp;amp;start=0&#34; style=&#34;position: absolute; top: 0; left: 0; width: 100%; height: 100%; border:0;&#34; title=&#34;YouTube video&#34;&gt;&lt;/iframe&gt;&#xA;    &lt;/div&gt;&#xA; If you have not had an opportunity to explore Azure SQL Database, take a look at my video.  I&amp;rsquo;ll show you what you need to create one and then show you how it is done. Enjoy!&lt;/p&gt;&#xA;</content:encoded>
    </item>
    <item>
      <title>I’m Speaking!</title>
      <link>https://johnmorehouse.com/2024/01/im-speaking/</link>
      <pubDate>Fri, 19 Jan 2024 15:32:53 +0000</pubDate>
      <guid>https://johnmorehouse.com/2024/01/im-speaking/</guid>
      <description>&lt;p&gt;After a long hiatus of not blogging, I’m trying to get back into writing.  So, to kick it off first thing in 2024, I’m speaking!&lt;/p&gt;&#xA;&lt;p&gt;I’m honored to have been selected to speak at &lt;a href=&#34;https://sqlbits.com&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;SQL Bits 2024&lt;/a&gt;.  The conference runs from Tuesday March 19th through Saturday March 23rd.  It’s being held at the &lt;a href=&#34;https://www.farnborough.com/&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;Farnbourough International Exhibition &amp;amp; Conference Center&lt;/a&gt; in Hampshire, UK.  h I’ll be traveling to London and will be giving 3 different sessions.  SQL Bits is a world-renowned conference that has been around for many years, and it is probably one of the biggest community driven events that you can attend.  If you can afford to attend, I highly recommend it.   It’s multiple days of Data-centric goodness and worth the expense.&lt;/p&gt;&#xA;&lt;p&gt;I’ve been fortunate to go previously and needless to say I’m very excited for the opportunity to do so again.&lt;/p&gt;&#xA;&lt;p&gt;First up, an all-day training session with my exceptional co-worker Monica Rathbun:&lt;/p&gt;&#xA;&lt;h3 class=&#34;content__title.h1&#34; id=&#34;mastering-sql-server-performance--optimization-strategies-training-day&#34;&gt;&lt;span style=&#34;text-decoration: underline;&#34;&gt;Mastering SQL Server Performance &amp;amp; Optimization Strategies (Training day)&lt;/span&gt;&lt;/h3&gt;&#xA;&lt;p&gt;In the pursuit of excellence, speed is the engine, and performance is the destination.&lt;/p&gt;&#xA;&lt;p&gt;Everyone wants their database to go faster, whether it’s shaving hours off your ETL process, taking minutes off the runtime for reports, or trimming milliseconds off a critical OLTP query. Every database professional must know where to look and how to tune, whether you have one SQL environment or thousands.&lt;/p&gt;&#xA;&lt;p&gt;In this full-day session, you’ll learn how to take your performance tuning skills to the next level. How to best configure SQL Server as well as how to decipher all metrics it collects can be daunting. Identifying how to distill the data down to actionable information is an integral part of a DBA’s job. After this session, you will understand what to look for, how to analyze the data, and you will know how to use an array of tools including query store, performance monitor, and various scripts to get the critical performance information you need. Beyond tools and scripts, you’ll become versed in the art and science of reading query plans to help you improve individual query performance. Finally, you’ll learn about the newest performance enhancements within SQL Server 2022 and Azure SQL.&lt;/p&gt;&#xA;&lt;p&gt;You’ll leave this knowledge packed session with a clearer understanding of which items to evaluate and how to resolve many issues that plague SQL Server performance.&lt;/p&gt;&#xA;&lt;h3 id=&#34;thwarting-disaster-for-sql-server-on-azure-vm-100-minute-session&#34;&gt;&lt;span style=&#34;text-decoration: underline;&#34;&gt;Thwarting Disaster for SQL Server on Azure VM (100-minute session)&lt;/span&gt;&lt;/h3&gt;&#xA;&lt;p&gt;Failing to plan is planning to fail.&lt;/p&gt;&#xA;&lt;p&gt;Azure offers a robust ecosystem where you can run SQL Server pretty effortlessly. Yet, disasters affect data centers, even ones belonging to Microsoft. Natural events, like tornadoes or hurricanes, can cause entire data centers to be lost. Even human error, like a heavy equipment operator cutting the power to a data center by mistake, can only cause an entire outage if you do not take steps to protect it.&lt;/p&gt;&#xA;&lt;p&gt;Several options are available to ensure disaster recovery when running SQL Server on an Azure Virtual Machine. Sometimes it can be challenging to determine which option is the best for your use case and fit into your organization’s grand scheme. In this session, we’ll walk through some available options so that you can see first-hand the benefits and pitfalls of each one.&lt;/p&gt;&#xA;&lt;p&gt;You will –&lt;br&gt;&#xA;• Learn about the various options available for your Azure VM running SQL Server&lt;br&gt;&#xA;• See where shortcomings may exist in each solution&lt;br&gt;&#xA;• Leave with a solid idea of what would work best for your environment&lt;/p&gt;&#xA;&lt;p&gt;Disaster recovery is vital in Azure. Let’s ensure you’ve everything in place to recover successfully, regardless of what comes your way.&lt;/p&gt;&#xA;&lt;h3 id=&#34;soaring-to-new-heights-with-accelerated-database-recovery-50-minute-session&#34;&gt;&lt;span style=&#34;text-decoration: underline;&#34;&gt;Soaring to New Heights with Accelerated Database Recovery (50-minute Session)&lt;/span&gt;&lt;/h3&gt;&#xA;&lt;p&gt;In the realm of database management, traditional rollback processes often resemble a slow, turbulent journey, causing disruptions and delays in critical operations. However, advancements in SQL Server have introduced a revolutionary concept known as Accelerated Database Recovery (ADR). Much like the sophisticated instruments and systems that keep aircraft flying smoothly, ADR introduces new mechanisms that improve database recovery performance, reducing downtime and minimizing the impact of database failures.&lt;/p&gt;&#xA;&lt;p&gt;In this session you will –&lt;br&gt;&#xA;• See what makes accelerated database recovery soar&lt;br&gt;&#xA;• Examine internal structures of ADR&lt;br&gt;&#xA;• Learn about the improvements that SQL Server 2022 brings to the table&lt;/p&gt;&#xA;&lt;p&gt;ADR offers a paradigm shift in SQL Server database recovery, allowing databases to soar to new heights of reliability and resilience while minimizing the turbulence of traditional recovery methods.&lt;/p&gt;&#xA;&lt;h3 id=&#34;azure-infrastructure--what-not-to-do-20-minute-session&#34;&gt;&lt;span style=&#34;text-decoration: underline;&#34;&gt;Azure Infrastructure – What Not To Do (20-minute session)&lt;/span&gt;&lt;/h3&gt;&#xA;&lt;p&gt;In a quick 20 minutes, we will talk about what not to do when configure your infrastructure in an Azure cloud environment. Learn from my experience as a consultant and all the things I’ve seen go wrong. Join me as we walk through a few “what not to do” things related to security, storage, and manageability, and more just to name few!&lt;/p&gt;&#xA;&lt;h3 id=&#34;summary&#34;&gt;&lt;span style=&#34;text-decoration: underline;&#34;&gt;Summary&lt;/span&gt;&lt;/h3&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://sqlbits.com&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;SQLBits&lt;/a&gt; is an amazing conference and if you can find a way to attend, it is definitely one that is in my list of top 5 conferences to attend.  If you are able to make it, please stop by one of my sessions and say Hi!&lt;/p&gt;&#xA;&lt;p&gt;See you in London!&lt;/p&gt;&#xA;</description>
      <content:encoded>&lt;p&gt;After a long hiatus of not blogging, I’m trying to get back into writing.  So, to kick it off first thing in 2024, I’m speaking!&lt;/p&gt;&#xA;&lt;p&gt;I’m honored to have been selected to speak at &lt;a href=&#34;https://sqlbits.com&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;SQL Bits 2024&lt;/a&gt;.  The conference runs from Tuesday March 19th through Saturday March 23rd.  It’s being held at the &lt;a href=&#34;https://www.farnborough.com/&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;Farnbourough International Exhibition &amp;amp; Conference Center&lt;/a&gt; in Hampshire, UK.  h I’ll be traveling to London and will be giving 3 different sessions.  SQL Bits is a world-renowned conference that has been around for many years, and it is probably one of the biggest community driven events that you can attend.  If you can afford to attend, I highly recommend it.   It’s multiple days of Data-centric goodness and worth the expense.&lt;/p&gt;&#xA;&lt;p&gt;I’ve been fortunate to go previously and needless to say I’m very excited for the opportunity to do so again.&lt;/p&gt;&#xA;&lt;p&gt;First up, an all-day training session with my exceptional co-worker Monica Rathbun:&lt;/p&gt;&#xA;&lt;h3 class=&#34;content__title.h1&#34; id=&#34;mastering-sql-server-performance--optimization-strategies-training-day&#34;&gt;&lt;span style=&#34;text-decoration: underline;&#34;&gt;Mastering SQL Server Performance &amp;amp; Optimization Strategies (Training day)&lt;/span&gt;&lt;/h3&gt;&#xA;&lt;p&gt;In the pursuit of excellence, speed is the engine, and performance is the destination.&lt;/p&gt;&#xA;&lt;p&gt;Everyone wants their database to go faster, whether it’s shaving hours off your ETL process, taking minutes off the runtime for reports, or trimming milliseconds off a critical OLTP query. Every database professional must know where to look and how to tune, whether you have one SQL environment or thousands.&lt;/p&gt;&#xA;&lt;p&gt;In this full-day session, you’ll learn how to take your performance tuning skills to the next level. How to best configure SQL Server as well as how to decipher all metrics it collects can be daunting. Identifying how to distill the data down to actionable information is an integral part of a DBA’s job. After this session, you will understand what to look for, how to analyze the data, and you will know how to use an array of tools including query store, performance monitor, and various scripts to get the critical performance information you need. Beyond tools and scripts, you’ll become versed in the art and science of reading query plans to help you improve individual query performance. Finally, you’ll learn about the newest performance enhancements within SQL Server 2022 and Azure SQL.&lt;/p&gt;&#xA;&lt;p&gt;You’ll leave this knowledge packed session with a clearer understanding of which items to evaluate and how to resolve many issues that plague SQL Server performance.&lt;/p&gt;&#xA;&lt;h3 id=&#34;thwarting-disaster-for-sql-server-on-azure-vm-100-minute-session&#34;&gt;&lt;span style=&#34;text-decoration: underline;&#34;&gt;Thwarting Disaster for SQL Server on Azure VM (100-minute session)&lt;/span&gt;&lt;/h3&gt;&#xA;&lt;p&gt;Failing to plan is planning to fail.&lt;/p&gt;&#xA;&lt;p&gt;Azure offers a robust ecosystem where you can run SQL Server pretty effortlessly. Yet, disasters affect data centers, even ones belonging to Microsoft. Natural events, like tornadoes or hurricanes, can cause entire data centers to be lost. Even human error, like a heavy equipment operator cutting the power to a data center by mistake, can only cause an entire outage if you do not take steps to protect it.&lt;/p&gt;&#xA;&lt;p&gt;Several options are available to ensure disaster recovery when running SQL Server on an Azure Virtual Machine. Sometimes it can be challenging to determine which option is the best for your use case and fit into your organization’s grand scheme. In this session, we’ll walk through some available options so that you can see first-hand the benefits and pitfalls of each one.&lt;/p&gt;&#xA;&lt;p&gt;You will –&lt;br&gt;&#xA;• Learn about the various options available for your Azure VM running SQL Server&lt;br&gt;&#xA;• See where shortcomings may exist in each solution&lt;br&gt;&#xA;• Leave with a solid idea of what would work best for your environment&lt;/p&gt;&#xA;&lt;p&gt;Disaster recovery is vital in Azure. Let’s ensure you’ve everything in place to recover successfully, regardless of what comes your way.&lt;/p&gt;&#xA;&lt;h3 id=&#34;soaring-to-new-heights-with-accelerated-database-recovery-50-minute-session&#34;&gt;&lt;span style=&#34;text-decoration: underline;&#34;&gt;Soaring to New Heights with Accelerated Database Recovery (50-minute Session)&lt;/span&gt;&lt;/h3&gt;&#xA;&lt;p&gt;In the realm of database management, traditional rollback processes often resemble a slow, turbulent journey, causing disruptions and delays in critical operations. However, advancements in SQL Server have introduced a revolutionary concept known as Accelerated Database Recovery (ADR). Much like the sophisticated instruments and systems that keep aircraft flying smoothly, ADR introduces new mechanisms that improve database recovery performance, reducing downtime and minimizing the impact of database failures.&lt;/p&gt;&#xA;&lt;p&gt;In this session you will –&lt;br&gt;&#xA;• See what makes accelerated database recovery soar&lt;br&gt;&#xA;• Examine internal structures of ADR&lt;br&gt;&#xA;• Learn about the improvements that SQL Server 2022 brings to the table&lt;/p&gt;&#xA;&lt;p&gt;ADR offers a paradigm shift in SQL Server database recovery, allowing databases to soar to new heights of reliability and resilience while minimizing the turbulence of traditional recovery methods.&lt;/p&gt;&#xA;&lt;h3 id=&#34;azure-infrastructure--what-not-to-do-20-minute-session&#34;&gt;&lt;span style=&#34;text-decoration: underline;&#34;&gt;Azure Infrastructure – What Not To Do (20-minute session)&lt;/span&gt;&lt;/h3&gt;&#xA;&lt;p&gt;In a quick 20 minutes, we will talk about what not to do when configure your infrastructure in an Azure cloud environment. Learn from my experience as a consultant and all the things I’ve seen go wrong. Join me as we walk through a few “what not to do” things related to security, storage, and manageability, and more just to name few!&lt;/p&gt;&#xA;&lt;h3 id=&#34;summary&#34;&gt;&lt;span style=&#34;text-decoration: underline;&#34;&gt;Summary&lt;/span&gt;&lt;/h3&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://sqlbits.com&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;SQLBits&lt;/a&gt; is an amazing conference and if you can find a way to attend, it is definitely one that is in my list of top 5 conferences to attend.  If you are able to make it, please stop by one of my sessions and say Hi!&lt;/p&gt;&#xA;&lt;p&gt;See you in London!&lt;/p&gt;&#xA;</content:encoded>
    </item>
    <item>
      <title>Deploying VMWare into Azure</title>
      <link>https://johnmorehouse.com/2023/12/deploying-vmware-into-azure/</link>
      <pubDate>Fri, 29 Dec 2023 14:44:49 +0000</pubDate>
      <guid>https://johnmorehouse.com/2023/12/deploying-vmware-into-azure/</guid>
      <description>&lt;p&gt;Did you know that you can deploy native VMWare virtual machines into Azure?&lt;/p&gt;&#xA;&lt;p&gt;Yeah, I didn’t either until earlier this month.&lt;/p&gt;&#xA;&lt;h3 id=&#34;expanding-vmware&#34;&gt;&lt;span style=&#34;text-decoration: underline;&#34;&gt;Expanding VMWare&lt;/span&gt;&lt;/h3&gt;&#xA;&lt;p&gt;If you are running VMware current in your on-premises, this solution would allow you to create a VMware cluster using dedicated Azure resources.  These resources are based on hyper-converged infrastructure (HCI) which could introduce other issues.  In my experience, HCI implementations leave some things to left to be desired and I have seen issues in both overall performance as well as ease of scalability in other HCI implementations.&lt;/p&gt;&#xA;&lt;p&gt;However, even with that being said, I think that the idea of natively extending your on-premises implementation of VMware into a cloud platform is on that should be at least looked at to see if it solves any business needs.&lt;/p&gt;&#xA;&lt;h3 id=&#34;architecture&#34;&gt;&lt;span style=&#34;text-decoration: underline;&#34;&gt;Architecture&lt;/span&gt;&lt;/h3&gt;&#xA;&lt;p&gt;The overall architecture appears to be fairly straight forward.  In a nutshell, you stand up a VMware cluster within the Azure cloud, which ultimately lands within a private cloud.  Using an ExpressRoute to Azure, you can connect your on-premises VMware implementation to the new hosts and essentially extend your landscape directly into Azure without having to worry about compatibility issues.  On the Azure side, it is running VMware natively.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://johnmorehouse.com/images/2024/01/adjacency-overview-drawing-final.png&#34;&gt;&lt;img data-recalc-dims=&#34;1&#34; loading=&#34;lazy&#34; decoding=&#34;async&#34; class=&#34;aligncenter size-large wp-image-13239&#34; src=&#34;https://johnmorehouse.com/images/2024/01/adjacency-overview-drawing-final.png&#34; alt=&#34;&#34; width=&#34;640&#34; height=&#34;304&#34; srcset=&#34;https://johnmorehouse.com/images/2024/01/adjacency-overview-drawing-final.png 1024w, https://johnmorehouse.com/images/2024/01/adjacency-overview-drawing-final.png 300w, https://johnmorehouse.com/images/2024/01/adjacency-overview-drawing-final.png 768w, https://johnmorehouse.com/images/2024/01/adjacency-overview-drawing-final.png 1225w&#34; sizes=&#34;auto, (max-width: 640px) 100vw, 640px&#34; /&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;hardware&#34;&gt;&lt;span style=&#34;text-decoration: underline;&#34;&gt;Hardware&lt;/span&gt;&lt;/h3&gt;&#xA;&lt;p&gt;This solution requires a minimum of three (3) hosts to implement.   This ensures appropriate redundancy across fault domains in the event of a failure.  All three hosts must be of the same type and in looking at the overall hardware specs from documentation, the hosts themselves are not small thus probably not cheap.   You can have up to 16 hosts per VMware cluster so there is room to expand the cluster if necessary.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://johnmorehouse.com/images/2024/01/2024-01-18_08-50-52.png&#34;&gt;&lt;img data-recalc-dims=&#34;1&#34; loading=&#34;lazy&#34; decoding=&#34;async&#34; class=&#34;aligncenter size-full wp-image-13238&#34; src=&#34;https://johnmorehouse.com/images/2024/01/2024-01-18_08-50-52.png&#34; alt=&#34;&#34; width=&#34;640&#34; height=&#34;397&#34; srcset=&#34;https://johnmorehouse.com/images/2024/01/2024-01-18_08-50-52.png 850w, https://johnmorehouse.com/images/2024/01/2024-01-18_08-50-52.png 300w, https://johnmorehouse.com/images/2024/01/2024-01-18_08-50-52.png 768w&#34; sizes=&#34;auto, (max-width: 640px) 100vw, 640px&#34; /&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;summary&#34;&gt;&lt;span style=&#34;text-decoration: underline;&#34;&gt;Summary&lt;/span&gt;&lt;/h3&gt;&#xA;&lt;p&gt;In this post I introduced a high-level look at the Azure VMware Solution.  If you are running VMware on-premises and are looking for a cloud way to extend things, take a look at the &lt;a href=&#34;https://learn.microsoft.com/en-us/azure/azure-vmware/&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;Microsoft Azure VMware Solution&lt;/a&gt; to see if it fits your needs.  While I’m a very large proponent of the cloud, albeit usually Azure, the cloud is not the end all solution for everything.  Make sure you evaluate all the aspects of any implementation carefully to ensure the solution meets all of the requirements.&lt;/p&gt;&#xA;</description>
      <content:encoded>&lt;p&gt;Did you know that you can deploy native VMWare virtual machines into Azure?&lt;/p&gt;&#xA;&lt;p&gt;Yeah, I didn’t either until earlier this month.&lt;/p&gt;&#xA;&lt;h3 id=&#34;expanding-vmware&#34;&gt;&lt;span style=&#34;text-decoration: underline;&#34;&gt;Expanding VMWare&lt;/span&gt;&lt;/h3&gt;&#xA;&lt;p&gt;If you are running VMware current in your on-premises, this solution would allow you to create a VMware cluster using dedicated Azure resources.  These resources are based on hyper-converged infrastructure (HCI) which could introduce other issues.  In my experience, HCI implementations leave some things to left to be desired and I have seen issues in both overall performance as well as ease of scalability in other HCI implementations.&lt;/p&gt;&#xA;&lt;p&gt;However, even with that being said, I think that the idea of natively extending your on-premises implementation of VMware into a cloud platform is on that should be at least looked at to see if it solves any business needs.&lt;/p&gt;&#xA;&lt;h3 id=&#34;architecture&#34;&gt;&lt;span style=&#34;text-decoration: underline;&#34;&gt;Architecture&lt;/span&gt;&lt;/h3&gt;&#xA;&lt;p&gt;The overall architecture appears to be fairly straight forward.  In a nutshell, you stand up a VMware cluster within the Azure cloud, which ultimately lands within a private cloud.  Using an ExpressRoute to Azure, you can connect your on-premises VMware implementation to the new hosts and essentially extend your landscape directly into Azure without having to worry about compatibility issues.  On the Azure side, it is running VMware natively.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://johnmorehouse.com/images/2024/01/adjacency-overview-drawing-final.png&#34;&gt;&lt;img data-recalc-dims=&#34;1&#34; loading=&#34;lazy&#34; decoding=&#34;async&#34; class=&#34;aligncenter size-large wp-image-13239&#34; src=&#34;https://johnmorehouse.com/images/2024/01/adjacency-overview-drawing-final.png&#34; alt=&#34;&#34; width=&#34;640&#34; height=&#34;304&#34; srcset=&#34;https://johnmorehouse.com/images/2024/01/adjacency-overview-drawing-final.png 1024w, https://johnmorehouse.com/images/2024/01/adjacency-overview-drawing-final.png 300w, https://johnmorehouse.com/images/2024/01/adjacency-overview-drawing-final.png 768w, https://johnmorehouse.com/images/2024/01/adjacency-overview-drawing-final.png 1225w&#34; sizes=&#34;auto, (max-width: 640px) 100vw, 640px&#34; /&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;hardware&#34;&gt;&lt;span style=&#34;text-decoration: underline;&#34;&gt;Hardware&lt;/span&gt;&lt;/h3&gt;&#xA;&lt;p&gt;This solution requires a minimum of three (3) hosts to implement.   This ensures appropriate redundancy across fault domains in the event of a failure.  All three hosts must be of the same type and in looking at the overall hardware specs from documentation, the hosts themselves are not small thus probably not cheap.   You can have up to 16 hosts per VMware cluster so there is room to expand the cluster if necessary.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://johnmorehouse.com/images/2024/01/2024-01-18_08-50-52.png&#34;&gt;&lt;img data-recalc-dims=&#34;1&#34; loading=&#34;lazy&#34; decoding=&#34;async&#34; class=&#34;aligncenter size-full wp-image-13238&#34; src=&#34;https://johnmorehouse.com/images/2024/01/2024-01-18_08-50-52.png&#34; alt=&#34;&#34; width=&#34;640&#34; height=&#34;397&#34; srcset=&#34;https://johnmorehouse.com/images/2024/01/2024-01-18_08-50-52.png 850w, https://johnmorehouse.com/images/2024/01/2024-01-18_08-50-52.png 300w, https://johnmorehouse.com/images/2024/01/2024-01-18_08-50-52.png 768w&#34; sizes=&#34;auto, (max-width: 640px) 100vw, 640px&#34; /&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;summary&#34;&gt;&lt;span style=&#34;text-decoration: underline;&#34;&gt;Summary&lt;/span&gt;&lt;/h3&gt;&#xA;&lt;p&gt;In this post I introduced a high-level look at the Azure VMware Solution.  If you are running VMware on-premises and are looking for a cloud way to extend things, take a look at the &lt;a href=&#34;https://learn.microsoft.com/en-us/azure/azure-vmware/&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;Microsoft Azure VMware Solution&lt;/a&gt; to see if it fits your needs.  While I’m a very large proponent of the cloud, albeit usually Azure, the cloud is not the end all solution for everything.  Make sure you evaluate all the aspects of any implementation carefully to ensure the solution meets all of the requirements.&lt;/p&gt;&#xA;</content:encoded>
    </item>
    <item>
      <title>Accounting for Virtualization Head Room</title>
      <link>https://johnmorehouse.com/2023/12/accounting-for-virtualization-head-room/</link>
      <pubDate>Thu, 07 Dec 2023 20:08:54 +0000</pubDate>
      <guid>https://johnmorehouse.com/2023/12/accounting-for-virtualization-head-room/</guid>
      <description>&lt;p&gt;While the cloud is not a fad, clients continue to operate within a physical data center.   I’ve often said that the cloud isn’t for everybody so there are valid reasons to stay in the data centers rather than moving to a cloud platform of your choice.  However, if you are planning on expanding your environment to include a better virtualization foundation, regardless of the underlying hypervisor, make sure that you do not forget to allow additional resources.&lt;/p&gt;&#xA;&lt;h3 id=&#34;business-headroom&#34;&gt;&lt;span style=&#34;text-decoration: underline;&#34;&gt;Business Headroom&lt;/span&gt;&lt;/h3&gt;&#xA;&lt;p&gt;Organizations typically grow 20% year to year in compute needs.  This means as time marches forward organizations need to have the ability expand their current infrastructure to accommodate for that growth.  If that growth isn’t accounted for, additional hardware purchases will be in the near future.  This becomes costly.&lt;/p&gt;&#xA;&lt;p&gt;If you are gathering requirements for a new hardware purchase, make sure to pad the final numbers by at least 10% if not 20%.  This will help to ensure that the new hardware has much needed room to accommodate your business as it grows.&lt;/p&gt;&#xA;&lt;h3 id=&#34;host-headroom&#34;&gt;&lt;span style=&#34;text-decoration: underline;&#34;&gt;Host Headroom&lt;/span&gt;&lt;/h3&gt;&#xA;&lt;p&gt;Did you make sure to account for additional head room on the host itself?  If your business is going to grow 20%, the physical host running your hypervisor might be tapped out of resources right out of the gate.   Just as you need to leave enough head space for the business to grow, the individual host machines need room to grow as well.   If you don’t, you’ll be right back purchasing new hardware.&lt;/p&gt;&#xA;&lt;h3 id=&#34;hadr-headroom&#34;&gt;&lt;span style=&#34;text-decoration: underline;&#34;&gt;HA/DR Headroom&lt;/span&gt;&lt;/h3&gt;&#xA;&lt;p&gt;Anytime an organization is looking to purchase new hardware, it is the optimal time to examine the current state of both high availability and disaster recovery.   Depending on how HA/DR is defined for the organization as well as its current implementation can alter the budget for the new hardware.  For example, if you are running SQL Server, any true high availability solution requires at least two individual machines (virtual or physical).  Technically, one of those machines could reside in another data center or a cloud platform depending on business requirements and other items such as network latency.  If the cloud isn’t an option, then both of those machines have to reside within the physical data center, which consume more resources.  The same holds true for a disaster recovery scenario, although Dr is easier accomplished with less intrusive solution such as log shipping off-site.  Whether the secondary machine is in a data center or the cloud, hardware resources have to be accounted for and budgeted.&lt;/p&gt;&#xA;&lt;p&gt;Planning any type of move that includes new hardware or new HA/DR solutions needs to be carefully architected.  Virtualization helps with a number of issues, however, if you forget to account for all of the solution components, it could be difficult to recover.&lt;/p&gt;&#xA;</description>
      <content:encoded>&lt;p&gt;While the cloud is not a fad, clients continue to operate within a physical data center.   I’ve often said that the cloud isn’t for everybody so there are valid reasons to stay in the data centers rather than moving to a cloud platform of your choice.  However, if you are planning on expanding your environment to include a better virtualization foundation, regardless of the underlying hypervisor, make sure that you do not forget to allow additional resources.&lt;/p&gt;&#xA;&lt;h3 id=&#34;business-headroom&#34;&gt;&lt;span style=&#34;text-decoration: underline;&#34;&gt;Business Headroom&lt;/span&gt;&lt;/h3&gt;&#xA;&lt;p&gt;Organizations typically grow 20% year to year in compute needs.  This means as time marches forward organizations need to have the ability expand their current infrastructure to accommodate for that growth.  If that growth isn’t accounted for, additional hardware purchases will be in the near future.  This becomes costly.&lt;/p&gt;&#xA;&lt;p&gt;If you are gathering requirements for a new hardware purchase, make sure to pad the final numbers by at least 10% if not 20%.  This will help to ensure that the new hardware has much needed room to accommodate your business as it grows.&lt;/p&gt;&#xA;&lt;h3 id=&#34;host-headroom&#34;&gt;&lt;span style=&#34;text-decoration: underline;&#34;&gt;Host Headroom&lt;/span&gt;&lt;/h3&gt;&#xA;&lt;p&gt;Did you make sure to account for additional head room on the host itself?  If your business is going to grow 20%, the physical host running your hypervisor might be tapped out of resources right out of the gate.   Just as you need to leave enough head space for the business to grow, the individual host machines need room to grow as well.   If you don’t, you’ll be right back purchasing new hardware.&lt;/p&gt;&#xA;&lt;h3 id=&#34;hadr-headroom&#34;&gt;&lt;span style=&#34;text-decoration: underline;&#34;&gt;HA/DR Headroom&lt;/span&gt;&lt;/h3&gt;&#xA;&lt;p&gt;Anytime an organization is looking to purchase new hardware, it is the optimal time to examine the current state of both high availability and disaster recovery.   Depending on how HA/DR is defined for the organization as well as its current implementation can alter the budget for the new hardware.  For example, if you are running SQL Server, any true high availability solution requires at least two individual machines (virtual or physical).  Technically, one of those machines could reside in another data center or a cloud platform depending on business requirements and other items such as network latency.  If the cloud isn’t an option, then both of those machines have to reside within the physical data center, which consume more resources.  The same holds true for a disaster recovery scenario, although Dr is easier accomplished with less intrusive solution such as log shipping off-site.  Whether the secondary machine is in a data center or the cloud, hardware resources have to be accounted for and budgeted.&lt;/p&gt;&#xA;&lt;p&gt;Planning any type of move that includes new hardware or new HA/DR solutions needs to be carefully architected.  Virtualization helps with a number of issues, however, if you forget to account for all of the solution components, it could be difficult to recover.&lt;/p&gt;&#xA;</content:encoded>
    </item>
    <item>
      <title>Hot Adding CPU to SQL Server</title>
      <link>https://johnmorehouse.com/2022/12/hot-adding-cpu-to-sql-server/</link>
      <pubDate>Fri, 09 Dec 2022 15:15:43 +0000</pubDate>
      <guid>https://johnmorehouse.com/2022/12/hot-adding-cpu-to-sql-server/</guid>
      <description>&lt;p&gt;Sometimes what you have just isn’t enough to get the job done.&lt;/p&gt;&#xA;&lt;p&gt;In certain workloads, having additional CPU might be beneficial for the immediate workload, especially when discussing SQL Server.  In the old days, dynamcially adding more CPU horsepower wasn’t an option unless you magically had another physical server with more CPU readily available.  With the evolvement of virtualization, this is much easier and even more easier within the cloud space. In the cloud, it’s a simple restart of the virtual machine to acquire additional compute resources, both CPU and memory.&lt;/p&gt;&#xA;&lt;p&gt;If you happen to be running a virtual hypervisor on-premises, such as VMWare ESXi, you can configure your virtual machines to “hot add” CPU.  Hot adding CPU essentially is adding additional CPU resources without having to restart the virtual machine or even shutting it down.  You can add the resources in-flight and as long as the operating system and subsequent applications can handle it, there aren’t any issues.  Most modern day operating systems should be able to handle this and SQL Server has been able to handle this for some time now.  The change is relatively seamless to the downstream consumer.&lt;/p&gt;&#xA;&lt;p&gt;One caveat is that the option to hot-add CPU must be either configured when the VM was initially created or you must shut the VM down to enable that feature.  Once it’s enabled, you can restart the VM and then hot-add CPU whenever needed.&lt;/p&gt;&#xA;&lt;p&gt;Let’s take a look at the steps.  I have a virtual machine running on our lab environment which is running on VMWare and I am going to “hot add” CPU to the VM.  It was originally running 1 socket with 4 cores and I’ll update it to run 1 socket but with 6 cores.  I have also installed SQL Server 2022 Developer.&lt;/p&gt;&#xA;&lt;p&gt;In the VM configuration, expand the CPU section.  Change 4 to 6 and then click Ok.  Its that simple.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://johnmorehouse.com/images/2022/12/vmware_hotadd_2.png&#34;&gt;&lt;img data-recalc-dims=&#34;1&#34; loading=&#34;lazy&#34; decoding=&#34;async&#34; class=&#34;aligncenter wp-image-11156&#34; src=&#34;https://johnmorehouse.com/images/2022/12/vmware_hotadd_2.png&#34; alt=&#34;&#34; width=&#34;543&#34; height=&#34;315&#34; srcset=&#34;https://johnmorehouse.com/images/2022/12/vmware_hotadd_2.png 1024w, https://johnmorehouse.com/images/2022/12/vmware_hotadd_2.png 300w, https://johnmorehouse.com/images/2022/12/vmware_hotadd_2.png 768w, https://johnmorehouse.com/images/2022/12/vmware_hotadd_2.png 380w, https://johnmorehouse.com/images/2022/12/vmware_hotadd_2.png 1302w&#34; sizes=&#34;auto, (max-width: 543px) 100vw, 543px&#34; /&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;Another thing to note is that you cannot change the socket count.  You can only add additional cores to the existing socket.  In order to change the socket count you would need to shut the virtual machine down first.&lt;/p&gt;&#xA;&lt;p&gt;Once back into a console session, we can examine the effects (if any) of adding additional CPU for SQL Server.  First, let’s check the error log.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://johnmorehouse.com/images/2022/12/vmware_hotadd_1.png&#34;&gt;&lt;img data-recalc-dims=&#34;1&#34; loading=&#34;lazy&#34; decoding=&#34;async&#34; class=&#34;aligncenter size-large wp-image-11157&#34; src=&#34;https://johnmorehouse.com/images/2022/12/vmware_hotadd_1.png&#34; alt=&#34;&#34; width=&#34;640&#34; height=&#34;83&#34; srcset=&#34;https://johnmorehouse.com/images/2022/12/vmware_hotadd_1.png 1024w, https://johnmorehouse.com/images/2022/12/vmware_hotadd_1.png 300w, https://johnmorehouse.com/images/2022/12/vmware_hotadd_1.png 768w, https://johnmorehouse.com/images/2022/12/vmware_hotadd_1.png 1322w&#34; sizes=&#34;auto, (max-width: 640px) 100vw, 640px&#34; /&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;As you can see from the log, SQL Server quickly recognized the additional 2 CPU’s and did not throw any errors.  If we examine the schedulers within SQL, first we need to tell SQL Server to reconfigure so that it will recongize the new cores.&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-sql&#34; data-lang=&#34;sql&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;RECONFIGURE&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;GO&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Once that is done, we can look into the DMV sys.dm_os_schedulers to see if they were added.&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-sql&#34; data-lang=&#34;sql&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;SELECT&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;*&lt;/span&gt; &lt;span style=&#34;color:#66d9ef&#34;&gt;FROM&lt;/span&gt; sys.dm_os_schedulers&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;GO&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&lt;a href=&#34;https://johnmorehouse.com/images/2022/12/vmware_hotadd_3.png&#34;&gt;&lt;img data-recalc-dims=&#34;1&#34; loading=&#34;lazy&#34; decoding=&#34;async&#34; class=&#34;aligncenter size-large wp-image-11158&#34; src=&#34;https://johnmorehouse.com/images/2022/12/vmware_hotadd_3.png&#34; alt=&#34;&#34; width=&#34;640&#34; height=&#34;342&#34; srcset=&#34;https://johnmorehouse.com/images/2022/12/vmware_hotadd_3.png 1024w, https://johnmorehouse.com/images/2022/12/vmware_hotadd_3.png 300w, https://johnmorehouse.com/images/2022/12/vmware_hotadd_3.png 768w, https://johnmorehouse.com/images/2022/12/vmware_hotadd_3.png 1100w&#34; sizes=&#34;auto, (max-width: 640px) 100vw, 640px&#34; /&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;You can see that schedulers 4 and 5 are now visible and online and were hot added.  They will remain in this status until the SQL Server instance is restarted.  Once restarted, they will then shift to just being visible online.&lt;/p&gt;&#xA;&lt;h3 id=&#34;summary&#34;&gt;&lt;span style=&#34;text-decoration: underline;&#34;&gt;Summary &lt;/span&gt;&lt;/h3&gt;&#xA;&lt;p&gt;In this post I discussed how SQL Server will react to hot adding CPU to a given virtual machine.  The only real caveat that I can think of is that by doing so is that you run the risk of over provisioning the hypervisor, which can cause issues long term.  If you are going to enable the ability to hot add CPU, make sure you are well aware as to what other VMs are consuming to prevent CPU issues.&lt;/p&gt;&#xA;</description>
      <content:encoded>&lt;p&gt;Sometimes what you have just isn’t enough to get the job done.&lt;/p&gt;&#xA;&lt;p&gt;In certain workloads, having additional CPU might be beneficial for the immediate workload, especially when discussing SQL Server.  In the old days, dynamcially adding more CPU horsepower wasn’t an option unless you magically had another physical server with more CPU readily available.  With the evolvement of virtualization, this is much easier and even more easier within the cloud space. In the cloud, it’s a simple restart of the virtual machine to acquire additional compute resources, both CPU and memory.&lt;/p&gt;&#xA;&lt;p&gt;If you happen to be running a virtual hypervisor on-premises, such as VMWare ESXi, you can configure your virtual machines to “hot add” CPU.  Hot adding CPU essentially is adding additional CPU resources without having to restart the virtual machine or even shutting it down.  You can add the resources in-flight and as long as the operating system and subsequent applications can handle it, there aren’t any issues.  Most modern day operating systems should be able to handle this and SQL Server has been able to handle this for some time now.  The change is relatively seamless to the downstream consumer.&lt;/p&gt;&#xA;&lt;p&gt;One caveat is that the option to hot-add CPU must be either configured when the VM was initially created or you must shut the VM down to enable that feature.  Once it’s enabled, you can restart the VM and then hot-add CPU whenever needed.&lt;/p&gt;&#xA;&lt;p&gt;Let’s take a look at the steps.  I have a virtual machine running on our lab environment which is running on VMWare and I am going to “hot add” CPU to the VM.  It was originally running 1 socket with 4 cores and I’ll update it to run 1 socket but with 6 cores.  I have also installed SQL Server 2022 Developer.&lt;/p&gt;&#xA;&lt;p&gt;In the VM configuration, expand the CPU section.  Change 4 to 6 and then click Ok.  Its that simple.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://johnmorehouse.com/images/2022/12/vmware_hotadd_2.png&#34;&gt;&lt;img data-recalc-dims=&#34;1&#34; loading=&#34;lazy&#34; decoding=&#34;async&#34; class=&#34;aligncenter wp-image-11156&#34; src=&#34;https://johnmorehouse.com/images/2022/12/vmware_hotadd_2.png&#34; alt=&#34;&#34; width=&#34;543&#34; height=&#34;315&#34; srcset=&#34;https://johnmorehouse.com/images/2022/12/vmware_hotadd_2.png 1024w, https://johnmorehouse.com/images/2022/12/vmware_hotadd_2.png 300w, https://johnmorehouse.com/images/2022/12/vmware_hotadd_2.png 768w, https://johnmorehouse.com/images/2022/12/vmware_hotadd_2.png 380w, https://johnmorehouse.com/images/2022/12/vmware_hotadd_2.png 1302w&#34; sizes=&#34;auto, (max-width: 543px) 100vw, 543px&#34; /&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;Another thing to note is that you cannot change the socket count.  You can only add additional cores to the existing socket.  In order to change the socket count you would need to shut the virtual machine down first.&lt;/p&gt;&#xA;&lt;p&gt;Once back into a console session, we can examine the effects (if any) of adding additional CPU for SQL Server.  First, let’s check the error log.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://johnmorehouse.com/images/2022/12/vmware_hotadd_1.png&#34;&gt;&lt;img data-recalc-dims=&#34;1&#34; loading=&#34;lazy&#34; decoding=&#34;async&#34; class=&#34;aligncenter size-large wp-image-11157&#34; src=&#34;https://johnmorehouse.com/images/2022/12/vmware_hotadd_1.png&#34; alt=&#34;&#34; width=&#34;640&#34; height=&#34;83&#34; srcset=&#34;https://johnmorehouse.com/images/2022/12/vmware_hotadd_1.png 1024w, https://johnmorehouse.com/images/2022/12/vmware_hotadd_1.png 300w, https://johnmorehouse.com/images/2022/12/vmware_hotadd_1.png 768w, https://johnmorehouse.com/images/2022/12/vmware_hotadd_1.png 1322w&#34; sizes=&#34;auto, (max-width: 640px) 100vw, 640px&#34; /&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;As you can see from the log, SQL Server quickly recognized the additional 2 CPU’s and did not throw any errors.  If we examine the schedulers within SQL, first we need to tell SQL Server to reconfigure so that it will recongize the new cores.&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-sql&#34; data-lang=&#34;sql&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;RECONFIGURE&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;GO&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Once that is done, we can look into the DMV sys.dm_os_schedulers to see if they were added.&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-sql&#34; data-lang=&#34;sql&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;SELECT&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;*&lt;/span&gt; &lt;span style=&#34;color:#66d9ef&#34;&gt;FROM&lt;/span&gt; sys.dm_os_schedulers&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;GO&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&lt;a href=&#34;https://johnmorehouse.com/images/2022/12/vmware_hotadd_3.png&#34;&gt;&lt;img data-recalc-dims=&#34;1&#34; loading=&#34;lazy&#34; decoding=&#34;async&#34; class=&#34;aligncenter size-large wp-image-11158&#34; src=&#34;https://johnmorehouse.com/images/2022/12/vmware_hotadd_3.png&#34; alt=&#34;&#34; width=&#34;640&#34; height=&#34;342&#34; srcset=&#34;https://johnmorehouse.com/images/2022/12/vmware_hotadd_3.png 1024w, https://johnmorehouse.com/images/2022/12/vmware_hotadd_3.png 300w, https://johnmorehouse.com/images/2022/12/vmware_hotadd_3.png 768w, https://johnmorehouse.com/images/2022/12/vmware_hotadd_3.png 1100w&#34; sizes=&#34;auto, (max-width: 640px) 100vw, 640px&#34; /&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;You can see that schedulers 4 and 5 are now visible and online and were hot added.  They will remain in this status until the SQL Server instance is restarted.  Once restarted, they will then shift to just being visible online.&lt;/p&gt;&#xA;&lt;h3 id=&#34;summary&#34;&gt;&lt;span style=&#34;text-decoration: underline;&#34;&gt;Summary &lt;/span&gt;&lt;/h3&gt;&#xA;&lt;p&gt;In this post I discussed how SQL Server will react to hot adding CPU to a given virtual machine.  The only real caveat that I can think of is that by doing so is that you run the risk of over provisioning the hypervisor, which can cause issues long term.  If you are going to enable the ability to hot add CPU, make sure you are well aware as to what other VMs are consuming to prevent CPU issues.&lt;/p&gt;&#xA;</content:encoded>
    </item>
    <item>
      <title>Preventing Noisy VM Neighbors for SQL</title>
      <link>https://johnmorehouse.com/2022/07/preventing-noisy-vm-neighbors-for-sql/</link>
      <pubDate>Fri, 08 Jul 2022 14:30:09 +0000</pubDate>
      <guid>https://johnmorehouse.com/2022/07/preventing-noisy-vm-neighbors-for-sql/</guid>
      <description>&lt;p&gt;In today’s modern world, virtualization is often used to help mitigate cost as well as to provide flexibility in scaling for performance workloads.  It’s very easy to scale a virtual machine with a few mouse clicks and a brief outage while it reboots.  If you are running VMWare on-premises, this is a few minute outage.  If you are running in the cloud, you can simply resize the virtual machine to a higher compute tier and upon reboot, poof, you have more compute.&lt;/p&gt;&#xA;&lt;p&gt;If you are running locally, one thing we see often crop up are noisy neighbors.  In the virtualization world, all of the virtual machines on a given host share the compute resources.  This means that CPU and memory can be “swapped” back and forth between virtual machines as their work load demands.   If you have a number of virtual machines that all require the compute, then that creates a bottle neck.  Thankfully, there are ways to help prevent this.&lt;/p&gt;&#xA;&lt;p&gt;If you are running SQL Server in a virtual environment, memory is king.  SQL Server loves to have as much memory as possible and will potentially fit your entire workload into cache if feasible.  However, if you have a noisy neighbor, memory can become scarce and you could potentially start to see memory pressure within SQL Server.  Since the hypervisor has to balance resources, both CPU and memory utilization, across multiple virtual machines, it does have the ability to steal memory away from the guest operating system which effective can steal memory from SQL Server.&lt;/p&gt;&#xA;&lt;p&gt;One way to help mitigate this is to ensure a memory reservation is in place at the VM level.  A memory reservation effectively allocates all of the required memory from the host to that specific virtual machine.  This helps to ensure that the virtual machine gets all the memory its been allocated and further swapping shouldn’t occur.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://johnmorehouse.com/images/2023/01/virtualization_memoryreserve_1.png&#34;&gt;&lt;img data-recalc-dims=&#34;1&#34; loading=&#34;lazy&#34; decoding=&#34;async&#34; class=&#34;aligncenter size-large wp-image-11135&#34; src=&#34;https://johnmorehouse.com/images/2023/01/virtualization_memoryreserve_1.png&#34; alt=&#34;&#34; width=&#34;640&#34; height=&#34;401&#34; srcset=&#34;https://johnmorehouse.com/images/2023/01/virtualization_memoryreserve_1.png 1024w, https://johnmorehouse.com/images/2023/01/virtualization_memoryreserve_1.png 300w, https://johnmorehouse.com/images/2023/01/virtualization_memoryreserve_1.png 768w, https://johnmorehouse.com/images/2023/01/virtualization_memoryreserve_1.png 1452w, https://johnmorehouse.com/images/2023/01/virtualization_memoryreserve_1.png 1280w&#34; sizes=&#34;auto, (max-width: 640px) 100vw, 640px&#34; /&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;Note: If the VM is running, you’ll have to stop it to make this change.&lt;/p&gt;&#xA;&lt;p&gt;Once the virtual machine is stopped, you can open the configuration within vSphere or whatever flavor of hypervisor you are using.  As shown above, the virtual machine has been allocated 16GB of memory.  Simply select the box to “reserver all guest memory” and then click Ok.&lt;/p&gt;&#xA;&lt;p&gt;You can then start the virtual machine and hopefully quiet down the neighbors.&lt;/p&gt;&#xA;&lt;h3 id=&#34;summary&#34;&gt;&lt;span style=&#34;text-decoration: underline;&#34;&gt;Summary&lt;/span&gt;&lt;/h3&gt;&#xA;&lt;p&gt;In this post I discuss a quick way to help prevent memory ballooning is by implementing a memory reservation for the virtual machine.  This will effectively allocate all of the requested memory to the guest VM and furthermore prevent the hypervisor from being able to reclaim it.   Of course, your mileage may vary, but implementing a memory reservation for your SQL Server virtual machines would be a best practice in my book.&lt;/p&gt;&#xA;&lt;p&gt;Happy SQL’ing!&lt;/p&gt;&#xA;</description>
      <content:encoded>&lt;p&gt;In today’s modern world, virtualization is often used to help mitigate cost as well as to provide flexibility in scaling for performance workloads.  It’s very easy to scale a virtual machine with a few mouse clicks and a brief outage while it reboots.  If you are running VMWare on-premises, this is a few minute outage.  If you are running in the cloud, you can simply resize the virtual machine to a higher compute tier and upon reboot, poof, you have more compute.&lt;/p&gt;&#xA;&lt;p&gt;If you are running locally, one thing we see often crop up are noisy neighbors.  In the virtualization world, all of the virtual machines on a given host share the compute resources.  This means that CPU and memory can be “swapped” back and forth between virtual machines as their work load demands.   If you have a number of virtual machines that all require the compute, then that creates a bottle neck.  Thankfully, there are ways to help prevent this.&lt;/p&gt;&#xA;&lt;p&gt;If you are running SQL Server in a virtual environment, memory is king.  SQL Server loves to have as much memory as possible and will potentially fit your entire workload into cache if feasible.  However, if you have a noisy neighbor, memory can become scarce and you could potentially start to see memory pressure within SQL Server.  Since the hypervisor has to balance resources, both CPU and memory utilization, across multiple virtual machines, it does have the ability to steal memory away from the guest operating system which effective can steal memory from SQL Server.&lt;/p&gt;&#xA;&lt;p&gt;One way to help mitigate this is to ensure a memory reservation is in place at the VM level.  A memory reservation effectively allocates all of the required memory from the host to that specific virtual machine.  This helps to ensure that the virtual machine gets all the memory its been allocated and further swapping shouldn’t occur.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://johnmorehouse.com/images/2023/01/virtualization_memoryreserve_1.png&#34;&gt;&lt;img data-recalc-dims=&#34;1&#34; loading=&#34;lazy&#34; decoding=&#34;async&#34; class=&#34;aligncenter size-large wp-image-11135&#34; src=&#34;https://johnmorehouse.com/images/2023/01/virtualization_memoryreserve_1.png&#34; alt=&#34;&#34; width=&#34;640&#34; height=&#34;401&#34; srcset=&#34;https://johnmorehouse.com/images/2023/01/virtualization_memoryreserve_1.png 1024w, https://johnmorehouse.com/images/2023/01/virtualization_memoryreserve_1.png 300w, https://johnmorehouse.com/images/2023/01/virtualization_memoryreserve_1.png 768w, https://johnmorehouse.com/images/2023/01/virtualization_memoryreserve_1.png 1452w, https://johnmorehouse.com/images/2023/01/virtualization_memoryreserve_1.png 1280w&#34; sizes=&#34;auto, (max-width: 640px) 100vw, 640px&#34; /&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;Note: If the VM is running, you’ll have to stop it to make this change.&lt;/p&gt;&#xA;&lt;p&gt;Once the virtual machine is stopped, you can open the configuration within vSphere or whatever flavor of hypervisor you are using.  As shown above, the virtual machine has been allocated 16GB of memory.  Simply select the box to “reserver all guest memory” and then click Ok.&lt;/p&gt;&#xA;&lt;p&gt;You can then start the virtual machine and hopefully quiet down the neighbors.&lt;/p&gt;&#xA;&lt;h3 id=&#34;summary&#34;&gt;&lt;span style=&#34;text-decoration: underline;&#34;&gt;Summary&lt;/span&gt;&lt;/h3&gt;&#xA;&lt;p&gt;In this post I discuss a quick way to help prevent memory ballooning is by implementing a memory reservation for the virtual machine.  This will effectively allocate all of the requested memory to the guest VM and furthermore prevent the hypervisor from being able to reclaim it.   Of course, your mileage may vary, but implementing a memory reservation for your SQL Server virtual machines would be a best practice in my book.&lt;/p&gt;&#xA;&lt;p&gt;Happy SQL’ing!&lt;/p&gt;&#xA;</content:encoded>
    </item>
    <item>
      <title>Running SQL Server on Synology</title>
      <link>https://johnmorehouse.com/2022/05/running-sql-server-on-synology/</link>
      <pubDate>Fri, 06 May 2022 14:00:03 +0000</pubDate>
      <guid>https://johnmorehouse.com/2022/05/running-sql-server-on-synology/</guid>
      <description>&lt;p&gt;Synology has a wide range of capabilities but sometimes it still falls short.&lt;/p&gt;&#xA;&lt;p&gt;In a previous post, I mentioned moving existing virtual machines to my Synology DS920+.  The movement of the virtual machines required configuring the virtual machine locally on my laptop and then subsequently moving the “bundle” to the Synology.  This effectively meant that I was running the virtual machine across the local area network (LAN).  As you might imagine, overall performance tanked.  Any CPU related workloads would happen locally on my laptop however any disk I/O requests would traverse the network, and well, sucked.&lt;/p&gt;&#xA;&lt;h3 id=&#34;virtual-machine-manager&#34;&gt;&lt;span style=&#34;text-decoration: underline;&#34;&gt;Virtual Machine Manager&lt;/span&gt;&lt;/h3&gt;&#xA;&lt;p&gt;Synology offers the ability to create and maintain full blown virtual machines locally.  This would be synonymous to having a VMWare ESXi host running somewhere inside your house.  Unfortunately, with my model of Synology, it’s lacking severely in the memory department.&lt;/p&gt;&#xA;&lt;p&gt;4GB of memory is all she’s got Capt’n!&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://johnmorehouse.com/images/2023/01/synology_memory.png&#34;&gt;&lt;img data-recalc-dims=&#34;1&#34; loading=&#34;lazy&#34; decoding=&#34;async&#34; class=&#34;aligncenter wp-image-11104&#34; src=&#34;https://johnmorehouse.com/images/2023/01/synology_memory.png&#34; alt=&#34;&#34; width=&#34;554&#34; height=&#34;161&#34; srcset=&#34;https://johnmorehouse.com/images/2023/01/synology_memory.png 626w, https://johnmorehouse.com/images/2023/01/synology_memory.png 300w&#34; sizes=&#34;auto, (max-width: 554px) 100vw, 554px&#34; /&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;4GB of memory is minimal in order to run a virtual machine on Synology.  Operating systems such as Windows require a decent amount of memory to function and it does not even address the need for SQL Server to have all the memory it can.&lt;/p&gt;&#xA;&lt;h3 id=&#34;docker&#34;&gt;&lt;span style=&#34;text-decoration: underline;&#34;&gt;Docker&lt;/span&gt;&lt;/h3&gt;&#xA;&lt;p&gt;Another possible solution is to run a Docker container.  Docker is platform that is designed to run containers and you can run it on a Synology NAS device.  Containers is the next evolution within the virtualization space.  Effectively, containers further remove layers by abstracting away the operating system entirely.   Each container allows minimal deployment of applications and services that are needed.  The operating system kernel (usually Linux) is an abstraction layer that sits below each container.&lt;/p&gt;&#xA;&lt;p&gt;While this is a potential solution, the minimum requirements to run a SQL Server container is 2GB.   Given that my Synology only has 4GB available, essentially I need to upgrade the hardware.&lt;/p&gt;&#xA;&lt;p&gt;Remember, even with virtualization or containers, it still has to run on hardware beneath the hood.&lt;/p&gt;&#xA;&lt;p&gt;However, at the moment I am unable to pull the appropriate container image needed so this will be a work in progress.&lt;/p&gt;&#xA;&lt;p&gt;Stay tuned!&lt;/p&gt;&#xA;</description>
      <content:encoded>&lt;p&gt;Synology has a wide range of capabilities but sometimes it still falls short.&lt;/p&gt;&#xA;&lt;p&gt;In a previous post, I mentioned moving existing virtual machines to my Synology DS920+.  The movement of the virtual machines required configuring the virtual machine locally on my laptop and then subsequently moving the “bundle” to the Synology.  This effectively meant that I was running the virtual machine across the local area network (LAN).  As you might imagine, overall performance tanked.  Any CPU related workloads would happen locally on my laptop however any disk I/O requests would traverse the network, and well, sucked.&lt;/p&gt;&#xA;&lt;h3 id=&#34;virtual-machine-manager&#34;&gt;&lt;span style=&#34;text-decoration: underline;&#34;&gt;Virtual Machine Manager&lt;/span&gt;&lt;/h3&gt;&#xA;&lt;p&gt;Synology offers the ability to create and maintain full blown virtual machines locally.  This would be synonymous to having a VMWare ESXi host running somewhere inside your house.  Unfortunately, with my model of Synology, it’s lacking severely in the memory department.&lt;/p&gt;&#xA;&lt;p&gt;4GB of memory is all she’s got Capt’n!&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://johnmorehouse.com/images/2023/01/synology_memory.png&#34;&gt;&lt;img data-recalc-dims=&#34;1&#34; loading=&#34;lazy&#34; decoding=&#34;async&#34; class=&#34;aligncenter wp-image-11104&#34; src=&#34;https://johnmorehouse.com/images/2023/01/synology_memory.png&#34; alt=&#34;&#34; width=&#34;554&#34; height=&#34;161&#34; srcset=&#34;https://johnmorehouse.com/images/2023/01/synology_memory.png 626w, https://johnmorehouse.com/images/2023/01/synology_memory.png 300w&#34; sizes=&#34;auto, (max-width: 554px) 100vw, 554px&#34; /&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;4GB of memory is minimal in order to run a virtual machine on Synology.  Operating systems such as Windows require a decent amount of memory to function and it does not even address the need for SQL Server to have all the memory it can.&lt;/p&gt;&#xA;&lt;h3 id=&#34;docker&#34;&gt;&lt;span style=&#34;text-decoration: underline;&#34;&gt;Docker&lt;/span&gt;&lt;/h3&gt;&#xA;&lt;p&gt;Another possible solution is to run a Docker container.  Docker is platform that is designed to run containers and you can run it on a Synology NAS device.  Containers is the next evolution within the virtualization space.  Effectively, containers further remove layers by abstracting away the operating system entirely.   Each container allows minimal deployment of applications and services that are needed.  The operating system kernel (usually Linux) is an abstraction layer that sits below each container.&lt;/p&gt;&#xA;&lt;p&gt;While this is a potential solution, the minimum requirements to run a SQL Server container is 2GB.   Given that my Synology only has 4GB available, essentially I need to upgrade the hardware.&lt;/p&gt;&#xA;&lt;p&gt;Remember, even with virtualization or containers, it still has to run on hardware beneath the hood.&lt;/p&gt;&#xA;&lt;p&gt;However, at the moment I am unable to pull the appropriate container image needed so this will be a work in progress.&lt;/p&gt;&#xA;&lt;p&gt;Stay tuned!&lt;/p&gt;&#xA;</content:encoded>
    </item>
    <item>
      <title>Secure Travel</title>
      <link>https://johnmorehouse.com/2022/03/secure-travel/</link>
      <pubDate>Fri, 04 Mar 2022 15:00:00 +0000</pubDate>
      <guid>https://johnmorehouse.com/2022/03/secure-travel/</guid>
      <description>&lt;p&gt;&lt;span style=&#34;color: #3366ff;&#34;&gt;&lt;em&gt;Update: This post was originally published on March 8th, 2019 and a lot of things have changed over the last 2-3 years.  Lots of things.  However, ironically, I’m headed off to SQL Bits again for their 2022 Conference and thought it’d be a good time to update this list of how to travel securely.  &lt;/em&gt;&lt;/span&gt;&lt;/p&gt;&#xA;&lt;p&gt;Traveling in today’s age of technology is a lot easier than in the past.   You can start your journey in the morning of one country and be half way across the world by nights end.   When traveling, data security is usually always at the forefront of my mind.  I recently traveled to a conference.   While this isn’t all that usual (I travel about once a month on average) this time it was different.  I was traveling internationally to England to speak at &lt;a href=&#34;http://www.sqlbits.com&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;SQL Bits&lt;/a&gt;.  It was a glorious conference and I was really excited to go, however while preparing to travel, I made sure to review my security measures so that I could enjoy my trip and not be worried.&lt;/p&gt;&#xA;&lt;h3 id=&#34;full-disk-encryption&#34;&gt;&lt;span style=&#34;text-decoration: underline;&#34;&gt;Full Disk Encryption&lt;/span&gt;&lt;/h3&gt;&#xA;&lt;p&gt;&lt;span style=&#34;color: #3366ff;&#34;&gt;&lt;em&gt;John: Proper disk encryption is still very high on my list of things to ensure I have before traveling.  In this case, because I’m presenting, I’m traveling with two laptops and both have the appropriate disk encryption already in place.  This is one thing you definitely don’t want to leave home with out.   Read on if you aren’t using disk encryption!&lt;/em&gt;&lt;/span&gt;&lt;/p&gt;&#xA;&lt;p&gt;If your laptop (or laptops in my case) don’t already have hard drive encryption enabled, you are doing it wrong. As a user of both Windows and Apple hardware, enabling this security feature is painless and just easy to do.  Hard drive encryption happens behind the scenes and should not cause any type of performance hit when it is enabled.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://support.apple.com/en-us/HT204837&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;FileVault for Apple&lt;/a&gt; – FileVault is the way to go if you are Mac user.  It’s built into the operating system and does not have any restrictions (that I know of) in terms of versions.  If you have been using your laptop for a bit without this enabled, when you do enable it, it may take some time to get everything encrypted appropriately.  I had been using my laptop for years without encryption enabled so when I made the switch, I did so over a weekend where I could let it sit.   However, you can enable it and continue to work just keep in mind that it might be slower as it’s encrypting all the bits.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://www.windowscentral.com/how-use-bitlocker-encryption-windows-10&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Bitlocker for Windows&lt;/a&gt; – Bitlocker is the way to go if you are in the Windows eco-system.  It’s easy to enable and does not introduce any type of performance overhead.  My Surface (provided to me by my employer) already came encrypted.   Bitlocker, unfortunately, is not available for the Windows Home version, however you pay $99 to upgrade your operating system to Windows Pro which would then come with Bitlocker.  In my opinion, having that full disk encryption is worth every penny of $99 however if that is above your price point there are other alternatives on the market such as &lt;a href=&#34;https://www.veracrypt.fr/en/Home.html&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;VeraCrypt&lt;/a&gt;.  Make sure that you research those alternatives closely and understand the process on how to encrypt/decrypt your hard drive.  If done wrong, the data that you could loose could be yours.&lt;/p&gt;&#xA;&lt;p&gt;In short, having the peace of mind knowing that if my laptop is stolen, most likely nobody is going to be able to retrieve any sensitive information that I might have on the laptop.  Even when traveling domestically, just enabled it and have that peace of mind.&lt;/p&gt;&#xA;&lt;p&gt;You’ll thank me later.&lt;/p&gt;&#xA;&lt;h3 id=&#34;backups-new&#34;&gt;&lt;span style=&#34;text-decoration: underline;&#34;&gt;Backups (New!)&lt;/span&gt;&lt;/h3&gt;&#xA;&lt;p&gt;This is an add-on to the original post.&lt;/p&gt;&#xA;&lt;p&gt;Even during the pandemic, before traveling in any way shape or form, a few days prior I make sure that the laptops that are going with me have a good backup in place.  I usually have a 1 to 1 rule in that I backup locally to a network storage device within my physical residence and then a secondary off-site backup.  I like using Backblaze for my Mac laptop as my off-site backup and I was Time Capsule locally.  For the Windows side, I use Synology’s Active Backup to ensure I’ve got a local copy.&lt;/p&gt;&#xA;&lt;p&gt;In line with that, while it’s not “backups” per say, I also utilize various cloud synchronizing providers like Dropbox, OneDrive, or Google to ensure I’ve got an off-site, easily accessible copies of my documents.  These cloud services are well encrypted however anything that I deem as sensitive gets additional layers of encryption on top.&lt;/p&gt;&#xA;&lt;p&gt;Yes, I’m that paranoid IT Guy.&lt;/p&gt;&#xA;&lt;h3 id=&#34;password-managers&#34;&gt;&lt;span style=&#34;text-decoration: underline;&#34;&gt;Password Managers&lt;/span&gt;&lt;/h3&gt;&#xA;&lt;p&gt;&lt;span style=&#34;color: #3366ff;&#34;&gt;&lt;em&gt;John: Still absolutely one of the best recommendations I can provide.  Highly recommend a password manger for not only traveling but for your day to day activities.  Use strong complex passwords whenever you can.  &lt;/em&gt;&lt;/span&gt;&lt;/p&gt;&#xA;&lt;p&gt;Password Managers such as &lt;a href=&#34;https://1password.com/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;1Password&lt;/a&gt;, &lt;a href=&#34;https://www.lastpass.com/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;LastPass&lt;/a&gt;, or &lt;a href=&#34;https://keepass.info/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;KeePass&lt;/a&gt; should be a part of your daily routine.  If you are continuing to utilize the same password for all of your accounts (both online &amp;amp; offline) you are begging for a hacker to break in.  Once they have been able to brute force your password, your kingdom is now theirs.  I personally use 1Password (and have for years) simply because they offer up several features that I really like.&lt;/p&gt;&#xA;&lt;p&gt;One of these features is the &lt;a href=&#34;https://blog.1password.com/introducing-travel-mode-protect-your-data-when-crossing-borders/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Travel Mode&lt;/a&gt;.  Travel Mode is pretty simple in that it removes any password vault marked as “not safe for travel” from your devices.  It does not hide them or mask them, it removes them completely.   Once you reach your destination, you can simple turn off Travel Mode and the vaults will then be sync’d once again.  This really helps to ensure that any unwarranted search of your device will not find any passwords which could be then used against you.   You can mark certain vaults as “safe for travel” and those will not be removed from your devices.&lt;/p&gt;&#xA;&lt;p&gt;If you are traveling to a country where unwarranted searches of your device might happen, this is a great way to elevate those concerns.&lt;/p&gt;&#xA;&lt;p&gt;&lt;em&gt;Note: Microsoft MVP &amp;amp; Security Expert &lt;a href=&#34;https://www.troyhunt.com/only-secure-password-is-one-you-cant/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Troy Hunt&lt;/a&gt; uses 1Password so take that into consideration.&lt;/em&gt;&lt;/p&gt;&#xA;&lt;p&gt;_&lt;span style=&#34;color: #3366ff;&#34;&gt;2nd Note: 1Password offers up the ability to identify if any of your passwords have been exposed through a service Troy provides,&lt;/span&gt; &lt;a href=&#34;https://haveibeenpwned.com/&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;HaveIBeenPwned&lt;/a&gt;. _&lt;/p&gt;&#xA;&lt;h3 id=&#34;multi-factor-authentication-new&#34;&gt;&lt;span style=&#34;text-decoration: underline;&#34;&gt;Multi-factor Authentication (New!)&lt;/span&gt;&lt;/h3&gt;&#xA;&lt;p&gt;This is also an add-on.&lt;/p&gt;&#xA;&lt;p&gt;Recently, as the events unfolded with the events with Ukraine and there was an uptick in the amount of cybersecurity awareness, it made me think about my own personal accounts and whether or not I had appropriate authentication enabled.  Appropriate authentication includes a strong complex password (see Password Manager above) as well as some type of multi-factor authentication.  In previous years getting a code texted to you via your cell phone was acceptable, however, in 2022 I much prefer the use of an Authenticator application.  Google and Microsoft (and others) both offer up an authentication application that you can register with your provider.  This means that in order to verify who you are, you need your account information (login and password) and either approve an authentication request from the application or provide the generated number.&lt;/p&gt;&#xA;&lt;p&gt;Double check all of your important accounts (any account that has personal information tied to it like finances, health, kids, etc) to ensure that some type of multi-factor authentication is configured.  Doing so will help to ensure your data is kept safe and sound.&lt;/p&gt;&#xA;&lt;h3 id=&#34;passport-security&#34;&gt;&lt;span style=&#34;text-decoration: underline;&#34;&gt;&lt;strong&gt;Passport Security&lt;/strong&gt;&lt;/span&gt;&lt;/h3&gt;&#xA;&lt;p&gt;&lt;span style=&#34;color: #3366ff;&#34;&gt;&lt;em&gt;John: Only one addition there.  I treat my passport and any identification while traveling just like I would my bank accounts.  Protect them as best as possible.   If you are from the United States, get a Passport card with your Passport.  Keep them separated but secured as either can serve as valid identification to American Embassy’s.  &lt;/em&gt;&lt;/span&gt;&lt;/p&gt;&#xA;&lt;p&gt;I consider my passport as sensitive information thus I want to protect it as best as possible whenever I travel.  In addition to my US Driver’s license, I also travel with my passport so that I have a secondary method to authenticate my identity.   The United States passport (as well as many other countries) has an RFID chip built into the cover.  This means that someone with a RFID scanner and who is near my passport could scan it.  While the amount of information contained on the chip is most likely limited, I don’t like to give anybody any type of personal information unless I absolutely must.  Especially if I don’t even know that it’s happening&lt;/p&gt;&#xA;&lt;p&gt;One way to protect your passport against RFID scanning is to purchase a &lt;a href=&#34;https://amzn.to/2Hl91AY&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;sleeve&lt;/a&gt; for it.  These are inexpensive sleeve’s which your passport would slide into and be shielded from a RFID scanner.  They are easy to use and gives me peace of mind when I travel.&lt;/p&gt;&#xA;&lt;p&gt;Another consideration when it comes to your passport, is have a secondary copy available somewhere, preferably off site.  In my case, I use a cloud provider (like Dropbox, OneDrive, Google, etc) with an encrypted copy of my passport in which certain family members have access to.   If my passport is stolen or mis-placed, I can either access it directly from my Cloud provider or I can contact a family member to get me a copy of my passport.  While this copy will not be enough to gain access to air travel or cross borders, it would at least give the local US Embassy information that can be used to authenticate who I am.&lt;/p&gt;&#xA;&lt;h3 id=&#34;vpn&#34;&gt;&lt;span style=&#34;text-decoration: underline;&#34;&gt;VPN&lt;/span&gt;&lt;/h3&gt;&#xA;&lt;p&gt;_&lt;span style=&#34;color: #3366ff;&#34;&gt;John: No real change here either.  Virtual Private Networks can help ensure that your communication remains private even when visiting a foreign country.  Thankfully I have two options for VPN access, my personal VPN solution that I built or the company one provided to me from work.  Both are excellent options.&lt;/span&gt;    _&lt;/p&gt;&#xA;&lt;p&gt;Whenever I am away from my home network, data security concerns are always present.  I work with a number of clients and I always want to ensure that I am protecting their data as well as mine as best as possible.  Therefore, when I am traveling anywhere and I need to access the internet, I use a VPN service.  In my case, I use my own &lt;a href=&#34;https://johnmorehouse.com/2018/06/building-a-personal-vpn-azure-solution/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;VPN server that I stood up in Azure&lt;/a&gt;.  Having a VPN service available makes sure that all of my internet traffic is encrypted and secured away from any prying eyes.   Depending on where you are traveling too, you might look at various 3rd party VPN services to ensure that they have a VPN endpoint as close to your destination as possible.  In my case, my VPN server is located in the East US region in Azure and even across the Atlantic Ocean the speed was sufficient for what I needed.&lt;/p&gt;&#xA;&lt;p&gt;My VPN solution also allowed me to use a VPN connection on my phone.  I have a newer iPhone but with OpenVPN I was able to get a secure connection when utilizing the hotel Wifi.&lt;/p&gt;&#xA;&lt;h3 id=&#34;summary&#34;&gt;&lt;span style=&#34;text-decoration: underline;&#34;&gt;Summary&lt;/span&gt;&lt;/h3&gt;&#xA;&lt;p&gt;It is really exciting to be able to travel, especially when that travel takes you across borders and around the world.  These simple items I’ve listed above will help to secure your data.  Unauthorized access to your data can really ruin your travel plans, so take a few moments to go over them as well as anything else that might be critical for you.  Remember, the data that you might save could be your own!&lt;/p&gt;&#xA;&lt;p&gt;If you are a frequent traveler, what do you do to secure your data?  Has your stance on security, even just in general, changed with the changing times of the world we live in? I’d love to know so that I can be more secure!&lt;/p&gt;&#xA;&lt;p&gt;Happy Traveling and stay safe out there.&lt;/p&gt;&#xA;</description>
      <content:encoded>&lt;p&gt;&lt;span style=&#34;color: #3366ff;&#34;&gt;&lt;em&gt;Update: This post was originally published on March 8th, 2019 and a lot of things have changed over the last 2-3 years.  Lots of things.  However, ironically, I’m headed off to SQL Bits again for their 2022 Conference and thought it’d be a good time to update this list of how to travel securely.  &lt;/em&gt;&lt;/span&gt;&lt;/p&gt;&#xA;&lt;p&gt;Traveling in today’s age of technology is a lot easier than in the past.   You can start your journey in the morning of one country and be half way across the world by nights end.   When traveling, data security is usually always at the forefront of my mind.  I recently traveled to a conference.   While this isn’t all that usual (I travel about once a month on average) this time it was different.  I was traveling internationally to England to speak at &lt;a href=&#34;http://www.sqlbits.com&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;SQL Bits&lt;/a&gt;.  It was a glorious conference and I was really excited to go, however while preparing to travel, I made sure to review my security measures so that I could enjoy my trip and not be worried.&lt;/p&gt;&#xA;&lt;h3 id=&#34;full-disk-encryption&#34;&gt;&lt;span style=&#34;text-decoration: underline;&#34;&gt;Full Disk Encryption&lt;/span&gt;&lt;/h3&gt;&#xA;&lt;p&gt;&lt;span style=&#34;color: #3366ff;&#34;&gt;&lt;em&gt;John: Proper disk encryption is still very high on my list of things to ensure I have before traveling.  In this case, because I’m presenting, I’m traveling with two laptops and both have the appropriate disk encryption already in place.  This is one thing you definitely don’t want to leave home with out.   Read on if you aren’t using disk encryption!&lt;/em&gt;&lt;/span&gt;&lt;/p&gt;&#xA;&lt;p&gt;If your laptop (or laptops in my case) don’t already have hard drive encryption enabled, you are doing it wrong. As a user of both Windows and Apple hardware, enabling this security feature is painless and just easy to do.  Hard drive encryption happens behind the scenes and should not cause any type of performance hit when it is enabled.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://support.apple.com/en-us/HT204837&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;FileVault for Apple&lt;/a&gt; – FileVault is the way to go if you are Mac user.  It’s built into the operating system and does not have any restrictions (that I know of) in terms of versions.  If you have been using your laptop for a bit without this enabled, when you do enable it, it may take some time to get everything encrypted appropriately.  I had been using my laptop for years without encryption enabled so when I made the switch, I did so over a weekend where I could let it sit.   However, you can enable it and continue to work just keep in mind that it might be slower as it’s encrypting all the bits.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://www.windowscentral.com/how-use-bitlocker-encryption-windows-10&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Bitlocker for Windows&lt;/a&gt; – Bitlocker is the way to go if you are in the Windows eco-system.  It’s easy to enable and does not introduce any type of performance overhead.  My Surface (provided to me by my employer) already came encrypted.   Bitlocker, unfortunately, is not available for the Windows Home version, however you pay $99 to upgrade your operating system to Windows Pro which would then come with Bitlocker.  In my opinion, having that full disk encryption is worth every penny of $99 however if that is above your price point there are other alternatives on the market such as &lt;a href=&#34;https://www.veracrypt.fr/en/Home.html&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;VeraCrypt&lt;/a&gt;.  Make sure that you research those alternatives closely and understand the process on how to encrypt/decrypt your hard drive.  If done wrong, the data that you could loose could be yours.&lt;/p&gt;&#xA;&lt;p&gt;In short, having the peace of mind knowing that if my laptop is stolen, most likely nobody is going to be able to retrieve any sensitive information that I might have on the laptop.  Even when traveling domestically, just enabled it and have that peace of mind.&lt;/p&gt;&#xA;&lt;p&gt;You’ll thank me later.&lt;/p&gt;&#xA;&lt;h3 id=&#34;backups-new&#34;&gt;&lt;span style=&#34;text-decoration: underline;&#34;&gt;Backups (New!)&lt;/span&gt;&lt;/h3&gt;&#xA;&lt;p&gt;This is an add-on to the original post.&lt;/p&gt;&#xA;&lt;p&gt;Even during the pandemic, before traveling in any way shape or form, a few days prior I make sure that the laptops that are going with me have a good backup in place.  I usually have a 1 to 1 rule in that I backup locally to a network storage device within my physical residence and then a secondary off-site backup.  I like using Backblaze for my Mac laptop as my off-site backup and I was Time Capsule locally.  For the Windows side, I use Synology’s Active Backup to ensure I’ve got a local copy.&lt;/p&gt;&#xA;&lt;p&gt;In line with that, while it’s not “backups” per say, I also utilize various cloud synchronizing providers like Dropbox, OneDrive, or Google to ensure I’ve got an off-site, easily accessible copies of my documents.  These cloud services are well encrypted however anything that I deem as sensitive gets additional layers of encryption on top.&lt;/p&gt;&#xA;&lt;p&gt;Yes, I’m that paranoid IT Guy.&lt;/p&gt;&#xA;&lt;h3 id=&#34;password-managers&#34;&gt;&lt;span style=&#34;text-decoration: underline;&#34;&gt;Password Managers&lt;/span&gt;&lt;/h3&gt;&#xA;&lt;p&gt;&lt;span style=&#34;color: #3366ff;&#34;&gt;&lt;em&gt;John: Still absolutely one of the best recommendations I can provide.  Highly recommend a password manger for not only traveling but for your day to day activities.  Use strong complex passwords whenever you can.  &lt;/em&gt;&lt;/span&gt;&lt;/p&gt;&#xA;&lt;p&gt;Password Managers such as &lt;a href=&#34;https://1password.com/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;1Password&lt;/a&gt;, &lt;a href=&#34;https://www.lastpass.com/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;LastPass&lt;/a&gt;, or &lt;a href=&#34;https://keepass.info/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;KeePass&lt;/a&gt; should be a part of your daily routine.  If you are continuing to utilize the same password for all of your accounts (both online &amp;amp; offline) you are begging for a hacker to break in.  Once they have been able to brute force your password, your kingdom is now theirs.  I personally use 1Password (and have for years) simply because they offer up several features that I really like.&lt;/p&gt;&#xA;&lt;p&gt;One of these features is the &lt;a href=&#34;https://blog.1password.com/introducing-travel-mode-protect-your-data-when-crossing-borders/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Travel Mode&lt;/a&gt;.  Travel Mode is pretty simple in that it removes any password vault marked as “not safe for travel” from your devices.  It does not hide them or mask them, it removes them completely.   Once you reach your destination, you can simple turn off Travel Mode and the vaults will then be sync’d once again.  This really helps to ensure that any unwarranted search of your device will not find any passwords which could be then used against you.   You can mark certain vaults as “safe for travel” and those will not be removed from your devices.&lt;/p&gt;&#xA;&lt;p&gt;If you are traveling to a country where unwarranted searches of your device might happen, this is a great way to elevate those concerns.&lt;/p&gt;&#xA;&lt;p&gt;&lt;em&gt;Note: Microsoft MVP &amp;amp; Security Expert &lt;a href=&#34;https://www.troyhunt.com/only-secure-password-is-one-you-cant/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Troy Hunt&lt;/a&gt; uses 1Password so take that into consideration.&lt;/em&gt;&lt;/p&gt;&#xA;&lt;p&gt;_&lt;span style=&#34;color: #3366ff;&#34;&gt;2nd Note: 1Password offers up the ability to identify if any of your passwords have been exposed through a service Troy provides,&lt;/span&gt; &lt;a href=&#34;https://haveibeenpwned.com/&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;HaveIBeenPwned&lt;/a&gt;. _&lt;/p&gt;&#xA;&lt;h3 id=&#34;multi-factor-authentication-new&#34;&gt;&lt;span style=&#34;text-decoration: underline;&#34;&gt;Multi-factor Authentication (New!)&lt;/span&gt;&lt;/h3&gt;&#xA;&lt;p&gt;This is also an add-on.&lt;/p&gt;&#xA;&lt;p&gt;Recently, as the events unfolded with the events with Ukraine and there was an uptick in the amount of cybersecurity awareness, it made me think about my own personal accounts and whether or not I had appropriate authentication enabled.  Appropriate authentication includes a strong complex password (see Password Manager above) as well as some type of multi-factor authentication.  In previous years getting a code texted to you via your cell phone was acceptable, however, in 2022 I much prefer the use of an Authenticator application.  Google and Microsoft (and others) both offer up an authentication application that you can register with your provider.  This means that in order to verify who you are, you need your account information (login and password) and either approve an authentication request from the application or provide the generated number.&lt;/p&gt;&#xA;&lt;p&gt;Double check all of your important accounts (any account that has personal information tied to it like finances, health, kids, etc) to ensure that some type of multi-factor authentication is configured.  Doing so will help to ensure your data is kept safe and sound.&lt;/p&gt;&#xA;&lt;h3 id=&#34;passport-security&#34;&gt;&lt;span style=&#34;text-decoration: underline;&#34;&gt;&lt;strong&gt;Passport Security&lt;/strong&gt;&lt;/span&gt;&lt;/h3&gt;&#xA;&lt;p&gt;&lt;span style=&#34;color: #3366ff;&#34;&gt;&lt;em&gt;John: Only one addition there.  I treat my passport and any identification while traveling just like I would my bank accounts.  Protect them as best as possible.   If you are from the United States, get a Passport card with your Passport.  Keep them separated but secured as either can serve as valid identification to American Embassy’s.  &lt;/em&gt;&lt;/span&gt;&lt;/p&gt;&#xA;&lt;p&gt;I consider my passport as sensitive information thus I want to protect it as best as possible whenever I travel.  In addition to my US Driver’s license, I also travel with my passport so that I have a secondary method to authenticate my identity.   The United States passport (as well as many other countries) has an RFID chip built into the cover.  This means that someone with a RFID scanner and who is near my passport could scan it.  While the amount of information contained on the chip is most likely limited, I don’t like to give anybody any type of personal information unless I absolutely must.  Especially if I don’t even know that it’s happening&lt;/p&gt;&#xA;&lt;p&gt;One way to protect your passport against RFID scanning is to purchase a &lt;a href=&#34;https://amzn.to/2Hl91AY&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;sleeve&lt;/a&gt; for it.  These are inexpensive sleeve’s which your passport would slide into and be shielded from a RFID scanner.  They are easy to use and gives me peace of mind when I travel.&lt;/p&gt;&#xA;&lt;p&gt;Another consideration when it comes to your passport, is have a secondary copy available somewhere, preferably off site.  In my case, I use a cloud provider (like Dropbox, OneDrive, Google, etc) with an encrypted copy of my passport in which certain family members have access to.   If my passport is stolen or mis-placed, I can either access it directly from my Cloud provider or I can contact a family member to get me a copy of my passport.  While this copy will not be enough to gain access to air travel or cross borders, it would at least give the local US Embassy information that can be used to authenticate who I am.&lt;/p&gt;&#xA;&lt;h3 id=&#34;vpn&#34;&gt;&lt;span style=&#34;text-decoration: underline;&#34;&gt;VPN&lt;/span&gt;&lt;/h3&gt;&#xA;&lt;p&gt;_&lt;span style=&#34;color: #3366ff;&#34;&gt;John: No real change here either.  Virtual Private Networks can help ensure that your communication remains private even when visiting a foreign country.  Thankfully I have two options for VPN access, my personal VPN solution that I built or the company one provided to me from work.  Both are excellent options.&lt;/span&gt;    _&lt;/p&gt;&#xA;&lt;p&gt;Whenever I am away from my home network, data security concerns are always present.  I work with a number of clients and I always want to ensure that I am protecting their data as well as mine as best as possible.  Therefore, when I am traveling anywhere and I need to access the internet, I use a VPN service.  In my case, I use my own &lt;a href=&#34;https://johnmorehouse.com/2018/06/building-a-personal-vpn-azure-solution/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;VPN server that I stood up in Azure&lt;/a&gt;.  Having a VPN service available makes sure that all of my internet traffic is encrypted and secured away from any prying eyes.   Depending on where you are traveling too, you might look at various 3rd party VPN services to ensure that they have a VPN endpoint as close to your destination as possible.  In my case, my VPN server is located in the East US region in Azure and even across the Atlantic Ocean the speed was sufficient for what I needed.&lt;/p&gt;&#xA;&lt;p&gt;My VPN solution also allowed me to use a VPN connection on my phone.  I have a newer iPhone but with OpenVPN I was able to get a secure connection when utilizing the hotel Wifi.&lt;/p&gt;&#xA;&lt;h3 id=&#34;summary&#34;&gt;&lt;span style=&#34;text-decoration: underline;&#34;&gt;Summary&lt;/span&gt;&lt;/h3&gt;&#xA;&lt;p&gt;It is really exciting to be able to travel, especially when that travel takes you across borders and around the world.  These simple items I’ve listed above will help to secure your data.  Unauthorized access to your data can really ruin your travel plans, so take a few moments to go over them as well as anything else that might be critical for you.  Remember, the data that you might save could be your own!&lt;/p&gt;&#xA;&lt;p&gt;If you are a frequent traveler, what do you do to secure your data?  Has your stance on security, even just in general, changed with the changing times of the world we live in? I’d love to know so that I can be more secure!&lt;/p&gt;&#xA;&lt;p&gt;Happy Traveling and stay safe out there.&lt;/p&gt;&#xA;</content:encoded>
    </item>
    <item>
      <title>Understanding Volumes vs Storage Pools</title>
      <link>https://johnmorehouse.com/2022/02/understanding-volumes-vs-storage-pools/</link>
      <pubDate>Fri, 18 Feb 2022 15:04:33 +0000</pubDate>
      <guid>https://johnmorehouse.com/2022/02/understanding-volumes-vs-storage-pools/</guid>
      <description>&lt;p&gt;In hindsight, I should have done this differently.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://johnmorehouse.com/2021/08/how-i-carved-up-18tb-of-storage/&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;In a previous post&lt;/a&gt; I discussed how I carved up 18TB of storage into various storage pools.  Now that I have the two storage pools, I need to create volumes on top of those pools so that I can start to store data.  After I create the volumes, I can then create folders to which is where the data will ultimately reside.&lt;/p&gt;&#xA;&lt;p&gt;Here are the two storage pools that I created on my Synology DS920+&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://johnmorehouse.com/images/2021/05/2021-05-30_09-21-16.png&#34;&gt;&lt;img data-recalc-dims=&#34;1&#34; loading=&#34;lazy&#34; decoding=&#34;async&#34; class=&#34;aligncenter size-large wp-image-8154&#34; src=&#34;https://johnmorehouse.com/images/2021/05/2021-05-30_09-21-16.png&#34; alt=&#34;&#34; width=&#34;640&#34; height=&#34;112&#34; srcset=&#34;https://johnmorehouse.com/images/2021/05/2021-05-30_09-21-16.png 1024w, https://johnmorehouse.com/images/2021/05/2021-05-30_09-21-16.png 300w, https://johnmorehouse.com/images/2021/05/2021-05-30_09-21-16.png 768w, https://johnmorehouse.com/images/2021/05/2021-05-30_09-21-16.png 1536w, https://johnmorehouse.com/images/2021/05/2021-05-30_09-21-16.png 1888w, https://johnmorehouse.com/images/2021/05/2021-05-30_09-21-16.png 1280w&#34; sizes=&#34;auto, (max-width: 640px) 100vw, 640px&#34; /&gt;&lt;/a&gt;Don’t worry about the warning you see there, that’s expected.  It’s a single drive and I am comfortable with the lack of safety via RAID in that case.&lt;/p&gt;&#xA;&lt;h3 id=&#34;how-many-volumes-do-i-create&#34;&gt;How many volumes do I create?&lt;/h3&gt;&#xA;&lt;p&gt;I think there are a couple of lines of thought related to this.  I’m one person with a NAS so I don’t need multiple volumes.  I can certainly get by with a single volume on each storage pool and this will simplify management of things.&lt;/p&gt;&#xA;&lt;p&gt;If you were working with enterprise grade storage in a corporate environment, having multiple volumes will make sense.  I think of this as carving up disk space for production SQL Servers where each drive letter corresponds to a given volume which resides on a given storage pool.  A volume can serve multiple folders.&lt;/p&gt;&#xA;&lt;p&gt;Ironically storage arrays today can supply hundreds of terabytes that need to be managed so it is significantly more complex with larger environments than I what I have here at home.&lt;/p&gt;&#xA;&lt;h3 id=&#34;how-many-volumes-did-i-create&#34;&gt;How many volumes did I create?&lt;/h3&gt;&#xA;&lt;p&gt;So far, three.  As I said earlier, I should have done this differently.  In its current state it is going down the path of being overly complex and since I’m just a single user, I should have kept it simple and just created two volumes, one on each of the storage pools.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://johnmorehouse.com/images/2021/05/2021-05-30_09-43-28.png&#34;&gt;&lt;img data-recalc-dims=&#34;1&#34; loading=&#34;lazy&#34; decoding=&#34;async&#34; class=&#34;aligncenter size-large wp-image-8157&#34; src=&#34;https://johnmorehouse.com/images/2021/05/2021-05-30_09-43-28.png&#34; alt=&#34;&#34; width=&#34;640&#34; height=&#34;197&#34; srcset=&#34;https://johnmorehouse.com/images/2021/05/2021-05-30_09-43-28.png 1024w, https://johnmorehouse.com/images/2021/05/2021-05-30_09-43-28.png 300w, https://johnmorehouse.com/images/2021/05/2021-05-30_09-43-28.png 768w, https://johnmorehouse.com/images/2021/05/2021-05-30_09-43-28.png 1516w, https://johnmorehouse.com/images/2021/05/2021-05-30_09-43-28.png 1280w&#34; sizes=&#34;auto, (max-width: 640px) 100vw, 640px&#34; /&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;In its current state, Volume 1 (shown above) is my Production volume where everything to do with anything that isn’t development is going to reside.  You’ll notice that it’s got over 8TB of storage allocated to it.&lt;/p&gt;&#xA;&lt;p&gt;Volumes 2 and 3 is where I made the mistake.  I carved up two volumes on the second storage pool thinking that I would have a volume for things like ISO files and another that would hold virtual machine data.   What I should have done was to have another single volume on Storage pool 2 (a single 4TB drive) and then created folders to house the data that I wanted.&lt;/p&gt;&#xA;&lt;p&gt;I recently read an analogy that helps to solidify this line of thinking –&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;A storage pool is the land that you own.&lt;/li&gt;&#xA;&lt;li&gt;A volume is the building that is sitting on the land that you own.&lt;/li&gt;&#xA;&lt;li&gt;Things you own (files) are sitting in the buildings (in folders) that you own.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;We can also see this trend if we look at the storage manager within DSM.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://johnmorehouse.com/images/2021/05/2021-05-30_10-08-03.png&#34;&gt;&lt;img data-recalc-dims=&#34;1&#34; loading=&#34;lazy&#34; decoding=&#34;async&#34; class=&#34;aligncenter size-large wp-image-8158&#34; src=&#34;https://johnmorehouse.com/images/2021/05/2021-05-30_10-08-03.png&#34; alt=&#34;&#34; width=&#34;640&#34; height=&#34;298&#34; srcset=&#34;https://johnmorehouse.com/images/2021/05/2021-05-30_10-08-03.png 1024w, https://johnmorehouse.com/images/2021/05/2021-05-30_10-08-03.png 300w, https://johnmorehouse.com/images/2021/05/2021-05-30_10-08-03.png 768w, https://johnmorehouse.com/images/2021/05/2021-05-30_10-08-03.png 1536w, https://johnmorehouse.com/images/2021/05/2021-05-30_10-08-03.png 2048w, https://johnmorehouse.com/images/2021/05/2021-05-30_10-08-03.png 1280w, https://johnmorehouse.com/images/2021/05/2021-05-30_10-08-03.png 1920w&#34; sizes=&#34;auto, (max-width: 640px) 100vw, 640px&#34; /&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;You’ll notice that the way that the information is presented it mirrors the analogy that I mentioned.&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;The hard drives are at the bottom and represent the location in which you purchased the land&lt;/li&gt;&#xA;&lt;li&gt;Storage pools are next and represent the land that you purchased.&lt;/li&gt;&#xA;&lt;li&gt;The volumes are at the top and represent the buildings you built on your land.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;What’s not showing are the folders, which of course, would within the volumes (the building).&lt;/p&gt;&#xA;&lt;h3 id=&#34;whats-the-benefit&#34;&gt;What’s the benefit?&lt;/h3&gt;&#xA;&lt;p&gt;So far the benefit of my current configuration is that I got to learn about volumes vs storage pools vs folders.  This really is just enforcing best practices, at least for home users anyway.  Learning new things is always fun and once you learn it, the power of that information is yours to control.&lt;/p&gt;&#xA;&lt;p&gt;In order to fix this, I’d have to move the folders from Volume 2 or 3 into the other volume and then destroy the volume.  I could then expand the remaining volume to encompass the entire 4TB drive.  This would leave me with two volumes, one for production stuff and another for development stuff.  I would then create individual folders for things to live in.&lt;/p&gt;&#xA;&lt;h3 id=&#34;summary&#34;&gt;Summary&lt;/h3&gt;&#xA;&lt;p&gt;In this post I talked about creating storage pools versus volumes.  As you can see I over-complicated things and will most likely go back and fix it just to make things simpler.  Of course your needs might be different so your mileage may vary.  In either case, this was a good learning experience for me.  If you are contemplating playing around with a NAS device such as a Synology, I definitely recommend that you keep things simple and spend a little time thinking about how you want things laid out.&lt;/p&gt;&#xA;&lt;p&gt;Would you have done anything different?  If so, tell me what you’d do differently and why in the comments!&lt;/p&gt;&#xA;</description>
      <content:encoded>&lt;p&gt;In hindsight, I should have done this differently.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://johnmorehouse.com/2021/08/how-i-carved-up-18tb-of-storage/&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;In a previous post&lt;/a&gt; I discussed how I carved up 18TB of storage into various storage pools.  Now that I have the two storage pools, I need to create volumes on top of those pools so that I can start to store data.  After I create the volumes, I can then create folders to which is where the data will ultimately reside.&lt;/p&gt;&#xA;&lt;p&gt;Here are the two storage pools that I created on my Synology DS920+&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://johnmorehouse.com/images/2021/05/2021-05-30_09-21-16.png&#34;&gt;&lt;img data-recalc-dims=&#34;1&#34; loading=&#34;lazy&#34; decoding=&#34;async&#34; class=&#34;aligncenter size-large wp-image-8154&#34; src=&#34;https://johnmorehouse.com/images/2021/05/2021-05-30_09-21-16.png&#34; alt=&#34;&#34; width=&#34;640&#34; height=&#34;112&#34; srcset=&#34;https://johnmorehouse.com/images/2021/05/2021-05-30_09-21-16.png 1024w, https://johnmorehouse.com/images/2021/05/2021-05-30_09-21-16.png 300w, https://johnmorehouse.com/images/2021/05/2021-05-30_09-21-16.png 768w, https://johnmorehouse.com/images/2021/05/2021-05-30_09-21-16.png 1536w, https://johnmorehouse.com/images/2021/05/2021-05-30_09-21-16.png 1888w, https://johnmorehouse.com/images/2021/05/2021-05-30_09-21-16.png 1280w&#34; sizes=&#34;auto, (max-width: 640px) 100vw, 640px&#34; /&gt;&lt;/a&gt;Don’t worry about the warning you see there, that’s expected.  It’s a single drive and I am comfortable with the lack of safety via RAID in that case.&lt;/p&gt;&#xA;&lt;h3 id=&#34;how-many-volumes-do-i-create&#34;&gt;How many volumes do I create?&lt;/h3&gt;&#xA;&lt;p&gt;I think there are a couple of lines of thought related to this.  I’m one person with a NAS so I don’t need multiple volumes.  I can certainly get by with a single volume on each storage pool and this will simplify management of things.&lt;/p&gt;&#xA;&lt;p&gt;If you were working with enterprise grade storage in a corporate environment, having multiple volumes will make sense.  I think of this as carving up disk space for production SQL Servers where each drive letter corresponds to a given volume which resides on a given storage pool.  A volume can serve multiple folders.&lt;/p&gt;&#xA;&lt;p&gt;Ironically storage arrays today can supply hundreds of terabytes that need to be managed so it is significantly more complex with larger environments than I what I have here at home.&lt;/p&gt;&#xA;&lt;h3 id=&#34;how-many-volumes-did-i-create&#34;&gt;How many volumes did I create?&lt;/h3&gt;&#xA;&lt;p&gt;So far, three.  As I said earlier, I should have done this differently.  In its current state it is going down the path of being overly complex and since I’m just a single user, I should have kept it simple and just created two volumes, one on each of the storage pools.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://johnmorehouse.com/images/2021/05/2021-05-30_09-43-28.png&#34;&gt;&lt;img data-recalc-dims=&#34;1&#34; loading=&#34;lazy&#34; decoding=&#34;async&#34; class=&#34;aligncenter size-large wp-image-8157&#34; src=&#34;https://johnmorehouse.com/images/2021/05/2021-05-30_09-43-28.png&#34; alt=&#34;&#34; width=&#34;640&#34; height=&#34;197&#34; srcset=&#34;https://johnmorehouse.com/images/2021/05/2021-05-30_09-43-28.png 1024w, https://johnmorehouse.com/images/2021/05/2021-05-30_09-43-28.png 300w, https://johnmorehouse.com/images/2021/05/2021-05-30_09-43-28.png 768w, https://johnmorehouse.com/images/2021/05/2021-05-30_09-43-28.png 1516w, https://johnmorehouse.com/images/2021/05/2021-05-30_09-43-28.png 1280w&#34; sizes=&#34;auto, (max-width: 640px) 100vw, 640px&#34; /&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;In its current state, Volume 1 (shown above) is my Production volume where everything to do with anything that isn’t development is going to reside.  You’ll notice that it’s got over 8TB of storage allocated to it.&lt;/p&gt;&#xA;&lt;p&gt;Volumes 2 and 3 is where I made the mistake.  I carved up two volumes on the second storage pool thinking that I would have a volume for things like ISO files and another that would hold virtual machine data.   What I should have done was to have another single volume on Storage pool 2 (a single 4TB drive) and then created folders to house the data that I wanted.&lt;/p&gt;&#xA;&lt;p&gt;I recently read an analogy that helps to solidify this line of thinking –&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;A storage pool is the land that you own.&lt;/li&gt;&#xA;&lt;li&gt;A volume is the building that is sitting on the land that you own.&lt;/li&gt;&#xA;&lt;li&gt;Things you own (files) are sitting in the buildings (in folders) that you own.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;We can also see this trend if we look at the storage manager within DSM.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://johnmorehouse.com/images/2021/05/2021-05-30_10-08-03.png&#34;&gt;&lt;img data-recalc-dims=&#34;1&#34; loading=&#34;lazy&#34; decoding=&#34;async&#34; class=&#34;aligncenter size-large wp-image-8158&#34; src=&#34;https://johnmorehouse.com/images/2021/05/2021-05-30_10-08-03.png&#34; alt=&#34;&#34; width=&#34;640&#34; height=&#34;298&#34; srcset=&#34;https://johnmorehouse.com/images/2021/05/2021-05-30_10-08-03.png 1024w, https://johnmorehouse.com/images/2021/05/2021-05-30_10-08-03.png 300w, https://johnmorehouse.com/images/2021/05/2021-05-30_10-08-03.png 768w, https://johnmorehouse.com/images/2021/05/2021-05-30_10-08-03.png 1536w, https://johnmorehouse.com/images/2021/05/2021-05-30_10-08-03.png 2048w, https://johnmorehouse.com/images/2021/05/2021-05-30_10-08-03.png 1280w, https://johnmorehouse.com/images/2021/05/2021-05-30_10-08-03.png 1920w&#34; sizes=&#34;auto, (max-width: 640px) 100vw, 640px&#34; /&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;You’ll notice that the way that the information is presented it mirrors the analogy that I mentioned.&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;The hard drives are at the bottom and represent the location in which you purchased the land&lt;/li&gt;&#xA;&lt;li&gt;Storage pools are next and represent the land that you purchased.&lt;/li&gt;&#xA;&lt;li&gt;The volumes are at the top and represent the buildings you built on your land.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;What’s not showing are the folders, which of course, would within the volumes (the building).&lt;/p&gt;&#xA;&lt;h3 id=&#34;whats-the-benefit&#34;&gt;What’s the benefit?&lt;/h3&gt;&#xA;&lt;p&gt;So far the benefit of my current configuration is that I got to learn about volumes vs storage pools vs folders.  This really is just enforcing best practices, at least for home users anyway.  Learning new things is always fun and once you learn it, the power of that information is yours to control.&lt;/p&gt;&#xA;&lt;p&gt;In order to fix this, I’d have to move the folders from Volume 2 or 3 into the other volume and then destroy the volume.  I could then expand the remaining volume to encompass the entire 4TB drive.  This would leave me with two volumes, one for production stuff and another for development stuff.  I would then create individual folders for things to live in.&lt;/p&gt;&#xA;&lt;h3 id=&#34;summary&#34;&gt;Summary&lt;/h3&gt;&#xA;&lt;p&gt;In this post I talked about creating storage pools versus volumes.  As you can see I over-complicated things and will most likely go back and fix it just to make things simpler.  Of course your needs might be different so your mileage may vary.  In either case, this was a good learning experience for me.  If you are contemplating playing around with a NAS device such as a Synology, I definitely recommend that you keep things simple and spend a little time thinking about how you want things laid out.&lt;/p&gt;&#xA;&lt;p&gt;Would you have done anything different?  If so, tell me what you’d do differently and why in the comments!&lt;/p&gt;&#xA;</content:encoded>
    </item>
    <item>
      <title>Speaking at SQL Bits 2022</title>
      <link>https://johnmorehouse.com/2022/02/speaking-at-sql-bits-2022/</link>
      <pubDate>Fri, 11 Feb 2022 14:41:24 +0000</pubDate>
      <guid>https://johnmorehouse.com/2022/02/speaking-at-sql-bits-2022/</guid>
      <description>&lt;p&gt;After two long years of waiting, I&amp;rsquo;ll once again be speaking at an in-person event, starting with SQL Bits 2022, March 8th-12th.  I&amp;rsquo;ll be traveling to London (as long as I think it’s safe to do so) and will be giving a total of 4 different sessions.  SQL Bits is a conference that has been around for many years and it is probably one of the biggest community driven events that you can attend.  It&amp;rsquo;s multiple days of Data-centric goodness.  This year the conference is offering a hybrid approach, allowing attendees to be either in-person or from the comfort of their couch.&lt;/p&gt;&#xA;&lt;p&gt;I’ve been fortunate to go once before and needless to say I’m very excited for the opportunity to do so again.&lt;/p&gt;&#xA;&lt;p&gt;First up, an all day training session with my exceptional co-worker, Joey D’Antoni:&lt;/p&gt;&#xA;&lt;h3 id=&#34;azure-from-admin-to-architect&#34;&gt;&lt;span style=&#34;text-decoration: underline;&#34;&gt;Azure from Admin to Architect&lt;/span&gt;&lt;/h3&gt;&#xA;&lt;p&gt;There are over 200 services in Azure, which makes trying to learn the platform an overwhelming task for many IT professionals. While you may have built a virtual machine, or deployed an Azure SQL Database, have you thought about your network design or policies for tagging strategies? In this all-day session, you will dive well beyond your basic DBA tasks and into the role of an architect. You will learn about how security with Azure Active Directory works, and how to implement it in your applications. You will learn about how to choose the right data services for your application, and how to secure them. You will also learn about additional services, like Azure Key Vault, Azure Functions, Logic Apps and Automation, which help you to bring make different components interact with each other. This session will be demo filled and full of open Q&amp;amp;A.&lt;/p&gt;&#xA;&lt;p&gt;Next up are 20 minute sessions with the magnificent Rob Sewell (two bears don’t make a right):&lt;/p&gt;&#xA;&lt;h3 id=&#34;there-is-a-time-and-place-for-everything&#34;&gt;&lt;span style=&#34;text-decoration: underline;&#34;&gt;There is a Time and Place for Everything&lt;/span&gt;&lt;/h3&gt;&#xA;&lt;p&gt;You have heard all of the “rules”&lt;/p&gt;&#xA;&lt;p&gt;“Cursors are evil”&lt;br&gt;&#xA;“Dont use Triggers”&lt;br&gt;&#xA;“Every time you use Write-Host a kitten is..” well its not true so we wont say it.&lt;br&gt;&#xA;“You should never use the GUI, all things must be code”&lt;br&gt;&#xA;“If you are going to do something more than once automate it”&lt;br&gt;&#xA;“Don’t use profiler always use Extended Events”&lt;/p&gt;&#xA;&lt;p&gt;John and Rob, being consultants, often say “Well, it depends” Lets talk about some of the times when these and other “rules” may not fit&lt;/p&gt;&#xA;&lt;h3 class=&#34;m-t-none&#34; id=&#34;10-productivity-tools-we-use-to-make-life-easier&#34;&gt;&lt;span style=&#34;text-decoration: underline;&#34;&gt;10 Productivity tools we use to make life easier&lt;/span&gt;&lt;/h3&gt;&#xA;&lt;p&gt;You are busy, we are busy, everyone is busy. These are the tools that two busy consultants use to improve their productivity.&lt;/p&gt;&#xA;&lt;p&gt;We want to tell you about the tools that we use; that maximise our time, simplify our life, reduce our key strokes and generally make us appear more amazing. So that you can use them too.&lt;/p&gt;&#xA;&lt;p&gt;and finally, a 20 minute session with just me:&lt;/p&gt;&#xA;&lt;h3 id=&#34;-i-learned-working-for-denny-cherry&#34;&gt;&lt;span style=&#34;text-decoration: underline;&#34;&gt;$%*# I Learned Working for Denny Cherry&lt;/span&gt;&lt;/h3&gt;&#xA;&lt;p&gt;Ever doubt your technical skills? Ever have imposter syndrome? I can assure you that both real things and both are absolutely terrifying to deal with. Working for someone as smart as Denny does not make it any easier. You are not alone.&lt;/p&gt;&#xA;&lt;p&gt;If you are not aware, my boss, Denny, is very well known in the SQL Server realm across the globe. I will be honest in that working for him is an absolute dream of a job for me. While difficult at times (because the work, not because of Denny), I’ve learned a lot about myself along the way. In this lightning talk of a session we will go over some things that I’ve had to learn about myself working for someone like Denny Cherry.&lt;/p&gt;&#xA;&lt;p&gt;We will talk about –&lt;br&gt;&#xA;• Dealing with imposter syndrome&lt;br&gt;&#xA;• Improving confidence&lt;br&gt;&#xA;• The feeling of lacking technical chops&lt;/p&gt;&#xA;&lt;p&gt;If you have ever had similar feelings in your job, know that you are not alone. Join me in this quick session on learning how to jump over these hurdles. You never know, maybe the lessons I’ve learned will help you land a dream job of your own.&lt;/p&gt;&#xA;&lt;h3 id=&#34;summary&#34;&gt;&lt;span style=&#34;text-decoration: underline;&#34;&gt;Summary&lt;/span&gt;&lt;/h3&gt;&#xA;&lt;p&gt;I’m really excited to have the opportunity to travel to London (it’s a bucket list destination for me) and experience the awesomeness that is SQL Bits again.  If you are attending in person or even virtually, I’ll be around and please do say Hi!&lt;/p&gt;&#xA;&lt;p&gt;Make sure to check out all that the &lt;a href=&#34;https://arcade.sqlbits.com/&#34;&gt;conference&lt;/a&gt; has to offer and hope you can attend, either in-person or virtually!&lt;/p&gt;&#xA;&lt;p&gt;See you in London!&lt;/p&gt;&#xA;</description>
      <content:encoded>&lt;p&gt;After two long years of waiting, I&amp;rsquo;ll once again be speaking at an in-person event, starting with SQL Bits 2022, March 8th-12th.  I&amp;rsquo;ll be traveling to London (as long as I think it’s safe to do so) and will be giving a total of 4 different sessions.  SQL Bits is a conference that has been around for many years and it is probably one of the biggest community driven events that you can attend.  It&amp;rsquo;s multiple days of Data-centric goodness.  This year the conference is offering a hybrid approach, allowing attendees to be either in-person or from the comfort of their couch.&lt;/p&gt;&#xA;&lt;p&gt;I’ve been fortunate to go once before and needless to say I’m very excited for the opportunity to do so again.&lt;/p&gt;&#xA;&lt;p&gt;First up, an all day training session with my exceptional co-worker, Joey D’Antoni:&lt;/p&gt;&#xA;&lt;h3 id=&#34;azure-from-admin-to-architect&#34;&gt;&lt;span style=&#34;text-decoration: underline;&#34;&gt;Azure from Admin to Architect&lt;/span&gt;&lt;/h3&gt;&#xA;&lt;p&gt;There are over 200 services in Azure, which makes trying to learn the platform an overwhelming task for many IT professionals. While you may have built a virtual machine, or deployed an Azure SQL Database, have you thought about your network design or policies for tagging strategies? In this all-day session, you will dive well beyond your basic DBA tasks and into the role of an architect. You will learn about how security with Azure Active Directory works, and how to implement it in your applications. You will learn about how to choose the right data services for your application, and how to secure them. You will also learn about additional services, like Azure Key Vault, Azure Functions, Logic Apps and Automation, which help you to bring make different components interact with each other. This session will be demo filled and full of open Q&amp;amp;A.&lt;/p&gt;&#xA;&lt;p&gt;Next up are 20 minute sessions with the magnificent Rob Sewell (two bears don’t make a right):&lt;/p&gt;&#xA;&lt;h3 id=&#34;there-is-a-time-and-place-for-everything&#34;&gt;&lt;span style=&#34;text-decoration: underline;&#34;&gt;There is a Time and Place for Everything&lt;/span&gt;&lt;/h3&gt;&#xA;&lt;p&gt;You have heard all of the “rules”&lt;/p&gt;&#xA;&lt;p&gt;“Cursors are evil”&lt;br&gt;&#xA;“Dont use Triggers”&lt;br&gt;&#xA;“Every time you use Write-Host a kitten is..” well its not true so we wont say it.&lt;br&gt;&#xA;“You should never use the GUI, all things must be code”&lt;br&gt;&#xA;“If you are going to do something more than once automate it”&lt;br&gt;&#xA;“Don’t use profiler always use Extended Events”&lt;/p&gt;&#xA;&lt;p&gt;John and Rob, being consultants, often say “Well, it depends” Lets talk about some of the times when these and other “rules” may not fit&lt;/p&gt;&#xA;&lt;h3 class=&#34;m-t-none&#34; id=&#34;10-productivity-tools-we-use-to-make-life-easier&#34;&gt;&lt;span style=&#34;text-decoration: underline;&#34;&gt;10 Productivity tools we use to make life easier&lt;/span&gt;&lt;/h3&gt;&#xA;&lt;p&gt;You are busy, we are busy, everyone is busy. These are the tools that two busy consultants use to improve their productivity.&lt;/p&gt;&#xA;&lt;p&gt;We want to tell you about the tools that we use; that maximise our time, simplify our life, reduce our key strokes and generally make us appear more amazing. So that you can use them too.&lt;/p&gt;&#xA;&lt;p&gt;and finally, a 20 minute session with just me:&lt;/p&gt;&#xA;&lt;h3 id=&#34;-i-learned-working-for-denny-cherry&#34;&gt;&lt;span style=&#34;text-decoration: underline;&#34;&gt;$%*# I Learned Working for Denny Cherry&lt;/span&gt;&lt;/h3&gt;&#xA;&lt;p&gt;Ever doubt your technical skills? Ever have imposter syndrome? I can assure you that both real things and both are absolutely terrifying to deal with. Working for someone as smart as Denny does not make it any easier. You are not alone.&lt;/p&gt;&#xA;&lt;p&gt;If you are not aware, my boss, Denny, is very well known in the SQL Server realm across the globe. I will be honest in that working for him is an absolute dream of a job for me. While difficult at times (because the work, not because of Denny), I’ve learned a lot about myself along the way. In this lightning talk of a session we will go over some things that I’ve had to learn about myself working for someone like Denny Cherry.&lt;/p&gt;&#xA;&lt;p&gt;We will talk about –&lt;br&gt;&#xA;• Dealing with imposter syndrome&lt;br&gt;&#xA;• Improving confidence&lt;br&gt;&#xA;• The feeling of lacking technical chops&lt;/p&gt;&#xA;&lt;p&gt;If you have ever had similar feelings in your job, know that you are not alone. Join me in this quick session on learning how to jump over these hurdles. You never know, maybe the lessons I’ve learned will help you land a dream job of your own.&lt;/p&gt;&#xA;&lt;h3 id=&#34;summary&#34;&gt;&lt;span style=&#34;text-decoration: underline;&#34;&gt;Summary&lt;/span&gt;&lt;/h3&gt;&#xA;&lt;p&gt;I’m really excited to have the opportunity to travel to London (it’s a bucket list destination for me) and experience the awesomeness that is SQL Bits again.  If you are attending in person or even virtually, I’ll be around and please do say Hi!&lt;/p&gt;&#xA;&lt;p&gt;Make sure to check out all that the &lt;a href=&#34;https://arcade.sqlbits.com/&#34;&gt;conference&lt;/a&gt; has to offer and hope you can attend, either in-person or virtually!&lt;/p&gt;&#xA;&lt;p&gt;See you in London!&lt;/p&gt;&#xA;</content:encoded>
    </item>
    <item>
      <title>Understanding VMWare Components</title>
      <link>https://johnmorehouse.com/2021/12/understanding-vmware-components/</link>
      <pubDate>Fri, 10 Dec 2021 22:14:06 +0000</pubDate>
      <guid>https://johnmorehouse.com/2021/12/understanding-vmware-components/</guid>
      <description>&lt;p&gt;Recently I was looking to install VMWare components in my local network of things so that I could gain additional knowledge of how VMWare works.   I have a local &lt;a href=&#34;https://johnmorehouse.com/2021/07/is-18tb-of-storage-enough/&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;Synology DS920+&lt;/a&gt; which can run virtual machines and I have about 18TB of space to play with so I thought this would be a good experiment.  The tricky part is that VMWare’s ecosystem has a couple of different components to it.  If you aren’t familiar with those components, it can be a dizzying to navigate.&lt;/p&gt;&#xA;&lt;p&gt;Let’s take a look at some of the more major components.&lt;/p&gt;&#xA;&lt;h3 id=&#34;vmware-esxi&#34;&gt;&lt;a href=&#34;https://www.vmware.com/products/esxi-and-esx.html&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;VMWare ESXi&lt;/a&gt;&lt;/h3&gt;&#xA;&lt;p&gt;If you’ve ever heard of the “Purple Screen of Death” being uttered from the mouths of your system administrators, they are speaking of ESXi.  ESXi is the underlying hypervisor (also know as the kernel) that serves as the platform guest virtual machines that reside within its immediate realm.  The Purple Screen of Death occurs when the kernel has encountered a critical error which is equivalent to the Blue Screen of Death of Windows.  You can have multiple ESXi installations and you can even cluster them just as you would a Windows Server installation.&lt;/p&gt;&#xA;&lt;h3 id=&#34;vmware-vsphere&#34;&gt;&lt;a href=&#34;https://www.vmware.com/products/vsphere.html&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;VMWare vSphere&lt;/a&gt;&lt;/h3&gt;&#xA;&lt;p&gt;For quite a while I always thought that vSphere was a “thing” like another widget in the grand scheme of VMWare’s world of virtualization.  Turns out, I was wrong.  The term “vSphere” is really just an over-arching umbrella that refers to the entire eco-system of virtualization products that VMWare offers.   Nothing more.&lt;/p&gt;&#xA;&lt;h3 id=&#34;vmware-vcenter&#34;&gt;&lt;a href=&#34;https://www.vmware.com/products/vcenter-server.html&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;VMWare vCenter&lt;/a&gt;&lt;/h3&gt;&#xA;&lt;p&gt;If you have ever had to manage a large server farm with potentially hundreds or thousands of servers, you know that it can become quite tedious to manage things properly.  This is where vCenter steps in and helps to save the day. vCenter is a tool that is used to help centralize, manage, and orchestra the virtual machine environment.   Through vCenter, you can create and destroy virtual machines or even manage the underlying ESXi host.&lt;/p&gt;&#xA;&lt;h3 id=&#34;vmotion&#34;&gt;&lt;a href=&#34;https://www.vmware.com/pdf/vmotion_datasheet.pdf&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;vMotion&lt;/a&gt;&lt;/h3&gt;&#xA;&lt;p&gt;vMotion isn’t really a product rather it’s an action.  If you have multiple VMWare ESXi servers in a cluster formation (where they all know about each other) you can seamlessly move virtual machines, while they are running, from one host to another.  This is know as “vMotioning” the virtual machine.    It’s a very slick and useful technology which allows administrators to quickly balance virtual machine resources across each host to help prevent over-allocation of compute resources.&lt;/p&gt;&#xA;&lt;h3 id=&#34;summary&#34;&gt;Summary&lt;/h3&gt;&#xA;&lt;p&gt;There are a number of moving parts for VMWare’s eco-system.  This makes sense because it is designed for enterprise deployments of potentially vast scale.  While you can certainly use it for smaller organizations, there may be better and cheaper alternatives.  However, if you are looking to move to VMWare for your organization just know that it’s a top player in the market and I’ve worked with many clients that deploy it with success.&lt;/p&gt;&#xA;&lt;p&gt;VMWare provides deeper understand of its components &lt;a href=&#34;https://docs.vmware.com/en/VMware-vSphere/7.0/com.vmware.vsphere.vcenterhost.doc/GUID-302A4F73-CA2D-49DC-8727-81052727A763.html&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;here&lt;/a&gt; that you can read further if you want.&lt;/p&gt;&#xA;</description>
      <content:encoded>&lt;p&gt;Recently I was looking to install VMWare components in my local network of things so that I could gain additional knowledge of how VMWare works.   I have a local &lt;a href=&#34;https://johnmorehouse.com/2021/07/is-18tb-of-storage-enough/&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;Synology DS920+&lt;/a&gt; which can run virtual machines and I have about 18TB of space to play with so I thought this would be a good experiment.  The tricky part is that VMWare’s ecosystem has a couple of different components to it.  If you aren’t familiar with those components, it can be a dizzying to navigate.&lt;/p&gt;&#xA;&lt;p&gt;Let’s take a look at some of the more major components.&lt;/p&gt;&#xA;&lt;h3 id=&#34;vmware-esxi&#34;&gt;&lt;a href=&#34;https://www.vmware.com/products/esxi-and-esx.html&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;VMWare ESXi&lt;/a&gt;&lt;/h3&gt;&#xA;&lt;p&gt;If you’ve ever heard of the “Purple Screen of Death” being uttered from the mouths of your system administrators, they are speaking of ESXi.  ESXi is the underlying hypervisor (also know as the kernel) that serves as the platform guest virtual machines that reside within its immediate realm.  The Purple Screen of Death occurs when the kernel has encountered a critical error which is equivalent to the Blue Screen of Death of Windows.  You can have multiple ESXi installations and you can even cluster them just as you would a Windows Server installation.&lt;/p&gt;&#xA;&lt;h3 id=&#34;vmware-vsphere&#34;&gt;&lt;a href=&#34;https://www.vmware.com/products/vsphere.html&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;VMWare vSphere&lt;/a&gt;&lt;/h3&gt;&#xA;&lt;p&gt;For quite a while I always thought that vSphere was a “thing” like another widget in the grand scheme of VMWare’s world of virtualization.  Turns out, I was wrong.  The term “vSphere” is really just an over-arching umbrella that refers to the entire eco-system of virtualization products that VMWare offers.   Nothing more.&lt;/p&gt;&#xA;&lt;h3 id=&#34;vmware-vcenter&#34;&gt;&lt;a href=&#34;https://www.vmware.com/products/vcenter-server.html&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;VMWare vCenter&lt;/a&gt;&lt;/h3&gt;&#xA;&lt;p&gt;If you have ever had to manage a large server farm with potentially hundreds or thousands of servers, you know that it can become quite tedious to manage things properly.  This is where vCenter steps in and helps to save the day. vCenter is a tool that is used to help centralize, manage, and orchestra the virtual machine environment.   Through vCenter, you can create and destroy virtual machines or even manage the underlying ESXi host.&lt;/p&gt;&#xA;&lt;h3 id=&#34;vmotion&#34;&gt;&lt;a href=&#34;https://www.vmware.com/pdf/vmotion_datasheet.pdf&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;vMotion&lt;/a&gt;&lt;/h3&gt;&#xA;&lt;p&gt;vMotion isn’t really a product rather it’s an action.  If you have multiple VMWare ESXi servers in a cluster formation (where they all know about each other) you can seamlessly move virtual machines, while they are running, from one host to another.  This is know as “vMotioning” the virtual machine.    It’s a very slick and useful technology which allows administrators to quickly balance virtual machine resources across each host to help prevent over-allocation of compute resources.&lt;/p&gt;&#xA;&lt;h3 id=&#34;summary&#34;&gt;Summary&lt;/h3&gt;&#xA;&lt;p&gt;There are a number of moving parts for VMWare’s eco-system.  This makes sense because it is designed for enterprise deployments of potentially vast scale.  While you can certainly use it for smaller organizations, there may be better and cheaper alternatives.  However, if you are looking to move to VMWare for your organization just know that it’s a top player in the market and I’ve worked with many clients that deploy it with success.&lt;/p&gt;&#xA;&lt;p&gt;VMWare provides deeper understand of its components &lt;a href=&#34;https://docs.vmware.com/en/VMware-vSphere/7.0/com.vmware.vsphere.vcenterhost.doc/GUID-302A4F73-CA2D-49DC-8727-81052727A763.html&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;here&lt;/a&gt; that you can read further if you want.&lt;/p&gt;&#xA;</content:encoded>
    </item>
    <item>
      <title>Moving VMWare Virtual Machines to Synology</title>
      <link>https://johnmorehouse.com/2021/09/moving-vmware-virtual-machines-to-synology/</link>
      <pubDate>Sun, 19 Sep 2021 14:15:40 +0000</pubDate>
      <guid>https://johnmorehouse.com/2021/09/moving-vmware-virtual-machines-to-synology/</guid>
      <description>&lt;p&gt;One of the reasons that I enjoy having a Synology DS920+ around is that that I can use it to experiment with virtualization. In this experiment, I’m going to move a virtual machine that I configured through VMWare’s Fusion which is running on my Mac laptop.&lt;/p&gt;&#xA;&lt;p&gt;This is just a blank Windows Server 2019 VM that has nothing installed on it.  I just needed a virtual machine to have some “meat” to it but it isn’t something that I care about in the event it gets trashed.&lt;/p&gt;&#xA;&lt;p&gt;&lt;span style=&#34;text-decoration: underline;&#34;&gt;&lt;strong&gt;VM Bundles&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&#xA;&lt;p&gt;When creating a virtual machine through VMWare Fusion, the files associated to the virtual machine are grouped together in what is called a “bundle”.  The bundle represents a the package that is the virtual machine.  We can see this by looking at the information on the file, as shown below.  This is for a blank Window Server 2019 VM that I had created.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://johnmorehouse.com/images/2021/12/2021-12-19_09-20-22.png&#34;&gt;&lt;img data-recalc-dims=&#34;1&#34; loading=&#34;lazy&#34; decoding=&#34;async&#34; class=&#34;aligncenter wp-image-9104&#34; src=&#34;https://johnmorehouse.com/images/2021/12/2021-12-19_09-20-22.png&#34; alt=&#34;&#34; width=&#34;449&#34; height=&#34;413&#34; srcset=&#34;https://johnmorehouse.com/images/2021/12/2021-12-19_09-20-22.png 642w, https://johnmorehouse.com/images/2021/12/2021-12-19_09-20-22.png 300w&#34; sizes=&#34;auto, (max-width: 449px) 100vw, 449px&#34; /&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;In this case, I’ve actually already moved it to my Synology via an SMB folder share.  I have a “VMs” folder on one of the volumes and that’s where I wanted to move the bundle to.&lt;/p&gt;&#xA;&lt;p&gt;&lt;span style=&#34;text-decoration: underline;&#34;&gt;&lt;strong&gt;Moving the Bundle&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&#xA;&lt;p&gt;So moving the bundle to the Synology was pretty straight forward.&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Create the folder on the appropriate volume on the Synology&lt;/li&gt;&#xA;&lt;li&gt;Move the physical bundle from your Mac to the SMB Share&lt;/li&gt;&#xA;&lt;li&gt;In VMWare Fusion, do an Open&lt;/li&gt;&#xA;&lt;li&gt;Browse to the VMBund on the share on the Synology&lt;/li&gt;&#xA;&lt;li&gt;Select the appropriate bundle&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;&lt;span style=&#34;text-decoration: underline;&#34;&gt;&lt;strong&gt;Gotchas&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&#xA;&lt;p&gt;In my case, I’m accessing the virtual machine over my local WiFi connection.  I’m using an Amplifier HD router which has been very stable for me while providing good bandwidth.  However, that being said, the virtual machine is slow.  The compute is happening on my local laptop but the physical VM files are located across the local area network on the Synology.&lt;/p&gt;&#xA;&lt;p&gt;Even though it’s definitely slower, I can function within the virtual machine without too much lag.  If you are on a busy network (like when my kids are gaming) your mileage will probably vary so take that into account.&lt;/p&gt;&#xA;&lt;p&gt;&lt;span style=&#34;text-decoration: underline;&#34;&gt;&lt;strong&gt;Summary&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&#xA;&lt;p&gt;Moving VM files around is a pretty easily accomplished.  In this case I just had to move the VMBundle from my local MacBook over to my Synology NAS and then open it within VMWare Fusion.  The performance isn’t the best, but it works for my experimentation.&lt;/p&gt;&#xA;</description>
      <content:encoded>&lt;p&gt;One of the reasons that I enjoy having a Synology DS920+ around is that that I can use it to experiment with virtualization. In this experiment, I’m going to move a virtual machine that I configured through VMWare’s Fusion which is running on my Mac laptop.&lt;/p&gt;&#xA;&lt;p&gt;This is just a blank Windows Server 2019 VM that has nothing installed on it.  I just needed a virtual machine to have some “meat” to it but it isn’t something that I care about in the event it gets trashed.&lt;/p&gt;&#xA;&lt;p&gt;&lt;span style=&#34;text-decoration: underline;&#34;&gt;&lt;strong&gt;VM Bundles&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&#xA;&lt;p&gt;When creating a virtual machine through VMWare Fusion, the files associated to the virtual machine are grouped together in what is called a “bundle”.  The bundle represents a the package that is the virtual machine.  We can see this by looking at the information on the file, as shown below.  This is for a blank Window Server 2019 VM that I had created.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://johnmorehouse.com/images/2021/12/2021-12-19_09-20-22.png&#34;&gt;&lt;img data-recalc-dims=&#34;1&#34; loading=&#34;lazy&#34; decoding=&#34;async&#34; class=&#34;aligncenter wp-image-9104&#34; src=&#34;https://johnmorehouse.com/images/2021/12/2021-12-19_09-20-22.png&#34; alt=&#34;&#34; width=&#34;449&#34; height=&#34;413&#34; srcset=&#34;https://johnmorehouse.com/images/2021/12/2021-12-19_09-20-22.png 642w, https://johnmorehouse.com/images/2021/12/2021-12-19_09-20-22.png 300w&#34; sizes=&#34;auto, (max-width: 449px) 100vw, 449px&#34; /&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;In this case, I’ve actually already moved it to my Synology via an SMB folder share.  I have a “VMs” folder on one of the volumes and that’s where I wanted to move the bundle to.&lt;/p&gt;&#xA;&lt;p&gt;&lt;span style=&#34;text-decoration: underline;&#34;&gt;&lt;strong&gt;Moving the Bundle&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&#xA;&lt;p&gt;So moving the bundle to the Synology was pretty straight forward.&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Create the folder on the appropriate volume on the Synology&lt;/li&gt;&#xA;&lt;li&gt;Move the physical bundle from your Mac to the SMB Share&lt;/li&gt;&#xA;&lt;li&gt;In VMWare Fusion, do an Open&lt;/li&gt;&#xA;&lt;li&gt;Browse to the VMBund on the share on the Synology&lt;/li&gt;&#xA;&lt;li&gt;Select the appropriate bundle&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;&lt;span style=&#34;text-decoration: underline;&#34;&gt;&lt;strong&gt;Gotchas&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&#xA;&lt;p&gt;In my case, I’m accessing the virtual machine over my local WiFi connection.  I’m using an Amplifier HD router which has been very stable for me while providing good bandwidth.  However, that being said, the virtual machine is slow.  The compute is happening on my local laptop but the physical VM files are located across the local area network on the Synology.&lt;/p&gt;&#xA;&lt;p&gt;Even though it’s definitely slower, I can function within the virtual machine without too much lag.  If you are on a busy network (like when my kids are gaming) your mileage will probably vary so take that into account.&lt;/p&gt;&#xA;&lt;p&gt;&lt;span style=&#34;text-decoration: underline;&#34;&gt;&lt;strong&gt;Summary&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&#xA;&lt;p&gt;Moving VM files around is a pretty easily accomplished.  In this case I just had to move the VMBundle from my local MacBook over to my Synology NAS and then open it within VMWare Fusion.  The performance isn’t the best, but it works for my experimentation.&lt;/p&gt;&#xA;</content:encoded>
    </item>
    <item>
      <title>For #JohnsDad</title>
      <link>https://johnmorehouse.com/2021/08/for-johnsdad/</link>
      <pubDate>Tue, 17 Aug 2021 17:30:33 +0000</pubDate>
      <guid>https://johnmorehouse.com/2021/08/for-johnsdad/</guid>
      <description>&lt;p&gt;Last week, on Wednesday August 11, 2021 at approximately 3:45PM Eastern, my Father left this world.  Much too early.  Covid took my Father from me, my family, and his grandchildren.  He had some underlying issues, but Covid is what pushed him over the edge.   Covid put him on a ventilator when nothing else worked.  If you remove Covid, he’d still be here, enjoying his retirement, traveling with his wife, and spending time with family and grandchildren.&lt;/p&gt;&#xA;&lt;p&gt;He did the right thing. He got vaccinated. He was immuno-compromised from other health issues. We discovered too late that those treatments destroyed any anti-bodies.&lt;/p&gt;&#xA;&lt;p&gt;He was my rock, absolutely one of my best friends and I am shattered beyond measure.&lt;/p&gt;&#xA;&lt;p&gt;My Dad, Duke, was a great man.  20 years of service in the United States Air Force, distinguished pilot and aircraft commander of the FB-111 Aardvark, flight instructor on T-37 Tweet and my one of my favorites, T-38 Talon.  He loved woodworking, golf (oh he loved golf!) and living life to it’s fullest.  He taught me about family, honor, respect, how to be a good dad to my own kids and countless other things.  Dad also never turned down sampling bourbon, delicious food, or a new adventure.&lt;/p&gt;&#xA;&lt;p&gt;I am truly the man I am today because of him. I am grateful beyond measure for that.   I miss him terribly.&lt;/p&gt;&#xA;&lt;p&gt;Some members of the #sqlfamily got a chance to meet my Dad.  He had joined me at a couple #sqlsaturday events in years past, namely in Nashville as it was an event we could easily drive to.  He loved the SQL Community and he loved that I was a part of it.  He was actually considering putting together a presentation and we were going to travel together to other events, speaking Father &amp;amp; Son.  Unfortunately, that won’t happen now.   Thanks to all of those who welcomed him and made sure he felt apart of the community.  He got to sit in the speaker rooms with me and talk to friends and colleagues and he had a ball every single time he did.  He loved those trips and spoke of them often.&lt;/p&gt;&#xA;&lt;p&gt;There’s even a Twitter hash for him, #JohnsDad.  He was a part of #sqlfamily.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://johnmorehouse.com/images/2021/08/Sqlsatnash_1.jpg&#34;&gt;&lt;img data-recalc-dims=&#34;1&#34; loading=&#34;lazy&#34; decoding=&#34;async&#34; class=&#34;wp-image-8576 size-full alignnone&#34; src=&#34;https://johnmorehouse.com/images/2021/08/Sqlsatnash_1.jpg&#34; alt=&#34;&#34; width=&#34;512&#34; height=&#34;385&#34; srcset=&#34;https://johnmorehouse.com/images/2021/08/Sqlsatnash_1.jpg 512w, https://johnmorehouse.com/images/2021/08/Sqlsatnash_1.jpg 300w&#34; sizes=&#34;auto, (max-width: 512px) 100vw, 512px&#34; /&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;heading&#34;&gt;&lt;a href=&#34;https://johnmorehouse.com/images/2021/08/Sqlsatnash_3.jpg&#34;&gt;&lt;img data-recalc-dims=&#34;1&#34; loading=&#34;lazy&#34; decoding=&#34;async&#34; class=&#34; wp-image-8578 alignnone&#34; src=&#34;https://johnmorehouse.com/images/2021/08/Sqlsatnash_3.jpg&#34; alt=&#34;&#34; width=&#34;358&#34; height=&#34;477&#34; srcset=&#34;https://johnmorehouse.com/images/2021/08/Sqlsatnash_3.jpg 384w, https://johnmorehouse.com/images/2021/08/Sqlsatnash_3.jpg 225w&#34; sizes=&#34;auto, (max-width: 358px) 100vw, 358px&#34; /&gt;&lt;/a&gt; &lt;a href=&#34;https://johnmorehouse.com/images/2021/08/Sqlsatnash_4.jpg&#34;&gt;&lt;img data-recalc-dims=&#34;1&#34; loading=&#34;lazy&#34; decoding=&#34;async&#34; class=&#34; wp-image-8579 alignnone&#34; src=&#34;https://johnmorehouse.com/images/2021/08/Sqlsatnash_4.jpg&#34; alt=&#34;&#34; width=&#34;359&#34; height=&#34;479&#34; srcset=&#34;https://johnmorehouse.com/images/2021/08/Sqlsatnash_4.jpg 384w, https://johnmorehouse.com/images/2021/08/Sqlsatnash_4.jpg 225w&#34; sizes=&#34;auto, (max-width: 359px) 100vw, 359px&#34; /&gt;&lt;/a&gt;&lt;/h3&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://johnmorehouse.com/images/2021/08/signal-2021-08-17-095108.jpeg&#34;&gt;&lt;img data-recalc-dims=&#34;1&#34; loading=&#34;lazy&#34; decoding=&#34;async&#34; class=&#34;size-large wp-image-8602 alignnone&#34; src=&#34;https://johnmorehouse.com/images/2021/08/signal-2021-08-17-095108.jpeg&#34; alt=&#34;&#34; width=&#34;640&#34; height=&#34;853&#34; srcset=&#34;https://johnmorehouse.com/images/2021/08/signal-2021-08-17-095108.jpeg 768w, https://johnmorehouse.com/images/2021/08/signal-2021-08-17-095108.jpeg 225w, https://johnmorehouse.com/images/2021/08/signal-2021-08-17-095108.jpeg 1152w, https://johnmorehouse.com/images/2021/08/signal-2021-08-17-095108.jpeg 1536w, https://johnmorehouse.com/images/2021/08/signal-2021-08-17-095108.jpeg 1280w&#34; sizes=&#34;auto, (max-width: 640px) 100vw, 640px&#34; /&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;He was a good sport and was always up for a laugh.&lt;/p&gt;&#xA;&lt;p&gt;Dad truly believed living life by the moto: Love, Laugh, Live.  So say we all.&lt;/p&gt;&#xA;&lt;h3 id=&#34;if-you-wear-a-mask&#34;&gt;If You Wear a Mask&lt;/h3&gt;&#xA;&lt;p&gt;Thank you.&lt;/p&gt;&#xA;&lt;p&gt;Wearing a mask costs us next to nothing and it’s the right thing to do.  Continue to wear your mask.  Just because you are vaccinated doesn’t mean that you can’t contract the virus or spread it to others.&lt;/p&gt;&#xA;&lt;p&gt;Continue to wear your mask, please.  For me.  For Dad.&lt;/p&gt;&#xA;&lt;h3 id=&#34;if-you-dont-wear-a-mask&#34;&gt;If You Don’t Wear a Mask&lt;/h3&gt;&#xA;&lt;p&gt;If you do not believe in masking up to protect others from Covid you dishonor him. If you dishonor him, you dishonor me.&lt;/p&gt;&#xA;&lt;p&gt;It’s possible that my Dad died because of people like you.  I don’t know and I’ll never know.  All because you do not want to wear a mask.&lt;/p&gt;&#xA;&lt;p&gt;If you don’t want to wear a mask for yourself, then wear one for others. After all, the Father you save could be your own.  I wish you could have saved mine.&lt;/p&gt;&#xA;&lt;p&gt;Don’t let my Dad’s death be in vain.  Mask up.  Please.  If not for me, then for him.&lt;/p&gt;&#xA;&lt;p&gt;Take one step further and get vaccinated.  Getting vaccinated helps to protect those that can’t be protected and slows the spread of the virus.&lt;/p&gt;&#xA;&lt;p&gt;For Dad.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://johnmorehouse.com/images/2021/08/Wine-trip.jpg&#34;&gt;&lt;img data-recalc-dims=&#34;1&#34; loading=&#34;lazy&#34; decoding=&#34;async&#34; class=&#34;size-full wp-image-8581 alignnone&#34; src=&#34;https://johnmorehouse.com/images/2021/08/Wine-trip.jpg&#34; alt=&#34;&#34; width=&#34;512&#34; height=&#34;385&#34; srcset=&#34;https://johnmorehouse.com/images/2021/08/Wine-trip.jpg 512w, https://johnmorehouse.com/images/2021/08/Wine-trip.jpg 300w&#34; sizes=&#34;auto, (max-width: 512px) 100vw, 512px&#34; /&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;I love you Dad.&lt;/p&gt;&#xA;</description>
      <content:encoded>&lt;p&gt;Last week, on Wednesday August 11, 2021 at approximately 3:45PM Eastern, my Father left this world.  Much too early.  Covid took my Father from me, my family, and his grandchildren.  He had some underlying issues, but Covid is what pushed him over the edge.   Covid put him on a ventilator when nothing else worked.  If you remove Covid, he’d still be here, enjoying his retirement, traveling with his wife, and spending time with family and grandchildren.&lt;/p&gt;&#xA;&lt;p&gt;He did the right thing. He got vaccinated. He was immuno-compromised from other health issues. We discovered too late that those treatments destroyed any anti-bodies.&lt;/p&gt;&#xA;&lt;p&gt;He was my rock, absolutely one of my best friends and I am shattered beyond measure.&lt;/p&gt;&#xA;&lt;p&gt;My Dad, Duke, was a great man.  20 years of service in the United States Air Force, distinguished pilot and aircraft commander of the FB-111 Aardvark, flight instructor on T-37 Tweet and my one of my favorites, T-38 Talon.  He loved woodworking, golf (oh he loved golf!) and living life to it’s fullest.  He taught me about family, honor, respect, how to be a good dad to my own kids and countless other things.  Dad also never turned down sampling bourbon, delicious food, or a new adventure.&lt;/p&gt;&#xA;&lt;p&gt;I am truly the man I am today because of him. I am grateful beyond measure for that.   I miss him terribly.&lt;/p&gt;&#xA;&lt;p&gt;Some members of the #sqlfamily got a chance to meet my Dad.  He had joined me at a couple #sqlsaturday events in years past, namely in Nashville as it was an event we could easily drive to.  He loved the SQL Community and he loved that I was a part of it.  He was actually considering putting together a presentation and we were going to travel together to other events, speaking Father &amp;amp; Son.  Unfortunately, that won’t happen now.   Thanks to all of those who welcomed him and made sure he felt apart of the community.  He got to sit in the speaker rooms with me and talk to friends and colleagues and he had a ball every single time he did.  He loved those trips and spoke of them often.&lt;/p&gt;&#xA;&lt;p&gt;There’s even a Twitter hash for him, #JohnsDad.  He was a part of #sqlfamily.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://johnmorehouse.com/images/2021/08/Sqlsatnash_1.jpg&#34;&gt;&lt;img data-recalc-dims=&#34;1&#34; loading=&#34;lazy&#34; decoding=&#34;async&#34; class=&#34;wp-image-8576 size-full alignnone&#34; src=&#34;https://johnmorehouse.com/images/2021/08/Sqlsatnash_1.jpg&#34; alt=&#34;&#34; width=&#34;512&#34; height=&#34;385&#34; srcset=&#34;https://johnmorehouse.com/images/2021/08/Sqlsatnash_1.jpg 512w, https://johnmorehouse.com/images/2021/08/Sqlsatnash_1.jpg 300w&#34; sizes=&#34;auto, (max-width: 512px) 100vw, 512px&#34; /&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;heading&#34;&gt;&lt;a href=&#34;https://johnmorehouse.com/images/2021/08/Sqlsatnash_3.jpg&#34;&gt;&lt;img data-recalc-dims=&#34;1&#34; loading=&#34;lazy&#34; decoding=&#34;async&#34; class=&#34; wp-image-8578 alignnone&#34; src=&#34;https://johnmorehouse.com/images/2021/08/Sqlsatnash_3.jpg&#34; alt=&#34;&#34; width=&#34;358&#34; height=&#34;477&#34; srcset=&#34;https://johnmorehouse.com/images/2021/08/Sqlsatnash_3.jpg 384w, https://johnmorehouse.com/images/2021/08/Sqlsatnash_3.jpg 225w&#34; sizes=&#34;auto, (max-width: 358px) 100vw, 358px&#34; /&gt;&lt;/a&gt; &lt;a href=&#34;https://johnmorehouse.com/images/2021/08/Sqlsatnash_4.jpg&#34;&gt;&lt;img data-recalc-dims=&#34;1&#34; loading=&#34;lazy&#34; decoding=&#34;async&#34; class=&#34; wp-image-8579 alignnone&#34; src=&#34;https://johnmorehouse.com/images/2021/08/Sqlsatnash_4.jpg&#34; alt=&#34;&#34; width=&#34;359&#34; height=&#34;479&#34; srcset=&#34;https://johnmorehouse.com/images/2021/08/Sqlsatnash_4.jpg 384w, https://johnmorehouse.com/images/2021/08/Sqlsatnash_4.jpg 225w&#34; sizes=&#34;auto, (max-width: 359px) 100vw, 359px&#34; /&gt;&lt;/a&gt;&lt;/h3&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://johnmorehouse.com/images/2021/08/signal-2021-08-17-095108.jpeg&#34;&gt;&lt;img data-recalc-dims=&#34;1&#34; loading=&#34;lazy&#34; decoding=&#34;async&#34; class=&#34;size-large wp-image-8602 alignnone&#34; src=&#34;https://johnmorehouse.com/images/2021/08/signal-2021-08-17-095108.jpeg&#34; alt=&#34;&#34; width=&#34;640&#34; height=&#34;853&#34; srcset=&#34;https://johnmorehouse.com/images/2021/08/signal-2021-08-17-095108.jpeg 768w, https://johnmorehouse.com/images/2021/08/signal-2021-08-17-095108.jpeg 225w, https://johnmorehouse.com/images/2021/08/signal-2021-08-17-095108.jpeg 1152w, https://johnmorehouse.com/images/2021/08/signal-2021-08-17-095108.jpeg 1536w, https://johnmorehouse.com/images/2021/08/signal-2021-08-17-095108.jpeg 1280w&#34; sizes=&#34;auto, (max-width: 640px) 100vw, 640px&#34; /&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;He was a good sport and was always up for a laugh.&lt;/p&gt;&#xA;&lt;p&gt;Dad truly believed living life by the moto: Love, Laugh, Live.  So say we all.&lt;/p&gt;&#xA;&lt;h3 id=&#34;if-you-wear-a-mask&#34;&gt;If You Wear a Mask&lt;/h3&gt;&#xA;&lt;p&gt;Thank you.&lt;/p&gt;&#xA;&lt;p&gt;Wearing a mask costs us next to nothing and it’s the right thing to do.  Continue to wear your mask.  Just because you are vaccinated doesn’t mean that you can’t contract the virus or spread it to others.&lt;/p&gt;&#xA;&lt;p&gt;Continue to wear your mask, please.  For me.  For Dad.&lt;/p&gt;&#xA;&lt;h3 id=&#34;if-you-dont-wear-a-mask&#34;&gt;If You Don’t Wear a Mask&lt;/h3&gt;&#xA;&lt;p&gt;If you do not believe in masking up to protect others from Covid you dishonor him. If you dishonor him, you dishonor me.&lt;/p&gt;&#xA;&lt;p&gt;It’s possible that my Dad died because of people like you.  I don’t know and I’ll never know.  All because you do not want to wear a mask.&lt;/p&gt;&#xA;&lt;p&gt;If you don’t want to wear a mask for yourself, then wear one for others. After all, the Father you save could be your own.  I wish you could have saved mine.&lt;/p&gt;&#xA;&lt;p&gt;Don’t let my Dad’s death be in vain.  Mask up.  Please.  If not for me, then for him.&lt;/p&gt;&#xA;&lt;p&gt;Take one step further and get vaccinated.  Getting vaccinated helps to protect those that can’t be protected and slows the spread of the virus.&lt;/p&gt;&#xA;&lt;p&gt;For Dad.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://johnmorehouse.com/images/2021/08/Wine-trip.jpg&#34;&gt;&lt;img data-recalc-dims=&#34;1&#34; loading=&#34;lazy&#34; decoding=&#34;async&#34; class=&#34;size-full wp-image-8581 alignnone&#34; src=&#34;https://johnmorehouse.com/images/2021/08/Wine-trip.jpg&#34; alt=&#34;&#34; width=&#34;512&#34; height=&#34;385&#34; srcset=&#34;https://johnmorehouse.com/images/2021/08/Wine-trip.jpg 512w, https://johnmorehouse.com/images/2021/08/Wine-trip.jpg 300w&#34; sizes=&#34;auto, (max-width: 512px) 100vw, 512px&#34; /&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;I love you Dad.&lt;/p&gt;&#xA;</content:encoded>
    </item>
    <item>
      <title>How I carved up 18TB of Storage</title>
      <link>https://johnmorehouse.com/2021/08/how-i-carved-up-18tb-of-storage/</link>
      <pubDate>Fri, 13 Aug 2021 13:13:23 +0000</pubDate>
      <guid>https://johnmorehouse.com/2021/08/how-i-carved-up-18tb-of-storage/</guid>
      <description>&lt;p&gt;In a previous post I told you about how I got a Synology DS920+ on loan to play around with.  The device comes with 4 drive bays so there is a wide range of combinations that you can do in terms of drives.&lt;/p&gt;&#xA;&lt;p&gt;Since this is my first entrance into using the Synology line of products, and for data safety, I decided that I would purchase my own set of drives to use.  This ensures that if the device had to be returned I could keep the drives in my possession.  It’s my data after all and I want to keep it with me.   This also means that I could reuse the drives elsewhere if I wanted to, say maybe in a new external case.&lt;/p&gt;&#xA;&lt;p&gt;After looking at various drive options and based on the suggestion from my Synology contact, I choose the following Seagate Ironwolf Pro drives.&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;2 x 4TB 7200RPM Drives&lt;/li&gt;&#xA;&lt;li&gt;2 x 6TB 7200RPM Drives&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;The Ironwolf series of drives comes in a standard HDD and a Pro version.  The Pro version offers the higher rotation speed whereas the standard drive is 5900RPMs.   The price different for the higher speed was minimal so I decided to go with those speeds. I also was able to find the 6TB drives on Newegg.com for about the same price I found the 4TB drives on Amazon.&lt;/p&gt;&#xA;&lt;p&gt;So, 6+6+4+4 equals 18TB of total storage.&lt;/p&gt;&#xA;&lt;h3 id=&#34;lets-talk-storage-pools&#34;&gt;Let’s talk storage pools&lt;/h3&gt;&#xA;&lt;p&gt;Now, I’m actually not going to have just 18TB sitting around waiting for me to do something with it.  I’m going to carve this up into different pools.  In my previous post, I had mentioned that I want to play around with things like VMWare, volumes, storage, pools, etc. but I also want to be able to backup my home machines.  This means that I want to carve things up so that I have a “production side”, which will hold my backups, file shares, etc, and then a “development side”.  The development side will be storage in which I can play around with without worrying about causing issues with the production side.&lt;/p&gt;&#xA;&lt;p&gt;So, I’ve carved it out into two different storage pools.  The first pool, which will be production, will hold the two 6TB drives and one of the 4TB drives.  With Synology Hybrid RAID (SHR) doing the RAID for drive redundancy, this will give me a little less than 10TB of usable space.  This is calculated because one of the 6TB drive is used for the RAID redundancy which leaves 6+4 = 10TB of storage.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://johnmorehouse.com/images/2021/05/Screen-Shot-2021-05-08-at-8.56.37-PM.png&#34;&gt;&lt;img data-recalc-dims=&#34;1&#34; loading=&#34;lazy&#34; decoding=&#34;async&#34; class=&#34;aligncenter wp-image-7893&#34; src=&#34;https://johnmorehouse.com/images/2021/05/Screen-Shot-2021-05-08-at-8.56.37-PM.png&#34; alt=&#34;&#34; width=&#34;640&#34; height=&#34;99&#34; srcset=&#34;https://johnmorehouse.com/images/2021/05/Screen-Shot-2021-05-08-at-8.56.37-PM.png 1024w, https://johnmorehouse.com/images/2021/05/Screen-Shot-2021-05-08-at-8.56.37-PM.png 300w, https://johnmorehouse.com/images/2021/05/Screen-Shot-2021-05-08-at-8.56.37-PM.png 768w, https://johnmorehouse.com/images/2021/05/Screen-Shot-2021-05-08-at-8.56.37-PM.png 1536w, https://johnmorehouse.com/images/2021/05/Screen-Shot-2021-05-08-at-8.56.37-PM.png 2048w, https://johnmorehouse.com/images/2021/05/Screen-Shot-2021-05-08-at-8.56.37-PM.png 1280w, https://johnmorehouse.com/images/2021/05/Screen-Shot-2021-05-08-at-8.56.37-PM.png 1920w&#34; sizes=&#34;auto, (max-width: 640px) 100vw, 640px&#34; /&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;If I were to replace the 4TB with another 6TB drive, then I would get 6+6 = 12TB of usable storage.  Another benefit of the production pool is expandability.  With multiple drives in the pool, I can strategically expand the pool with newer and bigger drives if needed without having to recreate things.  The DS920+ supports hot-swapping drives (not all units do so make sure to verify) so there can be no downtime in switching drives.  In my case because I’m usually paranoid about causing damage, I always power down the unit just to be on the safe side.&lt;/p&gt;&#xA;&lt;p&gt;The second 4TB is placed into a pool all by itself.  This will be the development side of things.  Since it’s development, I’m not concerned about data redundancy at this point so it won’t be in any type of RAID group. Unfortunately, if I wanted to expand that pool with a bigger hard drive, I would have to completely destroy that it and pretty much start over.  At this point, however, I don’t think that I’ll run out of space any time soon.  4TB is still a lot of space to consume, especially in a development type of setting.&lt;/p&gt;&#xA;&lt;p&gt;After all said and done, I ended up with a little over 9TB and 3.6TB for Production and Development, respectively speaking.  That’s not bad at all!&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://johnmorehouse.com/images/2021/05/2021-05-30_09-21-16.png&#34;&gt;&lt;img data-recalc-dims=&#34;1&#34; loading=&#34;lazy&#34; decoding=&#34;async&#34; class=&#34;aligncenter wp-image-8154&#34; src=&#34;https://johnmorehouse.com/images/2021/05/2021-05-30_09-21-16.png&#34; alt=&#34;&#34; width=&#34;640&#34; height=&#34;112&#34; srcset=&#34;https://johnmorehouse.com/images/2021/05/2021-05-30_09-21-16.png 1024w, https://johnmorehouse.com/images/2021/05/2021-05-30_09-21-16.png 300w, https://johnmorehouse.com/images/2021/05/2021-05-30_09-21-16.png 768w, https://johnmorehouse.com/images/2021/05/2021-05-30_09-21-16.png 1536w, https://johnmorehouse.com/images/2021/05/2021-05-30_09-21-16.png 1888w, https://johnmorehouse.com/images/2021/05/2021-05-30_09-21-16.png 1280w&#34; sizes=&#34;auto, (max-width: 640px) 100vw, 640px&#34; /&gt;&lt;/a&gt;You will notice that Synology isn’t shy about telling you that you don’t have data protection on a storage pool. Since this is just a single drive, there’s no way for me to get it into a RAID configuration.  Given that it’s development stuff, I’m ok with that.&lt;/p&gt;&#xA;&lt;h3 id=&#34;summary&#34;&gt;Summary&lt;/h3&gt;&#xA;&lt;p&gt;If you are going to do something similar, take the time to put some thought into how you want things configured. The other thing that I did is ensure that I didn’t put anything on the array that was production right away.  By doing so it allowed me to mess around with the drives and experiment without worrying about destroying things.   Doing so will ensure that you have a good solid plan moving forward.&lt;/p&gt;&#xA;&lt;p&gt;How would you have carved up the storage?  Let me know in the comments!&lt;/p&gt;&#xA;</description>
      <content:encoded>&lt;p&gt;In a previous post I told you about how I got a Synology DS920+ on loan to play around with.  The device comes with 4 drive bays so there is a wide range of combinations that you can do in terms of drives.&lt;/p&gt;&#xA;&lt;p&gt;Since this is my first entrance into using the Synology line of products, and for data safety, I decided that I would purchase my own set of drives to use.  This ensures that if the device had to be returned I could keep the drives in my possession.  It’s my data after all and I want to keep it with me.   This also means that I could reuse the drives elsewhere if I wanted to, say maybe in a new external case.&lt;/p&gt;&#xA;&lt;p&gt;After looking at various drive options and based on the suggestion from my Synology contact, I choose the following Seagate Ironwolf Pro drives.&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;2 x 4TB 7200RPM Drives&lt;/li&gt;&#xA;&lt;li&gt;2 x 6TB 7200RPM Drives&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;The Ironwolf series of drives comes in a standard HDD and a Pro version.  The Pro version offers the higher rotation speed whereas the standard drive is 5900RPMs.   The price different for the higher speed was minimal so I decided to go with those speeds. I also was able to find the 6TB drives on Newegg.com for about the same price I found the 4TB drives on Amazon.&lt;/p&gt;&#xA;&lt;p&gt;So, 6+6+4+4 equals 18TB of total storage.&lt;/p&gt;&#xA;&lt;h3 id=&#34;lets-talk-storage-pools&#34;&gt;Let’s talk storage pools&lt;/h3&gt;&#xA;&lt;p&gt;Now, I’m actually not going to have just 18TB sitting around waiting for me to do something with it.  I’m going to carve this up into different pools.  In my previous post, I had mentioned that I want to play around with things like VMWare, volumes, storage, pools, etc. but I also want to be able to backup my home machines.  This means that I want to carve things up so that I have a “production side”, which will hold my backups, file shares, etc, and then a “development side”.  The development side will be storage in which I can play around with without worrying about causing issues with the production side.&lt;/p&gt;&#xA;&lt;p&gt;So, I’ve carved it out into two different storage pools.  The first pool, which will be production, will hold the two 6TB drives and one of the 4TB drives.  With Synology Hybrid RAID (SHR) doing the RAID for drive redundancy, this will give me a little less than 10TB of usable space.  This is calculated because one of the 6TB drive is used for the RAID redundancy which leaves 6+4 = 10TB of storage.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://johnmorehouse.com/images/2021/05/Screen-Shot-2021-05-08-at-8.56.37-PM.png&#34;&gt;&lt;img data-recalc-dims=&#34;1&#34; loading=&#34;lazy&#34; decoding=&#34;async&#34; class=&#34;aligncenter wp-image-7893&#34; src=&#34;https://johnmorehouse.com/images/2021/05/Screen-Shot-2021-05-08-at-8.56.37-PM.png&#34; alt=&#34;&#34; width=&#34;640&#34; height=&#34;99&#34; srcset=&#34;https://johnmorehouse.com/images/2021/05/Screen-Shot-2021-05-08-at-8.56.37-PM.png 1024w, https://johnmorehouse.com/images/2021/05/Screen-Shot-2021-05-08-at-8.56.37-PM.png 300w, https://johnmorehouse.com/images/2021/05/Screen-Shot-2021-05-08-at-8.56.37-PM.png 768w, https://johnmorehouse.com/images/2021/05/Screen-Shot-2021-05-08-at-8.56.37-PM.png 1536w, https://johnmorehouse.com/images/2021/05/Screen-Shot-2021-05-08-at-8.56.37-PM.png 2048w, https://johnmorehouse.com/images/2021/05/Screen-Shot-2021-05-08-at-8.56.37-PM.png 1280w, https://johnmorehouse.com/images/2021/05/Screen-Shot-2021-05-08-at-8.56.37-PM.png 1920w&#34; sizes=&#34;auto, (max-width: 640px) 100vw, 640px&#34; /&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;If I were to replace the 4TB with another 6TB drive, then I would get 6+6 = 12TB of usable storage.  Another benefit of the production pool is expandability.  With multiple drives in the pool, I can strategically expand the pool with newer and bigger drives if needed without having to recreate things.  The DS920+ supports hot-swapping drives (not all units do so make sure to verify) so there can be no downtime in switching drives.  In my case because I’m usually paranoid about causing damage, I always power down the unit just to be on the safe side.&lt;/p&gt;&#xA;&lt;p&gt;The second 4TB is placed into a pool all by itself.  This will be the development side of things.  Since it’s development, I’m not concerned about data redundancy at this point so it won’t be in any type of RAID group. Unfortunately, if I wanted to expand that pool with a bigger hard drive, I would have to completely destroy that it and pretty much start over.  At this point, however, I don’t think that I’ll run out of space any time soon.  4TB is still a lot of space to consume, especially in a development type of setting.&lt;/p&gt;&#xA;&lt;p&gt;After all said and done, I ended up with a little over 9TB and 3.6TB for Production and Development, respectively speaking.  That’s not bad at all!&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://johnmorehouse.com/images/2021/05/2021-05-30_09-21-16.png&#34;&gt;&lt;img data-recalc-dims=&#34;1&#34; loading=&#34;lazy&#34; decoding=&#34;async&#34; class=&#34;aligncenter wp-image-8154&#34; src=&#34;https://johnmorehouse.com/images/2021/05/2021-05-30_09-21-16.png&#34; alt=&#34;&#34; width=&#34;640&#34; height=&#34;112&#34; srcset=&#34;https://johnmorehouse.com/images/2021/05/2021-05-30_09-21-16.png 1024w, https://johnmorehouse.com/images/2021/05/2021-05-30_09-21-16.png 300w, https://johnmorehouse.com/images/2021/05/2021-05-30_09-21-16.png 768w, https://johnmorehouse.com/images/2021/05/2021-05-30_09-21-16.png 1536w, https://johnmorehouse.com/images/2021/05/2021-05-30_09-21-16.png 1888w, https://johnmorehouse.com/images/2021/05/2021-05-30_09-21-16.png 1280w&#34; sizes=&#34;auto, (max-width: 640px) 100vw, 640px&#34; /&gt;&lt;/a&gt;You will notice that Synology isn’t shy about telling you that you don’t have data protection on a storage pool. Since this is just a single drive, there’s no way for me to get it into a RAID configuration.  Given that it’s development stuff, I’m ok with that.&lt;/p&gt;&#xA;&lt;h3 id=&#34;summary&#34;&gt;Summary&lt;/h3&gt;&#xA;&lt;p&gt;If you are going to do something similar, take the time to put some thought into how you want things configured. The other thing that I did is ensure that I didn’t put anything on the array that was production right away.  By doing so it allowed me to mess around with the drives and experiment without worrying about destroying things.   Doing so will ensure that you have a good solid plan moving forward.&lt;/p&gt;&#xA;&lt;p&gt;How would you have carved up the storage?  Let me know in the comments!&lt;/p&gt;&#xA;</content:encoded>
    </item>
    <item>
      <title>How to put a SQL Server Database into Recovery Pending</title>
      <link>https://johnmorehouse.com/2021/07/how-to-put-a-sql-server-database-into-recovery-pending/</link>
      <pubDate>Fri, 30 Jul 2021 13:18:34 +0000</pubDate>
      <guid>https://johnmorehouse.com/2021/07/how-to-put-a-sql-server-database-into-recovery-pending/</guid>
      <description>&lt;p&gt;You might be asking why on earth would you want to get a database into an undesirable state, more specifically into a Recovery Pending state.  Well, in my case, I had a client database that had entered into this state due to a failure of storage.  Thankfully, this database was not being used for production, so I had some time to determine the best way to fix the issue.&lt;/p&gt;&#xA;&lt;p&gt;A phrase that was often used during my time in the fire service, was “Try Before You Pry”.  Does the front door of the house need to be kicked in?  It may be unlocked and by trying before prying (with my boot) I can prevent damage to the door.  In these types of scenarios, this philosophy holds true.  Try things out on non-critical databases will help prevent any further damage.&lt;/p&gt;&#xA;&lt;p&gt;In this instance, I want to try it before forcing something that might be damaging.  This meant I had to get a test database into a recovering state.  Once it is in the state I need, then I can attempt different methods to recover the database properly.  Once a successful solution is determined, I can then confidently pry against the damaged database in production knowing that I am using a validated solution.&lt;/p&gt;&#xA;&lt;p&gt;&lt;span style=&#34;text-decoration: underline;&#34;&gt;&lt;strong&gt;&lt;span style=&#34;color: #ff0000; text-decoration: underline;&#34;&gt;DISCLAIMER: DO NOT DO THIS ON A PRODUCTION SQL SERVER INSTANCE.&lt;/span&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&#xA;&lt;p&gt;You have been warned.&lt;/p&gt;&#xA;&lt;p&gt;&lt;span style=&#34;text-decoration: underline;&#34;&gt;&lt;strong&gt;&lt;span style=&#34;color: #ff0000; text-decoration: underline;&#34;&gt;DISCLAIMER: DO NOT DO THIS ON A PRODUCTION SQL SERVER INSTANCE.&lt;/span&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&#xA;&lt;p&gt;You have been warned. Again.&lt;/p&gt;&#xA;&lt;h2 id=&#34;how-do-you-get-a-database-into-a-recovery-pending-state&#34;&gt;How do you get a database into a recovery pending state?&lt;/h2&gt;&#xA;&lt;p&gt;Here is how I did this:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Start a new transaction.&lt;/li&gt;&#xA;&lt;li&gt;Create a new table.&lt;/li&gt;&#xA;&lt;li&gt;Stop the SQL Server service&lt;/li&gt;&#xA;&lt;li&gt;Rename/Delete the database log file.&lt;/li&gt;&#xA;&lt;li&gt;Restart the SQL Server Service&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;The database will be in a recovery pending state upon the restart of the SQL Server service.&lt;/p&gt;&#xA;&lt;h3 id=&#34;why-is-the-database-in-recovery-pending&#34;&gt;Why is the database in recovery pending?&lt;/h3&gt;&#xA;&lt;p&gt;When the database attempts to come back online, it will be put into a recovery pending state because the log file is not present but there was an open transaction when the service was shut down.  In normal operations, even with an open transaction, SQL Server would go through the recovery phase of the transaction log.  In the rollback phase of recovery, SQL Server would attempt to rollback and transaction that was open at the point of restart and undo the changes.  Since the log file no longer exists, it is unable to do so.&lt;/p&gt;&#xA;&lt;p&gt;Therefore, the database is now in the recovery pending status.  It’s pending recovery because there was an open transaction, but SQL Server is unable to bring the database into a consistent state.&lt;/p&gt;&#xA;&lt;p&gt;When this occurs, you will see something like this in the error log:&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://johnmorehouse.com/images/2021/05/DBPendingStateLogError.png&#34;&gt;&lt;img data-recalc-dims=&#34;1&#34; loading=&#34;lazy&#34; decoding=&#34;async&#34; class=&#34;aligncenter wp-image-8131&#34; src=&#34;https://johnmorehouse.com/images/2021/05/DBPendingStateLogError.png&#34; alt=&#34;&#34; width=&#34;640&#34; height=&#34;44&#34; srcset=&#34;https://johnmorehouse.com/images/2021/05/DBPendingStateLogError.png 624w, https://johnmorehouse.com/images/2021/05/DBPendingStateLogError.png 300w&#34; sizes=&#34;auto, (max-width: 640px) 100vw, 640px&#34; /&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;If the database is shut down cleanly and the transaction log file remove/renamed/etc., SQL Server will just rebuild the log file for you.&lt;/p&gt;&#xA;&lt;h2 id=&#34;summary&#34;&gt;Summary&lt;/h2&gt;&#xA;&lt;p&gt;Sometimes it is useful to be able to put a database into a specific state of being so that you can validate solutions before attempting to perform an action in a Production environment.  Just remember to try it before prying it.  Not doing so could just make things worse so being overly cautious is not a bad thing.&lt;/p&gt;&#xA;</description>
      <content:encoded>&lt;p&gt;You might be asking why on earth would you want to get a database into an undesirable state, more specifically into a Recovery Pending state.  Well, in my case, I had a client database that had entered into this state due to a failure of storage.  Thankfully, this database was not being used for production, so I had some time to determine the best way to fix the issue.&lt;/p&gt;&#xA;&lt;p&gt;A phrase that was often used during my time in the fire service, was “Try Before You Pry”.  Does the front door of the house need to be kicked in?  It may be unlocked and by trying before prying (with my boot) I can prevent damage to the door.  In these types of scenarios, this philosophy holds true.  Try things out on non-critical databases will help prevent any further damage.&lt;/p&gt;&#xA;&lt;p&gt;In this instance, I want to try it before forcing something that might be damaging.  This meant I had to get a test database into a recovering state.  Once it is in the state I need, then I can attempt different methods to recover the database properly.  Once a successful solution is determined, I can then confidently pry against the damaged database in production knowing that I am using a validated solution.&lt;/p&gt;&#xA;&lt;p&gt;&lt;span style=&#34;text-decoration: underline;&#34;&gt;&lt;strong&gt;&lt;span style=&#34;color: #ff0000; text-decoration: underline;&#34;&gt;DISCLAIMER: DO NOT DO THIS ON A PRODUCTION SQL SERVER INSTANCE.&lt;/span&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&#xA;&lt;p&gt;You have been warned.&lt;/p&gt;&#xA;&lt;p&gt;&lt;span style=&#34;text-decoration: underline;&#34;&gt;&lt;strong&gt;&lt;span style=&#34;color: #ff0000; text-decoration: underline;&#34;&gt;DISCLAIMER: DO NOT DO THIS ON A PRODUCTION SQL SERVER INSTANCE.&lt;/span&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;&#xA;&lt;p&gt;You have been warned. Again.&lt;/p&gt;&#xA;&lt;h2 id=&#34;how-do-you-get-a-database-into-a-recovery-pending-state&#34;&gt;How do you get a database into a recovery pending state?&lt;/h2&gt;&#xA;&lt;p&gt;Here is how I did this:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Start a new transaction.&lt;/li&gt;&#xA;&lt;li&gt;Create a new table.&lt;/li&gt;&#xA;&lt;li&gt;Stop the SQL Server service&lt;/li&gt;&#xA;&lt;li&gt;Rename/Delete the database log file.&lt;/li&gt;&#xA;&lt;li&gt;Restart the SQL Server Service&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;The database will be in a recovery pending state upon the restart of the SQL Server service.&lt;/p&gt;&#xA;&lt;h3 id=&#34;why-is-the-database-in-recovery-pending&#34;&gt;Why is the database in recovery pending?&lt;/h3&gt;&#xA;&lt;p&gt;When the database attempts to come back online, it will be put into a recovery pending state because the log file is not present but there was an open transaction when the service was shut down.  In normal operations, even with an open transaction, SQL Server would go through the recovery phase of the transaction log.  In the rollback phase of recovery, SQL Server would attempt to rollback and transaction that was open at the point of restart and undo the changes.  Since the log file no longer exists, it is unable to do so.&lt;/p&gt;&#xA;&lt;p&gt;Therefore, the database is now in the recovery pending status.  It’s pending recovery because there was an open transaction, but SQL Server is unable to bring the database into a consistent state.&lt;/p&gt;&#xA;&lt;p&gt;When this occurs, you will see something like this in the error log:&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://johnmorehouse.com/images/2021/05/DBPendingStateLogError.png&#34;&gt;&lt;img data-recalc-dims=&#34;1&#34; loading=&#34;lazy&#34; decoding=&#34;async&#34; class=&#34;aligncenter wp-image-8131&#34; src=&#34;https://johnmorehouse.com/images/2021/05/DBPendingStateLogError.png&#34; alt=&#34;&#34; width=&#34;640&#34; height=&#34;44&#34; srcset=&#34;https://johnmorehouse.com/images/2021/05/DBPendingStateLogError.png 624w, https://johnmorehouse.com/images/2021/05/DBPendingStateLogError.png 300w&#34; sizes=&#34;auto, (max-width: 640px) 100vw, 640px&#34; /&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;If the database is shut down cleanly and the transaction log file remove/renamed/etc., SQL Server will just rebuild the log file for you.&lt;/p&gt;&#xA;&lt;h2 id=&#34;summary&#34;&gt;Summary&lt;/h2&gt;&#xA;&lt;p&gt;Sometimes it is useful to be able to put a database into a specific state of being so that you can validate solutions before attempting to perform an action in a Production environment.  Just remember to try it before prying it.  Not doing so could just make things worse so being overly cautious is not a bad thing.&lt;/p&gt;&#xA;</content:encoded>
    </item>
    <item>
      <title>Is 18TB of Storage Enough?</title>
      <link>https://johnmorehouse.com/2021/07/is-18tb-of-storage-enough/</link>
      <pubDate>Fri, 16 Jul 2021 13:13:03 +0000</pubDate>
      <guid>https://johnmorehouse.com/2021/07/is-18tb-of-storage-enough/</guid>
      <description>&lt;p&gt;Come to find out, nope, probably not.  My good friend Jim Donahoe (&lt;a href=&#34;http://sqlflipflopsdba.com/&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;blog&lt;/a&gt;|&lt;a href=&#34;https://twitter.com/SQLFlipFlopsDBA&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;twitter&lt;/a&gt;)was very nice to tell me that he’s running 100TB of storage in his house across multiple Synology devices.  I also know for a fact that another good friend, David Klee (&lt;a href=&#34;http://www.davidklee.net/&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;blog&lt;/a&gt;|&lt;a href=&#34;https://twitter.com/kleegeek&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;twitter&lt;/a&gt;), utilizes enough storage in his house to help heat his home during winter in Nebraska.  I’m no where close! You might have guessed that I’ve added storage to my home network.  18TB of it to be more precise.&lt;/p&gt;&#xA;&lt;p&gt;The real question is, what am I going to do with 18TB of storage at home? What would you do with it or even 100TB?&lt;/p&gt;&#xA;&lt;p&gt;&lt;em&gt;Disclaimer&lt;/em&gt;:  I got a Synology DS920+ from Synology on loan in exchange for reviewing it, playing around with it and writing some blogs. Honestly I’ve wanted one for years but never got around to picking one up so I’m really excited to have this opportunity. It came with 2 380GB Synology NVMe SSD drives to be used for caching.  I purchased my own hard drives so that if or when I have to return the unit I can keep the drives to ensure my data stays with me.  Plus, it never hurts to have some spare hard drives laying around.  Yes, I know, I’m paranoid.&lt;/p&gt;&#xA;&lt;p&gt;Now, back to my question.  Why am I doing this?&lt;/p&gt;&#xA;&lt;p&gt;For a couple of different reasons actually.&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;One thing that I really want is to do some hands on work with storage pools and volumes.  While I know the fundamentals, having this DS920 physically on my network loaded with drives gives me the chance to carve out storage pools and volumes.&lt;/li&gt;&#xA;&lt;li&gt;This also gives me the change to work with the Synology Hybrid RAID (SHR).&lt;/li&gt;&#xA;&lt;li&gt;Backups, backups, backups.  With now 18TB of raw usable storage for distribution, I can ensure all of my computers within my house are backed up. I won’t get the full 18TB when using RAID, but that’s still a good chunk of drive space.&lt;/li&gt;&#xA;&lt;li&gt;You can use certain Synology units as Virtual Machine managers.  While I can use Azure to facilitate this, sometimes I don’t want to mess with remembering to deallocate VM’s when I’m done with them.  This will also let me work with iSCSI targets and attempt some VMWare migrations along with some other VMWare related ideas.&lt;/li&gt;&#xA;&lt;li&gt;Synology package manager also comes with a slew of useful packages (like a VPN server, Docker, Backup managers, etc) that will offer up some flexibility in testing things as situations come up.  I’m really interested in the VPN capabilities as well as the ability to backup the entire array to cloud storage.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;I’m really looking forward to being able to learn some things about Synology as well as provide valuable backup options for my various laptops and workstations.&lt;/p&gt;&#xA;&lt;p&gt;If you are curious, here are some general specifications for the unit:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Model – DS920+&lt;/li&gt;&#xA;&lt;li&gt;CPU – 4 core 2.0Ghz (base) Intel Celeron J4125&lt;/li&gt;&#xA;&lt;li&gt;Memory – 4GB expandable to 8GB&lt;/li&gt;&#xA;&lt;li&gt;Drive Bays – 4&lt;/li&gt;&#xA;&lt;li&gt;M.2 Drive Slots – 2 (NVMe SSD)&lt;/li&gt;&#xA;&lt;li&gt;Ethernet – 2 x RJ-45 1GbE LAN Port (link aggregation / failover)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://johnmorehouse.com/images/2021/05/2021-05-05-17.59.03-scaled.jpg&#34;&gt;&lt;img data-recalc-dims=&#34;1&#34; loading=&#34;lazy&#34; decoding=&#34;async&#34; class=&#34;aligncenter wp-image-8152&#34; src=&#34;https://johnmorehouse.com/images/2021/05/2021-05-05-17.59.03.jpg&#34; alt=&#34;&#34; width=&#34;543&#34; height=&#34;407&#34; srcset=&#34;https://johnmorehouse.com/images/2021/05/2021-05-05-17.59.03-scaled.jpg 1024w, https://johnmorehouse.com/images/2021/05/2021-05-05-17.59.03-scaled.jpg 300w, https://johnmorehouse.com/images/2021/05/2021-05-05-17.59.03-scaled.jpg 768w, https://johnmorehouse.com/images/2021/05/2021-05-05-17.59.03-scaled.jpg 1536w, https://johnmorehouse.com/images/2021/05/2021-05-05-17.59.03-scaled.jpg 2048w, https://johnmorehouse.com/images/2021/05/2021-05-05-17.59.03-scaled.jpg 1280w, https://johnmorehouse.com/images/2021/05/2021-05-05-17.59.03-scaled.jpg 1920w&#34; sizes=&#34;auto, (max-width: 543px) 100vw, 543px&#34; /&gt;&lt;/a&gt;Stay tuned for future posts about getting everything setup as well as the drives that I have installed.  I am planning on blogging about how I’m using this device and what you can do with it.&lt;/p&gt;&#xA;&lt;p&gt;Do you have a Synology device in your home? What do you use it for? Leave a comment and let me know!&lt;/p&gt;&#xA;</description>
      <content:encoded>&lt;p&gt;Come to find out, nope, probably not.  My good friend Jim Donahoe (&lt;a href=&#34;http://sqlflipflopsdba.com/&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;blog&lt;/a&gt;|&lt;a href=&#34;https://twitter.com/SQLFlipFlopsDBA&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;twitter&lt;/a&gt;)was very nice to tell me that he’s running 100TB of storage in his house across multiple Synology devices.  I also know for a fact that another good friend, David Klee (&lt;a href=&#34;http://www.davidklee.net/&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;blog&lt;/a&gt;|&lt;a href=&#34;https://twitter.com/kleegeek&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;twitter&lt;/a&gt;), utilizes enough storage in his house to help heat his home during winter in Nebraska.  I’m no where close! You might have guessed that I’ve added storage to my home network.  18TB of it to be more precise.&lt;/p&gt;&#xA;&lt;p&gt;The real question is, what am I going to do with 18TB of storage at home? What would you do with it or even 100TB?&lt;/p&gt;&#xA;&lt;p&gt;&lt;em&gt;Disclaimer&lt;/em&gt;:  I got a Synology DS920+ from Synology on loan in exchange for reviewing it, playing around with it and writing some blogs. Honestly I’ve wanted one for years but never got around to picking one up so I’m really excited to have this opportunity. It came with 2 380GB Synology NVMe SSD drives to be used for caching.  I purchased my own hard drives so that if or when I have to return the unit I can keep the drives to ensure my data stays with me.  Plus, it never hurts to have some spare hard drives laying around.  Yes, I know, I’m paranoid.&lt;/p&gt;&#xA;&lt;p&gt;Now, back to my question.  Why am I doing this?&lt;/p&gt;&#xA;&lt;p&gt;For a couple of different reasons actually.&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;One thing that I really want is to do some hands on work with storage pools and volumes.  While I know the fundamentals, having this DS920 physically on my network loaded with drives gives me the chance to carve out storage pools and volumes.&lt;/li&gt;&#xA;&lt;li&gt;This also gives me the change to work with the Synology Hybrid RAID (SHR).&lt;/li&gt;&#xA;&lt;li&gt;Backups, backups, backups.  With now 18TB of raw usable storage for distribution, I can ensure all of my computers within my house are backed up. I won’t get the full 18TB when using RAID, but that’s still a good chunk of drive space.&lt;/li&gt;&#xA;&lt;li&gt;You can use certain Synology units as Virtual Machine managers.  While I can use Azure to facilitate this, sometimes I don’t want to mess with remembering to deallocate VM’s when I’m done with them.  This will also let me work with iSCSI targets and attempt some VMWare migrations along with some other VMWare related ideas.&lt;/li&gt;&#xA;&lt;li&gt;Synology package manager also comes with a slew of useful packages (like a VPN server, Docker, Backup managers, etc) that will offer up some flexibility in testing things as situations come up.  I’m really interested in the VPN capabilities as well as the ability to backup the entire array to cloud storage.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;I’m really looking forward to being able to learn some things about Synology as well as provide valuable backup options for my various laptops and workstations.&lt;/p&gt;&#xA;&lt;p&gt;If you are curious, here are some general specifications for the unit:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Model – DS920+&lt;/li&gt;&#xA;&lt;li&gt;CPU – 4 core 2.0Ghz (base) Intel Celeron J4125&lt;/li&gt;&#xA;&lt;li&gt;Memory – 4GB expandable to 8GB&lt;/li&gt;&#xA;&lt;li&gt;Drive Bays – 4&lt;/li&gt;&#xA;&lt;li&gt;M.2 Drive Slots – 2 (NVMe SSD)&lt;/li&gt;&#xA;&lt;li&gt;Ethernet – 2 x RJ-45 1GbE LAN Port (link aggregation / failover)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://johnmorehouse.com/images/2021/05/2021-05-05-17.59.03-scaled.jpg&#34;&gt;&lt;img data-recalc-dims=&#34;1&#34; loading=&#34;lazy&#34; decoding=&#34;async&#34; class=&#34;aligncenter wp-image-8152&#34; src=&#34;https://johnmorehouse.com/images/2021/05/2021-05-05-17.59.03.jpg&#34; alt=&#34;&#34; width=&#34;543&#34; height=&#34;407&#34; srcset=&#34;https://johnmorehouse.com/images/2021/05/2021-05-05-17.59.03-scaled.jpg 1024w, https://johnmorehouse.com/images/2021/05/2021-05-05-17.59.03-scaled.jpg 300w, https://johnmorehouse.com/images/2021/05/2021-05-05-17.59.03-scaled.jpg 768w, https://johnmorehouse.com/images/2021/05/2021-05-05-17.59.03-scaled.jpg 1536w, https://johnmorehouse.com/images/2021/05/2021-05-05-17.59.03-scaled.jpg 2048w, https://johnmorehouse.com/images/2021/05/2021-05-05-17.59.03-scaled.jpg 1280w, https://johnmorehouse.com/images/2021/05/2021-05-05-17.59.03-scaled.jpg 1920w&#34; sizes=&#34;auto, (max-width: 543px) 100vw, 543px&#34; /&gt;&lt;/a&gt;Stay tuned for future posts about getting everything setup as well as the drives that I have installed.  I am planning on blogging about how I’m using this device and what you can do with it.&lt;/p&gt;&#xA;&lt;p&gt;Do you have a Synology device in your home? What do you use it for? Leave a comment and let me know!&lt;/p&gt;&#xA;</content:encoded>
    </item>
    <item>
      <title>Quickly Determining Azure SQL Database Size</title>
      <link>https://johnmorehouse.com/2021/07/quickly-determining-azure-sql-database-size/</link>
      <pubDate>Fri, 02 Jul 2021 14:00:25 +0000</pubDate>
      <guid>https://johnmorehouse.com/2021/07/quickly-determining-azure-sql-database-size/</guid>
      <description>&lt;p&gt;Recently I needed to determine how much storage space each database on a logical server was consuming.  I was doing some DR testing and I need to give the client a rough estimate on how much each database was going to cost.  You can do this through the Azure portal where you interrogate each individual database, however, this is a long and tedious process especially if you have many databases on a given instance.&lt;/p&gt;&#xA;&lt;p&gt;Essentially, I was looking for the information shown below in the red box. &lt;a href=&#34;https://johnmorehouse.com/images/2021/05/AzureDBSizes.png&#34;&gt;&lt;img data-recalc-dims=&#34;1&#34; loading=&#34;lazy&#34; decoding=&#34;async&#34; class=&#34;aligncenter size-full wp-image-8138&#34; src=&#34;https://johnmorehouse.com/images/2021/05/AzureDBSizes.png&#34; alt=&#34;&#34; width=&#34;624&#34; height=&#34;522&#34; srcset=&#34;https://johnmorehouse.com/images/2021/05/AzureDBSizes.png 624w, https://johnmorehouse.com/images/2021/05/AzureDBSizes.png 300w&#34; sizes=&#34;auto, (max-width: 624px) 100vw, 624px&#34; /&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;I did not want to have to go into each database and manually record the appropriate values.  Instead, I went looking for a faster way and discovered sys.resource_stats.&lt;/p&gt;&#xA;&lt;h2 id=&#34;what-is-sysresource_stats&#34;&gt;What is sys.resource_stats?&lt;/h2&gt;&#xA;&lt;p&gt;This is a dynamic management view (DMV) that is explicitly available to Azure SQL Database and Azure SQL Managed Instance.  In other words, you will not be able to find this DMV available with on-premises installations including those instances installed on an Azure Virtual Machine.&lt;/p&gt;&#xA;&lt;p&gt;This DMV will show us information related to the amount of storage that a database is consuming as well as how much storage is allocated to the database currently.  This DMV will not, however, show you the maximize amount of storage the database can consume.&lt;/p&gt;&#xA;&lt;p&gt;Here is a quick script that you can use to easily determine how much consumed and allocated storage each database has.&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-sql&#34; data-lang=&#34;sql&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;SELECT&lt;/span&gt; &lt;span style=&#34;color:#66d9ef&#34;&gt;MAX&lt;/span&gt;(start_time) &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;Last Collection Time&amp;#39;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    , database_name, &lt;span style=&#34;color:#66d9ef&#34;&gt;MAX&lt;/span&gt;(storage_in_megabytes) &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;Current Size(MBs)&amp;#39;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    , &lt;span style=&#34;color:#66d9ef&#34;&gt;MAX&lt;/span&gt;(allocated_storage_in_megabytes) &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;Allocated Storage (MBs)&amp;#39;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;FROM&lt;/span&gt; sys.resource_stats &#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;GROUP&lt;/span&gt; &lt;span style=&#34;color:#66d9ef&#34;&gt;BY&lt;/span&gt; database_name&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&lt;a href=&#34;https://johnmorehouse.com/images/2021/05/AzureDBSizesResults.png&#34;&gt;&lt;img data-recalc-dims=&#34;1&#34; loading=&#34;lazy&#34; decoding=&#34;async&#34; class=&#34;aligncenter size-full wp-image-8139&#34; src=&#34;https://johnmorehouse.com/images/2021/05/AzureDBSizesResults.png&#34; alt=&#34;&#34; width=&#34;624&#34; height=&#34;195&#34; srcset=&#34;https://johnmorehouse.com/images/2021/05/AzureDBSizesResults.png 624w, https://johnmorehouse.com/images/2021/05/AzureDBSizesResults.png 300w&#34; sizes=&#34;auto, (max-width: 624px) 100vw, 624px&#34; /&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;We can see that by using this DMV the values returned match the values provided via the portal.&lt;/p&gt;&#xA;&lt;p&gt;One thing to note is that if the database is in the serverless tier and it has not been online for some time, this DMV will not capture the information. However, if you the database has been active, the data will be available to you.&lt;/p&gt;&#xA;&lt;h2 id=&#34;summary&#34;&gt;Summary&lt;/h2&gt;&#xA;&lt;p&gt;This was a quick script to determine quickly and easily how much storage my clients’ databases are consuming.  Armed with this information it made it easier to calculate the pricing information they were asking for without having to interrogate the Azure portal.&lt;/p&gt;&#xA;</description>
      <content:encoded>&lt;p&gt;Recently I needed to determine how much storage space each database on a logical server was consuming.  I was doing some DR testing and I need to give the client a rough estimate on how much each database was going to cost.  You can do this through the Azure portal where you interrogate each individual database, however, this is a long and tedious process especially if you have many databases on a given instance.&lt;/p&gt;&#xA;&lt;p&gt;Essentially, I was looking for the information shown below in the red box. &lt;a href=&#34;https://johnmorehouse.com/images/2021/05/AzureDBSizes.png&#34;&gt;&lt;img data-recalc-dims=&#34;1&#34; loading=&#34;lazy&#34; decoding=&#34;async&#34; class=&#34;aligncenter size-full wp-image-8138&#34; src=&#34;https://johnmorehouse.com/images/2021/05/AzureDBSizes.png&#34; alt=&#34;&#34; width=&#34;624&#34; height=&#34;522&#34; srcset=&#34;https://johnmorehouse.com/images/2021/05/AzureDBSizes.png 624w, https://johnmorehouse.com/images/2021/05/AzureDBSizes.png 300w&#34; sizes=&#34;auto, (max-width: 624px) 100vw, 624px&#34; /&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;I did not want to have to go into each database and manually record the appropriate values.  Instead, I went looking for a faster way and discovered sys.resource_stats.&lt;/p&gt;&#xA;&lt;h2 id=&#34;what-is-sysresource_stats&#34;&gt;What is sys.resource_stats?&lt;/h2&gt;&#xA;&lt;p&gt;This is a dynamic management view (DMV) that is explicitly available to Azure SQL Database and Azure SQL Managed Instance.  In other words, you will not be able to find this DMV available with on-premises installations including those instances installed on an Azure Virtual Machine.&lt;/p&gt;&#xA;&lt;p&gt;This DMV will show us information related to the amount of storage that a database is consuming as well as how much storage is allocated to the database currently.  This DMV will not, however, show you the maximize amount of storage the database can consume.&lt;/p&gt;&#xA;&lt;p&gt;Here is a quick script that you can use to easily determine how much consumed and allocated storage each database has.&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-sql&#34; data-lang=&#34;sql&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;SELECT&lt;/span&gt; &lt;span style=&#34;color:#66d9ef&#34;&gt;MAX&lt;/span&gt;(start_time) &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;Last Collection Time&amp;#39;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    , database_name, &lt;span style=&#34;color:#66d9ef&#34;&gt;MAX&lt;/span&gt;(storage_in_megabytes) &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;Current Size(MBs)&amp;#39;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    , &lt;span style=&#34;color:#66d9ef&#34;&gt;MAX&lt;/span&gt;(allocated_storage_in_megabytes) &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;Allocated Storage (MBs)&amp;#39;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;FROM&lt;/span&gt; sys.resource_stats &#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;GROUP&lt;/span&gt; &lt;span style=&#34;color:#66d9ef&#34;&gt;BY&lt;/span&gt; database_name&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&lt;a href=&#34;https://johnmorehouse.com/images/2021/05/AzureDBSizesResults.png&#34;&gt;&lt;img data-recalc-dims=&#34;1&#34; loading=&#34;lazy&#34; decoding=&#34;async&#34; class=&#34;aligncenter size-full wp-image-8139&#34; src=&#34;https://johnmorehouse.com/images/2021/05/AzureDBSizesResults.png&#34; alt=&#34;&#34; width=&#34;624&#34; height=&#34;195&#34; srcset=&#34;https://johnmorehouse.com/images/2021/05/AzureDBSizesResults.png 624w, https://johnmorehouse.com/images/2021/05/AzureDBSizesResults.png 300w&#34; sizes=&#34;auto, (max-width: 624px) 100vw, 624px&#34; /&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;We can see that by using this DMV the values returned match the values provided via the portal.&lt;/p&gt;&#xA;&lt;p&gt;One thing to note is that if the database is in the serverless tier and it has not been online for some time, this DMV will not capture the information. However, if you the database has been active, the data will be available to you.&lt;/p&gt;&#xA;&lt;h2 id=&#34;summary&#34;&gt;Summary&lt;/h2&gt;&#xA;&lt;p&gt;This was a quick script to determine quickly and easily how much storage my clients’ databases are consuming.  Armed with this information it made it easier to calculate the pricing information they were asking for without having to interrogate the Azure portal.&lt;/p&gt;&#xA;</content:encoded>
    </item>
    <item>
      <title>Understanding NUMA in SQL Server VMs</title>
      <link>https://johnmorehouse.com/2021/05/understanding-numa-in-sql-server-vms/</link>
      <pubDate>Fri, 07 May 2021 20:10:02 +0000</pubDate>
      <guid>https://johnmorehouse.com/2021/05/understanding-numa-in-sql-server-vms/</guid>
      <description>&lt;p&gt;What really is NUMA and why do we as database administrators care?&lt;/p&gt;&#xA;&lt;p&gt;NUMA stands for “Non-uniform Memory Access” and allows for increased CPU &amp;amp; memory performance.  This is because a memory bank is physically adjacent to a CPU socket on the motherboard of the server.  Each combination of memory and socket is considered a “node”.  If demands of a request (think query) forces it to go outside the bounds of a given node then the request could encounter slower performance.&lt;/p&gt;&#xA;&lt;p&gt;When dealing with SQL Server on virtual machines specifically, NUMA can be confusing and there are a couple of layers of NUMA.  Let’s talk about the foundation first and work our way up.  Keep in mind that these concepts are fairly hypervisor agnostic so it’s pretty much the same if you are running VMWare or Hyper-V.&lt;/p&gt;&#xA;&lt;p&gt;Of course, if you are running bare metal machines still, you still have NUMA nodes however you wouldn’t have the Guest NUMA layer to deal with.&lt;/p&gt;&#xA;&lt;h3 id=&#34;host-numa&#34;&gt;&lt;span style=&#34;text-decoration: underline;&#34;&gt;Host NUMA&lt;/span&gt;&lt;/h3&gt;&#xA;&lt;p&gt;Regardless if you are running a virtual machine on-premises or in the cloud, there is a physical host that supports the guest virtual machine.  There can be multiple guest virtual machines for any given host.  The host has a CPU scheduler that doles out CPU threads across all of the guest virtual machines that reside on itself.  Since the physical host is going to have a motherboard with (most likely) multiple CPU sockets and adjacent memory banks, it can take advantage of the onboard NUMA architecture to ensure CPU time for any given request is as minimal as possible.&lt;/p&gt;&#xA;&lt;p&gt;The real trick with the host NUMA configuration is ensure you now what the physical architecture is:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;How many cores per CPU socket&lt;/li&gt;&#xA;&lt;li&gt;How much memory is adjacent to each CPU socket&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;This information is critical to ensure guest virtual machines are configured correctly, especially when it comes to potential workload intensive applications such as SQL Server.&lt;/p&gt;&#xA;&lt;h3 id=&#34;guest-numa&#34;&gt;&lt;span style=&#34;text-decoration: underline;&#34;&gt;Guest NUMA&lt;/span&gt;&lt;/h3&gt;&#xA;&lt;p&gt;On hypervisors, such as VMWare and Hyper-V, both of which are NUMA aware, each virtual machine can be configured for a mix of sockets and cores.  Usually this is designated by a “socket x core” nomenclature.  For example,&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;1×4 = 1 socket with 4 cores (4 cores total)&lt;/li&gt;&#xA;&lt;li&gt;1×8 = 1 socket with 8 cores (8 cores total)&lt;/li&gt;&#xA;&lt;li&gt;2×4 = 2 sockets with 4 cores each (8 cores total)&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;You get the idea.&lt;/p&gt;&#xA;&lt;p&gt;Ideally, you want the guest virtual machines Socket/Core configuration to reside within a single NUMA node of the host machine.  This is where knowing what architecture the host machine has is important.   By configuring the VM to “fit” within the NUMA node of those, the requests for CPU cycle time from the VM will remain on a given NUMA node thus allowing for optimal performance.&lt;/p&gt;&#xA;&lt;p&gt;This is also true for memory configurations. If the host has 1TB of physical memory on it with 4 sockets, then each numa node would have 250GB.  If a virtual machine is configured with a memory amount greater than 250GB, then the memory allocation has to reside outside the bounds of one NUMA node of the host.&lt;/p&gt;&#xA;&lt;p&gt;So the general rule of thumb, and your mileage may vary, is to configure your virtual machines from both CPU and memory perspectives to fit within a NUMA node of the underlying host.&lt;/p&gt;&#xA;&lt;h3 id=&#34;sql-server--numa&#34;&gt;&lt;span style=&#34;text-decoration: underline;&#34;&gt;SQL Server &amp;amp; NUMA&lt;/span&gt;&lt;/h3&gt;&#xA;&lt;p&gt;Thankfully, SQL Server is NUMA aware which means that it can determine whether or not the underlying guest virtual machine has NUMA enabled.  SQL Server can also implement what is called “soft numa”.  Soft NUMA, in my opinion, is like software RAID.  In the olden times of hardware, you had to have a physical RAID controller in the drive chases in order to apply any type of RAID across the hard drives.  As technology evolved, eventually you could do RAID configurations by utilizing software alone.  In the same context, SQL Server can create soft NUMA nodes from the basis of the physical NUMA nodes of the underlying infrastructure.&lt;/p&gt;&#xA;&lt;p&gt;If you are running SQL Server 2016 or higher, this is done for you automatically.  When SQL Server starts, if it detects more than eight cores per socket, it will automatically create soft NUMA nodes for you.  Keep in mind that it doesn’t matter if the cores are using hyper-threading or not.&lt;/p&gt;&#xA;&lt;p&gt;Soft NUMA nodes can help with performance and scalability for SQL Server and while you can disable this behavior within SQL Server, it’s generally recommended that you don’t to do this for this reason alone.&lt;/p&gt;&#xA;&lt;h3 id=&#34;summary&#34;&gt;&lt;span style=&#34;text-decoration: underline;&#34;&gt;Summary&lt;/span&gt;&lt;/h3&gt;&#xA;&lt;p&gt;NUMA is a critical piece of Harvard architecture that can drastically affect your SQL Server workloads.  Understanding the foundation of how it works and why it is important is critical when deploying SQL Server in a virtualized environment.  Make sure to look at your existing systems and make any adjustments necessary to take full advantage of this awesome piece of technology.&lt;/p&gt;&#xA;</description>
      <content:encoded>&lt;p&gt;What really is NUMA and why do we as database administrators care?&lt;/p&gt;&#xA;&lt;p&gt;NUMA stands for “Non-uniform Memory Access” and allows for increased CPU &amp;amp; memory performance.  This is because a memory bank is physically adjacent to a CPU socket on the motherboard of the server.  Each combination of memory and socket is considered a “node”.  If demands of a request (think query) forces it to go outside the bounds of a given node then the request could encounter slower performance.&lt;/p&gt;&#xA;&lt;p&gt;When dealing with SQL Server on virtual machines specifically, NUMA can be confusing and there are a couple of layers of NUMA.  Let’s talk about the foundation first and work our way up.  Keep in mind that these concepts are fairly hypervisor agnostic so it’s pretty much the same if you are running VMWare or Hyper-V.&lt;/p&gt;&#xA;&lt;p&gt;Of course, if you are running bare metal machines still, you still have NUMA nodes however you wouldn’t have the Guest NUMA layer to deal with.&lt;/p&gt;&#xA;&lt;h3 id=&#34;host-numa&#34;&gt;&lt;span style=&#34;text-decoration: underline;&#34;&gt;Host NUMA&lt;/span&gt;&lt;/h3&gt;&#xA;&lt;p&gt;Regardless if you are running a virtual machine on-premises or in the cloud, there is a physical host that supports the guest virtual machine.  There can be multiple guest virtual machines for any given host.  The host has a CPU scheduler that doles out CPU threads across all of the guest virtual machines that reside on itself.  Since the physical host is going to have a motherboard with (most likely) multiple CPU sockets and adjacent memory banks, it can take advantage of the onboard NUMA architecture to ensure CPU time for any given request is as minimal as possible.&lt;/p&gt;&#xA;&lt;p&gt;The real trick with the host NUMA configuration is ensure you now what the physical architecture is:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;How many cores per CPU socket&lt;/li&gt;&#xA;&lt;li&gt;How much memory is adjacent to each CPU socket&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;This information is critical to ensure guest virtual machines are configured correctly, especially when it comes to potential workload intensive applications such as SQL Server.&lt;/p&gt;&#xA;&lt;h3 id=&#34;guest-numa&#34;&gt;&lt;span style=&#34;text-decoration: underline;&#34;&gt;Guest NUMA&lt;/span&gt;&lt;/h3&gt;&#xA;&lt;p&gt;On hypervisors, such as VMWare and Hyper-V, both of which are NUMA aware, each virtual machine can be configured for a mix of sockets and cores.  Usually this is designated by a “socket x core” nomenclature.  For example,&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;1×4 = 1 socket with 4 cores (4 cores total)&lt;/li&gt;&#xA;&lt;li&gt;1×8 = 1 socket with 8 cores (8 cores total)&lt;/li&gt;&#xA;&lt;li&gt;2×4 = 2 sockets with 4 cores each (8 cores total)&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;You get the idea.&lt;/p&gt;&#xA;&lt;p&gt;Ideally, you want the guest virtual machines Socket/Core configuration to reside within a single NUMA node of the host machine.  This is where knowing what architecture the host machine has is important.   By configuring the VM to “fit” within the NUMA node of those, the requests for CPU cycle time from the VM will remain on a given NUMA node thus allowing for optimal performance.&lt;/p&gt;&#xA;&lt;p&gt;This is also true for memory configurations. If the host has 1TB of physical memory on it with 4 sockets, then each numa node would have 250GB.  If a virtual machine is configured with a memory amount greater than 250GB, then the memory allocation has to reside outside the bounds of one NUMA node of the host.&lt;/p&gt;&#xA;&lt;p&gt;So the general rule of thumb, and your mileage may vary, is to configure your virtual machines from both CPU and memory perspectives to fit within a NUMA node of the underlying host.&lt;/p&gt;&#xA;&lt;h3 id=&#34;sql-server--numa&#34;&gt;&lt;span style=&#34;text-decoration: underline;&#34;&gt;SQL Server &amp;amp; NUMA&lt;/span&gt;&lt;/h3&gt;&#xA;&lt;p&gt;Thankfully, SQL Server is NUMA aware which means that it can determine whether or not the underlying guest virtual machine has NUMA enabled.  SQL Server can also implement what is called “soft numa”.  Soft NUMA, in my opinion, is like software RAID.  In the olden times of hardware, you had to have a physical RAID controller in the drive chases in order to apply any type of RAID across the hard drives.  As technology evolved, eventually you could do RAID configurations by utilizing software alone.  In the same context, SQL Server can create soft NUMA nodes from the basis of the physical NUMA nodes of the underlying infrastructure.&lt;/p&gt;&#xA;&lt;p&gt;If you are running SQL Server 2016 or higher, this is done for you automatically.  When SQL Server starts, if it detects more than eight cores per socket, it will automatically create soft NUMA nodes for you.  Keep in mind that it doesn’t matter if the cores are using hyper-threading or not.&lt;/p&gt;&#xA;&lt;p&gt;Soft NUMA nodes can help with performance and scalability for SQL Server and while you can disable this behavior within SQL Server, it’s generally recommended that you don’t to do this for this reason alone.&lt;/p&gt;&#xA;&lt;h3 id=&#34;summary&#34;&gt;&lt;span style=&#34;text-decoration: underline;&#34;&gt;Summary&lt;/span&gt;&lt;/h3&gt;&#xA;&lt;p&gt;NUMA is a critical piece of Harvard architecture that can drastically affect your SQL Server workloads.  Understanding the foundation of how it works and why it is important is critical when deploying SQL Server in a virtualized environment.  Make sure to look at your existing systems and make any adjustments necessary to take full advantage of this awesome piece of technology.&lt;/p&gt;&#xA;</content:encoded>
    </item>
    <item>
      <title>Issues When Using Temporary Tables in Nested Stored Procedures</title>
      <link>https://johnmorehouse.com/2021/03/issues-when-using-temporary-tables-in-nested-stored-procedures/</link>
      <pubDate>Fri, 26 Mar 2021 14:07:26 +0000</pubDate>
      <guid>https://johnmorehouse.com/2021/03/issues-when-using-temporary-tables-in-nested-stored-procedures/</guid>
      <description>&lt;p&gt;SQL Server offers a lot of flexibility when working with objects like stored procedures and temporary tables.  One of the capabilities is to allow for stored procedures to call other stored procedures.  This is called “nesting” one stored procedure within the context of the calling stored procedure.  In addition, you can instantiate a temporary table from within the parent procedure that can be utilized within the context of the child procedure.&lt;/p&gt;&#xA;&lt;p&gt;But wait! I’m not done yet!&lt;/p&gt;&#xA;&lt;p&gt;You can also instantiate a temporary table with the same name as the parent temporary table within the child procedure.  But there is a catch!&lt;/p&gt;&#xA;&lt;p&gt;From &lt;a href=&#34;https://docs.microsoft.com/en-us/sql/t-sql/statements/create-table-transact-sql?view=sql-server-ver15#temporary-tables&#34;&gt;Microsoft Documentation&lt;/a&gt;:&lt;/p&gt;&#xA;&lt;p&gt;_Nested stored procedures can also create temporary tables with the same name as a temporary table that was created by the stored procedure that called it. However, for modifications to resolve to the table that was created in the nested procedure, the table must have the same structure, with the same column names, as the table created in the calling procedure. _&lt;/p&gt;&#xA;&lt;p&gt;In other words, the name and the schema of the child temporary table must be identical to the name and schema of the parent temporary table.  Otherwise, mass confusion reigns supreme and you could get errors when attempting to do any data modifications in the child temporary table.&lt;/p&gt;&#xA;&lt;p&gt;Let’s look at some code so that we can see the behavior.&lt;/p&gt;&#xA;&lt;h2 id=&#34;examining-the-behavior&#34;&gt;Examining the behavior&lt;/h2&gt;&#xA;&lt;p&gt;First, here’s the code to show the example:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-sql&#34; data-lang=&#34;sql&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;USE Test&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;GO&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;CREATE&lt;/span&gt; &lt;span style=&#34;color:#66d9ef&#34;&gt;OR&lt;/span&gt; &lt;span style=&#34;color:#66d9ef&#34;&gt;ALTER&lt;/span&gt; &lt;span style=&#34;color:#66d9ef&#34;&gt;PROCEDURE&lt;/span&gt; dbo.parent&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;AS&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;BEGIN&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;       &lt;span style=&#34;color:#66d9ef&#34;&gt;CREATE&lt;/span&gt; &lt;span style=&#34;color:#66d9ef&#34;&gt;TABLE&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;#&lt;/span&gt;test (name sysname)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;       &lt;span style=&#34;color:#66d9ef&#34;&gt;INSERT&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;#&lt;/span&gt;test (name) &lt;span style=&#34;color:#66d9ef&#34;&gt;VALUES&lt;/span&gt; (&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;Joey&amp;#39;&lt;/span&gt;)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;       &lt;span style=&#34;color:#66d9ef&#34;&gt;EXEC&lt;/span&gt; dbo.child&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;       &lt;span style=&#34;color:#66d9ef&#34;&gt;SELECT&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;*&lt;/span&gt; &lt;span style=&#34;color:#66d9ef&#34;&gt;FROM&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;#&lt;/span&gt;test&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;END&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;GO&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;CREATE&lt;/span&gt; &lt;span style=&#34;color:#66d9ef&#34;&gt;OR&lt;/span&gt; &lt;span style=&#34;color:#66d9ef&#34;&gt;ALTER&lt;/span&gt; &lt;span style=&#34;color:#66d9ef&#34;&gt;PROCEDURE&lt;/span&gt; dbo.child&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;AS&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;BEGIN&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;       &lt;span style=&#34;color:#66d9ef&#34;&gt;CREATE&lt;/span&gt; &lt;span style=&#34;color:#66d9ef&#34;&gt;TABLE&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;#&lt;/span&gt;test (fname sysname)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;       &lt;span style=&#34;color:#66d9ef&#34;&gt;INSERT&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;#&lt;/span&gt;test (fname) &lt;span style=&#34;color:#66d9ef&#34;&gt;VALUES&lt;/span&gt; (&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;John&amp;#39;&lt;/span&gt;)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;       &lt;span style=&#34;color:#66d9ef&#34;&gt;SELECT&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;*&lt;/span&gt; &lt;span style=&#34;color:#66d9ef&#34;&gt;FROM&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;#&lt;/span&gt;test&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;END&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;GO&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;-- Execute the parent procedure&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;EXEC&lt;/span&gt; dbo.parent&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Now, let’s step through it so that we have a clear understanding of what it is doing.&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Create a parent procedure that creates a temporary table called #test with “name” as the column name.&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Insert a row into the parent temporary table&lt;/li&gt;&#xA;&lt;li&gt;Call a child stored procedure&lt;/li&gt;&#xA;&lt;li&gt;Select from the parent temporary table&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;Create a child stored procedure that creates a temporary table also called #test with “fname” as the column name. Note that this column name is different from the parent temporary table.&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Insert a row into the child temporary table&lt;/li&gt;&#xA;&lt;li&gt;Select from the child temporary table&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;Below is the error that is returned when executing the code block.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://johnmorehouse.com/images/2021/03/nested_temptable_1.png&#34;&gt;&lt;img data-recalc-dims=&#34;1&#34; loading=&#34;lazy&#34; decoding=&#34;async&#34; class=&#34;aligncenter wp-image-7733 size-full&#34; src=&#34;https://johnmorehouse.com/images/2021/03/nested_temptable_1.png&#34; alt=&#34;SSMS Screen Shot showing an error&#34; width=&#34;624&#34; height=&#34;240&#34; srcset=&#34;https://johnmorehouse.com/images/2021/03/nested_temptable_1.png 624w, https://johnmorehouse.com/images/2021/03/nested_temptable_1.png 300w&#34; sizes=&#34;auto, (max-width: 624px) 100vw, 624px&#34; /&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;The error above is stating that the “fname” column does not exist within the temporary table but we can see from the code block that is most definitely is.  This means that SQL Server is attempting to update the parent temporary table and NOT the child temporary table as one might expect.&lt;/p&gt;&#xA;&lt;h2 id=&#34;summary&#34;&gt;Summary&lt;/h2&gt;&#xA;&lt;p&gt;When working with nested procedures as well as nested temporary tables, make sure to either have the identical name and schema or make sure to use a different naming convention.  By doing so you help to eliminate any issues of the SQL Server not resolving to the appropriate temporary table.&lt;/p&gt;&#xA;</description>
      <content:encoded>&lt;p&gt;SQL Server offers a lot of flexibility when working with objects like stored procedures and temporary tables.  One of the capabilities is to allow for stored procedures to call other stored procedures.  This is called “nesting” one stored procedure within the context of the calling stored procedure.  In addition, you can instantiate a temporary table from within the parent procedure that can be utilized within the context of the child procedure.&lt;/p&gt;&#xA;&lt;p&gt;But wait! I’m not done yet!&lt;/p&gt;&#xA;&lt;p&gt;You can also instantiate a temporary table with the same name as the parent temporary table within the child procedure.  But there is a catch!&lt;/p&gt;&#xA;&lt;p&gt;From &lt;a href=&#34;https://docs.microsoft.com/en-us/sql/t-sql/statements/create-table-transact-sql?view=sql-server-ver15#temporary-tables&#34;&gt;Microsoft Documentation&lt;/a&gt;:&lt;/p&gt;&#xA;&lt;p&gt;_Nested stored procedures can also create temporary tables with the same name as a temporary table that was created by the stored procedure that called it. However, for modifications to resolve to the table that was created in the nested procedure, the table must have the same structure, with the same column names, as the table created in the calling procedure. _&lt;/p&gt;&#xA;&lt;p&gt;In other words, the name and the schema of the child temporary table must be identical to the name and schema of the parent temporary table.  Otherwise, mass confusion reigns supreme and you could get errors when attempting to do any data modifications in the child temporary table.&lt;/p&gt;&#xA;&lt;p&gt;Let’s look at some code so that we can see the behavior.&lt;/p&gt;&#xA;&lt;h2 id=&#34;examining-the-behavior&#34;&gt;Examining the behavior&lt;/h2&gt;&#xA;&lt;p&gt;First, here’s the code to show the example:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-sql&#34; data-lang=&#34;sql&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;USE Test&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;GO&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;CREATE&lt;/span&gt; &lt;span style=&#34;color:#66d9ef&#34;&gt;OR&lt;/span&gt; &lt;span style=&#34;color:#66d9ef&#34;&gt;ALTER&lt;/span&gt; &lt;span style=&#34;color:#66d9ef&#34;&gt;PROCEDURE&lt;/span&gt; dbo.parent&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;AS&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;BEGIN&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;       &lt;span style=&#34;color:#66d9ef&#34;&gt;CREATE&lt;/span&gt; &lt;span style=&#34;color:#66d9ef&#34;&gt;TABLE&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;#&lt;/span&gt;test (name sysname)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;       &lt;span style=&#34;color:#66d9ef&#34;&gt;INSERT&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;#&lt;/span&gt;test (name) &lt;span style=&#34;color:#66d9ef&#34;&gt;VALUES&lt;/span&gt; (&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;Joey&amp;#39;&lt;/span&gt;)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;       &lt;span style=&#34;color:#66d9ef&#34;&gt;EXEC&lt;/span&gt; dbo.child&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;       &lt;span style=&#34;color:#66d9ef&#34;&gt;SELECT&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;*&lt;/span&gt; &lt;span style=&#34;color:#66d9ef&#34;&gt;FROM&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;#&lt;/span&gt;test&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;END&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;GO&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;CREATE&lt;/span&gt; &lt;span style=&#34;color:#66d9ef&#34;&gt;OR&lt;/span&gt; &lt;span style=&#34;color:#66d9ef&#34;&gt;ALTER&lt;/span&gt; &lt;span style=&#34;color:#66d9ef&#34;&gt;PROCEDURE&lt;/span&gt; dbo.child&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;AS&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;BEGIN&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;       &lt;span style=&#34;color:#66d9ef&#34;&gt;CREATE&lt;/span&gt; &lt;span style=&#34;color:#66d9ef&#34;&gt;TABLE&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;#&lt;/span&gt;test (fname sysname)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;       &lt;span style=&#34;color:#66d9ef&#34;&gt;INSERT&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;#&lt;/span&gt;test (fname) &lt;span style=&#34;color:#66d9ef&#34;&gt;VALUES&lt;/span&gt; (&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;John&amp;#39;&lt;/span&gt;)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;       &lt;span style=&#34;color:#66d9ef&#34;&gt;SELECT&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;*&lt;/span&gt; &lt;span style=&#34;color:#66d9ef&#34;&gt;FROM&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;#&lt;/span&gt;test&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;END&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;GO&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;-- Execute the parent procedure&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;&lt;/span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;EXEC&lt;/span&gt; dbo.parent&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Now, let’s step through it so that we have a clear understanding of what it is doing.&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Create a parent procedure that creates a temporary table called #test with “name” as the column name.&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Insert a row into the parent temporary table&lt;/li&gt;&#xA;&lt;li&gt;Call a child stored procedure&lt;/li&gt;&#xA;&lt;li&gt;Select from the parent temporary table&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;Create a child stored procedure that creates a temporary table also called #test with “fname” as the column name. Note that this column name is different from the parent temporary table.&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Insert a row into the child temporary table&lt;/li&gt;&#xA;&lt;li&gt;Select from the child temporary table&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;Below is the error that is returned when executing the code block.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://johnmorehouse.com/images/2021/03/nested_temptable_1.png&#34;&gt;&lt;img data-recalc-dims=&#34;1&#34; loading=&#34;lazy&#34; decoding=&#34;async&#34; class=&#34;aligncenter wp-image-7733 size-full&#34; src=&#34;https://johnmorehouse.com/images/2021/03/nested_temptable_1.png&#34; alt=&#34;SSMS Screen Shot showing an error&#34; width=&#34;624&#34; height=&#34;240&#34; srcset=&#34;https://johnmorehouse.com/images/2021/03/nested_temptable_1.png 624w, https://johnmorehouse.com/images/2021/03/nested_temptable_1.png 300w&#34; sizes=&#34;auto, (max-width: 624px) 100vw, 624px&#34; /&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;The error above is stating that the “fname” column does not exist within the temporary table but we can see from the code block that is most definitely is.  This means that SQL Server is attempting to update the parent temporary table and NOT the child temporary table as one might expect.&lt;/p&gt;&#xA;&lt;h2 id=&#34;summary&#34;&gt;Summary&lt;/h2&gt;&#xA;&lt;p&gt;When working with nested procedures as well as nested temporary tables, make sure to either have the identical name and schema or make sure to use a different naming convention.  By doing so you help to eliminate any issues of the SQL Server not resolving to the appropriate temporary table.&lt;/p&gt;&#xA;</content:encoded>
    </item>
    <item>
      <title>Happy New Year!</title>
      <link>https://johnmorehouse.com/2021/01/happy-new-year-2/</link>
      <pubDate>Fri, 01 Jan 2021 15:16:06 +0000</pubDate>
      <guid>https://johnmorehouse.com/2021/01/happy-new-year-2/</guid>
      <description>&lt;p&gt;Happy New Year!!&lt;/p&gt;&#xA;&lt;p&gt;Looking back at my &lt;a href=&#34;https://johnmorehouse.com/2020/01/happy-new-year/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Happy New Year!&lt;/a&gt; post from the start of 2020, I of course, didn’t realize the brute force of the global pandemic that was about to hit.  Even with the dumpster fire that was 2020, good things still occurred even in the midst of the world burning.  Babies were born.  Relationships started.  New doors opened with new opportunities and the list continues.  2020 is behind us now and in the review mirror.  Let’s focus on making 2021 a vast improvement from 2020.&lt;/p&gt;&#xA;&lt;p&gt;With that said, I’m going to repeat my thoughts for the new year.  They are still valid and hold true.&lt;/p&gt;&#xA;&lt;p&gt;Here are some thoughts for the new year:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Don’t wait to start that project.  Some day never comes around.&lt;/li&gt;&#xA;&lt;li&gt;You are perfect the way you are.  However, if you want to get healthy, know that you aren’t alone.  You got this.&lt;/li&gt;&#xA;&lt;li&gt;Tell those people close to you how you feel about them.  Tomorrow may not come for some.&lt;/li&gt;&#xA;&lt;li&gt;Tell your kids (fur babies count too!) that you love them as often as you can.  My kids hear it from as often as I can.&lt;/li&gt;&#xA;&lt;li&gt;Finally, be kind to each other.  The world is harsh enough as it is without us beating each other up.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;img data-recalc-dims=&#34;1&#34; loading=&#34;lazy&#34; decoding=&#34;async&#34; class=&#34;aligncenter&#34; src=&#34;https://i0.wp.com/1.bp.blogspot.com/-O8OSHFOx0qM/X1GHVo01e4I/AAAAAAAAohM/u_BsXYAZrCMZXHm2X1mPLlVJP6rxFUhNACNcBGAsYHQ/s1000/Happy-New-Year-2021-images-60.jpg?resize=589%2C423&amp;ssl=1&#34; alt=&#34;See the source image&#34; width=&#34;589&#34; height=&#34;423&#34; /&gt; &#xA;&lt;p&gt;Hopefully this post comes at a time where we see the Covid vaccine rolling out to the masses.  Until then, keep wearing a mask and stay safe out there.&lt;/p&gt;&#xA;&lt;p&gt;Peace.&lt;/p&gt;&#xA;</description>
      <content:encoded>&lt;p&gt;Happy New Year!!&lt;/p&gt;&#xA;&lt;p&gt;Looking back at my &lt;a href=&#34;https://johnmorehouse.com/2020/01/happy-new-year/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Happy New Year!&lt;/a&gt; post from the start of 2020, I of course, didn’t realize the brute force of the global pandemic that was about to hit.  Even with the dumpster fire that was 2020, good things still occurred even in the midst of the world burning.  Babies were born.  Relationships started.  New doors opened with new opportunities and the list continues.  2020 is behind us now and in the review mirror.  Let’s focus on making 2021 a vast improvement from 2020.&lt;/p&gt;&#xA;&lt;p&gt;With that said, I’m going to repeat my thoughts for the new year.  They are still valid and hold true.&lt;/p&gt;&#xA;&lt;p&gt;Here are some thoughts for the new year:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Don’t wait to start that project.  Some day never comes around.&lt;/li&gt;&#xA;&lt;li&gt;You are perfect the way you are.  However, if you want to get healthy, know that you aren’t alone.  You got this.&lt;/li&gt;&#xA;&lt;li&gt;Tell those people close to you how you feel about them.  Tomorrow may not come for some.&lt;/li&gt;&#xA;&lt;li&gt;Tell your kids (fur babies count too!) that you love them as often as you can.  My kids hear it from as often as I can.&lt;/li&gt;&#xA;&lt;li&gt;Finally, be kind to each other.  The world is harsh enough as it is without us beating each other up.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;img data-recalc-dims=&#34;1&#34; loading=&#34;lazy&#34; decoding=&#34;async&#34; class=&#34;aligncenter&#34; src=&#34;https://i0.wp.com/1.bp.blogspot.com/-O8OSHFOx0qM/X1GHVo01e4I/AAAAAAAAohM/u_BsXYAZrCMZXHm2X1mPLlVJP6rxFUhNACNcBGAsYHQ/s1000/Happy-New-Year-2021-images-60.jpg?resize=589%2C423&amp;ssl=1&#34; alt=&#34;See the source image&#34; width=&#34;589&#34; height=&#34;423&#34; /&gt; &#xA;&lt;p&gt;Hopefully this post comes at a time where we see the Covid vaccine rolling out to the masses.  Until then, keep wearing a mask and stay safe out there.&lt;/p&gt;&#xA;&lt;p&gt;Peace.&lt;/p&gt;&#xA;</content:encoded>
    </item>
    <item>
      <title>Merry Christmas</title>
      <link>https://johnmorehouse.com/2020/12/merry-christmas-2/</link>
      <pubDate>Fri, 25 Dec 2020 15:11:13 +0000</pubDate>
      <guid>https://johnmorehouse.com/2020/12/merry-christmas-2/</guid>
      <description>&lt;p&gt;Christmas is this week so not a technical post for this week.  Just a simple post wishing you and your family as many blessing as possible (especially in the year 2020) and good tidings during this holiday time.  I hope that 2020 wasn’t too harsh on you or anybody close to you.  May the holidays bring you peach and joy!&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://johnmorehouse.com/images/2019/12/merry-christmas-4637374_1920.jpg&#34;&gt;&lt;br&gt;&#xA;&lt;img data-recalc-dims=&#34;1&#34; loading=&#34;lazy&#34; decoding=&#34;async&#34; class=&#34;aligncenter wp-image-5032&#34; src=&#34;https://johnmorehouse.com/images/2019/12/merry-christmas-4637374_1920.jpg&#34; alt=&#34;&#34; width=&#34;640&#34; height=&#34;441&#34; srcset=&#34;https://johnmorehouse.com/images/2019/12/merry-christmas-4637374_1920.jpg 1024w, https://johnmorehouse.com/images/2019/12/merry-christmas-4637374_1920.jpg 300w, https://johnmorehouse.com/images/2019/12/merry-christmas-4637374_1920.jpg 768w, https://johnmorehouse.com/images/2019/12/merry-christmas-4637374_1920.jpg 1536w, https://johnmorehouse.com/images/2019/12/merry-christmas-4637374_1920.jpg 1920w, https://johnmorehouse.com/images/2019/12/merry-christmas-4637374_1920.jpg 1280w&#34; sizes=&#34;auto, (max-width: 640px) 100vw, 640px&#34; /&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;Take care and wear a mask!&lt;/p&gt;&#xA;</description>
      <content:encoded>&lt;p&gt;Christmas is this week so not a technical post for this week.  Just a simple post wishing you and your family as many blessing as possible (especially in the year 2020) and good tidings during this holiday time.  I hope that 2020 wasn’t too harsh on you or anybody close to you.  May the holidays bring you peach and joy!&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://johnmorehouse.com/images/2019/12/merry-christmas-4637374_1920.jpg&#34;&gt;&lt;br&gt;&#xA;&lt;img data-recalc-dims=&#34;1&#34; loading=&#34;lazy&#34; decoding=&#34;async&#34; class=&#34;aligncenter wp-image-5032&#34; src=&#34;https://johnmorehouse.com/images/2019/12/merry-christmas-4637374_1920.jpg&#34; alt=&#34;&#34; width=&#34;640&#34; height=&#34;441&#34; srcset=&#34;https://johnmorehouse.com/images/2019/12/merry-christmas-4637374_1920.jpg 1024w, https://johnmorehouse.com/images/2019/12/merry-christmas-4637374_1920.jpg 300w, https://johnmorehouse.com/images/2019/12/merry-christmas-4637374_1920.jpg 768w, https://johnmorehouse.com/images/2019/12/merry-christmas-4637374_1920.jpg 1536w, https://johnmorehouse.com/images/2019/12/merry-christmas-4637374_1920.jpg 1920w, https://johnmorehouse.com/images/2019/12/merry-christmas-4637374_1920.jpg 1280w&#34; sizes=&#34;auto, (max-width: 640px) 100vw, 640px&#34; /&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;Take care and wear a mask!&lt;/p&gt;&#xA;</content:encoded>
    </item>
    <item>
      <title>Is On-premises SQL Server Still Relevant?</title>
      <link>https://johnmorehouse.com/2020/12/is-on-premises-sql-server-still-relevant/</link>
      <pubDate>Fri, 11 Dec 2020 15:15:30 +0000</pubDate>
      <guid>https://johnmorehouse.com/2020/12/is-on-premises-sql-server-still-relevant/</guid>
      <description>&lt;p&gt;Unequivocally, yes on-premises SQL Server Instances are still relevant.&lt;/p&gt;&#xA;&lt;p&gt;While I’m a firm believer that the cloud is not a fad and is not going away, it’s just an extension of a tool that we are already familiar with.  The Microsoft marketing slogan is “It’s just SQL” and for the most part that is indeed true.  However, that does not mean that every workload will benefit from being in the cloud.  There are scenarios where it does not make sense to move things to the cloud so let’s take a look at a few of them.&lt;/p&gt;&#xA;&lt;h3 id=&#34;the-cloud-can-cost-a-lot&#34;&gt;The cloud can cost a lot&lt;/h3&gt;&#xA;&lt;p&gt;There is no such thing as a free lunch and the cloud is not excluded.  I am sure that we’ve all heard horror stories of individuals leaving resources active which in turned costed large sums of money. While the cloud offers up a wide range of capabilities in aiding the day-to-day life of IT professionals everywhere, it might not be cost effective for your given workload or data volumes. Compute resources and all things associated with that cost money.  If you need higher CPU, more money.  If you need terabytes of storage, more money.  If you need a higher CPU to memory ratio for that virtual machine, more money.  All of the resources the cloud offers you essential rent and the bigger the space, the more money it takes. Of course, all of this is dependent on your organizational requirements and associated workloads.&lt;/p&gt;&#xA;&lt;p&gt;By having an on-premises environment you can implement a lower cost of ownership for hardware.  This being said, the cloud offers up more efficient means of upgrade and scaling which is usually limited with on-premises ecosystems which can actually save you money.  It’s a trade-off that organizations have to weigh to see if moving to the cloud makes sense.&lt;/p&gt;&#xA;&lt;h3 id=&#34;you-want-control-of-all-things&#34;&gt;You want control of all things&lt;/h3&gt;&#xA;&lt;p&gt;Most things in the cloud require that organizations relinquish control.  That is just a plain fact and that’s not changing.  We are trading speed and agility from an infrastructure perspective for a lower ability to control certain aspects of the architecture.  For example, with Azure SQL Database (Platform as a Service), database administrators no longer can control database backup method or frequency.  In exchange for this loss of control, though, backups are taken automatically for us. In my opinion, this is a more than fair exchange and I sleep better knowing that a tried and vetted backup process is taking care of things without my intervention.&lt;/p&gt;&#xA;&lt;h3 id=&#34;you-have-specific-compliance-or-regulation-requirements&#34;&gt;You have specific compliance or regulation requirements&lt;/h3&gt;&#xA;&lt;p&gt;While most of the players in the public cloud space (Azure, Amazon, Google) are all certified for a multitude of compliance regulations, it’s possible that you have a very specific one that the provider is unable to meet.  If this is the case, then your ability to move to the cloud is limited and you are forced to remain on-premises.  Regulations could also impose issues when moving to that cloud.  These regulations could be imposed by the governing body of the organization or be sourced from various places.  If this is the case, it’s possible that the cloud is not a viable solution for your organization.&lt;/p&gt;&#xA;&lt;p&gt;I do suspect that as cloud technology continues to advance, regulations and compliances will slowly be brought into the fold and allow for appropriate cloud implementations.&lt;/p&gt;&#xA;&lt;h3 id=&#34;you-do-not-have-the-expertise&#34;&gt;You do not have the expertise&lt;/h3&gt;&#xA;&lt;p&gt;Put simply, you do not have the knowledge internally to successfully migrate to the cloud nor do you have the budget to hire someone to move you to the cloud.  Shameless plug, this one of our core competencies here at &lt;a href=&#34;http://www.dcac.com&#34;&gt;Denny Cherry &amp;amp; Associates Consulting&lt;/a&gt;.  We help organizations (big or small) get into the cloud to help push their data ecosystem forward.  However, not every organization can afford to hire consultants (short or long term) to help them with such a project.  In this instance, until you can get the expertise to help you are left with either staying on-premises or trying to figure it out on your own.  In some respects, the cloud opens new security exposures that must be accounted for when moving to it.  If these are not accounted for the organization severe issues could arise so I recommend not going down the “we’ll figure it out as we go” method without some level of guidance.&lt;/p&gt;&#xA;&lt;h3 id=&#34;your-workloads-do-not-perform-in-the-cloud&#34;&gt;Your workloads do not perform in the cloud&lt;/h3&gt;&#xA;&lt;p&gt;Even though I am a huge fan of Azure, some workloads just won’t perform well unless you break out your wallet (see the first paragraph).  Even with proper performance tuning, the performance comparison between on-premises and the cloud is not going to be a true apples to apples comparison.  The infrastructure is just too vastly different to really get that “exact” level of comparison.  Organizations must find that sweet spot between performance infrastructure costs and frankly, sometimes that sweet spot dictates remaining with on-premises hardware.&lt;/p&gt;&#xA;&lt;h3 id=&#34;summary&#34;&gt;Summary&lt;/h3&gt;&#xA;&lt;p&gt;There are probably many other reasons why on-premises infrastructures will continue to be relevant.  Each organization may have unique requirements that having SQL Server on their own hardware is the only solution.  Remember, regardless of where you deploy SQL Server, it is just SQL and it’ll behave the same (mostly).  This does not mean that you should not continue to expand your skill sets.  Make sure to continue to learn about cloud technologies so that when your organization is ready to make the leap, you can do so in a safe and secure manner.&lt;/p&gt;&#xA;</description>
      <content:encoded>&lt;p&gt;Unequivocally, yes on-premises SQL Server Instances are still relevant.&lt;/p&gt;&#xA;&lt;p&gt;While I’m a firm believer that the cloud is not a fad and is not going away, it’s just an extension of a tool that we are already familiar with.  The Microsoft marketing slogan is “It’s just SQL” and for the most part that is indeed true.  However, that does not mean that every workload will benefit from being in the cloud.  There are scenarios where it does not make sense to move things to the cloud so let’s take a look at a few of them.&lt;/p&gt;&#xA;&lt;h3 id=&#34;the-cloud-can-cost-a-lot&#34;&gt;The cloud can cost a lot&lt;/h3&gt;&#xA;&lt;p&gt;There is no such thing as a free lunch and the cloud is not excluded.  I am sure that we’ve all heard horror stories of individuals leaving resources active which in turned costed large sums of money. While the cloud offers up a wide range of capabilities in aiding the day-to-day life of IT professionals everywhere, it might not be cost effective for your given workload or data volumes. Compute resources and all things associated with that cost money.  If you need higher CPU, more money.  If you need terabytes of storage, more money.  If you need a higher CPU to memory ratio for that virtual machine, more money.  All of the resources the cloud offers you essential rent and the bigger the space, the more money it takes. Of course, all of this is dependent on your organizational requirements and associated workloads.&lt;/p&gt;&#xA;&lt;p&gt;By having an on-premises environment you can implement a lower cost of ownership for hardware.  This being said, the cloud offers up more efficient means of upgrade and scaling which is usually limited with on-premises ecosystems which can actually save you money.  It’s a trade-off that organizations have to weigh to see if moving to the cloud makes sense.&lt;/p&gt;&#xA;&lt;h3 id=&#34;you-want-control-of-all-things&#34;&gt;You want control of all things&lt;/h3&gt;&#xA;&lt;p&gt;Most things in the cloud require that organizations relinquish control.  That is just a plain fact and that’s not changing.  We are trading speed and agility from an infrastructure perspective for a lower ability to control certain aspects of the architecture.  For example, with Azure SQL Database (Platform as a Service), database administrators no longer can control database backup method or frequency.  In exchange for this loss of control, though, backups are taken automatically for us. In my opinion, this is a more than fair exchange and I sleep better knowing that a tried and vetted backup process is taking care of things without my intervention.&lt;/p&gt;&#xA;&lt;h3 id=&#34;you-have-specific-compliance-or-regulation-requirements&#34;&gt;You have specific compliance or regulation requirements&lt;/h3&gt;&#xA;&lt;p&gt;While most of the players in the public cloud space (Azure, Amazon, Google) are all certified for a multitude of compliance regulations, it’s possible that you have a very specific one that the provider is unable to meet.  If this is the case, then your ability to move to the cloud is limited and you are forced to remain on-premises.  Regulations could also impose issues when moving to that cloud.  These regulations could be imposed by the governing body of the organization or be sourced from various places.  If this is the case, it’s possible that the cloud is not a viable solution for your organization.&lt;/p&gt;&#xA;&lt;p&gt;I do suspect that as cloud technology continues to advance, regulations and compliances will slowly be brought into the fold and allow for appropriate cloud implementations.&lt;/p&gt;&#xA;&lt;h3 id=&#34;you-do-not-have-the-expertise&#34;&gt;You do not have the expertise&lt;/h3&gt;&#xA;&lt;p&gt;Put simply, you do not have the knowledge internally to successfully migrate to the cloud nor do you have the budget to hire someone to move you to the cloud.  Shameless plug, this one of our core competencies here at &lt;a href=&#34;http://www.dcac.com&#34;&gt;Denny Cherry &amp;amp; Associates Consulting&lt;/a&gt;.  We help organizations (big or small) get into the cloud to help push their data ecosystem forward.  However, not every organization can afford to hire consultants (short or long term) to help them with such a project.  In this instance, until you can get the expertise to help you are left with either staying on-premises or trying to figure it out on your own.  In some respects, the cloud opens new security exposures that must be accounted for when moving to it.  If these are not accounted for the organization severe issues could arise so I recommend not going down the “we’ll figure it out as we go” method without some level of guidance.&lt;/p&gt;&#xA;&lt;h3 id=&#34;your-workloads-do-not-perform-in-the-cloud&#34;&gt;Your workloads do not perform in the cloud&lt;/h3&gt;&#xA;&lt;p&gt;Even though I am a huge fan of Azure, some workloads just won’t perform well unless you break out your wallet (see the first paragraph).  Even with proper performance tuning, the performance comparison between on-premises and the cloud is not going to be a true apples to apples comparison.  The infrastructure is just too vastly different to really get that “exact” level of comparison.  Organizations must find that sweet spot between performance infrastructure costs and frankly, sometimes that sweet spot dictates remaining with on-premises hardware.&lt;/p&gt;&#xA;&lt;h3 id=&#34;summary&#34;&gt;Summary&lt;/h3&gt;&#xA;&lt;p&gt;There are probably many other reasons why on-premises infrastructures will continue to be relevant.  Each organization may have unique requirements that having SQL Server on their own hardware is the only solution.  Remember, regardless of where you deploy SQL Server, it is just SQL and it’ll behave the same (mostly).  This does not mean that you should not continue to expand your skill sets.  Make sure to continue to learn about cloud technologies so that when your organization is ready to make the leap, you can do so in a safe and secure manner.&lt;/p&gt;&#xA;</content:encoded>
    </item>
    <item>
      <title>5 Things You Should Know About Azure SQL</title>
      <link>https://johnmorehouse.com/2020/12/5-things-you-should-know-about-azure-sql/</link>
      <pubDate>Fri, 04 Dec 2020 15:52:13 +0000</pubDate>
      <guid>https://johnmorehouse.com/2020/12/5-things-you-should-know-about-azure-sql/</guid>
      <description>&lt;p&gt;Azure SQL offers up a world of benefits that can be captured by consumers if implemented correctly.  It will not solve all your problems, but it can solve quite a few of them. When speaking to clients I often run into misconceptions as to what Azure SQL can really do. Let us look at a few of these to help eliminate any confusion.&lt;/p&gt;&#xA;&lt;h2 id=&#34;you-can-scale-easier-and-faster&#34;&gt;You can scale easier and faster&lt;/h2&gt;&#xA;&lt;p&gt;Let us face it, I am old.  I have been around the block in the IT realm for many years.  I distinctly remember the days where scaling server hardware was a multi-month process that usually resulted in the fact that the resulting scaled hardware was already out of date by the time the process was finished.  With the introduction of cloud providers, the ability to scale vertically or horizontally can usually be accomplished within a few clicks of the mouse.  Often, once initiated, the scaling process is completed within minutes instead of months.  This is multiple orders of magnitude better than the method of having to procure hardware for such needs.&lt;/p&gt;&#xA;&lt;p&gt;The added benefit of this scaling ability is that you can then scale down when needed to help save on costs.   Just like scaling up or out, this is accomplished with a few mouse clicks and a few minutes of your time.&lt;/p&gt;&#xA;&lt;h2 id=&#34;it-is-not-going-to-fix-your-performance-issues&#34;&gt;It is not going to fix your performance issues&lt;/h2&gt;&#xA;&lt;p&gt;If you currently have performance issues with your existing infrastructure, Azure SQL is not going to necessarily solve your problem.  Yes, you can hide the issue with faster and better hardware, but really the issue is still going to exist, and you need to deal with it.  Furthermore, moving to Azure SQL could introduce additional issues if the underlying performance issue is not addressed before hand.   Make sure to look at your current workloads and address any performance issues you might find before migrating to the cloud.  Furthermore, ensure that you understand the available service tiers that are offered for the Azure SQL products.   By doing so, you’ll help guarantee that your workloads have enough compute resources to run as optimal as possible.&lt;/p&gt;&#xA;&lt;h2 id=&#34;you-still-must-have-a-dr-plan&#34;&gt;You still must have a DR plan&lt;/h2&gt;&#xA;&lt;p&gt;If you have ever seen me present on Azure SQL, I’m quite certain you’ve heard me mention that one of the biggest mistakes you can do when moving to any cloud provider is not having a DR plan in place.  There are a multitude of ways to ensure you have a proper disaster recovery strategy in place regardless of which Azure SQL product you are using.  Platform as a Service (Azure SQL Database or SQL Managed Instance) offers automatic database backups which solves one DR issue for you out of the gate.  PaaS also offers geo-replication and automatic failover groups for additional disaster recovery solutions which are easily implemented with a few clicks of the mouse.&lt;/p&gt;&#xA;&lt;p&gt;When working with SQL Server on an Azure Virtual machine (which is Infrastructure as a Service), you can perform database backups through native SQL Server backups or tools like Azure Backup.&lt;/p&gt;&#xA;&lt;p&gt;Keep in mind that high availability is baked into the Azure service at every turn.  However, high availability does not equal disaster recovery and even cloud providers such as Azure do incur outages that can affect your production workloads.  Make sure to implement a disaster recovery strategy and furthermore, practice it.&lt;/p&gt;&#xA;&lt;h2 id=&#34;it-could-save-you-money&#34;&gt;It could save you money&lt;/h2&gt;&#xA;&lt;p&gt;When implemented correctly, Azure SQL could indeed save you money in the long run. However, it all depends on what your workloads and data volume look like. For example, due to the ease of scalability Azure SQL offers (even when scaling virtual machines), secondary replicas of your data could be at a lower service tier to minimize costs.  In the event a failover needs to occur you could then scale the resource to a higher performing service tier to ensure workload compute requirements are met. Azure SQL Database offers a serverless tier that provides the ability for the database to be paused.  When the database pauses, you will not be charged for any compute consumption.  This is a great resource for unpredictable workloads.&lt;/p&gt;&#xA;&lt;p&gt;Saving costs in any cloud provider implies knowing what options are available as well as continued evaluation of which options would best suit your needs.&lt;/p&gt;&#xA;&lt;h2 id=&#34;it-is-just-sql&#34;&gt;It is just SQL&lt;/h2&gt;&#xA;&lt;p&gt;Azure SQL is not magical quite honestly.  It really is just the same SQL engine you are used to with on-premises deployments.  The real difference is how you engage with the product and sometimes that can be scary if you are not used to it.  As a self-proclaimed die-hard database administrator, it was daunting for me when I started to learn how Azure SQL would fit into modern day workloads and potential help save organizations money.  In the end, though, it’s the same product that many of us have been using for years.&lt;/p&gt;&#xA;&lt;h2 id=&#34;summary&#34;&gt;Summary&lt;/h2&gt;&#xA;&lt;p&gt;In this blog post I’ve covered five things to know about Azure SQL.  It is a powerful product that can help transform your own data ecosystem into a more capable platform to serve your customers for years to come.  Cloud is definitely not a fad and is here to stay.  Make sure that you expand your horizons and look upward because that’s where the market is going.&lt;/p&gt;&#xA;&lt;p&gt;If you aren’t looking at Azure SQL currently, what are you waiting for?  Just do it.&lt;/p&gt;&#xA;</description>
      <content:encoded>&lt;p&gt;Azure SQL offers up a world of benefits that can be captured by consumers if implemented correctly.  It will not solve all your problems, but it can solve quite a few of them. When speaking to clients I often run into misconceptions as to what Azure SQL can really do. Let us look at a few of these to help eliminate any confusion.&lt;/p&gt;&#xA;&lt;h2 id=&#34;you-can-scale-easier-and-faster&#34;&gt;You can scale easier and faster&lt;/h2&gt;&#xA;&lt;p&gt;Let us face it, I am old.  I have been around the block in the IT realm for many years.  I distinctly remember the days where scaling server hardware was a multi-month process that usually resulted in the fact that the resulting scaled hardware was already out of date by the time the process was finished.  With the introduction of cloud providers, the ability to scale vertically or horizontally can usually be accomplished within a few clicks of the mouse.  Often, once initiated, the scaling process is completed within minutes instead of months.  This is multiple orders of magnitude better than the method of having to procure hardware for such needs.&lt;/p&gt;&#xA;&lt;p&gt;The added benefit of this scaling ability is that you can then scale down when needed to help save on costs.   Just like scaling up or out, this is accomplished with a few mouse clicks and a few minutes of your time.&lt;/p&gt;&#xA;&lt;h2 id=&#34;it-is-not-going-to-fix-your-performance-issues&#34;&gt;It is not going to fix your performance issues&lt;/h2&gt;&#xA;&lt;p&gt;If you currently have performance issues with your existing infrastructure, Azure SQL is not going to necessarily solve your problem.  Yes, you can hide the issue with faster and better hardware, but really the issue is still going to exist, and you need to deal with it.  Furthermore, moving to Azure SQL could introduce additional issues if the underlying performance issue is not addressed before hand.   Make sure to look at your current workloads and address any performance issues you might find before migrating to the cloud.  Furthermore, ensure that you understand the available service tiers that are offered for the Azure SQL products.   By doing so, you’ll help guarantee that your workloads have enough compute resources to run as optimal as possible.&lt;/p&gt;&#xA;&lt;h2 id=&#34;you-still-must-have-a-dr-plan&#34;&gt;You still must have a DR plan&lt;/h2&gt;&#xA;&lt;p&gt;If you have ever seen me present on Azure SQL, I’m quite certain you’ve heard me mention that one of the biggest mistakes you can do when moving to any cloud provider is not having a DR plan in place.  There are a multitude of ways to ensure you have a proper disaster recovery strategy in place regardless of which Azure SQL product you are using.  Platform as a Service (Azure SQL Database or SQL Managed Instance) offers automatic database backups which solves one DR issue for you out of the gate.  PaaS also offers geo-replication and automatic failover groups for additional disaster recovery solutions which are easily implemented with a few clicks of the mouse.&lt;/p&gt;&#xA;&lt;p&gt;When working with SQL Server on an Azure Virtual machine (which is Infrastructure as a Service), you can perform database backups through native SQL Server backups or tools like Azure Backup.&lt;/p&gt;&#xA;&lt;p&gt;Keep in mind that high availability is baked into the Azure service at every turn.  However, high availability does not equal disaster recovery and even cloud providers such as Azure do incur outages that can affect your production workloads.  Make sure to implement a disaster recovery strategy and furthermore, practice it.&lt;/p&gt;&#xA;&lt;h2 id=&#34;it-could-save-you-money&#34;&gt;It could save you money&lt;/h2&gt;&#xA;&lt;p&gt;When implemented correctly, Azure SQL could indeed save you money in the long run. However, it all depends on what your workloads and data volume look like. For example, due to the ease of scalability Azure SQL offers (even when scaling virtual machines), secondary replicas of your data could be at a lower service tier to minimize costs.  In the event a failover needs to occur you could then scale the resource to a higher performing service tier to ensure workload compute requirements are met. Azure SQL Database offers a serverless tier that provides the ability for the database to be paused.  When the database pauses, you will not be charged for any compute consumption.  This is a great resource for unpredictable workloads.&lt;/p&gt;&#xA;&lt;p&gt;Saving costs in any cloud provider implies knowing what options are available as well as continued evaluation of which options would best suit your needs.&lt;/p&gt;&#xA;&lt;h2 id=&#34;it-is-just-sql&#34;&gt;It is just SQL&lt;/h2&gt;&#xA;&lt;p&gt;Azure SQL is not magical quite honestly.  It really is just the same SQL engine you are used to with on-premises deployments.  The real difference is how you engage with the product and sometimes that can be scary if you are not used to it.  As a self-proclaimed die-hard database administrator, it was daunting for me when I started to learn how Azure SQL would fit into modern day workloads and potential help save organizations money.  In the end, though, it’s the same product that many of us have been using for years.&lt;/p&gt;&#xA;&lt;h2 id=&#34;summary&#34;&gt;Summary&lt;/h2&gt;&#xA;&lt;p&gt;In this blog post I’ve covered five things to know about Azure SQL.  It is a powerful product that can help transform your own data ecosystem into a more capable platform to serve your customers for years to come.  Cloud is definitely not a fad and is here to stay.  Make sure that you expand your horizons and look upward because that’s where the market is going.&lt;/p&gt;&#xA;&lt;p&gt;If you aren’t looking at Azure SQL currently, what are you waiting for?  Just do it.&lt;/p&gt;&#xA;</content:encoded>
    </item>
    <item>
      <title>Azure SQL Offers Manual Failover for PaaS Resources</title>
      <link>https://johnmorehouse.com/2020/09/azure-sql-offers-manual-failover-for-paas-resources/</link>
      <pubDate>Tue, 22 Sep 2020 07:30:40 +0000</pubDate>
      <guid>https://johnmorehouse.com/2020/09/azure-sql-offers-manual-failover-for-paas-resources/</guid>
      <description>&lt;p&gt;Sometime having the right command in place opens up new doors to test things, like a failover for example.  In this post we will take a look at a new ability that has recently surface within the Azure eco-system to help manage fail-overs.  Let’s jump to it.&lt;/p&gt;&#xA;&lt;p&gt;High availability is a crucial component for data professionals, even when operating in a cloud environment such as Azure.  Thankfully, Microsoft Azure Platform as a Service (PaaS) is architected in a way that offers high availability for service right out of the gate.  This helps to ensure that your databases, such as Azure SQL Database and Azure SQL Managed Instances, are always available without having to lift a finger.  What even better is Microsoft now offers the ability to manually control a failover over for these resources which gives data professionals more granular control.&lt;/p&gt;&#xA;&lt;p&gt;Previously, the service would manage this aspect and Microsoft would initiate the failover if needed.  But what if I wanted to test the failover to see how my applications would react?  Would a failover impact my end users?  There was not any way to test this even though the service offers a high level of availability. Thankfully that has changed and we can now control, to a degree, failovers for Azure SQL Platform as a Service resources, including Azure SQL Database, Elastic Pools, and SQL Managed Instances.&lt;/p&gt;&#xA;&lt;h2 id=&#34;how-can-we-manage-a-high-availability-failover-in-azure-sql-paas&#34;&gt;How can we manage a high availability failover in Azure SQL PaaS?&lt;/h2&gt;&#xA;&lt;p&gt;To facilitate the failovers, you must do this through some type of &lt;a href=&#34;https://docs.microsoft.com/en-us/azure/azure-sql/database/high-availability-sla#testing-application-fault-resiliency&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;command line interface&lt;/a&gt;. This means either PowerShell, Azure CLI, or a REST API call.  There is currently not a way to manage this through the portal.  In the future we could possibly see such capability, but I do not know if or when that would come to fruition.  For the purposes of this post, we will look at PowerShell.&lt;/p&gt;&#xA;&lt;p&gt;There are three powershell cmdlets that will failover Azure SQL resources.&lt;/p&gt;&#xA;&lt;h3 id=&#34;invoke-azsqldatabasefailover&#34;&gt;&lt;a href=&#34;https://docs.microsoft.com/en-us/powershell/module/az.sql/invoke-azsqldatabasefailover?view=azps-4.6.1&#34;&gt;Invoke-AzSQLDatabaseFailover&lt;/a&gt;&lt;/h3&gt;&#xA;&lt;p&gt;This cmdlet will failover an individual database.  If the database is involved within an elastic pool, the failover will not affect the entire pool and will only affect the database itself.  In testing, failing over a database involved with an elastic pool did not affect the databases membership in the pool.   Furthermore, if the database is within an Availability Zone, the database will be failed over to a secondary zone and all client connections will be redirected to the new primary zone.&lt;/p&gt;&#xA;&lt;p&gt;It is also worth noting that there is a “-ReadableSecondary” switch that would instead a failover the readable secondary.  Since you could be using a readable secondary to off-load read workloads it would make sense to test how its failover would impact those workloads.&lt;/p&gt;&#xA;&lt;h3 id=&#34;invoke-azsqlelasticpool&#34;&gt;&lt;a href=&#34;https://docs.microsoft.com/en-us/powershell/module/az.sql/invoke-azsqlelasticpoolfailover?view=azps-4.6.1&#34;&gt;Invoke-AzSQLElasticPool&lt;/a&gt;&lt;/h3&gt;&#xA;&lt;p&gt;This cmdlet will failover an entire elastic pool which means all the databases within the pool will failover.  This cmdlet will be handy if you are utilizing elastic pools to help minimize Azure costs but still want to test a failover.&lt;/p&gt;&#xA;&lt;h3 id=&#34;invoke-azusqlinstancefailover&#34;&gt;&lt;a href=&#34;https://docs.microsoft.com/en-us/powershell/module/az.sql/invoke-azsqlinstancefailover?view=azps-4.6.1&#34;&gt;Invoke-AzuSQLInstanceFailover&lt;/a&gt;&lt;/h3&gt;&#xA;&lt;p&gt;Like it’s the two predecessors, this cmdlet will failover a SQL Managed Instance.  It also has a readable secondary switch that you can utilize to failover the readable secondary.&lt;/p&gt;&#xA;&lt;h2 id=&#34;are-there-any-limitations&#34;&gt;Are there any limitations?&lt;/h2&gt;&#xA;&lt;p&gt;With great power comes great responsibility and such is the case here.  Given the intrusive nature of the failover within the Azure eco-system, it stands to make sense that you can only failover the resources every so often.  Currently, at the time of this post, the documentation states you can only failover every 30 minutes.  However, during testing things, I got a different error message that states it’s every 15 minutes.&lt;/p&gt;&#xA;&lt;figure id=&#34;attachment_7162&#34; aria-describedby=&#34;caption-attachment-7162&#34; style=&#34;width: 1769px&#34; class=&#34;wp-caption alignleft&#34;&gt;&lt;a href=&#34;https://johnmorehouse.com/images/2020/09/invoke-azsqldatabasefailover_message.png&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;&lt;img data-recalc-dims=&#34;1&#34; loading=&#34;lazy&#34; decoding=&#34;async&#34; class=&#34;wp-image-7162 size-full&#34; src=&#34;https://johnmorehouse.com/images/2020/09/invoke-azsqldatabasefailover_message.png&#34; alt=&#34;Image of error message stating 15 minute delay between failovers&#34; width=&#34;640&#34; height=&#34;46&#34; srcset=&#34;https://johnmorehouse.com/images/2020/09/invoke-azsqldatabasefailover_message.png 1769w, https://johnmorehouse.com/images/2020/09/invoke-azsqldatabasefailover_message.png 300w, https://johnmorehouse.com/images/2020/09/invoke-azsqldatabasefailover_message.png 1024w, https://johnmorehouse.com/images/2020/09/invoke-azsqldatabasefailover_message.png 768w, https://johnmorehouse.com/images/2020/09/invoke-azsqldatabasefailover_message.png 1536w, https://johnmorehouse.com/images/2020/09/invoke-azsqldatabasefailover_message.png 1280w&#34; sizes=&#34;auto, (max-width: 640px) 100vw, 640px&#34; /&gt;&lt;/a&gt;&lt;figcaption id=&#34;caption-attachment-7162&#34; class=&#34;wp-caption-text&#34;&gt;Click on the image to enlarge&lt;/figcaption&gt;&lt;/figure&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://github.com/MicrosoftDocs/azure-docs/issues/62684&#34;&gt;I have given feedback&lt;/a&gt; to Microsoft regarding this discrepancy and they were able to get it resolved and the documentation will be updated to reflect a 15 minute duration between failover events.&lt;/p&gt;&#xA;&lt;h2 id=&#34;what-else-would-this-help-fix&#34;&gt;What else would this help fix?&lt;/h2&gt;&#xA;&lt;p&gt;Even with the highly durable infrastructure that Microsoft has built, there are occasions where hardware issues arise where the service might not failover.  While failing over to a DR solution (such as active geo-replication or automatic failover groups) would help to resolve it, if things are configured correctly that is more intrusive to the application.  By having the ability to failover, customers can now initiate a failover when hardware issues surface without having to implement their disaster recovery solutions.&lt;/p&gt;&#xA;&lt;h2 id=&#34;summary&#34;&gt;Summary&lt;/h2&gt;&#xA;&lt;p&gt;Microsoft continues to enhance and improve the Azure SQL eco-system.  By having the ability to control and test failovers for Azure SQL resources just further provides a deeper level of control for data professionals.  If you are utilizing Microsoft Azure or even planning on moving Azure, I highly recommend you get familiar with how this feature works so that you can verify with certainty how your applications will handle a database high availability failover.&lt;/p&gt;&#xA;</description>
      <content:encoded>&lt;p&gt;Sometime having the right command in place opens up new doors to test things, like a failover for example.  In this post we will take a look at a new ability that has recently surface within the Azure eco-system to help manage fail-overs.  Let’s jump to it.&lt;/p&gt;&#xA;&lt;p&gt;High availability is a crucial component for data professionals, even when operating in a cloud environment such as Azure.  Thankfully, Microsoft Azure Platform as a Service (PaaS) is architected in a way that offers high availability for service right out of the gate.  This helps to ensure that your databases, such as Azure SQL Database and Azure SQL Managed Instances, are always available without having to lift a finger.  What even better is Microsoft now offers the ability to manually control a failover over for these resources which gives data professionals more granular control.&lt;/p&gt;&#xA;&lt;p&gt;Previously, the service would manage this aspect and Microsoft would initiate the failover if needed.  But what if I wanted to test the failover to see how my applications would react?  Would a failover impact my end users?  There was not any way to test this even though the service offers a high level of availability. Thankfully that has changed and we can now control, to a degree, failovers for Azure SQL Platform as a Service resources, including Azure SQL Database, Elastic Pools, and SQL Managed Instances.&lt;/p&gt;&#xA;&lt;h2 id=&#34;how-can-we-manage-a-high-availability-failover-in-azure-sql-paas&#34;&gt;How can we manage a high availability failover in Azure SQL PaaS?&lt;/h2&gt;&#xA;&lt;p&gt;To facilitate the failovers, you must do this through some type of &lt;a href=&#34;https://docs.microsoft.com/en-us/azure/azure-sql/database/high-availability-sla#testing-application-fault-resiliency&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;command line interface&lt;/a&gt;. This means either PowerShell, Azure CLI, or a REST API call.  There is currently not a way to manage this through the portal.  In the future we could possibly see such capability, but I do not know if or when that would come to fruition.  For the purposes of this post, we will look at PowerShell.&lt;/p&gt;&#xA;&lt;p&gt;There are three powershell cmdlets that will failover Azure SQL resources.&lt;/p&gt;&#xA;&lt;h3 id=&#34;invoke-azsqldatabasefailover&#34;&gt;&lt;a href=&#34;https://docs.microsoft.com/en-us/powershell/module/az.sql/invoke-azsqldatabasefailover?view=azps-4.6.1&#34;&gt;Invoke-AzSQLDatabaseFailover&lt;/a&gt;&lt;/h3&gt;&#xA;&lt;p&gt;This cmdlet will failover an individual database.  If the database is involved within an elastic pool, the failover will not affect the entire pool and will only affect the database itself.  In testing, failing over a database involved with an elastic pool did not affect the databases membership in the pool.   Furthermore, if the database is within an Availability Zone, the database will be failed over to a secondary zone and all client connections will be redirected to the new primary zone.&lt;/p&gt;&#xA;&lt;p&gt;It is also worth noting that there is a “-ReadableSecondary” switch that would instead a failover the readable secondary.  Since you could be using a readable secondary to off-load read workloads it would make sense to test how its failover would impact those workloads.&lt;/p&gt;&#xA;&lt;h3 id=&#34;invoke-azsqlelasticpool&#34;&gt;&lt;a href=&#34;https://docs.microsoft.com/en-us/powershell/module/az.sql/invoke-azsqlelasticpoolfailover?view=azps-4.6.1&#34;&gt;Invoke-AzSQLElasticPool&lt;/a&gt;&lt;/h3&gt;&#xA;&lt;p&gt;This cmdlet will failover an entire elastic pool which means all the databases within the pool will failover.  This cmdlet will be handy if you are utilizing elastic pools to help minimize Azure costs but still want to test a failover.&lt;/p&gt;&#xA;&lt;h3 id=&#34;invoke-azusqlinstancefailover&#34;&gt;&lt;a href=&#34;https://docs.microsoft.com/en-us/powershell/module/az.sql/invoke-azsqlinstancefailover?view=azps-4.6.1&#34;&gt;Invoke-AzuSQLInstanceFailover&lt;/a&gt;&lt;/h3&gt;&#xA;&lt;p&gt;Like it’s the two predecessors, this cmdlet will failover a SQL Managed Instance.  It also has a readable secondary switch that you can utilize to failover the readable secondary.&lt;/p&gt;&#xA;&lt;h2 id=&#34;are-there-any-limitations&#34;&gt;Are there any limitations?&lt;/h2&gt;&#xA;&lt;p&gt;With great power comes great responsibility and such is the case here.  Given the intrusive nature of the failover within the Azure eco-system, it stands to make sense that you can only failover the resources every so often.  Currently, at the time of this post, the documentation states you can only failover every 30 minutes.  However, during testing things, I got a different error message that states it’s every 15 minutes.&lt;/p&gt;&#xA;&lt;figure id=&#34;attachment_7162&#34; aria-describedby=&#34;caption-attachment-7162&#34; style=&#34;width: 1769px&#34; class=&#34;wp-caption alignleft&#34;&gt;&lt;a href=&#34;https://johnmorehouse.com/images/2020/09/invoke-azsqldatabasefailover_message.png&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;&lt;img data-recalc-dims=&#34;1&#34; loading=&#34;lazy&#34; decoding=&#34;async&#34; class=&#34;wp-image-7162 size-full&#34; src=&#34;https://johnmorehouse.com/images/2020/09/invoke-azsqldatabasefailover_message.png&#34; alt=&#34;Image of error message stating 15 minute delay between failovers&#34; width=&#34;640&#34; height=&#34;46&#34; srcset=&#34;https://johnmorehouse.com/images/2020/09/invoke-azsqldatabasefailover_message.png 1769w, https://johnmorehouse.com/images/2020/09/invoke-azsqldatabasefailover_message.png 300w, https://johnmorehouse.com/images/2020/09/invoke-azsqldatabasefailover_message.png 1024w, https://johnmorehouse.com/images/2020/09/invoke-azsqldatabasefailover_message.png 768w, https://johnmorehouse.com/images/2020/09/invoke-azsqldatabasefailover_message.png 1536w, https://johnmorehouse.com/images/2020/09/invoke-azsqldatabasefailover_message.png 1280w&#34; sizes=&#34;auto, (max-width: 640px) 100vw, 640px&#34; /&gt;&lt;/a&gt;&lt;figcaption id=&#34;caption-attachment-7162&#34; class=&#34;wp-caption-text&#34;&gt;Click on the image to enlarge&lt;/figcaption&gt;&lt;/figure&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://github.com/MicrosoftDocs/azure-docs/issues/62684&#34;&gt;I have given feedback&lt;/a&gt; to Microsoft regarding this discrepancy and they were able to get it resolved and the documentation will be updated to reflect a 15 minute duration between failover events.&lt;/p&gt;&#xA;&lt;h2 id=&#34;what-else-would-this-help-fix&#34;&gt;What else would this help fix?&lt;/h2&gt;&#xA;&lt;p&gt;Even with the highly durable infrastructure that Microsoft has built, there are occasions where hardware issues arise where the service might not failover.  While failing over to a DR solution (such as active geo-replication or automatic failover groups) would help to resolve it, if things are configured correctly that is more intrusive to the application.  By having the ability to failover, customers can now initiate a failover when hardware issues surface without having to implement their disaster recovery solutions.&lt;/p&gt;&#xA;&lt;h2 id=&#34;summary&#34;&gt;Summary&lt;/h2&gt;&#xA;&lt;p&gt;Microsoft continues to enhance and improve the Azure SQL eco-system.  By having the ability to control and test failovers for Azure SQL resources just further provides a deeper level of control for data professionals.  If you are utilizing Microsoft Azure or even planning on moving Azure, I highly recommend you get familiar with how this feature works so that you can verify with certainty how your applications will handle a database high availability failover.&lt;/p&gt;&#xA;</content:encoded>
    </item>
    <item>
      <title>Enabling SQL Server Optimizer Hotfixes</title>
      <link>https://johnmorehouse.com/2020/07/understanding-how-to-enable-sql-server-optimizer-hotfixes/</link>
      <pubDate>Fri, 31 Jul 2020 13:08:49 +0000</pubDate>
      <guid>https://johnmorehouse.com/2020/07/understanding-how-to-enable-sql-server-optimizer-hotfixes/</guid>
      <description>&lt;p&gt;There are a number of knobs and switches that are available to database administrators that can be used to enable better performance.  There are three options in particular that this blog will be discussing, trace flag 4199, the database scoped configuration QUERY_OPIMIZER_HOTFIXES and the qeury hint ENABLE_QUERY_OPTIMIZER_HOTFIXES. Understanding how these options function will give you a hand up on ensuring the query optimizer is running as optimally as possible.&lt;/p&gt;&#xA;&lt;p&gt;Let’s take a look at the three options.&lt;/p&gt;&#xA;&lt;h3 id=&#34;the-name-of-the-game-is-tf4199&#34;&gt;The name of the game is TF4199&lt;/h3&gt;&#xA;&lt;p&gt;In dealing with any trace flag, it is vital that you understand as to what the trace flag will enable or disable and how it pertains to your individual workloads.  Some trace flags are benign, such as TF3226 which removes successful backup messages from the log, others can be quite intrusive and cause havoc.   Make sure you review any documentation on the respective trace flag prior to implementation.&lt;/p&gt;&#xA;&lt;p&gt;The official verbiage from Microsoft on &lt;a href=&#34;https://docs.microsoft.com/en-us/sql/t-sql/database-console-commands/dbcc-traceon-trace-flags-transact-sql?view=sql-server-ver15&#34;&gt;trace flag 4199&lt;/a&gt; is:&lt;/p&gt;&#xA;&lt;p&gt;&lt;em&gt;“Enables Query Optimizer (QO) fixes released in SQL Server Cumulative Updates and Service Packs.&lt;/em&gt;&lt;/p&gt;&#xA;&lt;p&gt;QO changes that are made to previous releases of SQL Server are enabled by default under the latest database &lt;a href=&#34;https://docs.microsoft.com/en-us/sql/t-sql/statements/alter-database-transact-sql-compatibility-level?view=sql-server-ver15&#34;&gt;&lt;em&gt;compatibility level&lt;/em&gt;&lt;/a&gt;_ in a given product release, without trace flag 4199 being enabled.”__ _&lt;/p&gt;&#xA;&lt;p&gt;What this really implies is that if your database is at the most current compatibility level for your version of SQL server, then the query optimizer will utilize all of the QO hotfixes up to the release to market (RTM) version but nothing beyond the RTM version.&lt;/p&gt;&#xA;&lt;p&gt;For example, if you are running SQL Server 2017 CU20 the database is set at the appropriate compatibility level (140), and TF4199 is disabled, the query optimizer will only utilize any hotfixes for it up to 2017 RTM.   Any query optimizer hotfix that was delivered in subsequent cumulative updates will not be utilized.&lt;/p&gt;&#xA;&lt;p&gt;If you enable trace flag 4199, this instructs SQL Server to implement any query optimizer hotfix that was delivered after the RTM version.   Note that enabling this trace flag will be applied across all databases.  It’s an all or nothing trace flag as most trace flags are.&lt;/p&gt;&#xA;&lt;p&gt;The table below (from &lt;a href=&#34;https://docs.microsoft.com/en-us/sql/t-sql/database-console-commands/dbcc-traceon-trace-flags-transact-sql?view=sql-server-ver15&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Microsoft documentation&lt;/a&gt; explains the matrix of outcomes when dealing with trace flag enabled or disabled.&lt;/p&gt;&#xA;&lt;table&gt;&#xA;  &lt;tr&gt;&#xA;    &lt;td&gt;&#xA;      &lt;strong&gt;Database Engine (DE) version&lt;/strong&gt;&#xA;    &lt;/td&gt;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;td&amp;gt;&#xA;  &amp;lt;strong&amp;gt;Database Compatibility Level&amp;lt;/strong&amp;gt;&#xA;&amp;lt;/td&amp;gt;&#xA;&#xA;&amp;lt;td&amp;gt;&#xA;  &amp;lt;strong&amp;gt;TF 4199&amp;lt;/strong&amp;gt;&#xA;&amp;lt;/td&amp;gt;&#xA;&#xA;&amp;lt;td&amp;gt;&#xA;  &amp;lt;strong&amp;gt;QO changes from all previous Database Compatibility Levels&amp;lt;/strong&amp;gt;&#xA;&amp;lt;/td&amp;gt;&#xA;&#xA;&amp;lt;td&amp;gt;&#xA;  &amp;lt;strong&amp;gt;QO changes for DE version post-RTM&amp;lt;/strong&amp;gt;&#xA;&amp;lt;/td&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;  &lt;/tr&gt;&#xA;  &lt;tr&gt;&#xA;    &lt;td rowspan=&#34;4&#34;&gt;&#xA;      &lt;strong&gt;13 (SQL Server 2016 (13.x))&lt;/strong&gt;&#xA;    &lt;/td&gt;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;td rowspan=&amp;quot;2&amp;quot;&amp;gt;&#xA;  &amp;lt;strong&amp;gt;100 to 120&amp;lt;/strong&amp;gt;&#xA;&amp;lt;/td&amp;gt;&#xA;&#xA;&amp;lt;td&amp;gt;&#xA;  Off&#xA;&amp;lt;/td&amp;gt;&#xA;&#xA;&amp;lt;td&amp;gt;&#xA;  Disabled&#xA;&amp;lt;/td&amp;gt;&#xA;&#xA;&amp;lt;td&amp;gt;&#xA;  Disabled&#xA;&amp;lt;/td&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;  &lt;/tr&gt;&#xA;  &lt;tr&gt;&#xA;    &lt;td&gt;&#xA;      On&#xA;    &lt;/td&gt;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;td&amp;gt;&#xA;  Enabled&#xA;&amp;lt;/td&amp;gt;&#xA;&#xA;&amp;lt;td&amp;gt;&#xA;  Enabled&#xA;&amp;lt;/td&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;  &lt;/tr&gt;&#xA;  &lt;tr&gt;&#xA;    &lt;td rowspan=&#34;2&#34;&gt;&#xA;      &lt;strong&gt;130&lt;/strong&gt; (Default)&#xA;    &lt;/td&gt;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;td&amp;gt;&#xA;  Off&#xA;&amp;lt;/td&amp;gt;&#xA;&#xA;&amp;lt;td&amp;gt;&#xA;  Enabled&#xA;&amp;lt;/td&amp;gt;&#xA;&#xA;&amp;lt;td&amp;gt;&#xA;  Disabled&#xA;&amp;lt;/td&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;  &lt;/tr&gt;&#xA;  &lt;tr&gt;&#xA;    &lt;td&gt;&#xA;      On&#xA;    &lt;/td&gt;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;td&amp;gt;&#xA;  Enabled&#xA;&amp;lt;/td&amp;gt;&#xA;&#xA;&amp;lt;td&amp;gt;&#xA;  Enabled&#xA;&amp;lt;/td&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;  &lt;/tr&gt;&#xA;  &lt;tr&gt;&#xA;    &lt;td rowspan=&#34;6&#34;&gt;&#xA;      &lt;strong&gt;14 (SQL Server 2017 (14.x))&lt;/strong&gt;&#xA;    &lt;/td&gt;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;td rowspan=&amp;quot;2&amp;quot;&amp;gt;&#xA;  &amp;lt;strong&amp;gt;100 to 120&amp;lt;/strong&amp;gt;&#xA;&amp;lt;/td&amp;gt;&#xA;&#xA;&amp;lt;td&amp;gt;&#xA;  Off&#xA;&amp;lt;/td&amp;gt;&#xA;&#xA;&amp;lt;td&amp;gt;&#xA;  Disabled&#xA;&amp;lt;/td&amp;gt;&#xA;&#xA;&amp;lt;td&amp;gt;&#xA;  Disabled&#xA;&amp;lt;/td&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;  &lt;/tr&gt;&#xA;  &lt;tr&gt;&#xA;    &lt;td&gt;&#xA;      On&#xA;    &lt;/td&gt;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;td&amp;gt;&#xA;  Enabled&#xA;&amp;lt;/td&amp;gt;&#xA;&#xA;&amp;lt;td&amp;gt;&#xA;  Enabled&#xA;&amp;lt;/td&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;  &lt;/tr&gt;&#xA;  &lt;tr&gt;&#xA;    &lt;td rowspan=&#34;2&#34;&gt;&#xA;      &lt;strong&gt;130&lt;/strong&gt;&#xA;    &lt;/td&gt;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;td&amp;gt;&#xA;  Off&#xA;&amp;lt;/td&amp;gt;&#xA;&#xA;&amp;lt;td&amp;gt;&#xA;  Enabled&#xA;&amp;lt;/td&amp;gt;&#xA;&#xA;&amp;lt;td&amp;gt;&#xA;  Disabled&#xA;&amp;lt;/td&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;  &lt;/tr&gt;&#xA;  &lt;tr&gt;&#xA;    &lt;td&gt;&#xA;      On&#xA;    &lt;/td&gt;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;td&amp;gt;&#xA;  Enabled&#xA;&amp;lt;/td&amp;gt;&#xA;&#xA;&amp;lt;td&amp;gt;&#xA;  Enabled&#xA;&amp;lt;/td&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;  &lt;/tr&gt;&#xA;  &lt;tr&gt;&#xA;    &lt;td rowspan=&#34;2&#34;&gt;&#xA;      &lt;strong&gt;140&lt;/strong&gt; (Default)&#xA;    &lt;/td&gt;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;td&amp;gt;&#xA;  Off&#xA;&amp;lt;/td&amp;gt;&#xA;&#xA;&amp;lt;td&amp;gt;&#xA;  Enabled&#xA;&amp;lt;/td&amp;gt;&#xA;&#xA;&amp;lt;td&amp;gt;&#xA;  Disabled&#xA;&amp;lt;/td&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;  &lt;/tr&gt;&#xA;  &lt;tr&gt;&#xA;    &lt;td&gt;&#xA;      On&#xA;    &lt;/td&gt;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;td&amp;gt;&#xA;  Enabled&#xA;&amp;lt;/td&amp;gt;&#xA;&#xA;&amp;lt;td&amp;gt;&#xA;  Enabled&#xA;&amp;lt;/td&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;  &lt;/tr&gt;&#xA;  &lt;tr&gt;&#xA;    &lt;td rowspan=&#34;7&#34;&gt;&#xA;      &lt;strong&gt;15 (SQL Server 2019 (15.x)) and 12 (Azure SQL Database)&lt;/strong&gt;&#xA;    &lt;/td&gt;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;td rowspan=&amp;quot;2&amp;quot;&amp;gt;&#xA;  &amp;lt;strong&amp;gt;100 to 120&amp;lt;/strong&amp;gt;&#xA;&amp;lt;/td&amp;gt;&#xA;&#xA;&amp;lt;td&amp;gt;&#xA;  Off&#xA;&amp;lt;/td&amp;gt;&#xA;&#xA;&amp;lt;td&amp;gt;&#xA;  Disabled&#xA;&amp;lt;/td&amp;gt;&#xA;&#xA;&amp;lt;td&amp;gt;&#xA;  Disabled&#xA;&amp;lt;/td&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;  &lt;/tr&gt;&#xA;  &lt;tr&gt;&#xA;    &lt;td&gt;&#xA;      On&#xA;    &lt;/td&gt;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;td&amp;gt;&#xA;  Enabled&#xA;&amp;lt;/td&amp;gt;&#xA;&#xA;&amp;lt;td&amp;gt;&#xA;  Enabled&#xA;&amp;lt;/td&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;  &lt;/tr&gt;&#xA;  &lt;tr&gt;&#xA;    &lt;td rowspan=&#34;2&#34;&gt;&#xA;      &lt;strong&gt;130 to 140&lt;/strong&gt;&#xA;    &lt;/td&gt;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;td&amp;gt;&#xA;  Off&#xA;&amp;lt;/td&amp;gt;&#xA;&#xA;&amp;lt;td&amp;gt;&#xA;  Enabled&#xA;&amp;lt;/td&amp;gt;&#xA;&#xA;&amp;lt;td&amp;gt;&#xA;  Disabled&#xA;&amp;lt;/td&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;  &lt;/tr&gt;&#xA;  &lt;tr&gt;&#xA;    &lt;td&gt;&#xA;      On&#xA;    &lt;/td&gt;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;td&amp;gt;&#xA;  Enabled&#xA;&amp;lt;/td&amp;gt;&#xA;&#xA;&amp;lt;td&amp;gt;&#xA;  Enabled&#xA;&amp;lt;/td&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;  &lt;/tr&gt;&#xA;  &lt;tr&gt;&#xA;    &lt;td rowspan=&#34;3&#34;&gt;&#xA;      &lt;strong&gt;150&lt;/strong&gt; (Default)&#xA;    &lt;/td&gt;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;td&amp;gt;&#xA;  Off&#xA;&amp;lt;/td&amp;gt;&#xA;&#xA;&amp;lt;td&amp;gt;&#xA;  Enabled&#xA;&amp;lt;/td&amp;gt;&#xA;&#xA;&amp;lt;td&amp;gt;&#xA;  Disabled&#xA;&amp;lt;/td&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;  &lt;/tr&gt;&#xA;  &lt;tr&gt;&#xA;    &lt;td&gt;&#xA;    &lt;/td&gt;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;td&amp;gt;&#xA;&amp;lt;/td&amp;gt;&#xA;&#xA;&amp;lt;td&amp;gt;&#xA;&amp;lt;/td&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;  &lt;/tr&gt;&#xA;  &lt;tr&gt;&#xA;    &lt;td&gt;&#xA;      On&#xA;    &lt;/td&gt;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;td&amp;gt;&#xA;  Enabled&#xA;&amp;lt;/td&amp;gt;&#xA;&#xA;&amp;lt;td&amp;gt;&#xA;  Enabled&#xA;&amp;lt;/td&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;  &lt;/tr&gt;&#xA;&lt;/table&gt;&#xA;&lt;p&gt;If you are running in Azure SQL Database, you don’t have the ability to enable this particular trace flag, which is where the database scoped configuration becomes useful. If you are running on Azure SQL Managed Instances, you can enable the trace flag just like you would if on-premises.&lt;/p&gt;&#xA;&lt;p&gt;Enabling this trace flag would also require a restart of the SQL Server services if you want to persist it upon a restart. You can enable this trace flag by setting up a &lt;a href=&#34;https://docs.microsoft.com/en-us/sql/database-engine/configure-windows/scm-services-configure-server-startup-options?view=sql-server-ver15&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;startup parameter&lt;/a&gt; in the SQL Server Configuration Manager.  You can check for the existence of trace flags by using DBCC TRACESTATUS().&lt;/p&gt;&#xA;&lt;h3 id=&#34;database-scoped-configuration-query_opimizer_hotfixes&#34;&gt;Database Scoped Configuration QUERY_OPIMIZER_HOTFIXES&lt;/h3&gt;&#xA;&lt;p&gt;Enabling trace flag 4199 is a global trace flag for the entire instance.  This means that it’ll apply the configuration across all databases.  What if you have a mixture of databases that may or may not be able to take advantage of any hotfixes?  Enabling the trace flag could cause issues.  This is where the QUERY_OPIMIZER_HOTFIXES database scoped configuration comes in to play.&lt;/p&gt;&#xA;&lt;p&gt;This configuration allows you to enabled query optimizer hotfixes post the release to market version for any specific database. This also allows you to enable it for Azure SQL Database since we don’t have the ability to enable the trace flag within that product.&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-sql&#34; data-lang=&#34;sql&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;ALTER&lt;/span&gt; &lt;span style=&#34;color:#66d9ef&#34;&gt;DATABASE&lt;/span&gt; SCOPED CONFIGURATION QUERY_OPTIMIZER_HOTFIXES &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;color:#66d9ef&#34;&gt;ON&lt;/span&gt;;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The query above has to be executed within the context of the individual database.  You can also enable this configuration in Azure SQL Managed Instances databases.&lt;/p&gt;&#xA;&lt;h3 id=&#34;enabling_query_optimizer_hotfixes-for-queries&#34;&gt;Enabling_QUERY_OPTIMIZER_HOTFIXES for Queries&lt;/h3&gt;&#xA;&lt;p&gt;If you didn’t want to enable these hotfixes at the instance level or the database level, there’s a third option.  You can also enable it as a query hint.  Keep in mind that the query optimizer will want to pick the best execution plan possible.  Use query hints as sparingly as possible and make sure to ask yourself if you are really smarter than the optimizer.  If the answer is no, you aren’t smarter than the optimizer then don’t use a query hint.  So, it goes without saying that my recommendation is to not use query hints unless that’s the only way to solve an issue.&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-sql&#34; data-lang=&#34;sql&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;SELECT&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;*&lt;/span&gt; &lt;span style=&#34;color:#66d9ef&#34;&gt;FROM&lt;/span&gt; Person.Address &#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;WHERE&lt;/span&gt; City &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;SEATTLE&amp;#39;&lt;/span&gt; &lt;span style=&#34;color:#66d9ef&#34;&gt;AND&lt;/span&gt; PostalCode &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;color:#ae81ff&#34;&gt;98104&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;OPTION&lt;/span&gt; ( USE HINT (&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;ENABLE_QUERY_OPTIMIZER_HOTFIXES&amp;#39;&lt;/span&gt;));&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;GO&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id=&#34;summary&#34;&gt;Summary&lt;/h3&gt;&#xA;&lt;p&gt;In this post I’ve shown three methods on how to implement the most recent query optimizer hot fixes.  Before putting any of them into production, make sure that you verify your respective workloads again them.  Make sure to also review all of the cumulative updates or service packs since initial release to see what query optimizer issues were fixed.  You might be missing out of a fix that will help solve a performance problem.&lt;/p&gt;&#xA;</description>
      <content:encoded>&lt;p&gt;There are a number of knobs and switches that are available to database administrators that can be used to enable better performance.  There are three options in particular that this blog will be discussing, trace flag 4199, the database scoped configuration QUERY_OPIMIZER_HOTFIXES and the qeury hint ENABLE_QUERY_OPTIMIZER_HOTFIXES. Understanding how these options function will give you a hand up on ensuring the query optimizer is running as optimally as possible.&lt;/p&gt;&#xA;&lt;p&gt;Let’s take a look at the three options.&lt;/p&gt;&#xA;&lt;h3 id=&#34;the-name-of-the-game-is-tf4199&#34;&gt;The name of the game is TF4199&lt;/h3&gt;&#xA;&lt;p&gt;In dealing with any trace flag, it is vital that you understand as to what the trace flag will enable or disable and how it pertains to your individual workloads.  Some trace flags are benign, such as TF3226 which removes successful backup messages from the log, others can be quite intrusive and cause havoc.   Make sure you review any documentation on the respective trace flag prior to implementation.&lt;/p&gt;&#xA;&lt;p&gt;The official verbiage from Microsoft on &lt;a href=&#34;https://docs.microsoft.com/en-us/sql/t-sql/database-console-commands/dbcc-traceon-trace-flags-transact-sql?view=sql-server-ver15&#34;&gt;trace flag 4199&lt;/a&gt; is:&lt;/p&gt;&#xA;&lt;p&gt;&lt;em&gt;“Enables Query Optimizer (QO) fixes released in SQL Server Cumulative Updates and Service Packs.&lt;/em&gt;&lt;/p&gt;&#xA;&lt;p&gt;QO changes that are made to previous releases of SQL Server are enabled by default under the latest database &lt;a href=&#34;https://docs.microsoft.com/en-us/sql/t-sql/statements/alter-database-transact-sql-compatibility-level?view=sql-server-ver15&#34;&gt;&lt;em&gt;compatibility level&lt;/em&gt;&lt;/a&gt;_ in a given product release, without trace flag 4199 being enabled.”__ _&lt;/p&gt;&#xA;&lt;p&gt;What this really implies is that if your database is at the most current compatibility level for your version of SQL server, then the query optimizer will utilize all of the QO hotfixes up to the release to market (RTM) version but nothing beyond the RTM version.&lt;/p&gt;&#xA;&lt;p&gt;For example, if you are running SQL Server 2017 CU20 the database is set at the appropriate compatibility level (140), and TF4199 is disabled, the query optimizer will only utilize any hotfixes for it up to 2017 RTM.   Any query optimizer hotfix that was delivered in subsequent cumulative updates will not be utilized.&lt;/p&gt;&#xA;&lt;p&gt;If you enable trace flag 4199, this instructs SQL Server to implement any query optimizer hotfix that was delivered after the RTM version.   Note that enabling this trace flag will be applied across all databases.  It’s an all or nothing trace flag as most trace flags are.&lt;/p&gt;&#xA;&lt;p&gt;The table below (from &lt;a href=&#34;https://docs.microsoft.com/en-us/sql/t-sql/database-console-commands/dbcc-traceon-trace-flags-transact-sql?view=sql-server-ver15&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Microsoft documentation&lt;/a&gt; explains the matrix of outcomes when dealing with trace flag enabled or disabled.&lt;/p&gt;&#xA;&lt;table&gt;&#xA;  &lt;tr&gt;&#xA;    &lt;td&gt;&#xA;      &lt;strong&gt;Database Engine (DE) version&lt;/strong&gt;&#xA;    &lt;/td&gt;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;td&amp;gt;&#xA;  &amp;lt;strong&amp;gt;Database Compatibility Level&amp;lt;/strong&amp;gt;&#xA;&amp;lt;/td&amp;gt;&#xA;&#xA;&amp;lt;td&amp;gt;&#xA;  &amp;lt;strong&amp;gt;TF 4199&amp;lt;/strong&amp;gt;&#xA;&amp;lt;/td&amp;gt;&#xA;&#xA;&amp;lt;td&amp;gt;&#xA;  &amp;lt;strong&amp;gt;QO changes from all previous Database Compatibility Levels&amp;lt;/strong&amp;gt;&#xA;&amp;lt;/td&amp;gt;&#xA;&#xA;&amp;lt;td&amp;gt;&#xA;  &amp;lt;strong&amp;gt;QO changes for DE version post-RTM&amp;lt;/strong&amp;gt;&#xA;&amp;lt;/td&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;  &lt;/tr&gt;&#xA;  &lt;tr&gt;&#xA;    &lt;td rowspan=&#34;4&#34;&gt;&#xA;      &lt;strong&gt;13 (SQL Server 2016 (13.x))&lt;/strong&gt;&#xA;    &lt;/td&gt;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;td rowspan=&amp;quot;2&amp;quot;&amp;gt;&#xA;  &amp;lt;strong&amp;gt;100 to 120&amp;lt;/strong&amp;gt;&#xA;&amp;lt;/td&amp;gt;&#xA;&#xA;&amp;lt;td&amp;gt;&#xA;  Off&#xA;&amp;lt;/td&amp;gt;&#xA;&#xA;&amp;lt;td&amp;gt;&#xA;  Disabled&#xA;&amp;lt;/td&amp;gt;&#xA;&#xA;&amp;lt;td&amp;gt;&#xA;  Disabled&#xA;&amp;lt;/td&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;  &lt;/tr&gt;&#xA;  &lt;tr&gt;&#xA;    &lt;td&gt;&#xA;      On&#xA;    &lt;/td&gt;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;td&amp;gt;&#xA;  Enabled&#xA;&amp;lt;/td&amp;gt;&#xA;&#xA;&amp;lt;td&amp;gt;&#xA;  Enabled&#xA;&amp;lt;/td&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;  &lt;/tr&gt;&#xA;  &lt;tr&gt;&#xA;    &lt;td rowspan=&#34;2&#34;&gt;&#xA;      &lt;strong&gt;130&lt;/strong&gt; (Default)&#xA;    &lt;/td&gt;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;td&amp;gt;&#xA;  Off&#xA;&amp;lt;/td&amp;gt;&#xA;&#xA;&amp;lt;td&amp;gt;&#xA;  Enabled&#xA;&amp;lt;/td&amp;gt;&#xA;&#xA;&amp;lt;td&amp;gt;&#xA;  Disabled&#xA;&amp;lt;/td&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;  &lt;/tr&gt;&#xA;  &lt;tr&gt;&#xA;    &lt;td&gt;&#xA;      On&#xA;    &lt;/td&gt;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;td&amp;gt;&#xA;  Enabled&#xA;&amp;lt;/td&amp;gt;&#xA;&#xA;&amp;lt;td&amp;gt;&#xA;  Enabled&#xA;&amp;lt;/td&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;  &lt;/tr&gt;&#xA;  &lt;tr&gt;&#xA;    &lt;td rowspan=&#34;6&#34;&gt;&#xA;      &lt;strong&gt;14 (SQL Server 2017 (14.x))&lt;/strong&gt;&#xA;    &lt;/td&gt;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;td rowspan=&amp;quot;2&amp;quot;&amp;gt;&#xA;  &amp;lt;strong&amp;gt;100 to 120&amp;lt;/strong&amp;gt;&#xA;&amp;lt;/td&amp;gt;&#xA;&#xA;&amp;lt;td&amp;gt;&#xA;  Off&#xA;&amp;lt;/td&amp;gt;&#xA;&#xA;&amp;lt;td&amp;gt;&#xA;  Disabled&#xA;&amp;lt;/td&amp;gt;&#xA;&#xA;&amp;lt;td&amp;gt;&#xA;  Disabled&#xA;&amp;lt;/td&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;  &lt;/tr&gt;&#xA;  &lt;tr&gt;&#xA;    &lt;td&gt;&#xA;      On&#xA;    &lt;/td&gt;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;td&amp;gt;&#xA;  Enabled&#xA;&amp;lt;/td&amp;gt;&#xA;&#xA;&amp;lt;td&amp;gt;&#xA;  Enabled&#xA;&amp;lt;/td&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;  &lt;/tr&gt;&#xA;  &lt;tr&gt;&#xA;    &lt;td rowspan=&#34;2&#34;&gt;&#xA;      &lt;strong&gt;130&lt;/strong&gt;&#xA;    &lt;/td&gt;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;td&amp;gt;&#xA;  Off&#xA;&amp;lt;/td&amp;gt;&#xA;&#xA;&amp;lt;td&amp;gt;&#xA;  Enabled&#xA;&amp;lt;/td&amp;gt;&#xA;&#xA;&amp;lt;td&amp;gt;&#xA;  Disabled&#xA;&amp;lt;/td&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;  &lt;/tr&gt;&#xA;  &lt;tr&gt;&#xA;    &lt;td&gt;&#xA;      On&#xA;    &lt;/td&gt;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;td&amp;gt;&#xA;  Enabled&#xA;&amp;lt;/td&amp;gt;&#xA;&#xA;&amp;lt;td&amp;gt;&#xA;  Enabled&#xA;&amp;lt;/td&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;  &lt;/tr&gt;&#xA;  &lt;tr&gt;&#xA;    &lt;td rowspan=&#34;2&#34;&gt;&#xA;      &lt;strong&gt;140&lt;/strong&gt; (Default)&#xA;    &lt;/td&gt;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;td&amp;gt;&#xA;  Off&#xA;&amp;lt;/td&amp;gt;&#xA;&#xA;&amp;lt;td&amp;gt;&#xA;  Enabled&#xA;&amp;lt;/td&amp;gt;&#xA;&#xA;&amp;lt;td&amp;gt;&#xA;  Disabled&#xA;&amp;lt;/td&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;  &lt;/tr&gt;&#xA;  &lt;tr&gt;&#xA;    &lt;td&gt;&#xA;      On&#xA;    &lt;/td&gt;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;td&amp;gt;&#xA;  Enabled&#xA;&amp;lt;/td&amp;gt;&#xA;&#xA;&amp;lt;td&amp;gt;&#xA;  Enabled&#xA;&amp;lt;/td&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;  &lt;/tr&gt;&#xA;  &lt;tr&gt;&#xA;    &lt;td rowspan=&#34;7&#34;&gt;&#xA;      &lt;strong&gt;15 (SQL Server 2019 (15.x)) and 12 (Azure SQL Database)&lt;/strong&gt;&#xA;    &lt;/td&gt;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;td rowspan=&amp;quot;2&amp;quot;&amp;gt;&#xA;  &amp;lt;strong&amp;gt;100 to 120&amp;lt;/strong&amp;gt;&#xA;&amp;lt;/td&amp;gt;&#xA;&#xA;&amp;lt;td&amp;gt;&#xA;  Off&#xA;&amp;lt;/td&amp;gt;&#xA;&#xA;&amp;lt;td&amp;gt;&#xA;  Disabled&#xA;&amp;lt;/td&amp;gt;&#xA;&#xA;&amp;lt;td&amp;gt;&#xA;  Disabled&#xA;&amp;lt;/td&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;  &lt;/tr&gt;&#xA;  &lt;tr&gt;&#xA;    &lt;td&gt;&#xA;      On&#xA;    &lt;/td&gt;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;td&amp;gt;&#xA;  Enabled&#xA;&amp;lt;/td&amp;gt;&#xA;&#xA;&amp;lt;td&amp;gt;&#xA;  Enabled&#xA;&amp;lt;/td&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;  &lt;/tr&gt;&#xA;  &lt;tr&gt;&#xA;    &lt;td rowspan=&#34;2&#34;&gt;&#xA;      &lt;strong&gt;130 to 140&lt;/strong&gt;&#xA;    &lt;/td&gt;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;td&amp;gt;&#xA;  Off&#xA;&amp;lt;/td&amp;gt;&#xA;&#xA;&amp;lt;td&amp;gt;&#xA;  Enabled&#xA;&amp;lt;/td&amp;gt;&#xA;&#xA;&amp;lt;td&amp;gt;&#xA;  Disabled&#xA;&amp;lt;/td&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;  &lt;/tr&gt;&#xA;  &lt;tr&gt;&#xA;    &lt;td&gt;&#xA;      On&#xA;    &lt;/td&gt;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;td&amp;gt;&#xA;  Enabled&#xA;&amp;lt;/td&amp;gt;&#xA;&#xA;&amp;lt;td&amp;gt;&#xA;  Enabled&#xA;&amp;lt;/td&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;  &lt;/tr&gt;&#xA;  &lt;tr&gt;&#xA;    &lt;td rowspan=&#34;3&#34;&gt;&#xA;      &lt;strong&gt;150&lt;/strong&gt; (Default)&#xA;    &lt;/td&gt;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;td&amp;gt;&#xA;  Off&#xA;&amp;lt;/td&amp;gt;&#xA;&#xA;&amp;lt;td&amp;gt;&#xA;  Enabled&#xA;&amp;lt;/td&amp;gt;&#xA;&#xA;&amp;lt;td&amp;gt;&#xA;  Disabled&#xA;&amp;lt;/td&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;  &lt;/tr&gt;&#xA;  &lt;tr&gt;&#xA;    &lt;td&gt;&#xA;    &lt;/td&gt;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;td&amp;gt;&#xA;&amp;lt;/td&amp;gt;&#xA;&#xA;&amp;lt;td&amp;gt;&#xA;&amp;lt;/td&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;  &lt;/tr&gt;&#xA;  &lt;tr&gt;&#xA;    &lt;td&gt;&#xA;      On&#xA;    &lt;/td&gt;&#xA;&lt;pre&gt;&lt;code&gt;&amp;lt;td&amp;gt;&#xA;  Enabled&#xA;&amp;lt;/td&amp;gt;&#xA;&#xA;&amp;lt;td&amp;gt;&#xA;  Enabled&#xA;&amp;lt;/td&amp;gt;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;  &lt;/tr&gt;&#xA;&lt;/table&gt;&#xA;&lt;p&gt;If you are running in Azure SQL Database, you don’t have the ability to enable this particular trace flag, which is where the database scoped configuration becomes useful. If you are running on Azure SQL Managed Instances, you can enable the trace flag just like you would if on-premises.&lt;/p&gt;&#xA;&lt;p&gt;Enabling this trace flag would also require a restart of the SQL Server services if you want to persist it upon a restart. You can enable this trace flag by setting up a &lt;a href=&#34;https://docs.microsoft.com/en-us/sql/database-engine/configure-windows/scm-services-configure-server-startup-options?view=sql-server-ver15&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;startup parameter&lt;/a&gt; in the SQL Server Configuration Manager.  You can check for the existence of trace flags by using DBCC TRACESTATUS().&lt;/p&gt;&#xA;&lt;h3 id=&#34;database-scoped-configuration-query_opimizer_hotfixes&#34;&gt;Database Scoped Configuration QUERY_OPIMIZER_HOTFIXES&lt;/h3&gt;&#xA;&lt;p&gt;Enabling trace flag 4199 is a global trace flag for the entire instance.  This means that it’ll apply the configuration across all databases.  What if you have a mixture of databases that may or may not be able to take advantage of any hotfixes?  Enabling the trace flag could cause issues.  This is where the QUERY_OPIMIZER_HOTFIXES database scoped configuration comes in to play.&lt;/p&gt;&#xA;&lt;p&gt;This configuration allows you to enabled query optimizer hotfixes post the release to market version for any specific database. This also allows you to enable it for Azure SQL Database since we don’t have the ability to enable the trace flag within that product.&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-sql&#34; data-lang=&#34;sql&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;ALTER&lt;/span&gt; &lt;span style=&#34;color:#66d9ef&#34;&gt;DATABASE&lt;/span&gt; SCOPED CONFIGURATION QUERY_OPTIMIZER_HOTFIXES &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;color:#66d9ef&#34;&gt;ON&lt;/span&gt;;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The query above has to be executed within the context of the individual database.  You can also enable this configuration in Azure SQL Managed Instances databases.&lt;/p&gt;&#xA;&lt;h3 id=&#34;enabling_query_optimizer_hotfixes-for-queries&#34;&gt;Enabling_QUERY_OPTIMIZER_HOTFIXES for Queries&lt;/h3&gt;&#xA;&lt;p&gt;If you didn’t want to enable these hotfixes at the instance level or the database level, there’s a third option.  You can also enable it as a query hint.  Keep in mind that the query optimizer will want to pick the best execution plan possible.  Use query hints as sparingly as possible and make sure to ask yourself if you are really smarter than the optimizer.  If the answer is no, you aren’t smarter than the optimizer then don’t use a query hint.  So, it goes without saying that my recommendation is to not use query hints unless that’s the only way to solve an issue.&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-sql&#34; data-lang=&#34;sql&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;SELECT&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;*&lt;/span&gt; &lt;span style=&#34;color:#66d9ef&#34;&gt;FROM&lt;/span&gt; Person.Address &#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;WHERE&lt;/span&gt; City &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;SEATTLE&amp;#39;&lt;/span&gt; &lt;span style=&#34;color:#66d9ef&#34;&gt;AND&lt;/span&gt; PostalCode &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;color:#ae81ff&#34;&gt;98104&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;OPTION&lt;/span&gt; ( USE HINT (&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;ENABLE_QUERY_OPTIMIZER_HOTFIXES&amp;#39;&lt;/span&gt;));&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;GO&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id=&#34;summary&#34;&gt;Summary&lt;/h3&gt;&#xA;&lt;p&gt;In this post I’ve shown three methods on how to implement the most recent query optimizer hot fixes.  Before putting any of them into production, make sure that you verify your respective workloads again them.  Make sure to also review all of the cumulative updates or service packs since initial release to see what query optimizer issues were fixed.  You might be missing out of a fix that will help solve a performance problem.&lt;/p&gt;&#xA;</content:encoded>
    </item>
    <item>
      <title>Using LAST_QUERY_PLAN_STATS in SQL Server 2019</title>
      <link>https://johnmorehouse.com/2020/07/using-last_query_plan_stats-in-sql-server-2019/</link>
      <pubDate>Fri, 17 Jul 2020 13:17:14 +0000</pubDate>
      <guid>https://johnmorehouse.com/2020/07/using-last_query_plan_stats-in-sql-server-2019/</guid>
      <description>&lt;p&gt;In my opinion, SQL Server 2019 is one of the greatest releases of the product that Microsoft has ever produced.  The amount of improvements across the platform really allows data professionals to have better and faster queries while simultaneously minimizing effort.   One of the many things that it fixes is the ability to get an actual plan without having to re-run the query.&lt;/p&gt;&#xA;&lt;p&gt;Currently, if you are not on SQL Server 2019 and wanted to see an execution plan, you would attempt to dive into the execution plan cache to retrieve an &lt;span style=&#34;text-decoration: underline;&#34;&gt;&lt;em&gt;estimated&lt;/em&gt;&lt;/span&gt; plan.  Keep in mind that this just an estimated plan and the actual plan, while the shape should be the same, will have runtime metrics.  These  Actual runtime metrics could be, different than what is shown in the estimated plan, so it is important to get the actual whenever possible.&lt;/p&gt;&#xA;&lt;p&gt;With the introduction of lightweight statistics, SQL Server can retain the metrics of the actual execution plan if enabled.  Note that this could introduce a slight increase in overhead, however, I haven’t yet seen it be determinantal. These metrics are vastly important when performing query tuning.&lt;/p&gt;&#xA;&lt;p&gt;Metrics:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Actual number of rows per operator&lt;/li&gt;&#xA;&lt;li&gt;Total CPU time&lt;/li&gt;&#xA;&lt;li&gt;Total execution time&lt;/li&gt;&#xA;&lt;li&gt;Actual maximum degree of parallelism&lt;/li&gt;&#xA;&lt;li&gt;Memory granted and subsequently used&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;Two new items are also introduced for this particular feature, one being a new database scoped configuration,  LAST_QUERY_PLAN_STATS, and the other a new dynamic management function, sys.dm_exec_query_plan_stats.&lt;/p&gt;&#xA;&lt;p&gt;Let us look at both.&lt;/p&gt;&#xA;&lt;h3 id=&#34;last_query_plan_stats&#34;&gt;LAST_QUERY_PLAN_STATS&lt;/h3&gt;&#xA;&lt;p&gt;Introduced in SQL Server 2016, database scoped configurations allow you to have  more granular control of how the database is going to behave.  LAST_QUERY_PLAN_STATS can either be set globally with trace flag 2451 or on each individual database.  It does require compatibility level of 150 so you must be on SQL Server 2019 to take advantage of this new ability.  You can enable this database scoped configuration with this command.&lt;/p&gt;&#xA;&lt;p&gt;&lt;code&gt;ALTER DATABASE SCOPED CONFIGURATION SET LAST_QUERY_PLAN_STATS = ON&lt;/code&gt;&lt;/p&gt;&#xA;&lt;p&gt;Like with anything else, there is a minor overhead with enabling this.  SQL Server does have to work just a tad bit harder to capture and store the runtime metrics for the plans.  This overhead &lt;strong&gt;should&lt;/strong&gt; be minimal but as always, proper testing should be completed against your given workloads.&lt;/p&gt;&#xA;&lt;h3 id=&#34;sysdm_exec_query_plan_stats&#34;&gt;SYS.DM_EXEC_QUERY_PLAN_STATS&lt;/h3&gt;&#xA;&lt;p&gt;Along with the new database scoped configuration comes a new dynamic management function, or DMF.  This DMF requires the plan_handle, which is obtains by cross applying it with one of the other dmvs, such as:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;dm_exec_cached_plans&lt;/li&gt;&#xA;&lt;li&gt;dm_exec_query_stats&lt;/li&gt;&#xA;&lt;li&gt;dm_exec_requests&lt;/li&gt;&#xA;&lt;li&gt;dm_exec_procedure_stats&lt;/li&gt;&#xA;&lt;li&gt;dm_exec_trigger_stats&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;Here is an example query:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-sql&#34; data-lang=&#34;sql&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;SELECT&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;*&lt;/span&gt; &lt;span style=&#34;color:#66d9ef&#34;&gt;FROM&lt;/span&gt; SYS.DM_EXEC_CACHED_PLANS CP&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;CROSS&lt;/span&gt; APPLY SYS.DM_EXEC_QUERY_PLAN_STATS(CP.PLAN_HANDLE)  PS&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;WHERE&lt;/span&gt; PS.DBID &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;color:#ae81ff&#34;&gt;10&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Let’s take a look at this feature in action.&lt;/p&gt;&#xA;&lt;h3 id=&#34;finding-the-last-known-actual-plan&#34;&gt;Finding the Last Known Actual Plan&lt;/h3&gt;&#xA;&lt;p&gt;Using WideWorldImporters, let’s first ensure that the database is at compatibility level of 150 and the new database scoped configuration is also enabled.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://johnmorehouse.com/images/2020/07/lastqueryplanstats_1.png&#34;&gt;&lt;img data-recalc-dims=&#34;1&#34; loading=&#34;lazy&#34; decoding=&#34;async&#34; class=&#34;aligncenter wp-image-6928 size-large&#34; src=&#34;https://johnmorehouse.com/images/2020/07/lastqueryplanstats_1.png&#34; alt=&#34;SSMS screen shot of query and results&#34; width=&#34;640&#34; height=&#34;293&#34; srcset=&#34;https://johnmorehouse.com/images/2020/07/lastqueryplanstats_1.png 1024w, https://johnmorehouse.com/images/2020/07/lastqueryplanstats_1.png 300w, https://johnmorehouse.com/images/2020/07/lastqueryplanstats_1.png 768w, https://johnmorehouse.com/images/2020/07/lastqueryplanstats_1.png 1310w&#34; sizes=&#34;auto, (max-width: 640px) 100vw, 640px&#34; /&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;We can see that it is now at the correct compatibility level and the database scoped configuration is also been enabled.  Now we can run a query and go find the actual plan utilizing the new DMF.&lt;/p&gt;&#xA;&lt;p&gt;I am going to do a simple join between the Sales.Orders and Sales.OrderLines tables.  After the results are returned, I’ll interrogate the new DMF using sys.dm_exec_cached_plans as a way to get the plan handle&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-sql&#34; data-lang=&#34;sql&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;select&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;*&lt;/span&gt; &lt;span style=&#34;color:#66d9ef&#34;&gt;from&lt;/span&gt; sales.orders o&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;       &lt;span style=&#34;color:#66d9ef&#34;&gt;inner&lt;/span&gt; &lt;span style=&#34;color:#66d9ef&#34;&gt;join&lt;/span&gt; sales.OrderLines ol &lt;span style=&#34;color:#66d9ef&#34;&gt;on&lt;/span&gt; o.OrderID&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;ol.OrderID;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;select&lt;/span&gt; size_in_bytes,cacheobjtype,objtype,plan_handle,ps.dbid, ps.query_plan&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;from&lt;/span&gt; sys.dm_exec_cached_plans cp&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;       &lt;span style=&#34;color:#66d9ef&#34;&gt;cross&lt;/span&gt; apply sys.dm_exec_query_plan_stats(cp.plan_handle) ps&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;where&lt;/span&gt; ps.dbid &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;color:#ae81ff&#34;&gt;10&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&lt;a href=&#34;https://johnmorehouse.com/images/2020/07/lastqueryplanstats_2.png&#34;&gt;&lt;img data-recalc-dims=&#34;1&#34; loading=&#34;lazy&#34; decoding=&#34;async&#34; class=&#34;aligncenter wp-image-6931&#34; src=&#34;https://johnmorehouse.com/images/2020/07/lastqueryplanstats_2.png&#34; alt=&#34;&#34; width=&#34;640&#34; height=&#34;351&#34; srcset=&#34;https://johnmorehouse.com/images/2020/07/lastqueryplanstats_2.png 1024w, https://johnmorehouse.com/images/2020/07/lastqueryplanstats_2.png 300w, https://johnmorehouse.com/images/2020/07/lastqueryplanstats_2.png 768w, https://johnmorehouse.com/images/2020/07/lastqueryplanstats_2.png 1443w, https://johnmorehouse.com/images/2020/07/lastqueryplanstats_2.png 1280w&#34; sizes=&#34;auto, (max-width: 640px) 100vw, 640px&#34; /&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;The resulting query_plan column is being derived from the new DMF.  If you click on the hyperlink in SQL Server Management Studio, it will open the query plan.   Once opened, hit F4 or right click to show the properties of the plan and select the Clustered Index Scan of the Sales.OrderLines table.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://johnmorehouse.com/images/2020/07/lastqueryplanstats_3.png&#34;&gt;&lt;img data-recalc-dims=&#34;1&#34; loading=&#34;lazy&#34; decoding=&#34;async&#34; class=&#34;aligncenter wp-image-6932&#34; src=&#34;https://johnmorehouse.com/images/2020/07/lastqueryplanstats_3.png&#34; alt=&#34;&#34; width=&#34;640&#34; height=&#34;319&#34; srcset=&#34;https://johnmorehouse.com/images/2020/07/lastqueryplanstats_3.png 1024w, https://johnmorehouse.com/images/2020/07/lastqueryplanstats_3.png 300w, https://johnmorehouse.com/images/2020/07/lastqueryplanstats_3.png 768w, https://johnmorehouse.com/images/2020/07/lastqueryplanstats_3.png 1257w&#34; sizes=&#34;auto, (max-width: 640px) 100vw, 640px&#34; /&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;You can now see the actual runtime statistics that SQL Server captured when the query was executed.&lt;/p&gt;&#xA;&lt;h2 id=&#34;summary&#34;&gt;Summary&lt;/h2&gt;&#xA;&lt;p&gt;As I mentioned at the beginning of this post, SQL Server 2019 is one of the best releases of the product that Microsoft has ever accomplished.  Features such as lightweight query profiling and LAST_QUERY_PLAN_STATS just continue to make the data professionals life that much easier.&lt;/p&gt;&#xA;&lt;p&gt;Have you migrated to SQL Server 2019 yet?  Are you using this feature?  If you are, drop me a note! I’d love to hear about your experience with it!&lt;/p&gt;&#xA;</description>
      <content:encoded>&lt;p&gt;In my opinion, SQL Server 2019 is one of the greatest releases of the product that Microsoft has ever produced.  The amount of improvements across the platform really allows data professionals to have better and faster queries while simultaneously minimizing effort.   One of the many things that it fixes is the ability to get an actual plan without having to re-run the query.&lt;/p&gt;&#xA;&lt;p&gt;Currently, if you are not on SQL Server 2019 and wanted to see an execution plan, you would attempt to dive into the execution plan cache to retrieve an &lt;span style=&#34;text-decoration: underline;&#34;&gt;&lt;em&gt;estimated&lt;/em&gt;&lt;/span&gt; plan.  Keep in mind that this just an estimated plan and the actual plan, while the shape should be the same, will have runtime metrics.  These  Actual runtime metrics could be, different than what is shown in the estimated plan, so it is important to get the actual whenever possible.&lt;/p&gt;&#xA;&lt;p&gt;With the introduction of lightweight statistics, SQL Server can retain the metrics of the actual execution plan if enabled.  Note that this could introduce a slight increase in overhead, however, I haven’t yet seen it be determinantal. These metrics are vastly important when performing query tuning.&lt;/p&gt;&#xA;&lt;p&gt;Metrics:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Actual number of rows per operator&lt;/li&gt;&#xA;&lt;li&gt;Total CPU time&lt;/li&gt;&#xA;&lt;li&gt;Total execution time&lt;/li&gt;&#xA;&lt;li&gt;Actual maximum degree of parallelism&lt;/li&gt;&#xA;&lt;li&gt;Memory granted and subsequently used&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;Two new items are also introduced for this particular feature, one being a new database scoped configuration,  LAST_QUERY_PLAN_STATS, and the other a new dynamic management function, sys.dm_exec_query_plan_stats.&lt;/p&gt;&#xA;&lt;p&gt;Let us look at both.&lt;/p&gt;&#xA;&lt;h3 id=&#34;last_query_plan_stats&#34;&gt;LAST_QUERY_PLAN_STATS&lt;/h3&gt;&#xA;&lt;p&gt;Introduced in SQL Server 2016, database scoped configurations allow you to have  more granular control of how the database is going to behave.  LAST_QUERY_PLAN_STATS can either be set globally with trace flag 2451 or on each individual database.  It does require compatibility level of 150 so you must be on SQL Server 2019 to take advantage of this new ability.  You can enable this database scoped configuration with this command.&lt;/p&gt;&#xA;&lt;p&gt;&lt;code&gt;ALTER DATABASE SCOPED CONFIGURATION SET LAST_QUERY_PLAN_STATS = ON&lt;/code&gt;&lt;/p&gt;&#xA;&lt;p&gt;Like with anything else, there is a minor overhead with enabling this.  SQL Server does have to work just a tad bit harder to capture and store the runtime metrics for the plans.  This overhead &lt;strong&gt;should&lt;/strong&gt; be minimal but as always, proper testing should be completed against your given workloads.&lt;/p&gt;&#xA;&lt;h3 id=&#34;sysdm_exec_query_plan_stats&#34;&gt;SYS.DM_EXEC_QUERY_PLAN_STATS&lt;/h3&gt;&#xA;&lt;p&gt;Along with the new database scoped configuration comes a new dynamic management function, or DMF.  This DMF requires the plan_handle, which is obtains by cross applying it with one of the other dmvs, such as:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;dm_exec_cached_plans&lt;/li&gt;&#xA;&lt;li&gt;dm_exec_query_stats&lt;/li&gt;&#xA;&lt;li&gt;dm_exec_requests&lt;/li&gt;&#xA;&lt;li&gt;dm_exec_procedure_stats&lt;/li&gt;&#xA;&lt;li&gt;dm_exec_trigger_stats&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;Here is an example query:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-sql&#34; data-lang=&#34;sql&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;SELECT&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;*&lt;/span&gt; &lt;span style=&#34;color:#66d9ef&#34;&gt;FROM&lt;/span&gt; SYS.DM_EXEC_CACHED_PLANS CP&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;CROSS&lt;/span&gt; APPLY SYS.DM_EXEC_QUERY_PLAN_STATS(CP.PLAN_HANDLE)  PS&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;WHERE&lt;/span&gt; PS.DBID &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;color:#ae81ff&#34;&gt;10&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Let’s take a look at this feature in action.&lt;/p&gt;&#xA;&lt;h3 id=&#34;finding-the-last-known-actual-plan&#34;&gt;Finding the Last Known Actual Plan&lt;/h3&gt;&#xA;&lt;p&gt;Using WideWorldImporters, let’s first ensure that the database is at compatibility level of 150 and the new database scoped configuration is also enabled.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://johnmorehouse.com/images/2020/07/lastqueryplanstats_1.png&#34;&gt;&lt;img data-recalc-dims=&#34;1&#34; loading=&#34;lazy&#34; decoding=&#34;async&#34; class=&#34;aligncenter wp-image-6928 size-large&#34; src=&#34;https://johnmorehouse.com/images/2020/07/lastqueryplanstats_1.png&#34; alt=&#34;SSMS screen shot of query and results&#34; width=&#34;640&#34; height=&#34;293&#34; srcset=&#34;https://johnmorehouse.com/images/2020/07/lastqueryplanstats_1.png 1024w, https://johnmorehouse.com/images/2020/07/lastqueryplanstats_1.png 300w, https://johnmorehouse.com/images/2020/07/lastqueryplanstats_1.png 768w, https://johnmorehouse.com/images/2020/07/lastqueryplanstats_1.png 1310w&#34; sizes=&#34;auto, (max-width: 640px) 100vw, 640px&#34; /&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;We can see that it is now at the correct compatibility level and the database scoped configuration is also been enabled.  Now we can run a query and go find the actual plan utilizing the new DMF.&lt;/p&gt;&#xA;&lt;p&gt;I am going to do a simple join between the Sales.Orders and Sales.OrderLines tables.  After the results are returned, I’ll interrogate the new DMF using sys.dm_exec_cached_plans as a way to get the plan handle&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-sql&#34; data-lang=&#34;sql&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;select&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;*&lt;/span&gt; &lt;span style=&#34;color:#66d9ef&#34;&gt;from&lt;/span&gt; sales.orders o&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;       &lt;span style=&#34;color:#66d9ef&#34;&gt;inner&lt;/span&gt; &lt;span style=&#34;color:#66d9ef&#34;&gt;join&lt;/span&gt; sales.OrderLines ol &lt;span style=&#34;color:#66d9ef&#34;&gt;on&lt;/span&gt; o.OrderID&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;ol.OrderID;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;select&lt;/span&gt; size_in_bytes,cacheobjtype,objtype,plan_handle,ps.dbid, ps.query_plan&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;from&lt;/span&gt; sys.dm_exec_cached_plans cp&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;       &lt;span style=&#34;color:#66d9ef&#34;&gt;cross&lt;/span&gt; apply sys.dm_exec_query_plan_stats(cp.plan_handle) ps&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;where&lt;/span&gt; ps.dbid &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;color:#ae81ff&#34;&gt;10&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&lt;a href=&#34;https://johnmorehouse.com/images/2020/07/lastqueryplanstats_2.png&#34;&gt;&lt;img data-recalc-dims=&#34;1&#34; loading=&#34;lazy&#34; decoding=&#34;async&#34; class=&#34;aligncenter wp-image-6931&#34; src=&#34;https://johnmorehouse.com/images/2020/07/lastqueryplanstats_2.png&#34; alt=&#34;&#34; width=&#34;640&#34; height=&#34;351&#34; srcset=&#34;https://johnmorehouse.com/images/2020/07/lastqueryplanstats_2.png 1024w, https://johnmorehouse.com/images/2020/07/lastqueryplanstats_2.png 300w, https://johnmorehouse.com/images/2020/07/lastqueryplanstats_2.png 768w, https://johnmorehouse.com/images/2020/07/lastqueryplanstats_2.png 1443w, https://johnmorehouse.com/images/2020/07/lastqueryplanstats_2.png 1280w&#34; sizes=&#34;auto, (max-width: 640px) 100vw, 640px&#34; /&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;The resulting query_plan column is being derived from the new DMF.  If you click on the hyperlink in SQL Server Management Studio, it will open the query plan.   Once opened, hit F4 or right click to show the properties of the plan and select the Clustered Index Scan of the Sales.OrderLines table.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://johnmorehouse.com/images/2020/07/lastqueryplanstats_3.png&#34;&gt;&lt;img data-recalc-dims=&#34;1&#34; loading=&#34;lazy&#34; decoding=&#34;async&#34; class=&#34;aligncenter wp-image-6932&#34; src=&#34;https://johnmorehouse.com/images/2020/07/lastqueryplanstats_3.png&#34; alt=&#34;&#34; width=&#34;640&#34; height=&#34;319&#34; srcset=&#34;https://johnmorehouse.com/images/2020/07/lastqueryplanstats_3.png 1024w, https://johnmorehouse.com/images/2020/07/lastqueryplanstats_3.png 300w, https://johnmorehouse.com/images/2020/07/lastqueryplanstats_3.png 768w, https://johnmorehouse.com/images/2020/07/lastqueryplanstats_3.png 1257w&#34; sizes=&#34;auto, (max-width: 640px) 100vw, 640px&#34; /&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;You can now see the actual runtime statistics that SQL Server captured when the query was executed.&lt;/p&gt;&#xA;&lt;h2 id=&#34;summary&#34;&gt;Summary&lt;/h2&gt;&#xA;&lt;p&gt;As I mentioned at the beginning of this post, SQL Server 2019 is one of the best releases of the product that Microsoft has ever accomplished.  Features such as lightweight query profiling and LAST_QUERY_PLAN_STATS just continue to make the data professionals life that much easier.&lt;/p&gt;&#xA;&lt;p&gt;Have you migrated to SQL Server 2019 yet?  Are you using this feature?  If you are, drop me a note! I’d love to hear about your experience with it!&lt;/p&gt;&#xA;</content:encoded>
    </item>
    <item>
      <title>Using Docker Volumes for SQL Server in Linux</title>
      <link>https://johnmorehouse.com/2020/07/using-docker-volumes-for-sql-server-in-linux/</link>
      <pubDate>Fri, 03 Jul 2020 13:09:45 +0000</pubDate>
      <guid>https://johnmorehouse.com/2020/07/using-docker-volumes-for-sql-server-in-linux/</guid>
      <description>&lt;p&gt;No, not that kind of volume!&lt;/p&gt;&#xA;&lt;p&gt;Over the past couple of blog posts, I have been talking about the versatility of deploying SQL Server with Docker.  This combination is a great way to quickly and easily spin up local SQL Server instances.  &lt;a href=&#34;https://johnmorehouse.com/2020/06/restoring-a-sql-server-database-in-docker/&#34; title=&#34;Restoring a SQL Server Database in Docker&#34;&gt;In the most recent post&lt;/a&gt;, I talked about a method to copy and restore a sample database into a Docker container that is running SQL Server.   In this post, I am going to talk about an easier way to accomplish this by attaching a persistent volume to the container.   With this method you don’t have to copy any files into the container, and it makes the overall process easier and repeatable.&lt;/p&gt;&#xA;&lt;p&gt;First, before we get into the code, let’s talk about what a volume is.  Essentially, a volume is a location on the host machine that can be referenced by the container.  I think of this as a shared folder that the container can see.  Once attached to the container, it can then read or write to the volume.   You can easily declare the volume when you create the container with a simple switch in the command.&lt;/p&gt;&#xA;&lt;p&gt;Let’s take a look!&lt;/p&gt;&#xA;&lt;h3 id=&#34;creating-a-local-folder&#34;&gt;&lt;span style=&#34;text-decoration: underline;&#34;&gt;Creating a Local Folder&lt;/span&gt;&lt;/h3&gt;&#xA;&lt;p&gt;Since I’m going to use a volume to hold backup copies of SQL Server sample databases, I am going to create a new local folder entitled “sampledbs”.  Within a terminal session within your local profile, you can issue a “mkdir” command, which stands for “make directory”.  &lt;a href=&#34;https://en.wikipedia.org/wiki/Mkdir&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;MKDIR &lt;/a&gt;is also utilized in several various operating systems, including Windows, so it may be familiar to you.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://johnmorehouse.com/images/2020/07/dockervols_1.png&#34;&gt;&lt;img data-recalc-dims=&#34;1&#34; loading=&#34;lazy&#34; decoding=&#34;async&#34; class=&#34;aligncenter size-full wp-image-6851&#34; src=&#34;https://johnmorehouse.com/images/2020/07/dockervols_1.png&#34; alt=&#34;&#34; width=&#34;640&#34; height=&#34;397&#34; srcset=&#34;https://johnmorehouse.com/images/2020/07/dockervols_1.png 797w, https://johnmorehouse.com/images/2020/07/dockervols_1.png 300w, https://johnmorehouse.com/images/2020/07/dockervols_1.png 768w&#34; sizes=&#34;auto, (max-width: 640px) 100vw, 640px&#34; /&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;Next, I want to put a copy of the AdventureWorks2017 database backup file into the folder we just created.   If you haven’t already, you can down the file from &lt;a href=&#34;https://github.com/microsoft/sql-server-samples&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Microsoft’s GitHub&lt;/a&gt; repository.  In my case, I have it already downloaded.  I’ll copy it to the appropriate folder using the the “cp” command, which stands for “copy”.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://johnmorehouse.com/images/2020/07/dockervols_2.png&#34;&gt;&lt;img data-recalc-dims=&#34;1&#34; loading=&#34;lazy&#34; decoding=&#34;async&#34; class=&#34;aligncenter size-full wp-image-6852&#34; src=&#34;https://johnmorehouse.com/images/2020/07/dockervols_2.png&#34; alt=&#34;&#34; width=&#34;640&#34; height=&#34;128&#34; srcset=&#34;https://johnmorehouse.com/images/2020/07/dockervols_2.png 845w, https://johnmorehouse.com/images/2020/07/dockervols_2.png 300w, https://johnmorehouse.com/images/2020/07/dockervols_2.png 768w&#34; sizes=&#34;auto, (max-width: 640px) 100vw, 640px&#34; /&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;Shown above, I am in the “mssql” directory that I had in my profile.  I issue the copy command to copy the AdventureWorks2017.bak file into the new directory.  Then I move to the new samplesdb directory and issue a “list” or “ls” command to show the contents of the directory.  We can see that the file now exists in the right directory.&lt;/p&gt;&#xA;&lt;p&gt;Next, we need to share the folder within Docker and then we can create a container with a volume.&lt;/p&gt;&#xA;&lt;h3 id=&#34;sharing-the-folder-in-docker&#34;&gt;&lt;span style=&#34;text-decoration: underline;&#34;&gt;Sharing the Folder in Docker&lt;/span&gt;&lt;/h3&gt;&#xA;&lt;p&gt;In order for the volume to be mounted to the container, Docker must be granted access to do so.  This is done by specifying the folder as “shared”.&lt;/p&gt;&#xA;&lt;p&gt;Open the Docker Dashboard.  This can be done by right clicking the Docker icon (looks like a ship) in the system tray.  Select Dashboard.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://johnmorehouse.com/images/2020/07/dockervols_3.png&#34;&gt;&lt;img data-recalc-dims=&#34;1&#34; loading=&#34;lazy&#34; decoding=&#34;async&#34; class=&#34;aligncenter size-full wp-image-6853&#34; src=&#34;https://johnmorehouse.com/images/2020/07/dockervols_3.png&#34; alt=&#34;&#34; width=&#34;250&#34; height=&#34;372&#34; srcset=&#34;https://johnmorehouse.com/images/2020/07/dockervols_3.png 250w, https://johnmorehouse.com/images/2020/07/dockervols_3.png 202w&#34; sizes=&#34;auto, (max-width: 250px) 100vw, 250px&#34; /&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;Once the dashboard has opened, do the following:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Next, go to the gear icon in the upper right area.&lt;/li&gt;&#xA;&lt;li&gt;Then on the left-hand side click expand Resources and then click on File Sharing.&lt;/li&gt;&#xA;&lt;li&gt;Click on the plus icon and browse to the folder that you just created in the step above.&lt;/li&gt;&#xA;&lt;li&gt;Apply &amp;amp; Restart.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://johnmorehouse.com/images/2020/07/dockervols_4.png&#34;&gt;&lt;img data-recalc-dims=&#34;1&#34; loading=&#34;lazy&#34; decoding=&#34;async&#34; class=&#34;aligncenter size-large wp-image-6854&#34; src=&#34;https://johnmorehouse.com/images/2020/07/dockervols_4.png&#34; alt=&#34;&#34; width=&#34;640&#34; height=&#34;406&#34; srcset=&#34;https://johnmorehouse.com/images/2020/07/dockervols_4.png 1024w, https://johnmorehouse.com/images/2020/07/dockervols_4.png 300w, https://johnmorehouse.com/images/2020/07/dockervols_4.png 768w, https://johnmorehouse.com/images/2020/07/dockervols_4.png 1040w&#34; sizes=&#34;auto, (max-width: 640px) 100vw, 640px&#34; /&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;After restarting, the folder is now able to be attached to a container.  Now we can create a container with a volume.&lt;/p&gt;&#xA;&lt;h3 id=&#34;creating-a-container-with-a-volume&#34;&gt;&lt;span style=&#34;text-decoration: underline;&#34;&gt;Creating a container with a volume&lt;/span&gt;&lt;/h3&gt;&#xA;&lt;p&gt;The process is straight forward to create a volume when creating a container. _ _If you recall from previous posts, we create the SQL Server container with this command,&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;docker run -e &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;ACCEPT_EULA=Y&amp;#39;&lt;/span&gt; -e &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;SA_PASSWORD=yourStrong(!)Password&amp;#39;&lt;/span&gt; -p 1433:1433 -d mcr.microsoft.com/mssql/server:2019-latest&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;If we wanted to add a volume to this container, we would include the “-v” or “-volume” switch.  As shown below, the volume switch tells Docker that I want to attach a volume “/Users/jmorehouse/sampledbs”, which was defined in the previous step, to the container.  Inside the container, the folder “sampledbs” will be allocated.&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;docker run -e &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;ACCEPT_EULA=Y&amp;#39;&lt;/span&gt; -e &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;SA_PASSWORD=yourStrong(!)Password&amp;#39;&lt;/span&gt; -p 1433:1433 -v /Users/jmorehouse/sampledbsl:/sampledbs -d mcr.microsoft.com/mssql/server:2019-latest&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;I think of this as a one to one mapping.  The volume essentially lives outside the container itself and inside the container it is represented by the folder “sampledbs”.  This is done with the context of &lt;em&gt;Local volume location:inside the container location&lt;/em&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;now-what&#34;&gt;&lt;span style=&#34;text-decoration: underline;&#34;&gt;Now what?&lt;/span&gt;&lt;/h3&gt;&#xA;&lt;p&gt;So far we have examined how to create a container with a volume attached.  &lt;a href=&#34;https://johnmorehouse.com/2020/06/restoring-a-sql-server-database-in-docker/&#34; title=&#34;Restoring a SQL Server Database in Docker&#34;&gt;In my previous post&lt;/a&gt;, I discussed how to copy a backup file from the host machine into a container.  By doing this it allowed me to restore a database within the container but that meant I had to copy a file and duplicate it. By using a volume, I don’t have to copy anything into the container. i can now either issue a command in the container (like a SQLCMD query) to restore it or do it through tools like &lt;a href=&#34;https://docs.microsoft.com/en-us/sql/azure-data-studio/what-is?view=sql-server-ver15&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Azure Data Studio&lt;/a&gt;.  Let’s take a look at using &lt;a href=&#34;https://docs.microsoft.com/en-us/sql/azure-data-studio/what-is?view=sql-server-ver15&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Azure Data Studio&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;First, I’ll start the container with the volume mounted.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://johnmorehouse.com/images/2020/07/dockervols_5.png&#34;&gt;&lt;img data-recalc-dims=&#34;1&#34; loading=&#34;lazy&#34; decoding=&#34;async&#34; class=&#34;aligncenter size-large wp-image-6855&#34; src=&#34;https://johnmorehouse.com/images/2020/07/dockervols_5.png&#34; alt=&#34;&#34; width=&#34;640&#34; height=&#34;86&#34; srcset=&#34;https://johnmorehouse.com/images/2020/07/dockervols_5.png 1024w, https://johnmorehouse.com/images/2020/07/dockervols_5.png 300w, https://johnmorehouse.com/images/2020/07/dockervols_5.png 768w, https://johnmorehouse.com/images/2020/07/dockervols_5.png 1536w, https://johnmorehouse.com/images/2020/07/dockervols_5.png 1544w, https://johnmorehouse.com/images/2020/07/dockervols_5.png 1280w&#34; sizes=&#34;auto, (max-width: 640px) 100vw, 640px&#34; /&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;Once the container is up and running, I start &lt;a href=&#34;https://docs.microsoft.com/en-us/sql/azure-data-studio/what-is?view=sql-server-ver15&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Azure Data Studio&lt;/a&gt; and being a new query.  First, I’m going to see if SQL Server can see the AdventureWorks2017 backup file in the sampledbs folder that was created.&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-sql&#34; data-lang=&#34;sql&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;RESTORE FILELISTONLY &lt;span style=&#34;color:#66d9ef&#34;&gt;FROM&lt;/span&gt; DISK &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; N&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;/sampledbs/AdventureWorks2017.bak&amp;#39;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;GO&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&lt;a href=&#34;https://johnmorehouse.com/images/2020/07/dockervols_6.png&#34;&gt;&lt;img data-recalc-dims=&#34;1&#34; loading=&#34;lazy&#34; decoding=&#34;async&#34; class=&#34;aligncenter size-large wp-image-6856&#34; src=&#34;https://johnmorehouse.com/images/2020/07/dockervols_6.png&#34; alt=&#34;&#34; width=&#34;640&#34; height=&#34;224&#34; srcset=&#34;https://johnmorehouse.com/images/2020/07/dockervols_6.png 1024w, https://johnmorehouse.com/images/2020/07/dockervols_6.png 300w, https://johnmorehouse.com/images/2020/07/dockervols_6.png 768w, https://johnmorehouse.com/images/2020/07/dockervols_6.png 1154w&#34; sizes=&#34;auto, (max-width: 640px) 100vw, 640px&#34; /&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;Success!  SQL Server can see the file and restore the headers.  This means that I can now restore it.&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-sql&#34; data-lang=&#34;sql&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;RESTORE DATABSE AdventureWorks2017 &lt;span style=&#34;color:#66d9ef&#34;&gt;FROM&lt;/span&gt; DISK&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;N&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;/samplesdbs/AdventureWorks2017.bak&amp;#39;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;WITH&lt;/span&gt; &lt;span style=&#34;color:#66d9ef&#34;&gt;MOVE&lt;/span&gt; &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;AdventureWorks2017&amp;#39;&lt;/span&gt; &lt;span style=&#34;color:#66d9ef&#34;&gt;to&lt;/span&gt; &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;/var/opt/mssql/data/AdventureWorks2017.mdf&amp;#39;&lt;/span&gt;,&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;     &lt;span style=&#34;color:#66d9ef&#34;&gt;MOVE&lt;/span&gt; &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;AdventureWorks2017_log&amp;#39;&lt;/span&gt; &lt;span style=&#34;color:#66d9ef&#34;&gt;to&lt;/span&gt; &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;/var/opt/mssql/data/AdventureWorks2017_log.ldf&amp;#39;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;GO&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&lt;a href=&#34;https://johnmorehouse.com/images/2020/07/dockervols_7.png&#34;&gt;&lt;img data-recalc-dims=&#34;1&#34; loading=&#34;lazy&#34; decoding=&#34;async&#34; class=&#34;aligncenter size-large wp-image-6857&#34; src=&#34;https://johnmorehouse.com/images/2020/07/dockervols_7.png&#34; alt=&#34;&#34; width=&#34;640&#34; height=&#34;255&#34; srcset=&#34;https://johnmorehouse.com/images/2020/07/dockervols_7.png 1024w, https://johnmorehouse.com/images/2020/07/dockervols_7.png 300w, https://johnmorehouse.com/images/2020/07/dockervols_7.png 768w, https://johnmorehouse.com/images/2020/07/dockervols_7.png 1323w&#34; sizes=&#34;auto, (max-width: 640px) 100vw, 640px&#34; /&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;Remember, the backup file doesn’t actually exist within the container.  It lives in a folder on the host, in this case my Mac laptop, and uses the mapping to reach into the host to obtain the file.&lt;/p&gt;&#xA;&lt;h3 id=&#34;summary&#34;&gt;&lt;span style=&#34;text-decoration: underline;&#34;&gt;Summary&lt;/span&gt;&lt;/h3&gt;&#xA;&lt;p&gt;This was a brief look at using volumes in conjunction with containers.  The volume can now be used with other containers which prevents having to manually copy files, such as backup files, into the container.  The container itself can now just reach into the volume and do what it needs.&lt;/p&gt;&#xA;</description>
      <content:encoded>&lt;p&gt;No, not that kind of volume!&lt;/p&gt;&#xA;&lt;p&gt;Over the past couple of blog posts, I have been talking about the versatility of deploying SQL Server with Docker.  This combination is a great way to quickly and easily spin up local SQL Server instances.  &lt;a href=&#34;https://johnmorehouse.com/2020/06/restoring-a-sql-server-database-in-docker/&#34; title=&#34;Restoring a SQL Server Database in Docker&#34;&gt;In the most recent post&lt;/a&gt;, I talked about a method to copy and restore a sample database into a Docker container that is running SQL Server.   In this post, I am going to talk about an easier way to accomplish this by attaching a persistent volume to the container.   With this method you don’t have to copy any files into the container, and it makes the overall process easier and repeatable.&lt;/p&gt;&#xA;&lt;p&gt;First, before we get into the code, let’s talk about what a volume is.  Essentially, a volume is a location on the host machine that can be referenced by the container.  I think of this as a shared folder that the container can see.  Once attached to the container, it can then read or write to the volume.   You can easily declare the volume when you create the container with a simple switch in the command.&lt;/p&gt;&#xA;&lt;p&gt;Let’s take a look!&lt;/p&gt;&#xA;&lt;h3 id=&#34;creating-a-local-folder&#34;&gt;&lt;span style=&#34;text-decoration: underline;&#34;&gt;Creating a Local Folder&lt;/span&gt;&lt;/h3&gt;&#xA;&lt;p&gt;Since I’m going to use a volume to hold backup copies of SQL Server sample databases, I am going to create a new local folder entitled “sampledbs”.  Within a terminal session within your local profile, you can issue a “mkdir” command, which stands for “make directory”.  &lt;a href=&#34;https://en.wikipedia.org/wiki/Mkdir&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;MKDIR &lt;/a&gt;is also utilized in several various operating systems, including Windows, so it may be familiar to you.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://johnmorehouse.com/images/2020/07/dockervols_1.png&#34;&gt;&lt;img data-recalc-dims=&#34;1&#34; loading=&#34;lazy&#34; decoding=&#34;async&#34; class=&#34;aligncenter size-full wp-image-6851&#34; src=&#34;https://johnmorehouse.com/images/2020/07/dockervols_1.png&#34; alt=&#34;&#34; width=&#34;640&#34; height=&#34;397&#34; srcset=&#34;https://johnmorehouse.com/images/2020/07/dockervols_1.png 797w, https://johnmorehouse.com/images/2020/07/dockervols_1.png 300w, https://johnmorehouse.com/images/2020/07/dockervols_1.png 768w&#34; sizes=&#34;auto, (max-width: 640px) 100vw, 640px&#34; /&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;Next, I want to put a copy of the AdventureWorks2017 database backup file into the folder we just created.   If you haven’t already, you can down the file from &lt;a href=&#34;https://github.com/microsoft/sql-server-samples&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Microsoft’s GitHub&lt;/a&gt; repository.  In my case, I have it already downloaded.  I’ll copy it to the appropriate folder using the the “cp” command, which stands for “copy”.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://johnmorehouse.com/images/2020/07/dockervols_2.png&#34;&gt;&lt;img data-recalc-dims=&#34;1&#34; loading=&#34;lazy&#34; decoding=&#34;async&#34; class=&#34;aligncenter size-full wp-image-6852&#34; src=&#34;https://johnmorehouse.com/images/2020/07/dockervols_2.png&#34; alt=&#34;&#34; width=&#34;640&#34; height=&#34;128&#34; srcset=&#34;https://johnmorehouse.com/images/2020/07/dockervols_2.png 845w, https://johnmorehouse.com/images/2020/07/dockervols_2.png 300w, https://johnmorehouse.com/images/2020/07/dockervols_2.png 768w&#34; sizes=&#34;auto, (max-width: 640px) 100vw, 640px&#34; /&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;Shown above, I am in the “mssql” directory that I had in my profile.  I issue the copy command to copy the AdventureWorks2017.bak file into the new directory.  Then I move to the new samplesdb directory and issue a “list” or “ls” command to show the contents of the directory.  We can see that the file now exists in the right directory.&lt;/p&gt;&#xA;&lt;p&gt;Next, we need to share the folder within Docker and then we can create a container with a volume.&lt;/p&gt;&#xA;&lt;h3 id=&#34;sharing-the-folder-in-docker&#34;&gt;&lt;span style=&#34;text-decoration: underline;&#34;&gt;Sharing the Folder in Docker&lt;/span&gt;&lt;/h3&gt;&#xA;&lt;p&gt;In order for the volume to be mounted to the container, Docker must be granted access to do so.  This is done by specifying the folder as “shared”.&lt;/p&gt;&#xA;&lt;p&gt;Open the Docker Dashboard.  This can be done by right clicking the Docker icon (looks like a ship) in the system tray.  Select Dashboard.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://johnmorehouse.com/images/2020/07/dockervols_3.png&#34;&gt;&lt;img data-recalc-dims=&#34;1&#34; loading=&#34;lazy&#34; decoding=&#34;async&#34; class=&#34;aligncenter size-full wp-image-6853&#34; src=&#34;https://johnmorehouse.com/images/2020/07/dockervols_3.png&#34; alt=&#34;&#34; width=&#34;250&#34; height=&#34;372&#34; srcset=&#34;https://johnmorehouse.com/images/2020/07/dockervols_3.png 250w, https://johnmorehouse.com/images/2020/07/dockervols_3.png 202w&#34; sizes=&#34;auto, (max-width: 250px) 100vw, 250px&#34; /&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;Once the dashboard has opened, do the following:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Next, go to the gear icon in the upper right area.&lt;/li&gt;&#xA;&lt;li&gt;Then on the left-hand side click expand Resources and then click on File Sharing.&lt;/li&gt;&#xA;&lt;li&gt;Click on the plus icon and browse to the folder that you just created in the step above.&lt;/li&gt;&#xA;&lt;li&gt;Apply &amp;amp; Restart.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://johnmorehouse.com/images/2020/07/dockervols_4.png&#34;&gt;&lt;img data-recalc-dims=&#34;1&#34; loading=&#34;lazy&#34; decoding=&#34;async&#34; class=&#34;aligncenter size-large wp-image-6854&#34; src=&#34;https://johnmorehouse.com/images/2020/07/dockervols_4.png&#34; alt=&#34;&#34; width=&#34;640&#34; height=&#34;406&#34; srcset=&#34;https://johnmorehouse.com/images/2020/07/dockervols_4.png 1024w, https://johnmorehouse.com/images/2020/07/dockervols_4.png 300w, https://johnmorehouse.com/images/2020/07/dockervols_4.png 768w, https://johnmorehouse.com/images/2020/07/dockervols_4.png 1040w&#34; sizes=&#34;auto, (max-width: 640px) 100vw, 640px&#34; /&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;After restarting, the folder is now able to be attached to a container.  Now we can create a container with a volume.&lt;/p&gt;&#xA;&lt;h3 id=&#34;creating-a-container-with-a-volume&#34;&gt;&lt;span style=&#34;text-decoration: underline;&#34;&gt;Creating a container with a volume&lt;/span&gt;&lt;/h3&gt;&#xA;&lt;p&gt;The process is straight forward to create a volume when creating a container. _ _If you recall from previous posts, we create the SQL Server container with this command,&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;docker run -e &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;ACCEPT_EULA=Y&amp;#39;&lt;/span&gt; -e &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;SA_PASSWORD=yourStrong(!)Password&amp;#39;&lt;/span&gt; -p 1433:1433 -d mcr.microsoft.com/mssql/server:2019-latest&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;If we wanted to add a volume to this container, we would include the “-v” or “-volume” switch.  As shown below, the volume switch tells Docker that I want to attach a volume “/Users/jmorehouse/sampledbs”, which was defined in the previous step, to the container.  Inside the container, the folder “sampledbs” will be allocated.&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;docker run -e &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;ACCEPT_EULA=Y&amp;#39;&lt;/span&gt; -e &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;SA_PASSWORD=yourStrong(!)Password&amp;#39;&lt;/span&gt; -p 1433:1433 -v /Users/jmorehouse/sampledbsl:/sampledbs -d mcr.microsoft.com/mssql/server:2019-latest&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;I think of this as a one to one mapping.  The volume essentially lives outside the container itself and inside the container it is represented by the folder “sampledbs”.  This is done with the context of &lt;em&gt;Local volume location:inside the container location&lt;/em&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;now-what&#34;&gt;&lt;span style=&#34;text-decoration: underline;&#34;&gt;Now what?&lt;/span&gt;&lt;/h3&gt;&#xA;&lt;p&gt;So far we have examined how to create a container with a volume attached.  &lt;a href=&#34;https://johnmorehouse.com/2020/06/restoring-a-sql-server-database-in-docker/&#34; title=&#34;Restoring a SQL Server Database in Docker&#34;&gt;In my previous post&lt;/a&gt;, I discussed how to copy a backup file from the host machine into a container.  By doing this it allowed me to restore a database within the container but that meant I had to copy a file and duplicate it. By using a volume, I don’t have to copy anything into the container. i can now either issue a command in the container (like a SQLCMD query) to restore it or do it through tools like &lt;a href=&#34;https://docs.microsoft.com/en-us/sql/azure-data-studio/what-is?view=sql-server-ver15&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Azure Data Studio&lt;/a&gt;.  Let’s take a look at using &lt;a href=&#34;https://docs.microsoft.com/en-us/sql/azure-data-studio/what-is?view=sql-server-ver15&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Azure Data Studio&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;First, I’ll start the container with the volume mounted.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://johnmorehouse.com/images/2020/07/dockervols_5.png&#34;&gt;&lt;img data-recalc-dims=&#34;1&#34; loading=&#34;lazy&#34; decoding=&#34;async&#34; class=&#34;aligncenter size-large wp-image-6855&#34; src=&#34;https://johnmorehouse.com/images/2020/07/dockervols_5.png&#34; alt=&#34;&#34; width=&#34;640&#34; height=&#34;86&#34; srcset=&#34;https://johnmorehouse.com/images/2020/07/dockervols_5.png 1024w, https://johnmorehouse.com/images/2020/07/dockervols_5.png 300w, https://johnmorehouse.com/images/2020/07/dockervols_5.png 768w, https://johnmorehouse.com/images/2020/07/dockervols_5.png 1536w, https://johnmorehouse.com/images/2020/07/dockervols_5.png 1544w, https://johnmorehouse.com/images/2020/07/dockervols_5.png 1280w&#34; sizes=&#34;auto, (max-width: 640px) 100vw, 640px&#34; /&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;Once the container is up and running, I start &lt;a href=&#34;https://docs.microsoft.com/en-us/sql/azure-data-studio/what-is?view=sql-server-ver15&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Azure Data Studio&lt;/a&gt; and being a new query.  First, I’m going to see if SQL Server can see the AdventureWorks2017 backup file in the sampledbs folder that was created.&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-sql&#34; data-lang=&#34;sql&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;RESTORE FILELISTONLY &lt;span style=&#34;color:#66d9ef&#34;&gt;FROM&lt;/span&gt; DISK &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; N&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;/sampledbs/AdventureWorks2017.bak&amp;#39;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;GO&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&lt;a href=&#34;https://johnmorehouse.com/images/2020/07/dockervols_6.png&#34;&gt;&lt;img data-recalc-dims=&#34;1&#34; loading=&#34;lazy&#34; decoding=&#34;async&#34; class=&#34;aligncenter size-large wp-image-6856&#34; src=&#34;https://johnmorehouse.com/images/2020/07/dockervols_6.png&#34; alt=&#34;&#34; width=&#34;640&#34; height=&#34;224&#34; srcset=&#34;https://johnmorehouse.com/images/2020/07/dockervols_6.png 1024w, https://johnmorehouse.com/images/2020/07/dockervols_6.png 300w, https://johnmorehouse.com/images/2020/07/dockervols_6.png 768w, https://johnmorehouse.com/images/2020/07/dockervols_6.png 1154w&#34; sizes=&#34;auto, (max-width: 640px) 100vw, 640px&#34; /&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;Success!  SQL Server can see the file and restore the headers.  This means that I can now restore it.&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-sql&#34; data-lang=&#34;sql&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;RESTORE DATABSE AdventureWorks2017 &lt;span style=&#34;color:#66d9ef&#34;&gt;FROM&lt;/span&gt; DISK&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;N&lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;/samplesdbs/AdventureWorks2017.bak&amp;#39;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;WITH&lt;/span&gt; &lt;span style=&#34;color:#66d9ef&#34;&gt;MOVE&lt;/span&gt; &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;AdventureWorks2017&amp;#39;&lt;/span&gt; &lt;span style=&#34;color:#66d9ef&#34;&gt;to&lt;/span&gt; &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;/var/opt/mssql/data/AdventureWorks2017.mdf&amp;#39;&lt;/span&gt;,&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;     &lt;span style=&#34;color:#66d9ef&#34;&gt;MOVE&lt;/span&gt; &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;AdventureWorks2017_log&amp;#39;&lt;/span&gt; &lt;span style=&#34;color:#66d9ef&#34;&gt;to&lt;/span&gt; &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;/var/opt/mssql/data/AdventureWorks2017_log.ldf&amp;#39;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;GO&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&lt;a href=&#34;https://johnmorehouse.com/images/2020/07/dockervols_7.png&#34;&gt;&lt;img data-recalc-dims=&#34;1&#34; loading=&#34;lazy&#34; decoding=&#34;async&#34; class=&#34;aligncenter size-large wp-image-6857&#34; src=&#34;https://johnmorehouse.com/images/2020/07/dockervols_7.png&#34; alt=&#34;&#34; width=&#34;640&#34; height=&#34;255&#34; srcset=&#34;https://johnmorehouse.com/images/2020/07/dockervols_7.png 1024w, https://johnmorehouse.com/images/2020/07/dockervols_7.png 300w, https://johnmorehouse.com/images/2020/07/dockervols_7.png 768w, https://johnmorehouse.com/images/2020/07/dockervols_7.png 1323w&#34; sizes=&#34;auto, (max-width: 640px) 100vw, 640px&#34; /&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;Remember, the backup file doesn’t actually exist within the container.  It lives in a folder on the host, in this case my Mac laptop, and uses the mapping to reach into the host to obtain the file.&lt;/p&gt;&#xA;&lt;h3 id=&#34;summary&#34;&gt;&lt;span style=&#34;text-decoration: underline;&#34;&gt;Summary&lt;/span&gt;&lt;/h3&gt;&#xA;&lt;p&gt;This was a brief look at using volumes in conjunction with containers.  The volume can now be used with other containers which prevents having to manually copy files, such as backup files, into the container.  The container itself can now just reach into the volume and do what it needs.&lt;/p&gt;&#xA;</content:encoded>
    </item>
    <item>
      <title>Restoring a SQL Server Database in Docker</title>
      <link>https://johnmorehouse.com/2020/06/restoring-a-sql-server-database-in-docker/</link>
      <pubDate>Fri, 19 Jun 2020 13:21:44 +0000</pubDate>
      <guid>https://johnmorehouse.com/2020/06/restoring-a-sql-server-database-in-docker/</guid>
      <description>&lt;p&gt;Last month I blogged about using Docker to run SQL Server as a quick and easy way to get SQL Server up and running.  While it continues to be immensely useful, there aren’t any user databases  running on it.  The only databases present are the system databases. Yes, I could manually create a database, but it would be a lot easier to have a sample database available.&lt;/p&gt;&#xA;&lt;p&gt;How do we do restore a sample database, in a container, that is running on a Mac laptop?  Let’s check it out!&lt;/p&gt;&#xA;&lt;p&gt;&lt;em&gt;Disclaimer: Not a container expert so there might be various ways of doing it.  This is just how I’ve figured out how to make the magic happen.&lt;/em&gt;&lt;/p&gt;&#xA;&lt;p&gt;Also, if you have not read the first blog on how to get SQL Server running in Docker on your Mac, take a few minutes to &lt;a href=&#34;https://johnmorehouse.com/2020/05/running-sql-server-on-my-mac-with-docker/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;read through it&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;Here are the steps that we will take to make this work:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://github.com/microsoft/sql-server-samples&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Download&lt;/a&gt; one of the sample databases from I have a “mssql” directory in my local profile to make things easier&lt;/li&gt;&#xA;&lt;li&gt;Make sure the container is started.  You can issue a “&lt;em&gt;docker ps&lt;/em&gt;” command terminal to see which containers are running&lt;/li&gt;&#xA;&lt;li&gt;Create a directory within the container&lt;/li&gt;&#xA;&lt;li&gt;Copy the sample database backup file into the directory you just created&lt;/li&gt;&#xA;&lt;li&gt;Restore the database onto the SQL instance that is running within the container&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;Sounds simple, right? Let’s see!&lt;/p&gt;&#xA;&lt;h2 id=&#34;create-a-directory&#34;&gt;&lt;u&gt;Create a directory&lt;/u&gt;&lt;/h2&gt;&#xA;&lt;p&gt;To create a directory within the container (remember that the container is running Linux), we can issue a command to the container that will create the directory.  Using Terminal (you can go to Spotlight to find the Terminal program or it is under Utilities in the Applications folder), execute the following command,&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Docker exec -it sql2019 mkdir /var/opt/mssql/backups&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Let us break that command down:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Docker – this indicates that we are going to be doing something with Docker&lt;/li&gt;&#xA;&lt;li&gt;Exec – this tells the specified container to exec the command we pass into it&lt;/li&gt;&#xA;&lt;li&gt;-it – this basically allows for an interactive session with the container&lt;/li&gt;&#xA;&lt;li&gt;Sql2019 – this is the name of the container. You can specify the container name when you start the container or Docker will name it for you&lt;/li&gt;&#xA;&lt;li&gt;Mkdir – this is short for “make directory”&lt;/li&gt;&#xA;&lt;li&gt;/var/opt/mssql/backups – this is the directory path that is to be created.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;h2&gt;&lt;a href=&#34;https://johnmorehouse.com/images/2020/06/dockerrestore_1.png&#34;&gt;&lt;img data-recalc-dims=&#34;1&#34; loading=&#34;lazy&#34; decoding=&#34;async&#34; class=&#34;aligncenter wp-image-6758&#34; src=&#34;https://johnmorehouse.com/images/2020/06/dockerrestore_1.png&#34; alt=&#34;&#34; width=&#34;640&#34; height=&#34;98&#34; srcset=&#34;https://johnmorehouse.com/images/2020/06/dockerrestore_1.png 1024w, https://johnmorehouse.com/images/2020/06/dockerrestore_1.png 300w, https://johnmorehouse.com/images/2020/06/dockerrestore_1.png 768w, https://johnmorehouse.com/images/2020/06/dockerrestore_1.png 1536w, https://johnmorehouse.com/images/2020/06/dockerrestore_1.png 1650w, https://johnmorehouse.com/images/2020/06/dockerrestore_1.png 1280w&#34; sizes=&#34;auto, (max-width: 640px) 100vw, 640px&#34; /&gt;&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;h2 id=&#34;copy-the-backup-file&#34;&gt;Copy the Backup File&lt;/h2&gt;&#xA;&lt;p&gt;Now that the directory has been created, we need to get the backup file of the sample database into the container.  In my case, I am using AdventureWorks2017.bak&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Docker cp ./mssql/AdventureWorks2017.bak sql2019:/var/opt/mssql/backups&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Here is how that command breaks down:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Docker – this indicates that we are going to be doing something with Docker&lt;/li&gt;&#xA;&lt;li&gt;cp – this is short for “copy”&lt;/li&gt;&#xA;&lt;li&gt;./mssql/AdventureWorks2017.bak – this is the path of the source file that is being copied into the container. The “.” Indicates start with whatever working directory I am in, which is my profile directory as indicated by the “jmorehouse$”&lt;/li&gt;&#xA;&lt;li&gt;Sql2019 – this is the name of the container.&lt;/li&gt;&#xA;&lt;li&gt;:/var/opt/mssql/backups – this is the destination directory that is within the container.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;Once the command is complete, we can check to make sure that the file was copied successfully.&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Docker exec -it sql2019 ls /var/opt/mssql/backups&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The “ls” refers to “list”.  This is equivalent to executing a “dir” command in DOS.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://johnmorehouse.com/images/2020/06/dockerrestore_2.png&#34;&gt;&lt;img data-recalc-dims=&#34;1&#34; loading=&#34;lazy&#34; decoding=&#34;async&#34; class=&#34;aligncenter size-full wp-image-6759&#34; src=&#34;https://johnmorehouse.com/images/2020/06/dockerrestore_2.png&#34; alt=&#34;&#34; width=&#34;640&#34; height=&#34;141&#34; srcset=&#34;https://johnmorehouse.com/images/2020/06/dockerrestore_2.png 1014w, https://johnmorehouse.com/images/2020/06/dockerrestore_2.png 300w, https://johnmorehouse.com/images/2020/06/dockerrestore_2.png 768w&#34; sizes=&#34;auto, (max-width: 640px) 100vw, 640px&#34; /&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;h2 id=&#34;restore-the-database&#34;&gt;&lt;u&gt;Restore the Database&lt;/u&gt;&lt;/h2&gt;&#xA;&lt;p&gt;The backup file now resides within the container and we just need to tell SQL Server to restore it.  In this section, I will be using &lt;a href=&#34;https://docs.microsoft.com/en-us/sql/azure-data-studio/?view=sql-server-ver15&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Azure Data Studio&lt;/a&gt; and native T-SQL commands.&lt;/p&gt;&#xA;&lt;p&gt;Let us first check that SQL Server can see the file.&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-sql&#34; data-lang=&#34;sql&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;RESTORE FILELISTONLY &lt;span style=&#34;color:#66d9ef&#34;&gt;FROM&lt;/span&gt; DISK&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;N&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;’&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;/&lt;/span&gt;var&lt;span style=&#34;color:#f92672&#34;&gt;/&lt;/span&gt;opt&lt;span style=&#34;color:#f92672&#34;&gt;/&lt;/span&gt;mssql&lt;span style=&#34;color:#f92672&#34;&gt;/&lt;/span&gt;backups&lt;span style=&#34;color:#f92672&#34;&gt;/&lt;/span&gt;AdventureWorks2017.bak&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;’&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;GO&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&lt;a href=&#34;https://johnmorehouse.com/images/2020/06/dockerrestore_3.png&#34;&gt;&lt;img data-recalc-dims=&#34;1&#34; loading=&#34;lazy&#34; decoding=&#34;async&#34; class=&#34;aligncenter wp-image-6760&#34; src=&#34;https://johnmorehouse.com/images/2020/06/dockerrestore_3.png&#34; alt=&#34;&#34; width=&#34;640&#34; height=&#34;229&#34; srcset=&#34;https://johnmorehouse.com/images/2020/06/dockerrestore_3.png 1024w, https://johnmorehouse.com/images/2020/06/dockerrestore_3.png 300w, https://johnmorehouse.com/images/2020/06/dockerrestore_3.png 768w, https://johnmorehouse.com/images/2020/06/dockerrestore_3.png 1536w, https://johnmorehouse.com/images/2020/06/dockerrestore_3.png 1594w, https://johnmorehouse.com/images/2020/06/dockerrestore_3.png 1280w&#34; sizes=&#34;auto, (max-width: 640px) 100vw, 640px&#34; /&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;Excellent!  SQL Server can see the backup file which means that we can restore it.  Notice on the left-hand side, there are no user databases, just system databases. Also notice that the physical names of the database shown above are from the Windows Operating System.  Since SQL Server is running on Linux within the container, we will have to move the physical files to a different location.&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-sql&#34; data-lang=&#34;sql&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;RESTORE &lt;span style=&#34;color:#66d9ef&#34;&gt;DATABASE&lt;/span&gt; AdventureWorks2017 &lt;span style=&#34;color:#66d9ef&#34;&gt;FROM&lt;/span&gt; DISK&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;N&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;’&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;/&lt;/span&gt;var&lt;span style=&#34;color:#f92672&#34;&gt;/&lt;/span&gt;opt&lt;span style=&#34;color:#f92672&#34;&gt;/&lt;/span&gt;mssql&lt;span style=&#34;color:#f92672&#34;&gt;/&lt;/span&gt;backups&lt;span style=&#34;color:#f92672&#34;&gt;/&lt;/span&gt;AdventureWorks2017.bak&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;’&lt;/span&gt; &lt;span style=&#34;color:#66d9ef&#34;&gt;WITH&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;MOVE&lt;/span&gt; &lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;‘&lt;/span&gt;AdventureWorks2017&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;’&lt;/span&gt; &lt;span style=&#34;color:#66d9ef&#34;&gt;to&lt;/span&gt; &lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;‘&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;/&lt;/span&gt;var&lt;span style=&#34;color:#f92672&#34;&gt;/&lt;/span&gt;opt&lt;span style=&#34;color:#f92672&#34;&gt;/&lt;/span&gt;mssql&lt;span style=&#34;color:#f92672&#34;&gt;/&lt;/span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;data&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;/&lt;/span&gt;AdventureWorks2017.mdf&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;’&lt;/span&gt;,&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;MOVE&lt;/span&gt; &lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;‘&lt;/span&gt;AdventureWorks2017_log&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;’&lt;/span&gt; &lt;span style=&#34;color:#66d9ef&#34;&gt;to&lt;/span&gt; &lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;‘&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;/&lt;/span&gt;var&lt;span style=&#34;color:#f92672&#34;&gt;/&lt;/span&gt;opt&lt;span style=&#34;color:#f92672&#34;&gt;/&lt;/span&gt;mssql&lt;span style=&#34;color:#f92672&#34;&gt;/&lt;/span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;data&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;/&lt;/span&gt;AdventureWorks2017_log.ldf&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;’&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;GO&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&lt;a href=&#34;https://johnmorehouse.com/images/2020/06/dockerrestore_4.png&#34;&gt;&lt;img data-recalc-dims=&#34;1&#34; loading=&#34;lazy&#34; decoding=&#34;async&#34; class=&#34;aligncenter wp-image-6761&#34; src=&#34;https://johnmorehouse.com/images/2020/06/dockerrestore_4.png&#34; alt=&#34;&#34; width=&#34;640&#34; height=&#34;374&#34; srcset=&#34;https://johnmorehouse.com/images/2020/06/dockerrestore_4.png 1024w, https://johnmorehouse.com/images/2020/06/dockerrestore_4.png 300w, https://johnmorehouse.com/images/2020/06/dockerrestore_4.png 768w, https://johnmorehouse.com/images/2020/06/dockerrestore_4.png 1487w, https://johnmorehouse.com/images/2020/06/dockerrestore_4.png 1280w&#34; sizes=&#34;auto, (max-width: 640px) 100vw, 640px&#34; /&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;Above we can see that the database was restored and then subsequently upgraded to the SQL Server 2019 database version.  If you refresh the Databases branch on the left-hand side, the AdventureWorks2017 database is now present!&lt;/p&gt;&#xA;&lt;h2 id=&#34;summary&#34;&gt;&lt;u&gt;Summary&lt;/u&gt;&lt;/h2&gt;&#xA;&lt;p&gt;Docker continues to be my current choice of “go to” when I need a quick and easy SQL Server solution to play around.  While I absolutely recommend Azure and its offerings, utilizing Docker on my local laptop is just faster, and frankly, fun to play around it.   Now that I can easily restore databases, it just makes it that much better of a solution for non-production uses.&lt;/p&gt;&#xA;&lt;p&gt;Like these posts?  Make sure to &lt;a href=&#34;https://sqlrus.com/subscribe/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;subscribe&lt;/a&gt; to get alerted when new posts arrive!&lt;/p&gt;&#xA;</description>
      <content:encoded>&lt;p&gt;Last month I blogged about using Docker to run SQL Server as a quick and easy way to get SQL Server up and running.  While it continues to be immensely useful, there aren’t any user databases  running on it.  The only databases present are the system databases. Yes, I could manually create a database, but it would be a lot easier to have a sample database available.&lt;/p&gt;&#xA;&lt;p&gt;How do we do restore a sample database, in a container, that is running on a Mac laptop?  Let’s check it out!&lt;/p&gt;&#xA;&lt;p&gt;&lt;em&gt;Disclaimer: Not a container expert so there might be various ways of doing it.  This is just how I’ve figured out how to make the magic happen.&lt;/em&gt;&lt;/p&gt;&#xA;&lt;p&gt;Also, if you have not read the first blog on how to get SQL Server running in Docker on your Mac, take a few minutes to &lt;a href=&#34;https://johnmorehouse.com/2020/05/running-sql-server-on-my-mac-with-docker/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;read through it&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;Here are the steps that we will take to make this work:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://github.com/microsoft/sql-server-samples&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Download&lt;/a&gt; one of the sample databases from I have a “mssql” directory in my local profile to make things easier&lt;/li&gt;&#xA;&lt;li&gt;Make sure the container is started.  You can issue a “&lt;em&gt;docker ps&lt;/em&gt;” command terminal to see which containers are running&lt;/li&gt;&#xA;&lt;li&gt;Create a directory within the container&lt;/li&gt;&#xA;&lt;li&gt;Copy the sample database backup file into the directory you just created&lt;/li&gt;&#xA;&lt;li&gt;Restore the database onto the SQL instance that is running within the container&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;Sounds simple, right? Let’s see!&lt;/p&gt;&#xA;&lt;h2 id=&#34;create-a-directory&#34;&gt;&lt;u&gt;Create a directory&lt;/u&gt;&lt;/h2&gt;&#xA;&lt;p&gt;To create a directory within the container (remember that the container is running Linux), we can issue a command to the container that will create the directory.  Using Terminal (you can go to Spotlight to find the Terminal program or it is under Utilities in the Applications folder), execute the following command,&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Docker exec -it sql2019 mkdir /var/opt/mssql/backups&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Let us break that command down:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Docker – this indicates that we are going to be doing something with Docker&lt;/li&gt;&#xA;&lt;li&gt;Exec – this tells the specified container to exec the command we pass into it&lt;/li&gt;&#xA;&lt;li&gt;-it – this basically allows for an interactive session with the container&lt;/li&gt;&#xA;&lt;li&gt;Sql2019 – this is the name of the container. You can specify the container name when you start the container or Docker will name it for you&lt;/li&gt;&#xA;&lt;li&gt;Mkdir – this is short for “make directory”&lt;/li&gt;&#xA;&lt;li&gt;/var/opt/mssql/backups – this is the directory path that is to be created.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;h2&gt;&lt;a href=&#34;https://johnmorehouse.com/images/2020/06/dockerrestore_1.png&#34;&gt;&lt;img data-recalc-dims=&#34;1&#34; loading=&#34;lazy&#34; decoding=&#34;async&#34; class=&#34;aligncenter wp-image-6758&#34; src=&#34;https://johnmorehouse.com/images/2020/06/dockerrestore_1.png&#34; alt=&#34;&#34; width=&#34;640&#34; height=&#34;98&#34; srcset=&#34;https://johnmorehouse.com/images/2020/06/dockerrestore_1.png 1024w, https://johnmorehouse.com/images/2020/06/dockerrestore_1.png 300w, https://johnmorehouse.com/images/2020/06/dockerrestore_1.png 768w, https://johnmorehouse.com/images/2020/06/dockerrestore_1.png 1536w, https://johnmorehouse.com/images/2020/06/dockerrestore_1.png 1650w, https://johnmorehouse.com/images/2020/06/dockerrestore_1.png 1280w&#34; sizes=&#34;auto, (max-width: 640px) 100vw, 640px&#34; /&gt;&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;h2 id=&#34;copy-the-backup-file&#34;&gt;Copy the Backup File&lt;/h2&gt;&#xA;&lt;p&gt;Now that the directory has been created, we need to get the backup file of the sample database into the container.  In my case, I am using AdventureWorks2017.bak&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Docker cp ./mssql/AdventureWorks2017.bak sql2019:/var/opt/mssql/backups&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Here is how that command breaks down:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Docker – this indicates that we are going to be doing something with Docker&lt;/li&gt;&#xA;&lt;li&gt;cp – this is short for “copy”&lt;/li&gt;&#xA;&lt;li&gt;./mssql/AdventureWorks2017.bak – this is the path of the source file that is being copied into the container. The “.” Indicates start with whatever working directory I am in, which is my profile directory as indicated by the “jmorehouse$”&lt;/li&gt;&#xA;&lt;li&gt;Sql2019 – this is the name of the container.&lt;/li&gt;&#xA;&lt;li&gt;:/var/opt/mssql/backups – this is the destination directory that is within the container.&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;Once the command is complete, we can check to make sure that the file was copied successfully.&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Docker exec -it sql2019 ls /var/opt/mssql/backups&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The “ls” refers to “list”.  This is equivalent to executing a “dir” command in DOS.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://johnmorehouse.com/images/2020/06/dockerrestore_2.png&#34;&gt;&lt;img data-recalc-dims=&#34;1&#34; loading=&#34;lazy&#34; decoding=&#34;async&#34; class=&#34;aligncenter size-full wp-image-6759&#34; src=&#34;https://johnmorehouse.com/images/2020/06/dockerrestore_2.png&#34; alt=&#34;&#34; width=&#34;640&#34; height=&#34;141&#34; srcset=&#34;https://johnmorehouse.com/images/2020/06/dockerrestore_2.png 1014w, https://johnmorehouse.com/images/2020/06/dockerrestore_2.png 300w, https://johnmorehouse.com/images/2020/06/dockerrestore_2.png 768w&#34; sizes=&#34;auto, (max-width: 640px) 100vw, 640px&#34; /&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;h2 id=&#34;restore-the-database&#34;&gt;&lt;u&gt;Restore the Database&lt;/u&gt;&lt;/h2&gt;&#xA;&lt;p&gt;The backup file now resides within the container and we just need to tell SQL Server to restore it.  In this section, I will be using &lt;a href=&#34;https://docs.microsoft.com/en-us/sql/azure-data-studio/?view=sql-server-ver15&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Azure Data Studio&lt;/a&gt; and native T-SQL commands.&lt;/p&gt;&#xA;&lt;p&gt;Let us first check that SQL Server can see the file.&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-sql&#34; data-lang=&#34;sql&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;RESTORE FILELISTONLY &lt;span style=&#34;color:#66d9ef&#34;&gt;FROM&lt;/span&gt; DISK&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;N&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;’&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;/&lt;/span&gt;var&lt;span style=&#34;color:#f92672&#34;&gt;/&lt;/span&gt;opt&lt;span style=&#34;color:#f92672&#34;&gt;/&lt;/span&gt;mssql&lt;span style=&#34;color:#f92672&#34;&gt;/&lt;/span&gt;backups&lt;span style=&#34;color:#f92672&#34;&gt;/&lt;/span&gt;AdventureWorks2017.bak&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;’&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;GO&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&lt;a href=&#34;https://johnmorehouse.com/images/2020/06/dockerrestore_3.png&#34;&gt;&lt;img data-recalc-dims=&#34;1&#34; loading=&#34;lazy&#34; decoding=&#34;async&#34; class=&#34;aligncenter wp-image-6760&#34; src=&#34;https://johnmorehouse.com/images/2020/06/dockerrestore_3.png&#34; alt=&#34;&#34; width=&#34;640&#34; height=&#34;229&#34; srcset=&#34;https://johnmorehouse.com/images/2020/06/dockerrestore_3.png 1024w, https://johnmorehouse.com/images/2020/06/dockerrestore_3.png 300w, https://johnmorehouse.com/images/2020/06/dockerrestore_3.png 768w, https://johnmorehouse.com/images/2020/06/dockerrestore_3.png 1536w, https://johnmorehouse.com/images/2020/06/dockerrestore_3.png 1594w, https://johnmorehouse.com/images/2020/06/dockerrestore_3.png 1280w&#34; sizes=&#34;auto, (max-width: 640px) 100vw, 640px&#34; /&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;Excellent!  SQL Server can see the backup file which means that we can restore it.  Notice on the left-hand side, there are no user databases, just system databases. Also notice that the physical names of the database shown above are from the Windows Operating System.  Since SQL Server is running on Linux within the container, we will have to move the physical files to a different location.&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-sql&#34; data-lang=&#34;sql&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;RESTORE &lt;span style=&#34;color:#66d9ef&#34;&gt;DATABASE&lt;/span&gt; AdventureWorks2017 &lt;span style=&#34;color:#66d9ef&#34;&gt;FROM&lt;/span&gt; DISK&lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt;N&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;’&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;/&lt;/span&gt;var&lt;span style=&#34;color:#f92672&#34;&gt;/&lt;/span&gt;opt&lt;span style=&#34;color:#f92672&#34;&gt;/&lt;/span&gt;mssql&lt;span style=&#34;color:#f92672&#34;&gt;/&lt;/span&gt;backups&lt;span style=&#34;color:#f92672&#34;&gt;/&lt;/span&gt;AdventureWorks2017.bak&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;’&lt;/span&gt; &lt;span style=&#34;color:#66d9ef&#34;&gt;WITH&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;MOVE&lt;/span&gt; &lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;‘&lt;/span&gt;AdventureWorks2017&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;’&lt;/span&gt; &lt;span style=&#34;color:#66d9ef&#34;&gt;to&lt;/span&gt; &lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;‘&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;/&lt;/span&gt;var&lt;span style=&#34;color:#f92672&#34;&gt;/&lt;/span&gt;opt&lt;span style=&#34;color:#f92672&#34;&gt;/&lt;/span&gt;mssql&lt;span style=&#34;color:#f92672&#34;&gt;/&lt;/span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;data&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;/&lt;/span&gt;AdventureWorks2017.mdf&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;’&lt;/span&gt;,&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;MOVE&lt;/span&gt; &lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;‘&lt;/span&gt;AdventureWorks2017_log&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;’&lt;/span&gt; &lt;span style=&#34;color:#66d9ef&#34;&gt;to&lt;/span&gt; &lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;‘&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;/&lt;/span&gt;var&lt;span style=&#34;color:#f92672&#34;&gt;/&lt;/span&gt;opt&lt;span style=&#34;color:#f92672&#34;&gt;/&lt;/span&gt;mssql&lt;span style=&#34;color:#f92672&#34;&gt;/&lt;/span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;data&lt;/span&gt;&lt;span style=&#34;color:#f92672&#34;&gt;/&lt;/span&gt;AdventureWorks2017_log.ldf&lt;span style=&#34;color:#960050;background-color:#1e0010&#34;&gt;’&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;GO&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&lt;a href=&#34;https://johnmorehouse.com/images/2020/06/dockerrestore_4.png&#34;&gt;&lt;img data-recalc-dims=&#34;1&#34; loading=&#34;lazy&#34; decoding=&#34;async&#34; class=&#34;aligncenter wp-image-6761&#34; src=&#34;https://johnmorehouse.com/images/2020/06/dockerrestore_4.png&#34; alt=&#34;&#34; width=&#34;640&#34; height=&#34;374&#34; srcset=&#34;https://johnmorehouse.com/images/2020/06/dockerrestore_4.png 1024w, https://johnmorehouse.com/images/2020/06/dockerrestore_4.png 300w, https://johnmorehouse.com/images/2020/06/dockerrestore_4.png 768w, https://johnmorehouse.com/images/2020/06/dockerrestore_4.png 1487w, https://johnmorehouse.com/images/2020/06/dockerrestore_4.png 1280w&#34; sizes=&#34;auto, (max-width: 640px) 100vw, 640px&#34; /&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;Above we can see that the database was restored and then subsequently upgraded to the SQL Server 2019 database version.  If you refresh the Databases branch on the left-hand side, the AdventureWorks2017 database is now present!&lt;/p&gt;&#xA;&lt;h2 id=&#34;summary&#34;&gt;&lt;u&gt;Summary&lt;/u&gt;&lt;/h2&gt;&#xA;&lt;p&gt;Docker continues to be my current choice of “go to” when I need a quick and easy SQL Server solution to play around.  While I absolutely recommend Azure and its offerings, utilizing Docker on my local laptop is just faster, and frankly, fun to play around it.   Now that I can easily restore databases, it just makes it that much better of a solution for non-production uses.&lt;/p&gt;&#xA;&lt;p&gt;Like these posts?  Make sure to &lt;a href=&#34;https://sqlrus.com/subscribe/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;subscribe&lt;/a&gt; to get alerted when new posts arrive!&lt;/p&gt;&#xA;</content:encoded>
    </item>
    <item>
      <title>Quickly Blocking Inbound Connections to SQL Server</title>
      <link>https://johnmorehouse.com/2020/05/quickly-blocking-inbound-connections-to-sql-server/</link>
      <pubDate>Fri, 22 May 2020 13:55:49 +0000</pubDate>
      <guid>https://johnmorehouse.com/2020/05/quickly-blocking-inbound-connections-to-sql-server/</guid>
      <description>&lt;p&gt;In this post we’ll examine a quick and easy way to block all inbound connections to SQL Server.&lt;/p&gt;&#xA;&lt;p&gt;Sometimes the brilliance of a solution is lost in its simplicity.  Full disclaimer, this was Joey D ’Antoni’s (&lt;a href=&#34;https://joeydantoni.com/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;B&lt;/a&gt;|&lt;a href=&#34;https://twitter.com/jdanton&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;T&lt;/a&gt;) idea, however, he has given me permission to blog about it.&lt;/p&gt;&#xA;&lt;p&gt;Recently, Joey and I were helping a client to reconfigure their production SQL Server instances to have a new and improved TempDB configuration.  We knew that this would require an outage to ensure the changes had correctly taken affect.&lt;/p&gt;&#xA;&lt;p&gt;Of course, we ran into a snag.   The current configuration had 30 plus tempdb data files and any attempts to delete the files were blocked because they were actively being used.  Nothing we tried would give us the ability to delete the excess files.&lt;/p&gt;&#xA;&lt;p&gt;We even tried to restart the instance into single user mode, however, every time that happened something else would take the connection before we could get into the instance.  We eventually restarted the SQL Server instance to normal operation so that we could investigate why we could not get a connection when in single user mode.&lt;/p&gt;&#xA;&lt;p&gt;Turns out that with the production nature of the instance, the clients large farm of application servers was connecting to it faster than we could.   This was discovered by using sp_who2, however, you could use the DMV sys.dm_exec_connections to see what is connecting to the instance if you desired.  So, we needed a way to block incoming connections while not being evasive like shutting down the application servers or a large network change.&lt;/p&gt;&#xA;&lt;p&gt;This is where the brilliance comes in.&lt;/p&gt;&#xA;&lt;p&gt;Disable TCP/IP as a network protocol to SQL Server.  BOOM.  Instant firewall.&lt;/p&gt;&#xA;&lt;h2 id=&#34;how-to&#34;&gt;&lt;u&gt;How To &lt;/u&gt;&lt;/h2&gt;&#xA;&lt;p&gt;If you open SQL Server Configuration Manager, you will probably see something like this.  If you have more facets installed or multiple named instances installed, your list on the right-hand side might look a bit larger but for the most part it should be similar.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://johnmorehouse.com/images/2020/05/disabletcpip_1.png&#34;&gt;&lt;img data-recalc-dims=&#34;1&#34; loading=&#34;lazy&#34; decoding=&#34;async&#34; class=&#34;aligncenter size-full wp-image-6606&#34; src=&#34;https://johnmorehouse.com/images/2020/05/disabletcpip_1.png&#34; alt=&#34;&#34; width=&#34;640&#34; height=&#34;234&#34; srcset=&#34;https://johnmorehouse.com/images/2020/05/disabletcpip_1.png 743w, https://johnmorehouse.com/images/2020/05/disabletcpip_1.png 300w&#34; sizes=&#34;auto, (max-width: 640px) 100vw, 640px&#34; /&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;Expand SQL Server Network Configuration in the left-hand menu and select Protocols for the instance you want wish to block connections to.  In this case, I just have the default instance installed on my laptop.&lt;a href=&#34;https://johnmorehouse.com/images/2020/05/disabletcpip_2.png&#34;&gt;&lt;img data-recalc-dims=&#34;1&#34; loading=&#34;lazy&#34; decoding=&#34;async&#34; class=&#34;aligncenter size-full wp-image-6607&#34; src=&#34;https://johnmorehouse.com/images/2020/05/disabletcpip_2.png&#34; alt=&#34;&#34; width=&#34;640&#34; height=&#34;249&#34; srcset=&#34;https://johnmorehouse.com/images/2020/05/disabletcpip_2.png 883w, https://johnmorehouse.com/images/2020/05/disabletcpip_2.png 300w, https://johnmorehouse.com/images/2020/05/disabletcpip_2.png 768w&#34; sizes=&#34;auto, (max-width: 640px) 100vw, 640px&#34; /&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;On the right hand side, notice that the TCP/IP protocol is correctly enabled.&lt;/p&gt;&#xA;&lt;p&gt;You can disable that by double clicking on TCP/IP and then changing the Enabled option to reflect No.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://johnmorehouse.com/images/2020/05/disabletcpip_3.png&#34;&gt;&lt;img data-recalc-dims=&#34;1&#34; loading=&#34;lazy&#34; decoding=&#34;async&#34; class=&#34;aligncenter size-full wp-image-6608&#34; src=&#34;https://johnmorehouse.com/images/2020/05/disabletcpip_3.png&#34; alt=&#34;&#34; width=&#34;412&#34; height=&#34;473&#34; srcset=&#34;https://johnmorehouse.com/images/2020/05/disabletcpip_3.png 412w, https://johnmorehouse.com/images/2020/05/disabletcpip_3.png 261w&#34; sizes=&#34;auto, (max-width: 412px) 100vw, 412px&#34; /&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;An alternative method is that you can also simply right click on the protocol and choose to enable or disable it.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://johnmorehouse.com/images/2020/05/disabletcpip_4.png&#34;&gt;&lt;img data-recalc-dims=&#34;1&#34; loading=&#34;lazy&#34; decoding=&#34;async&#34; class=&#34;aligncenter size-full wp-image-6609&#34; src=&#34;https://johnmorehouse.com/images/2020/05/disabletcpip_4.png&#34; alt=&#34;&#34; width=&#34;640&#34; height=&#34;249&#34; srcset=&#34;https://johnmorehouse.com/images/2020/05/disabletcpip_4.png 883w, https://johnmorehouse.com/images/2020/05/disabletcpip_4.png 300w, https://johnmorehouse.com/images/2020/05/disabletcpip_4.png 768w&#34; sizes=&#34;auto, (max-width: 640px) 100vw, 640px&#34; /&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;With either method, you will acknowledge that the changes will not take effect until the service has been stopped and restarted.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://johnmorehouse.com/images/2020/05/disabletcpip_5.png&#34;&gt;&lt;img data-recalc-dims=&#34;1&#34; loading=&#34;lazy&#34; decoding=&#34;async&#34; class=&#34;aligncenter size-full wp-image-6610&#34; src=&#34;https://johnmorehouse.com/images/2020/05/disabletcpip_5.png&#34; alt=&#34;&#34; width=&#34;407&#34; height=&#34;152&#34; srcset=&#34;https://johnmorehouse.com/images/2020/05/disabletcpip_5.png 407w, https://johnmorehouse.com/images/2020/05/disabletcpip_5.png 300w&#34; sizes=&#34;auto, (max-width: 407px) 100vw, 407px&#34; /&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;Go ahead and restart the service.  Once back online, the TCP/IP protocol will be disabled and any servers wishing to connect will be effectively denied.  Keep in mind that we had local access to the server itself and retained connectivity to it even though SQL Server no longer allowed TCP/IP connections.  Utilizing the shared memory protocol (it was the only thing enabled), we were able to restart into single user mode, get connected, and successfully remove the extraneous tempdb data files.&lt;/p&gt;&#xA;&lt;p&gt;Once the tempdb work was completed, we re-enabled the TCPIP protocol, and then restarted the instance back into normal operations.  Double checking sp_who2, we also verified that all the application servers had resumed connectivity to the SQL Server instance&lt;/p&gt;&#xA;&lt;h2 id=&#34;summary&#34;&gt;&lt;u&gt;Summary&lt;/u&gt;&lt;/h2&gt;&#xA;&lt;p&gt;This is an example of a quick and effortless way to block all inbound connections to the SQL Server instance.  This method required zero intervention from any engineers to stop application servers or implement firewall changes.  A few simple clicks of the mouse and we were back in business.&lt;/p&gt;&#xA;&lt;p&gt;Sometimes it is the simple things that are astonishing and brilliant.&lt;/p&gt;&#xA;</description>
      <content:encoded>&lt;p&gt;In this post we’ll examine a quick and easy way to block all inbound connections to SQL Server.&lt;/p&gt;&#xA;&lt;p&gt;Sometimes the brilliance of a solution is lost in its simplicity.  Full disclaimer, this was Joey D ’Antoni’s (&lt;a href=&#34;https://joeydantoni.com/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;B&lt;/a&gt;|&lt;a href=&#34;https://twitter.com/jdanton&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;T&lt;/a&gt;) idea, however, he has given me permission to blog about it.&lt;/p&gt;&#xA;&lt;p&gt;Recently, Joey and I were helping a client to reconfigure their production SQL Server instances to have a new and improved TempDB configuration.  We knew that this would require an outage to ensure the changes had correctly taken affect.&lt;/p&gt;&#xA;&lt;p&gt;Of course, we ran into a snag.   The current configuration had 30 plus tempdb data files and any attempts to delete the files were blocked because they were actively being used.  Nothing we tried would give us the ability to delete the excess files.&lt;/p&gt;&#xA;&lt;p&gt;We even tried to restart the instance into single user mode, however, every time that happened something else would take the connection before we could get into the instance.  We eventually restarted the SQL Server instance to normal operation so that we could investigate why we could not get a connection when in single user mode.&lt;/p&gt;&#xA;&lt;p&gt;Turns out that with the production nature of the instance, the clients large farm of application servers was connecting to it faster than we could.   This was discovered by using sp_who2, however, you could use the DMV sys.dm_exec_connections to see what is connecting to the instance if you desired.  So, we needed a way to block incoming connections while not being evasive like shutting down the application servers or a large network change.&lt;/p&gt;&#xA;&lt;p&gt;This is where the brilliance comes in.&lt;/p&gt;&#xA;&lt;p&gt;Disable TCP/IP as a network protocol to SQL Server.  BOOM.  Instant firewall.&lt;/p&gt;&#xA;&lt;h2 id=&#34;how-to&#34;&gt;&lt;u&gt;How To &lt;/u&gt;&lt;/h2&gt;&#xA;&lt;p&gt;If you open SQL Server Configuration Manager, you will probably see something like this.  If you have more facets installed or multiple named instances installed, your list on the right-hand side might look a bit larger but for the most part it should be similar.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://johnmorehouse.com/images/2020/05/disabletcpip_1.png&#34;&gt;&lt;img data-recalc-dims=&#34;1&#34; loading=&#34;lazy&#34; decoding=&#34;async&#34; class=&#34;aligncenter size-full wp-image-6606&#34; src=&#34;https://johnmorehouse.com/images/2020/05/disabletcpip_1.png&#34; alt=&#34;&#34; width=&#34;640&#34; height=&#34;234&#34; srcset=&#34;https://johnmorehouse.com/images/2020/05/disabletcpip_1.png 743w, https://johnmorehouse.com/images/2020/05/disabletcpip_1.png 300w&#34; sizes=&#34;auto, (max-width: 640px) 100vw, 640px&#34; /&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;Expand SQL Server Network Configuration in the left-hand menu and select Protocols for the instance you want wish to block connections to.  In this case, I just have the default instance installed on my laptop.&lt;a href=&#34;https://johnmorehouse.com/images/2020/05/disabletcpip_2.png&#34;&gt;&lt;img data-recalc-dims=&#34;1&#34; loading=&#34;lazy&#34; decoding=&#34;async&#34; class=&#34;aligncenter size-full wp-image-6607&#34; src=&#34;https://johnmorehouse.com/images/2020/05/disabletcpip_2.png&#34; alt=&#34;&#34; width=&#34;640&#34; height=&#34;249&#34; srcset=&#34;https://johnmorehouse.com/images/2020/05/disabletcpip_2.png 883w, https://johnmorehouse.com/images/2020/05/disabletcpip_2.png 300w, https://johnmorehouse.com/images/2020/05/disabletcpip_2.png 768w&#34; sizes=&#34;auto, (max-width: 640px) 100vw, 640px&#34; /&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;On the right hand side, notice that the TCP/IP protocol is correctly enabled.&lt;/p&gt;&#xA;&lt;p&gt;You can disable that by double clicking on TCP/IP and then changing the Enabled option to reflect No.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://johnmorehouse.com/images/2020/05/disabletcpip_3.png&#34;&gt;&lt;img data-recalc-dims=&#34;1&#34; loading=&#34;lazy&#34; decoding=&#34;async&#34; class=&#34;aligncenter size-full wp-image-6608&#34; src=&#34;https://johnmorehouse.com/images/2020/05/disabletcpip_3.png&#34; alt=&#34;&#34; width=&#34;412&#34; height=&#34;473&#34; srcset=&#34;https://johnmorehouse.com/images/2020/05/disabletcpip_3.png 412w, https://johnmorehouse.com/images/2020/05/disabletcpip_3.png 261w&#34; sizes=&#34;auto, (max-width: 412px) 100vw, 412px&#34; /&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;An alternative method is that you can also simply right click on the protocol and choose to enable or disable it.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://johnmorehouse.com/images/2020/05/disabletcpip_4.png&#34;&gt;&lt;img data-recalc-dims=&#34;1&#34; loading=&#34;lazy&#34; decoding=&#34;async&#34; class=&#34;aligncenter size-full wp-image-6609&#34; src=&#34;https://johnmorehouse.com/images/2020/05/disabletcpip_4.png&#34; alt=&#34;&#34; width=&#34;640&#34; height=&#34;249&#34; srcset=&#34;https://johnmorehouse.com/images/2020/05/disabletcpip_4.png 883w, https://johnmorehouse.com/images/2020/05/disabletcpip_4.png 300w, https://johnmorehouse.com/images/2020/05/disabletcpip_4.png 768w&#34; sizes=&#34;auto, (max-width: 640px) 100vw, 640px&#34; /&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;With either method, you will acknowledge that the changes will not take effect until the service has been stopped and restarted.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://johnmorehouse.com/images/2020/05/disabletcpip_5.png&#34;&gt;&lt;img data-recalc-dims=&#34;1&#34; loading=&#34;lazy&#34; decoding=&#34;async&#34; class=&#34;aligncenter size-full wp-image-6610&#34; src=&#34;https://johnmorehouse.com/images/2020/05/disabletcpip_5.png&#34; alt=&#34;&#34; width=&#34;407&#34; height=&#34;152&#34; srcset=&#34;https://johnmorehouse.com/images/2020/05/disabletcpip_5.png 407w, https://johnmorehouse.com/images/2020/05/disabletcpip_5.png 300w&#34; sizes=&#34;auto, (max-width: 407px) 100vw, 407px&#34; /&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;Go ahead and restart the service.  Once back online, the TCP/IP protocol will be disabled and any servers wishing to connect will be effectively denied.  Keep in mind that we had local access to the server itself and retained connectivity to it even though SQL Server no longer allowed TCP/IP connections.  Utilizing the shared memory protocol (it was the only thing enabled), we were able to restart into single user mode, get connected, and successfully remove the extraneous tempdb data files.&lt;/p&gt;&#xA;&lt;p&gt;Once the tempdb work was completed, we re-enabled the TCPIP protocol, and then restarted the instance back into normal operations.  Double checking sp_who2, we also verified that all the application servers had resumed connectivity to the SQL Server instance&lt;/p&gt;&#xA;&lt;h2 id=&#34;summary&#34;&gt;&lt;u&gt;Summary&lt;/u&gt;&lt;/h2&gt;&#xA;&lt;p&gt;This is an example of a quick and effortless way to block all inbound connections to the SQL Server instance.  This method required zero intervention from any engineers to stop application servers or implement firewall changes.  A few simple clicks of the mouse and we were back in business.&lt;/p&gt;&#xA;&lt;p&gt;Sometimes it is the simple things that are astonishing and brilliant.&lt;/p&gt;&#xA;</content:encoded>
    </item>
    <item>
      <title>Running SQL Server on my Mac with Docker</title>
      <link>https://johnmorehouse.com/2020/05/running-sql-server-on-my-mac-with-docker/</link>
      <pubDate>Fri, 01 May 2020 13:32:01 +0000</pubDate>
      <guid>https://johnmorehouse.com/2020/05/running-sql-server-on-my-mac-with-docker/</guid>
      <description>&lt;p&gt;My day to day work machine is a Windows 10 HP laptop. It remains docked at my desk where it happily helps me to go about my daily business.  However, my backup machine, is an Apple MacBook Pro.  It’s small footprint and ease of use allows me to easily shift working locations if needed.  Of course, these days I’m maintaining social distancing so getting away from my desk to work elsewhere means working from my kitchen table for a change of scenery.&lt;/p&gt;&#xA;&lt;p&gt;When I shift working locations I work on my Macbook, and I still need access to a SQL Server instance.  Yes, I could install SQL Server on the OS but it’s my personal machine and I’m not that familiar with SQL on Linux (yet).  Docker, however, it a great solution to allow me to run SQL Server containers on my Macbook without having to set up anything.  Let’s look to see how easy it is to setup Docker.&lt;/p&gt;&#xA;&lt;h3 id=&#34;download-docker&#34;&gt;&lt;span style=&#34;text-decoration: underline;&#34;&gt;Download Docker&lt;/span&gt;&lt;/h3&gt;&#xA;&lt;p&gt;Go out to docker.com, download, and install the &lt;a href=&#34;https://www.docker.com/products/docker-desktop&#34;&gt;Docker Desktop&lt;/a&gt; application.  This is what will allow you to run container images.  The images are what define the container which then in turn runs the application, which in our case is SQL Server. Once you have it installed, you’ll have a dashboard like the one shown below.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://johnmorehouse.com/images/2020/04/dockermac_1.png&#34;&gt;&lt;img data-recalc-dims=&#34;1&#34; loading=&#34;lazy&#34; decoding=&#34;async&#34; class=&#34;aligncenter size-large wp-image-6482&#34; src=&#34;https://johnmorehouse.com/images/2020/04/dockermac_1.png&#34; alt=&#34;&#34; width=&#34;640&#34; height=&#34;377&#34; srcset=&#34;https://johnmorehouse.com/images/2020/04/dockermac_1.png 1024w, https://johnmorehouse.com/images/2020/04/dockermac_1.png 300w, https://johnmorehouse.com/images/2020/04/dockermac_1.png 768w, https://johnmorehouse.com/images/2020/04/dockermac_1.png 1040w&#34; sizes=&#34;auto, (max-width: 640px) 100vw, 640px&#34; /&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;At this point, we don’t have any containers running so we need to first get a container image and then create a container. I got my image from  Docker Hub, a library of container images that you can browse and subsequently download if needed.   Searching for SQL Server images, we can see that Microsoft has their own registry that has a few available container images.  The Feature Tags shown below show some often used images.  If you scroll further down the page, you can browse the full is list of available tags that can be used to download an image.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://johnmorehouse.com/images/2020/04/dockermac_2.png&#34;&gt;&lt;img data-recalc-dims=&#34;1&#34; loading=&#34;lazy&#34; decoding=&#34;async&#34; class=&#34;aligncenter size-full wp-image-6483&#34; src=&#34;https://johnmorehouse.com/images/2020/04/dockermac_2.png&#34; alt=&#34;&#34; width=&#34;533&#34; height=&#34;322&#34; srcset=&#34;https://johnmorehouse.com/images/2020/04/dockermac_2.png 533w, https://johnmorehouse.com/images/2020/04/dockermac_2.png 300w&#34; sizes=&#34;auto, (max-width: 533px) 100vw, 533px&#34; /&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;For my purposes, using the latest and greatest for testing and validating things is perfect so I’m only interested in the “2019-latest” container image.  To obtain the image, you can issue a pull command from within a &lt;a href=&#34;https://www.imore.com/how-use-terminal-mac-when-you-have-no-idea-where-start&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;terminal session&lt;/a&gt;.  You’ll notice that Docker Hub provides you with the command in the above image.&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;docker pull mcr.microsoft.com/mssql/server:2019-latest.&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&lt;a href=&#34;https://johnmorehouse.com/images/2020/04/dockermac_3.png&#34;&gt;&lt;img data-recalc-dims=&#34;1&#34; loading=&#34;lazy&#34; decoding=&#34;async&#34; class=&#34;aligncenter size-full wp-image-6484&#34; src=&#34;https://johnmorehouse.com/images/2020/04/dockermac_3.png&#34; alt=&#34;&#34; width=&#34;611&#34; height=&#34;204&#34; srcset=&#34;https://johnmorehouse.com/images/2020/04/dockermac_3.png 611w, https://johnmorehouse.com/images/2020/04/dockermac_3.png 300w&#34; sizes=&#34;auto, (max-width: 611px) 100vw, 611px&#34; /&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;We can check to make sure that the container image was downloaded as well as view any other images we might have.  As shown below, you can see that I have three images available.&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;docker images&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&lt;a href=&#34;https://johnmorehouse.com/images/2020/04/dockermac_4.png&#34;&gt;&lt;img data-recalc-dims=&#34;1&#34; loading=&#34;lazy&#34; decoding=&#34;async&#34; class=&#34;aligncenter size-full wp-image-6485&#34; src=&#34;https://johnmorehouse.com/images/2020/04/dockermac_4.png&#34; alt=&#34;&#34; width=&#34;640&#34; height=&#34;115&#34; srcset=&#34;https://johnmorehouse.com/images/2020/04/dockermac_4.png 737w, https://johnmorehouse.com/images/2020/04/dockermac_4.png 300w&#34; sizes=&#34;auto, (max-width: 640px) 100vw, 640px&#34; /&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;starting-the-sql-server-container&#34;&gt;&lt;span style=&#34;text-decoration: underline;&#34;&gt;Starting the SQL Server Container&lt;/span&gt;&lt;/h3&gt;&#xA;&lt;p&gt;Now that we have a container image downloaded, we can now initiate setting up the container itself.   Since SQL Server has already been installed within the container, it must now be configured for it to successfully start.  Essentially, we need to tell Docker to run the image and pass in some parameters.&lt;/p&gt;&#xA;&lt;p&gt;Here’s what they mean:&lt;/p&gt;&#xA;&lt;p&gt;-e represents environment variables.  Here we are accepting the end user license agreement (EULA) as well as supplying a SA password (it’s required).&lt;/p&gt;&#xA;&lt;p&gt;-p represents the ports.  The value on the left side of the colon is the port on the host and the value on the right side is the port within the container.  In this example, both sides will be listening on port 1433, which is the default port for SQL.&lt;/p&gt;&#xA;&lt;p&gt;-d represents which container image we want to run.  In this example I want to run the 2019-latest image pulled from Microsoft.com.&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;docker run -e &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;ACCEPT_EULA=Y&amp;#39;&lt;/span&gt; -e &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;SA_PASSWORD=yourStrong(!)Password&amp;#39;&lt;/span&gt; -p 1433:1433 -d mcr.microsoft.com/mssql/server:2019-latest&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Running this command, if all is correct, will return a GUID looking value.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://johnmorehouse.com/images/2020/04/dockermac_5.png&#34;&gt;&lt;img data-recalc-dims=&#34;1&#34; loading=&#34;lazy&#34; decoding=&#34;async&#34; class=&#34;aligncenter wp-image-6486&#34; src=&#34;https://johnmorehouse.com/images/2020/04/dockermac_5.png&#34; alt=&#34;&#34; width=&#34;640&#34; height=&#34;61&#34; srcset=&#34;https://johnmorehouse.com/images/2020/04/dockermac_5.png 1024w, https://johnmorehouse.com/images/2020/04/dockermac_5.png 300w, https://johnmorehouse.com/images/2020/04/dockermac_5.png 768w, https://johnmorehouse.com/images/2020/04/dockermac_5.png 1040w&#34; sizes=&#34;auto, (max-width: 640px) 100vw, 640px&#34; /&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;We can also see that the Docker dashboard now has a running instance.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://johnmorehouse.com/images/2020/04/dockermac_6.png&#34;&gt;&lt;img data-recalc-dims=&#34;1&#34; loading=&#34;lazy&#34; decoding=&#34;async&#34; class=&#34;aligncenter wp-image-6487&#34; src=&#34;https://johnmorehouse.com/images/2020/04/dockermac_6.png&#34; alt=&#34;&#34; width=&#34;640&#34; height=&#34;107&#34; srcset=&#34;https://johnmorehouse.com/images/2020/04/dockermac_6.png 1024w, https://johnmorehouse.com/images/2020/04/dockermac_6.png 300w, https://johnmorehouse.com/images/2020/04/dockermac_6.png 768w, https://johnmorehouse.com/images/2020/04/dockermac_6.png 1040w&#34; sizes=&#34;auto, (max-width: 640px) 100vw, 640px&#34; /&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;Using Azure Data Studio, I can now connect to the localhost on port 1433.  We can see that the version is 2019 CU4 which is the latest release for SQL Server 2019.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://johnmorehouse.com/images/2020/04/dockermacfix_7.png&#34;&gt;&lt;img data-recalc-dims=&#34;1&#34; loading=&#34;lazy&#34; decoding=&#34;async&#34; class=&#34;aligncenter wp-image-6492 size-full&#34; src=&#34;https://johnmorehouse.com/images/2020/04/dockermacfix_7.png&#34; alt=&#34;&#34; width=&#34;640&#34; height=&#34;148&#34; srcset=&#34;https://johnmorehouse.com/images/2020/04/dockermacfix_7.png 1361w, https://johnmorehouse.com/images/2020/04/dockermacfix_7.png 300w, https://johnmorehouse.com/images/2020/04/dockermacfix_7.png 1024w, https://johnmorehouse.com/images/2020/04/dockermacfix_7.png 768w, https://johnmorehouse.com/images/2020/04/dockermacfix_7.png 1280w&#34; sizes=&#34;auto, (max-width: 640px) 100vw, 640px&#34; /&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;It’s that easy!&lt;/p&gt;&#xA;&lt;h3 id=&#34;getting-help&#34;&gt;&lt;span style=&#34;text-decoration: underline;&#34;&gt;Getting Help&lt;/span&gt;&lt;/h3&gt;&#xA;&lt;p&gt;If you are stuck on a command, simply run docker + command + “–help” to get a list of available parameters.   For example, if I need to see what parameters are available for the run command, I would type in “docker run –help”.  The output would display all of the available parameters that you can supply with the “run” command.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://johnmorehouse.com/images/2020/04/dockermac_8.png&#34;&gt;&lt;img data-recalc-dims=&#34;1&#34; loading=&#34;lazy&#34; decoding=&#34;async&#34; class=&#34;aligncenter wp-image-6489&#34; src=&#34;https://johnmorehouse.com/images/2020/04/dockermac_8.png&#34; alt=&#34;&#34; width=&#34;640&#34; height=&#34;211&#34; srcset=&#34;https://johnmorehouse.com/images/2020/04/dockermac_8.png 1024w, https://johnmorehouse.com/images/2020/04/dockermac_8.png 300w, https://johnmorehouse.com/images/2020/04/dockermac_8.png 768w, https://johnmorehouse.com/images/2020/04/dockermac_8.png 1040w&#34; sizes=&#34;auto, (max-width: 640px) 100vw, 640px&#34; /&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;summary&#34;&gt;&lt;span style=&#34;text-decoration: underline;&#34;&gt;Summary&lt;/span&gt;&lt;/h3&gt;&#xA;&lt;p&gt;Using Docker allows me to quickly and easily stand up an instance of SQL Server.  Often times I just need an instance to test a feature or try to figure out how something works.   All in all, this process takes about 5-10 minutes to finish and it significantly faster than standing up a VM.  If you are new to Docker, try it out.  It works on Windows too!&lt;/p&gt;&#xA;&lt;p&gt;Watch for future blog posts on how to use Docker with SQL Server! &lt;a href=&#34;https://sqlrus.com/subscribe/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Subscribe&lt;/a&gt; for email notifications when new content is posted!&lt;/p&gt;&#xA;</description>
      <content:encoded>&lt;p&gt;My day to day work machine is a Windows 10 HP laptop. It remains docked at my desk where it happily helps me to go about my daily business.  However, my backup machine, is an Apple MacBook Pro.  It’s small footprint and ease of use allows me to easily shift working locations if needed.  Of course, these days I’m maintaining social distancing so getting away from my desk to work elsewhere means working from my kitchen table for a change of scenery.&lt;/p&gt;&#xA;&lt;p&gt;When I shift working locations I work on my Macbook, and I still need access to a SQL Server instance.  Yes, I could install SQL Server on the OS but it’s my personal machine and I’m not that familiar with SQL on Linux (yet).  Docker, however, it a great solution to allow me to run SQL Server containers on my Macbook without having to set up anything.  Let’s look to see how easy it is to setup Docker.&lt;/p&gt;&#xA;&lt;h3 id=&#34;download-docker&#34;&gt;&lt;span style=&#34;text-decoration: underline;&#34;&gt;Download Docker&lt;/span&gt;&lt;/h3&gt;&#xA;&lt;p&gt;Go out to docker.com, download, and install the &lt;a href=&#34;https://www.docker.com/products/docker-desktop&#34;&gt;Docker Desktop&lt;/a&gt; application.  This is what will allow you to run container images.  The images are what define the container which then in turn runs the application, which in our case is SQL Server. Once you have it installed, you’ll have a dashboard like the one shown below.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://johnmorehouse.com/images/2020/04/dockermac_1.png&#34;&gt;&lt;img data-recalc-dims=&#34;1&#34; loading=&#34;lazy&#34; decoding=&#34;async&#34; class=&#34;aligncenter size-large wp-image-6482&#34; src=&#34;https://johnmorehouse.com/images/2020/04/dockermac_1.png&#34; alt=&#34;&#34; width=&#34;640&#34; height=&#34;377&#34; srcset=&#34;https://johnmorehouse.com/images/2020/04/dockermac_1.png 1024w, https://johnmorehouse.com/images/2020/04/dockermac_1.png 300w, https://johnmorehouse.com/images/2020/04/dockermac_1.png 768w, https://johnmorehouse.com/images/2020/04/dockermac_1.png 1040w&#34; sizes=&#34;auto, (max-width: 640px) 100vw, 640px&#34; /&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;At this point, we don’t have any containers running so we need to first get a container image and then create a container. I got my image from  Docker Hub, a library of container images that you can browse and subsequently download if needed.   Searching for SQL Server images, we can see that Microsoft has their own registry that has a few available container images.  The Feature Tags shown below show some often used images.  If you scroll further down the page, you can browse the full is list of available tags that can be used to download an image.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://johnmorehouse.com/images/2020/04/dockermac_2.png&#34;&gt;&lt;img data-recalc-dims=&#34;1&#34; loading=&#34;lazy&#34; decoding=&#34;async&#34; class=&#34;aligncenter size-full wp-image-6483&#34; src=&#34;https://johnmorehouse.com/images/2020/04/dockermac_2.png&#34; alt=&#34;&#34; width=&#34;533&#34; height=&#34;322&#34; srcset=&#34;https://johnmorehouse.com/images/2020/04/dockermac_2.png 533w, https://johnmorehouse.com/images/2020/04/dockermac_2.png 300w&#34; sizes=&#34;auto, (max-width: 533px) 100vw, 533px&#34; /&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;For my purposes, using the latest and greatest for testing and validating things is perfect so I’m only interested in the “2019-latest” container image.  To obtain the image, you can issue a pull command from within a &lt;a href=&#34;https://www.imore.com/how-use-terminal-mac-when-you-have-no-idea-where-start&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;terminal session&lt;/a&gt;.  You’ll notice that Docker Hub provides you with the command in the above image.&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;docker pull mcr.microsoft.com/mssql/server:2019-latest.&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&lt;a href=&#34;https://johnmorehouse.com/images/2020/04/dockermac_3.png&#34;&gt;&lt;img data-recalc-dims=&#34;1&#34; loading=&#34;lazy&#34; decoding=&#34;async&#34; class=&#34;aligncenter size-full wp-image-6484&#34; src=&#34;https://johnmorehouse.com/images/2020/04/dockermac_3.png&#34; alt=&#34;&#34; width=&#34;611&#34; height=&#34;204&#34; srcset=&#34;https://johnmorehouse.com/images/2020/04/dockermac_3.png 611w, https://johnmorehouse.com/images/2020/04/dockermac_3.png 300w&#34; sizes=&#34;auto, (max-width: 611px) 100vw, 611px&#34; /&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;We can check to make sure that the container image was downloaded as well as view any other images we might have.  As shown below, you can see that I have three images available.&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;docker images&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&lt;a href=&#34;https://johnmorehouse.com/images/2020/04/dockermac_4.png&#34;&gt;&lt;img data-recalc-dims=&#34;1&#34; loading=&#34;lazy&#34; decoding=&#34;async&#34; class=&#34;aligncenter size-full wp-image-6485&#34; src=&#34;https://johnmorehouse.com/images/2020/04/dockermac_4.png&#34; alt=&#34;&#34; width=&#34;640&#34; height=&#34;115&#34; srcset=&#34;https://johnmorehouse.com/images/2020/04/dockermac_4.png 737w, https://johnmorehouse.com/images/2020/04/dockermac_4.png 300w&#34; sizes=&#34;auto, (max-width: 640px) 100vw, 640px&#34; /&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;starting-the-sql-server-container&#34;&gt;&lt;span style=&#34;text-decoration: underline;&#34;&gt;Starting the SQL Server Container&lt;/span&gt;&lt;/h3&gt;&#xA;&lt;p&gt;Now that we have a container image downloaded, we can now initiate setting up the container itself.   Since SQL Server has already been installed within the container, it must now be configured for it to successfully start.  Essentially, we need to tell Docker to run the image and pass in some parameters.&lt;/p&gt;&#xA;&lt;p&gt;Here’s what they mean:&lt;/p&gt;&#xA;&lt;p&gt;-e represents environment variables.  Here we are accepting the end user license agreement (EULA) as well as supplying a SA password (it’s required).&lt;/p&gt;&#xA;&lt;p&gt;-p represents the ports.  The value on the left side of the colon is the port on the host and the value on the right side is the port within the container.  In this example, both sides will be listening on port 1433, which is the default port for SQL.&lt;/p&gt;&#xA;&lt;p&gt;-d represents which container image we want to run.  In this example I want to run the 2019-latest image pulled from Microsoft.com.&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-sh&#34; data-lang=&#34;sh&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;docker run -e &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;ACCEPT_EULA=Y&amp;#39;&lt;/span&gt; -e &lt;span style=&#34;color:#e6db74&#34;&gt;&amp;#39;SA_PASSWORD=yourStrong(!)Password&amp;#39;&lt;/span&gt; -p 1433:1433 -d mcr.microsoft.com/mssql/server:2019-latest&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Running this command, if all is correct, will return a GUID looking value.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://johnmorehouse.com/images/2020/04/dockermac_5.png&#34;&gt;&lt;img data-recalc-dims=&#34;1&#34; loading=&#34;lazy&#34; decoding=&#34;async&#34; class=&#34;aligncenter wp-image-6486&#34; src=&#34;https://johnmorehouse.com/images/2020/04/dockermac_5.png&#34; alt=&#34;&#34; width=&#34;640&#34; height=&#34;61&#34; srcset=&#34;https://johnmorehouse.com/images/2020/04/dockermac_5.png 1024w, https://johnmorehouse.com/images/2020/04/dockermac_5.png 300w, https://johnmorehouse.com/images/2020/04/dockermac_5.png 768w, https://johnmorehouse.com/images/2020/04/dockermac_5.png 1040w&#34; sizes=&#34;auto, (max-width: 640px) 100vw, 640px&#34; /&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;We can also see that the Docker dashboard now has a running instance.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://johnmorehouse.com/images/2020/04/dockermac_6.png&#34;&gt;&lt;img data-recalc-dims=&#34;1&#34; loading=&#34;lazy&#34; decoding=&#34;async&#34; class=&#34;aligncenter wp-image-6487&#34; src=&#34;https://johnmorehouse.com/images/2020/04/dockermac_6.png&#34; alt=&#34;&#34; width=&#34;640&#34; height=&#34;107&#34; srcset=&#34;https://johnmorehouse.com/images/2020/04/dockermac_6.png 1024w, https://johnmorehouse.com/images/2020/04/dockermac_6.png 300w, https://johnmorehouse.com/images/2020/04/dockermac_6.png 768w, https://johnmorehouse.com/images/2020/04/dockermac_6.png 1040w&#34; sizes=&#34;auto, (max-width: 640px) 100vw, 640px&#34; /&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;Using Azure Data Studio, I can now connect to the localhost on port 1433.  We can see that the version is 2019 CU4 which is the latest release for SQL Server 2019.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://johnmorehouse.com/images/2020/04/dockermacfix_7.png&#34;&gt;&lt;img data-recalc-dims=&#34;1&#34; loading=&#34;lazy&#34; decoding=&#34;async&#34; class=&#34;aligncenter wp-image-6492 size-full&#34; src=&#34;https://johnmorehouse.com/images/2020/04/dockermacfix_7.png&#34; alt=&#34;&#34; width=&#34;640&#34; height=&#34;148&#34; srcset=&#34;https://johnmorehouse.com/images/2020/04/dockermacfix_7.png 1361w, https://johnmorehouse.com/images/2020/04/dockermacfix_7.png 300w, https://johnmorehouse.com/images/2020/04/dockermacfix_7.png 1024w, https://johnmorehouse.com/images/2020/04/dockermacfix_7.png 768w, https://johnmorehouse.com/images/2020/04/dockermacfix_7.png 1280w&#34; sizes=&#34;auto, (max-width: 640px) 100vw, 640px&#34; /&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;It’s that easy!&lt;/p&gt;&#xA;&lt;h3 id=&#34;getting-help&#34;&gt;&lt;span style=&#34;text-decoration: underline;&#34;&gt;Getting Help&lt;/span&gt;&lt;/h3&gt;&#xA;&lt;p&gt;If you are stuck on a command, simply run docker + command + “–help” to get a list of available parameters.   For example, if I need to see what parameters are available for the run command, I would type in “docker run –help”.  The output would display all of the available parameters that you can supply with the “run” command.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://johnmorehouse.com/images/2020/04/dockermac_8.png&#34;&gt;&lt;img data-recalc-dims=&#34;1&#34; loading=&#34;lazy&#34; decoding=&#34;async&#34; class=&#34;aligncenter wp-image-6489&#34; src=&#34;https://johnmorehouse.com/images/2020/04/dockermac_8.png&#34; alt=&#34;&#34; width=&#34;640&#34; height=&#34;211&#34; srcset=&#34;https://johnmorehouse.com/images/2020/04/dockermac_8.png 1024w, https://johnmorehouse.com/images/2020/04/dockermac_8.png 300w, https://johnmorehouse.com/images/2020/04/dockermac_8.png 768w, https://johnmorehouse.com/images/2020/04/dockermac_8.png 1040w&#34; sizes=&#34;auto, (max-width: 640px) 100vw, 640px&#34; /&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;summary&#34;&gt;&lt;span style=&#34;text-decoration: underline;&#34;&gt;Summary&lt;/span&gt;&lt;/h3&gt;&#xA;&lt;p&gt;Using Docker allows me to quickly and easily stand up an instance of SQL Server.  Often times I just need an instance to test a feature or try to figure out how something works.   All in all, this process takes about 5-10 minutes to finish and it significantly faster than standing up a VM.  If you are new to Docker, try it out.  It works on Windows too!&lt;/p&gt;&#xA;&lt;p&gt;Watch for future blog posts on how to use Docker with SQL Server! &lt;a href=&#34;https://sqlrus.com/subscribe/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Subscribe&lt;/a&gt; for email notifications when new content is posted!&lt;/p&gt;&#xA;</content:encoded>
    </item>
    <item>
      <title>Working from Home Effectively</title>
      <link>https://johnmorehouse.com/2020/04/working-from-home-effectively/</link>
      <pubDate>Fri, 24 Apr 2020 13:42:07 +0000</pubDate>
      <guid>https://johnmorehouse.com/2020/04/working-from-home-effectively/</guid>
      <description>&lt;p&gt;Some of us have been lucky enough to have already been &lt;a href=&#34;https://johnmorehouse.com/2017/12/working-from-home/&#34;&gt;working from home&lt;/a&gt; (WFH) prior to the world events.  This has allowed most of us the ability to easily ready our homes to fit our needs.  For those that have suddenly been plunged into the working from home lifestyle, here are some tips that I’ve learned over the last 2.5 years being home 100% of the time.   I &lt;a title=&#34;Working From Home&#34; href=&#34;https://johnmorehouse.com/2017/12/working-from-home/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;blogged &lt;/a&gt;about this a few years ago when I started with &lt;a href=&#34;https://www.dcac.com&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Denny Cherry &amp;amp; Associates Consulting&lt;/a&gt; so some of these are updates.&lt;/p&gt;&#xA;&lt;h2 id=&#34;keep-a-schedule--routine&#34;&gt;Keep a Schedule &amp;amp; Routine&lt;/h2&gt;&#xA;&lt;p&gt;This is still probably one of the most important aspects of working from home.  Prior to coming into the WFH realm I worked a normal 8-5 job. It required me to be in the office before 8, so I decided when I switched I would keep to the same schedule. I continue to wake up at the same time and report to my desk at the same time ready to tackle the day every day.  Now, depending on what I have going on, it’s nice to be able  to wake up earlier  (like 5:30AM) so that I have some extra time to focus on things.   If I have my sons with me (for those that might be co-parenting), that also allows me to focus without having to tend to their needs. My advice is to keep whatever schedule best works for you and your employer.  Thankfully, my employer allows me to set my own schedule and manage my own time which is helpful.  Having that flexibility makes things easier on me as a work from home employee.&lt;/p&gt;&#xA;&lt;p&gt;Beyond keeping a consistent schedule, keep a consistent routine as well.  As I mentioned, I get up about the same time.  While I &lt;em&gt;&lt;em&gt;could&lt;/em&gt;&lt;/em&gt; wear pajamas or whatever I wanted to work, I choose not to.  I get up, get showered, shave, brush teeth, etc and get fully dressed so that I’m ready for the day.  I find this makes me more productive. Once ready, I go downstairs for my coffee and usually for some breakfast.  Sometimes I’ll take food to my desk but usually I sit at my kitchen table and watch the world wake up while I enjoy my first cup of coffee.  Then it’s time to go to the “office”.  Warning the commute can be horrible so watch out for traffic jams (kids or pets) in the hallways and stairwell.  13 seconds later, I’m at my desk ready to get started.  Once there, I’ll start on any daily tasks that I need to get done and then continue on any project work I might have on my plate.&lt;/p&gt;&#xA;&lt;p&gt;Fast forward to lunch. It’s a 50/50 chance that I’ll eat lunch at my desk.  Some days I do, others I don’t.  It’s important to take breaks away from your desk as it’s really easy to get sucked into working all the time.  My advice is to make sure to take a break for lunch and try to disconnect as much as possible.  Some days, for me, I’ll make lunch and play Xbox (Titan Fall 2), or  go for a walk, or just read a book while eating.&lt;/p&gt;&#xA;&lt;p&gt;Come evening time, I wrap things up somewhere between 4-5PM.   Some days it’s later and some days it’s earlier usually because of kid responsibilities.  Some Due to the nature of my job some evenings I must work later due to time zones and sometimes even on the weekends due to system availability.  I recognize that it is all part of the job, however, I’m able to find a balance that works for me while maintain any responsibilities I might have.&lt;/p&gt;&#xA;&lt;h2 id=&#34;workspace&#34;&gt;Workspace&lt;/h2&gt;&#xA;&lt;p&gt;When I joined with Denny Cherry &amp;amp; Associates Consulting (DCAC), I invested some cash into my workspace.  I tend to like a clean and clutter free desk, so I invested in a good quality standing desk from Uplift Desk.  I started out with 2-27” monitors and operated with that for quite a long time.  Within the past 6 months I further invested in an additional 27” monitor so now I have three.  I have found that having three monitors (actually 4 if I used the laptop itself) allows me to have a better workflow in my daily tasks.  You might have to play with configurations or ideas, but don’t be afraid to invest (if you can) in things that help you work from home.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://johnmorehouse.com/images/2020/04/workingfromhome_1.png&#34;&gt;&lt;img data-recalc-dims=&#34;1&#34; loading=&#34;lazy&#34; decoding=&#34;async&#34; class=&#34;aligncenter wp-image-6417&#34; src=&#34;https://johnmorehouse.com/images/2020/04/workingfromhome_1.png&#34; alt=&#34;&#34; width=&#34;640&#34; height=&#34;480&#34; srcset=&#34;https://johnmorehouse.com/images/2020/04/workingfromhome_1.png 1431w, https://johnmorehouse.com/images/2020/04/workingfromhome_1.png 300w, https://johnmorehouse.com/images/2020/04/workingfromhome_1.png 1024w, https://johnmorehouse.com/images/2020/04/workingfromhome_1.png 768w, https://johnmorehouse.com/images/2020/04/workingfromhome_1.png 1280w&#34; sizes=&#34;auto, (max-width: 640px) 100vw, 640px&#34; /&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;Of course, you can invest a lot of money into your workspace.  I know people have to walls of monitors, expensive desk chairs, extreme web camera setups, and the list goes on.  Do what you can to make it your space.  At times I’ll even work on my secondary machine standing at my kitchen bar because it works.  You don’t have to drop a ton of money and there are ways to make it work with minimal amounts of money.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://johnmorehouse.com/images/2020/04/workingfromhome_3-1.png&#34;&gt;&lt;img data-recalc-dims=&#34;1&#34; loading=&#34;lazy&#34; decoding=&#34;async&#34; class=&#34;aligncenter wp-image-6420&#34; src=&#34;https://johnmorehouse.com/images/2020/04/workingfromhome_3-1.png&#34; alt=&#34;&#34; width=&#34;281&#34; height=&#34;374&#34; srcset=&#34;https://johnmorehouse.com/images/2020/04/workingfromhome_3-1.png 1512w, https://johnmorehouse.com/images/2020/04/workingfromhome_3-1.png 225w, https://johnmorehouse.com/images/2020/04/workingfromhome_3-1.png 768w, https://johnmorehouse.com/images/2020/04/workingfromhome_3-1.png 1152w, https://johnmorehouse.com/images/2020/04/workingfromhome_3-1.png 1280w&#34; sizes=&#34;auto, (max-width: 281px) 100vw, 281px&#34; /&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;Here I am just using a &lt;a href=&#34;https://amzn.to/2XZEroO&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;laptop tray&lt;/a&gt; that I bought off of Amazon to allow me to have a “mobile standing point” on just about any flat surface.  I find that mixing up my location from time to time help to get my mind focused on the task at hand.&lt;/p&gt;&#xA;&lt;h2 id=&#34;communications&#34;&gt;Communications&lt;/h2&gt;&#xA;&lt;p&gt;Maintaining communication with your colleagues as well as your family is important, especially during this time of chaos. Without it the self-isolation feeling can be overwhelming. For me this means I check up on my family (they all live at least 6 hours away) on a semi-weekly basis to ensure that they are healthy and are doing as best as possible. Having peace of mind that they are doing well helps me better focus on work, and keeps me from getting distracted by worrying about them. Thankfully with my work I am able to take breaks and have a phone conversation, or I’ll even have a video call with them via Skype or FaceTime.&lt;/p&gt;&#xA;&lt;p&gt;Beyond just family, make sure to have open dialogs with your managers on your status.  If you are struggling with things, let them know.  They cannot help resolve any issues if they don’t know they even exist.  I have a check-in with Denny once or twice a month just to see how things are going.  Now, at DCAC, we chat constantly via Teams.  During the day, evenings, weekends, or even holidays usually someone on the team is talking.  This makes is much easier to have some interaction and feel connected to the team.&lt;/p&gt;&#xA;&lt;h2 id=&#34;distractions&#34;&gt;Distractions&lt;/h2&gt;&#xA;&lt;p&gt;Working from home comes with a whole new set of distractions, namely the television.  I have found that, thankfully, the television remains off during my working time (I have a TV in my office) and I can count on one hand the number of times it’s been on while I’m working.  When I first started working from home, I had a real feeling that TV would be a huge distraction for me.  Turns out that wasn’t my distraction.  My distraction normally is the internet.  Twitter, social media, blogs, news, etc.  For me, it can be a quicksand place to get lost in and the next thing you know 3 hours have gone by.&lt;/p&gt;&#xA;&lt;p&gt;Here are some things I use to help keep those in check:&lt;/p&gt;&#xA;&lt;img data-recalc-dims=&#34;1&#34; loading=&#34;lazy&#34; decoding=&#34;async&#34; class=&#34;size-full wp-image-6419 alignright&#34; src=&#34;https://johnmorehouse.com/images/2020/04/workingfromhome_2.png&#34; alt=&#34;&#34; width=&#34;509&#34; height=&#34;360&#34; srcset=&#34;https://johnmorehouse.com/images/2020/04/workingfromhome_2.png 509w, https://johnmorehouse.com/images/2020/04/workingfromhome_2.png 300w&#34; sizes=&#34;auto, (max-width: 509px) 100vw, 509px&#34; /&gt; &#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;strong&gt;Focus Assist&lt;/strong&gt; – For Windows users, try the &lt;a href=&#34;https://support.microsoft.com/en-us/help/4026996/windows-10-turn-focus-assist-on-or-off&#34;&gt;Focus assist&lt;/a&gt;. You can adjust the focus to only show certain alerts or none.  This helps me to block out any unwanted alerts for a period.  I don’t know if Apple products have something similar.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Internet Traffic&lt;/strong&gt; – For Chrome (or Edge) users – &lt;a href=&#34;https://chrome.google.com/webstore/detail/stayfocusd/laankejkbhbdhmipfmgcngdelahlfoji?hl=en&#34;&gt;StayFocusd&lt;/a&gt; will provide allotment of time to browse certain websites, like YouTube for example. Once you have burned through you allotted amount of time, it blocks that site until the next day.  Of course, there are way around this, but it helps to keep you in check.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Set Do Not Disturb (DND)&lt;/strong&gt; – These days we are inundated with communication tools. Slack, Teams, Skype, Hangouts, pick one.   If you need time to focus, don’t be afraid to set your status on all these tools to “Do Not Disturb”.  This will let your teammates know to not bug you or just send you an email.  Respect that DND and don’t answer things unless they are critical.  I’ll even set my iPhone to DND so that I won’t get text messages or phone calls during that time.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Close Your Email&lt;/strong&gt; –Really, it is ok to close your email client and not have it open. There have been studies done about the amount of time that gets wasted when you address an email and try to resume what you were focused on.  It’ll be Okay to close your email, trust me.  The messages will be there for when you get back to it.  If it’s an emergency most likely the person will call you and then you can handle it.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;summary&#34;&gt;Summary&lt;/h2&gt;&#xA;&lt;p&gt;The way in which you work has probably shifted.  It takes time to adapt and get used to the new “normal.  I know that was the case when I shifted to working from home 100% of the time.  Now that you’ve been working from home for a bit, what has been your experience so far?  What distractions do you have to contend with and how do you handle them?  Let me know by leaving comments!&lt;/p&gt;&#xA;</description>
      <content:encoded>&lt;p&gt;Some of us have been lucky enough to have already been &lt;a href=&#34;https://johnmorehouse.com/2017/12/working-from-home/&#34;&gt;working from home&lt;/a&gt; (WFH) prior to the world events.  This has allowed most of us the ability to easily ready our homes to fit our needs.  For those that have suddenly been plunged into the working from home lifestyle, here are some tips that I’ve learned over the last 2.5 years being home 100% of the time.   I &lt;a title=&#34;Working From Home&#34; href=&#34;https://johnmorehouse.com/2017/12/working-from-home/&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;blogged &lt;/a&gt;about this a few years ago when I started with &lt;a href=&#34;https://www.dcac.com&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;Denny Cherry &amp;amp; Associates Consulting&lt;/a&gt; so some of these are updates.&lt;/p&gt;&#xA;&lt;h2 id=&#34;keep-a-schedule--routine&#34;&gt;Keep a Schedule &amp;amp; Routine&lt;/h2&gt;&#xA;&lt;p&gt;This is still probably one of the most important aspects of working from home.  Prior to coming into the WFH realm I worked a normal 8-5 job. It required me to be in the office before 8, so I decided when I switched I would keep to the same schedule. I continue to wake up at the same time and report to my desk at the same time ready to tackle the day every day.  Now, depending on what I have going on, it’s nice to be able  to wake up earlier  (like 5:30AM) so that I have some extra time to focus on things.   If I have my sons with me (for those that might be co-parenting), that also allows me to focus without having to tend to their needs. My advice is to keep whatever schedule best works for you and your employer.  Thankfully, my employer allows me to set my own schedule and manage my own time which is helpful.  Having that flexibility makes things easier on me as a work from home employee.&lt;/p&gt;&#xA;&lt;p&gt;Beyond keeping a consistent schedule, keep a consistent routine as well.  As I mentioned, I get up about the same time.  While I &lt;em&gt;&lt;em&gt;could&lt;/em&gt;&lt;/em&gt; wear pajamas or whatever I wanted to work, I choose not to.  I get up, get showered, shave, brush teeth, etc and get fully dressed so that I’m ready for the day.  I find this makes me more productive. Once ready, I go downstairs for my coffee and usually for some breakfast.  Sometimes I’ll take food to my desk but usually I sit at my kitchen table and watch the world wake up while I enjoy my first cup of coffee.  Then it’s time to go to the “office”.  Warning the commute can be horrible so watch out for traffic jams (kids or pets) in the hallways and stairwell.  13 seconds later, I’m at my desk ready to get started.  Once there, I’ll start on any daily tasks that I need to get done and then continue on any project work I might have on my plate.&lt;/p&gt;&#xA;&lt;p&gt;Fast forward to lunch. It’s a 50/50 chance that I’ll eat lunch at my desk.  Some days I do, others I don’t.  It’s important to take breaks away from your desk as it’s really easy to get sucked into working all the time.  My advice is to make sure to take a break for lunch and try to disconnect as much as possible.  Some days, for me, I’ll make lunch and play Xbox (Titan Fall 2), or  go for a walk, or just read a book while eating.&lt;/p&gt;&#xA;&lt;p&gt;Come evening time, I wrap things up somewhere between 4-5PM.   Some days it’s later and some days it’s earlier usually because of kid responsibilities.  Some Due to the nature of my job some evenings I must work later due to time zones and sometimes even on the weekends due to system availability.  I recognize that it is all part of the job, however, I’m able to find a balance that works for me while maintain any responsibilities I might have.&lt;/p&gt;&#xA;&lt;h2 id=&#34;workspace&#34;&gt;Workspace&lt;/h2&gt;&#xA;&lt;p&gt;When I joined with Denny Cherry &amp;amp; Associates Consulting (DCAC), I invested some cash into my workspace.  I tend to like a clean and clutter free desk, so I invested in a good quality standing desk from Uplift Desk.  I started out with 2-27” monitors and operated with that for quite a long time.  Within the past 6 months I further invested in an additional 27” monitor so now I have three.  I have found that having three monitors (actually 4 if I used the laptop itself) allows me to have a better workflow in my daily tasks.  You might have to play with configurations or ideas, but don’t be afraid to invest (if you can) in things that help you work from home.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://johnmorehouse.com/images/2020/04/workingfromhome_1.png&#34;&gt;&lt;img data-recalc-dims=&#34;1&#34; loading=&#34;lazy&#34; decoding=&#34;async&#34; class=&#34;aligncenter wp-image-6417&#34; src=&#34;https://johnmorehouse.com/images/2020/04/workingfromhome_1.png&#34; alt=&#34;&#34; width=&#34;640&#34; height=&#34;480&#34; srcset=&#34;https://johnmorehouse.com/images/2020/04/workingfromhome_1.png 1431w, https://johnmorehouse.com/images/2020/04/workingfromhome_1.png 300w, https://johnmorehouse.com/images/2020/04/workingfromhome_1.png 1024w, https://johnmorehouse.com/images/2020/04/workingfromhome_1.png 768w, https://johnmorehouse.com/images/2020/04/workingfromhome_1.png 1280w&#34; sizes=&#34;auto, (max-width: 640px) 100vw, 640px&#34; /&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;Of course, you can invest a lot of money into your workspace.  I know people have to walls of monitors, expensive desk chairs, extreme web camera setups, and the list goes on.  Do what you can to make it your space.  At times I’ll even work on my secondary machine standing at my kitchen bar because it works.  You don’t have to drop a ton of money and there are ways to make it work with minimal amounts of money.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://johnmorehouse.com/images/2020/04/workingfromhome_3-1.png&#34;&gt;&lt;img data-recalc-dims=&#34;1&#34; loading=&#34;lazy&#34; decoding=&#34;async&#34; class=&#34;aligncenter wp-image-6420&#34; src=&#34;https://johnmorehouse.com/images/2020/04/workingfromhome_3-1.png&#34; alt=&#34;&#34; width=&#34;281&#34; height=&#34;374&#34; srcset=&#34;https://johnmorehouse.com/images/2020/04/workingfromhome_3-1.png 1512w, https://johnmorehouse.com/images/2020/04/workingfromhome_3-1.png 225w, https://johnmorehouse.com/images/2020/04/workingfromhome_3-1.png 768w, https://johnmorehouse.com/images/2020/04/workingfromhome_3-1.png 1152w, https://johnmorehouse.com/images/2020/04/workingfromhome_3-1.png 1280w&#34; sizes=&#34;auto, (max-width: 281px) 100vw, 281px&#34; /&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;Here I am just using a &lt;a href=&#34;https://amzn.to/2XZEroO&#34; target=&#34;_blank&#34; rel=&#34;noopener noreferrer&#34;&gt;laptop tray&lt;/a&gt; that I bought off of Amazon to allow me to have a “mobile standing point” on just about any flat surface.  I find that mixing up my location from time to time help to get my mind focused on the task at hand.&lt;/p&gt;&#xA;&lt;h2 id=&#34;communications&#34;&gt;Communications&lt;/h2&gt;&#xA;&lt;p&gt;Maintaining communication with your colleagues as well as your family is important, especially during this time of chaos. Without it the self-isolation feeling can be overwhelming. For me this means I check up on my family (they all live at least 6 hours away) on a semi-weekly basis to ensure that they are healthy and are doing as best as possible. Having peace of mind that they are doing well helps me better focus on work, and keeps me from getting distracted by worrying about them. Thankfully with my work I am able to take breaks and have a phone conversation, or I’ll even have a video call with them via Skype or FaceTime.&lt;/p&gt;&#xA;&lt;p&gt;Beyond just family, make sure to have open dialogs with your managers on your status.  If you are struggling with things, let them know.  They cannot help resolve any issues if they don’t know they even exist.  I have a check-in with Denny once or twice a month just to see how things are going.  Now, at DCAC, we chat constantly via Teams.  During the day, evenings, weekends, or even holidays usually someone on the team is talking.  This makes is much easier to have some interaction and feel connected to the team.&lt;/p&gt;&#xA;&lt;h2 id=&#34;distractions&#34;&gt;Distractions&lt;/h2&gt;&#xA;&lt;p&gt;Working from home comes with a whole new set of distractions, namely the television.  I have found that, thankfully, the television remains off during my working time (I have a TV in my office) and I can count on one hand the number of times it’s been on while I’m working.  When I first started working from home, I had a real feeling that TV would be a huge distraction for me.  Turns out that wasn’t my distraction.  My distraction normally is the internet.  Twitter, social media, blogs, news, etc.  For me, it can be a quicksand place to get lost in and the next thing you know 3 hours have gone by.&lt;/p&gt;&#xA;&lt;p&gt;Here are some things I use to help keep those in check:&lt;/p&gt;&#xA;&lt;img data-recalc-dims=&#34;1&#34; loading=&#34;lazy&#34; decoding=&#34;async&#34; class=&#34;size-full wp-image-6419 alignright&#34; src=&#34;https://johnmorehouse.com/images/2020/04/workingfromhome_2.png&#34; alt=&#34;&#34; width=&#34;509&#34; height=&#34;360&#34; srcset=&#34;https://johnmorehouse.com/images/2020/04/workingfromhome_2.png 509w, https://johnmorehouse.com/images/2020/04/workingfromhome_2.png 300w&#34; sizes=&#34;auto, (max-width: 509px) 100vw, 509px&#34; /&gt; &#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;strong&gt;Focus Assist&lt;/strong&gt; – For Windows users, try the &lt;a href=&#34;https://support.microsoft.com/en-us/help/4026996/windows-10-turn-focus-assist-on-or-off&#34;&gt;Focus assist&lt;/a&gt;. You can adjust the focus to only show certain alerts or none.  This helps me to block out any unwanted alerts for a period.  I don’t know if Apple products have something similar.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Internet Traffic&lt;/strong&gt; – For Chrome (or Edge) users – &lt;a href=&#34;https://chrome.google.com/webstore/detail/stayfocusd/laankejkbhbdhmipfmgcngdelahlfoji?hl=en&#34;&gt;StayFocusd&lt;/a&gt; will provide allotment of time to browse certain websites, like YouTube for example. Once you have burned through you allotted amount of time, it blocks that site until the next day.  Of course, there are way around this, but it helps to keep you in check.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Set Do Not Disturb (DND)&lt;/strong&gt; – These days we are inundated with communication tools. Slack, Teams, Skype, Hangouts, pick one.   If you need time to focus, don’t be afraid to set your status on all these tools to “Do Not Disturb”.  This will let your teammates know to not bug you or just send you an email.  Respect that DND and don’t answer things unless they are critical.  I’ll even set my iPhone to DND so that I won’t get text messages or phone calls during that time.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Close Your Email&lt;/strong&gt; –Really, it is ok to close your email client and not have it open. There have been studies done about the amount of time that gets wasted when you address an email and try to resume what you were focused on.  It’ll be Okay to close your email, trust me.  The messages will be there for when you get back to it.  If it’s an emergency most likely the person will call you and then you can handle it.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;summary&#34;&gt;Summary&lt;/h2&gt;&#xA;&lt;p&gt;The way in which you work has probably shifted.  It takes time to adapt and get used to the new “normal.  I know that was the case when I shifted to working from home 100% of the time.  Now that you’ve been working from home for a bit, what has been your experience so far?  What distractions do you have to contend with and how do you handle them?  Let me know by leaving comments!&lt;/p&gt;&#xA;</content:encoded>
    </item>
    <item>
      <title>Azure SQL Database: Great Choice for Modern Cloud Applications</title>
      <link>https://johnmorehouse.com/2020/03/azure-sql-database-great-choice-for-modern-cloud-applications/</link>
      <pubDate>Fri, 27 Mar 2020 13:05:08 +0000</pubDate>
      <guid>https://johnmorehouse.com/2020/03/azure-sql-database-great-choice-for-modern-cloud-applications/</guid>
      <description>&lt;p&gt;Microsoft offers several options for moving your SQL Server workloads to Azure. If you’re looking to host modern cloud applications, your best option is &lt;a href=&#34;https://docs.microsoft.com/azure/sql-database/sql-database-technical-overview&#34;&gt;Azure SQL Database Service&lt;/a&gt;. For an overview of the business benefits of using data infrastructure services in the cloud, download “&lt;a href=&#34;http://aka.ms/dbmseries_best_open&#34;&gt;Future-Proof Your Data Infrastructure with Azure: A Business Case for Database Administrators&lt;/a&gt;.”&lt;/p&gt;&#xA;&lt;p&gt;Azure SQL Database is a general-purpose relational database based on the latest Enterprise Edition of SQL Server. A fully managed SQL database engine, Azure SQL Database service is your platform as a service solution. That means you don’t have to worry about updates, patching, or managing the hardware, and it’s a great option when you need to get to market fast.&lt;/p&gt;&#xA;&lt;p&gt;Within Azure SQL Database service, you have a couple of deployment options.&lt;/p&gt;&#xA;&lt;h3 id=&#34;single-databases&#34;&gt;&lt;span style=&#34;text-decoration: underline;&#34;&gt;Single Databases&lt;/span&gt;&lt;/h3&gt;&#xA;&lt;p&gt;A &lt;a href=&#34;https://docs.microsoft.com/azure/sql-database/sql-database-single-database&#34;&gt;single database&lt;/a&gt; is one with its own set of resources, including guaranteed compute size. A single database is portable and isolated from other databases. It is also optimized for the development of cloud-based applications.  A serverless option is available which allows the database to “spin down”.  When a database spins down, you not charged for compute resources only for consumed storage.  Or you can go with a provisioned model where compute resources are available to your application at all times.&lt;/p&gt;&#xA;&lt;p&gt;The dynamic scalability of a single database makes it a great option when you’re building your first app in the cloud. You can develop your app on a small, single database at a low cost in the serverless compute tier or a small compute size in the provisioned compute tier, and then change the compute or service tier at any time without downtime.&lt;/p&gt;&#xA;&lt;h3 id=&#34;sql-database-elastic-pool&#34;&gt;&lt;span style=&#34;text-decoration: underline;&#34;&gt;SQL Database Elastic Pool&lt;/span&gt;&lt;/h3&gt;&#xA;&lt;p&gt;A &lt;a href=&#34;https://docs.microsoft.com/azure/sql-database/sql-database-elastic-pool&#34;&gt;SQL Database elastic pool&lt;/a&gt; is a set of resources that are shared by a collection of databases and managed via a database server. If you need to manage and scale multiple databases that have fluctuating usage, elastic pools are a simple and cost-effective way to do so. You can easily move single databases in and out of an elastic pool as well as limit resources to individual databases so as to not consume the entire pool. Like single databases, elastic pools are optimized for the development of new cloud-based applications but using the multi-tenant software as a service model.&lt;/p&gt;&#xA;&lt;p&gt;Whether you choose a single database or an elastic pool, before you create an Azure SQL Database, you must first create an &lt;a href=&#34;https://docs.microsoft.com/azure/sql-database/sql-database-servers&#34;&gt;Azure SQL Database server&lt;/a&gt;. As the central administrative point for multiple single or pooled databases, the Azure SQL Database server is used to manage logins, backups, firewall rules, auditing rules, threat detection policies, active geo-replication, and fail-over groups.&lt;/p&gt;&#xA;&lt;p&gt;Unlike in the on-premises world, a SQL Database server is distinct from a SQL Server instance. While all databases managed by a SQL Database server are created within the same region, the SQL Database service makes no guarantees regarding the location of the databases in relation to the server that manages them. Nor does the SQL Database server expose any instance-level access or features. Finally, a SQL Database server can be in a different region than its resource group.&lt;/p&gt;&#xA;&lt;p&gt;Azure SQL Database service is ideal for moving or building a modern, cloud-based application in Azure. The options within the service are specifically built and optimized for cloud environments. If you want to learn more about moving SQL Server to the cloud, download “&lt;a href=&#34;http://aka.ms/dbmseries_best_close&#34;&gt;Future-Proof Your Data Infrastructure with Azure: A Business Case for Database Administrators&lt;/a&gt;.”&lt;/p&gt;&#xA;</description>
      <content:encoded>&lt;p&gt;Microsoft offers several options for moving your SQL Server workloads to Azure. If you’re looking to host modern cloud applications, your best option is &lt;a href=&#34;https://docs.microsoft.com/azure/sql-database/sql-database-technical-overview&#34;&gt;Azure SQL Database Service&lt;/a&gt;. For an overview of the business benefits of using data infrastructure services in the cloud, download “&lt;a href=&#34;http://aka.ms/dbmseries_best_open&#34;&gt;Future-Proof Your Data Infrastructure with Azure: A Business Case for Database Administrators&lt;/a&gt;.”&lt;/p&gt;&#xA;&lt;p&gt;Azure SQL Database is a general-purpose relational database based on the latest Enterprise Edition of SQL Server. A fully managed SQL database engine, Azure SQL Database service is your platform as a service solution. That means you don’t have to worry about updates, patching, or managing the hardware, and it’s a great option when you need to get to market fast.&lt;/p&gt;&#xA;&lt;p&gt;Within Azure SQL Database service, you have a couple of deployment options.&lt;/p&gt;&#xA;&lt;h3 id=&#34;single-databases&#34;&gt;&lt;span style=&#34;text-decoration: underline;&#34;&gt;Single Databases&lt;/span&gt;&lt;/h3&gt;&#xA;&lt;p&gt;A &lt;a href=&#34;https://docs.microsoft.com/azure/sql-database/sql-database-single-database&#34;&gt;single database&lt;/a&gt; is one with its own set of resources, including guaranteed compute size. A single database is portable and isolated from other databases. It is also optimized for the development of cloud-based applications.  A serverless option is available which allows the database to “spin down”.  When a database spins down, you not charged for compute resources only for consumed storage.  Or you can go with a provisioned model where compute resources are available to your application at all times.&lt;/p&gt;&#xA;&lt;p&gt;The dynamic scalability of a single database makes it a great option when you’re building your first app in the cloud. You can develop your app on a small, single database at a low cost in the serverless compute tier or a small compute size in the provisioned compute tier, and then change the compute or service tier at any time without downtime.&lt;/p&gt;&#xA;&lt;h3 id=&#34;sql-database-elastic-pool&#34;&gt;&lt;span style=&#34;text-decoration: underline;&#34;&gt;SQL Database Elastic Pool&lt;/span&gt;&lt;/h3&gt;&#xA;&lt;p&gt;A &lt;a href=&#34;https://docs.microsoft.com/azure/sql-database/sql-database-elastic-pool&#34;&gt;SQL Database elastic pool&lt;/a&gt; is a set of resources that are shared by a collection of databases and managed via a database server. If you need to manage and scale multiple databases that have fluctuating usage, elastic pools are a simple and cost-effective way to do so. You can easily move single databases in and out of an elastic pool as well as limit resources to individual databases so as to not consume the entire pool. Like single databases, elastic pools are optimized for the development of new cloud-based applications but using the multi-tenant software as a service model.&lt;/p&gt;&#xA;&lt;p&gt;Whether you choose a single database or an elastic pool, before you create an Azure SQL Database, you must first create an &lt;a href=&#34;https://docs.microsoft.com/azure/sql-database/sql-database-servers&#34;&gt;Azure SQL Database server&lt;/a&gt;. As the central administrative point for multiple single or pooled databases, the Azure SQL Database server is used to manage logins, backups, firewall rules, auditing rules, threat detection policies, active geo-replication, and fail-over groups.&lt;/p&gt;&#xA;&lt;p&gt;Unlike in the on-premises world, a SQL Database server is distinct from a SQL Server instance. While all databases managed by a SQL Database server are created within the same region, the SQL Database service makes no guarantees regarding the location of the databases in relation to the server that manages them. Nor does the SQL Database server expose any instance-level access or features. Finally, a SQL Database server can be in a different region than its resource group.&lt;/p&gt;&#xA;&lt;p&gt;Azure SQL Database service is ideal for moving or building a modern, cloud-based application in Azure. The options within the service are specifically built and optimized for cloud environments. If you want to learn more about moving SQL Server to the cloud, download “&lt;a href=&#34;http://aka.ms/dbmseries_best_close&#34;&gt;Future-Proof Your Data Infrastructure with Azure: A Business Case for Database Administrators&lt;/a&gt;.”&lt;/p&gt;&#xA;</content:encoded>
    </item>
  </channel>
</rss>
