<?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>Posts on Mark Allison</title>
    <link>https://markallison.co.uk/posts/</link>
    <description>Recent content in Posts on Mark Allison</description>
    <image>
      <title>Mark Allison</title>
      <url>https://markallison.co.uk/%3Clink%20or%20path%20of%20image%20for%20opengraph,%20twitter-cards%3E</url>
      <link>https://markallison.co.uk/%3Clink%20or%20path%20of%20image%20for%20opengraph,%20twitter-cards%3E</link>
    </image>
    <generator>Hugo -- 0.151.2</generator>
    <language>en</language>
    <lastBuildDate>Fri, 01 Nov 2024 07:57:04 +0000</lastBuildDate>
    <atom:link href="https://markallison.co.uk/posts/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Backup to S3 from SQL Server</title>
      <link>https://markallison.co.uk/blog/backup-to-s3/</link>
      <pubDate>Fri, 01 Nov 2024 07:57:04 +0000</pubDate>
      <guid>https://markallison.co.uk/blog/backup-to-s3/</guid>
      <description>&lt;p&gt;As we all know backing up to Azure Storage has been easy for some years now, but only since SQL Server 2022 have Microsoft supported backing up to S3. This includes third party providers that implement the S3 bucket protocol.&lt;/p&gt;
&lt;h2 id=&#34;why-do-this&#34;&gt;Why do this?&lt;/h2&gt;
&lt;p&gt;To keep backups safe and secure, best practise dictates that backup files should be off-site. Rather than backing up locally to a volume and then copying the file to S3, money can be saved by not having to provision space for local volumes. It is common in AWS to use an FSx volume for backups, or even a mounted EBS volume, but these costs can be removed by backing up directly to an S3 bucket.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Connect Logic App to  Azure Sql Securely</title>
      <link>https://markallison.co.uk/blog/logicapp-connect-azuresql/</link>
      <pubDate>Mon, 16 Sep 2024 07:27:43 +0100</pubDate>
      <guid>https://markallison.co.uk/blog/logicapp-connect-azuresql/</guid>
      <description>&lt;h1 id=&#34;the-problem&#34;&gt;The Problem&lt;/h1&gt;
&lt;p&gt;Recently, I was working on a &lt;a href=&#34;https://ppgstats.markallison.co.uk/&#34;&gt;personal project&lt;/a&gt; where I needed to export data from my Azure SQL Database into a JSON file roughly every hour. This JSON file would then be used by a static website hosted on Azure Blob Storage. I wanted a secure way to do this without maintaining passwords, so I decided to use &lt;strong&gt;Managed Identity&lt;/strong&gt; to connect my Logic App to the Azure SQL Database.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Script to Remove NOLOCK Hints</title>
      <link>https://markallison.co.uk/blog/remove-nolock-hints/</link>
      <pubDate>Fri, 06 Sep 2024 13:25:32 +0100</pubDate>
      <guid>https://markallison.co.uk/blog/remove-nolock-hints/</guid>
      <description>&lt;h1 id=&#34;the-problem&#34;&gt;The problem&lt;/h1&gt;
&lt;p&gt;Recently, I was performance tuning and enhancing the reliability of several SQL Server 2019 and 2022 databases for a client and discovered &lt;code&gt;NOLOCK&lt;/code&gt; hints everywhere. Why are these bad, they seem to improve performance and remove blocking for most queries?&lt;/p&gt;
&lt;h2 id=&#34;1-dirty-reads&#34;&gt;1. Dirty reads&lt;/h2&gt;
&lt;p&gt;This allows data to be read that is currently being modified by another query leading to inconsistent results. If a row that has been read gets rolled back because of an error like a deadlock, or network issue, the data never existed!&lt;/p&gt;</description>
    </item>
    <item>
      <title>CPU Hot Add Breaks Fulltext Search</title>
      <link>https://markallison.co.uk/blog/cpu-hot-add-breaks-fulltext/</link>
      <pubDate>Wed, 07 Aug 2024 14:23:28 +0100</pubDate>
      <guid>https://markallison.co.uk/blog/cpu-hot-add-breaks-fulltext/</guid>
      <description>&lt;h1 id=&#34;overloaded-server&#34;&gt;Overloaded server&lt;/h1&gt;
&lt;p&gt;I recently worked on a SQL Server 2019 CU27 on-premises server that was running at 100% CPU sustained several times during business hours and also during the night running batch processes. This was impacting users, who were complaining. The VM was running in vmware which supports hot cpu add functionality.&lt;/p&gt;
&lt;h2 id=&#34;hot-add&#34;&gt;Hot add&lt;/h2&gt;
&lt;p&gt;The number of CPUs was doubled from 8 to 16 to deal with the customer workload. In order for SQL Server to use these CPUs in SQL Server 2019, the &lt;code&gt;RECONFIGURE&lt;/code&gt; command must be run. When that was run all looked fine.&lt;/p&gt;</description>
    </item>
    <item>
      <title>How to Move Sql Distribution Database</title>
      <link>https://markallison.co.uk/blog/move-sql-distribution-db/</link>
      <pubDate>Thu, 02 May 2024 11:04:28 +0100</pubDate>
      <guid>https://markallison.co.uk/blog/move-sql-distribution-db/</guid>
      <description>&lt;h1 id=&#34;the-problem&#34;&gt;The Problem&lt;/h1&gt;
&lt;h2 id=&#34;the-incident&#34;&gt;The incident&lt;/h2&gt;
&lt;p&gt;Recently, a system I am working on experienced a noticeable slow response time for users due to high PAGEIOLATCH_SH waits. These waits are SQL Server waiting on a latch to read data from disk into memory. At the time we noticed that the distribution agent cleanup task was running for over an hour and checking the latency on the disks revealed that disk read time was peaking at 400ms, when it should be below 10ms.&lt;/p&gt;</description>
    </item>
    <item>
      <title>SQLMI Restore Blob Storage Access Denied</title>
      <link>https://markallison.co.uk/blog/sqlmi-restore-blob-storage-access-denied/</link>
      <pubDate>Tue, 08 Aug 2023 11:24:22 +0100</pubDate>
      <guid>https://markallison.co.uk/blog/sqlmi-restore-blob-storage-access-denied/</guid>
      <description>&lt;p&gt;If you are using Azure SQL Managed Instance and encounter an error like this when restoring a database from an Azure Blob Storage container:&lt;/p&gt;
&lt;div class=&#34;admonition admonition-failure&#34;&gt;
  &lt;p class=&#34;admonition-title&#34;&gt;
      Msg 3201, Level 16, State 2, Line 1 
  &lt;/p&gt;
  &lt;div class=&#34;admonition-content&#34;&gt;
    
Cannot open backup device &#39;https://{storage-account}.blob.core.windows.net/my-container/mydb/FULL/mydb-backup.bak&#39;. Operating system error 5(Access is denied.).

  &lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;You can try the following steps to fix it:&lt;/p&gt;
&lt;h2 id=&#34;1-check-the-sas-token-and-generate-a-new-one-if-needed&#34;&gt;1. Check the SAS token and generate a new one if needed.&lt;/h2&gt;
&lt;p&gt;The most common cause of this error is that the SAS token used to access the Azure Blob Storage container has expired or is invalid. A SAS token is a shared access signature that grants limited access to a resource in Azure. You can generate a SAS token for your Azure Blob Storage container using the Azure portal, PowerShell, CLI, or SDK.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Trouble Connecting Adf to Github</title>
      <link>https://markallison.co.uk/blog/trouble-connecting-adf-to-github/</link>
      <pubDate>Fri, 31 Mar 2023 08:08:01 +0100</pubDate>
      <guid>https://markallison.co.uk/blog/trouble-connecting-adf-to-github/</guid>
      <description>&lt;p&gt;Hi there!&lt;/p&gt;
&lt;p&gt;I had a frustrating issue this week which had a very simple solution but it took me way too long to find it!&lt;/p&gt;
&lt;h2 id=&#34;problem&#34;&gt;Problem&lt;/h2&gt;
&lt;p&gt;As mentioned in my &lt;a href=&#34;../which-adf-runtime/&#34;&gt;previous article&lt;/a&gt;, I created a new resource group to demonstrate different Integration Runtimes with ADF. As part of this I tried to connect ADF to GitHub to source control the code and had real trouble.&lt;/p&gt;
&lt;p&gt;I&amp;rsquo;m using Microsoft Edge and I could connect to my repo but I got these errors:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Which ADF Integration Runtime for my workload?</title>
      <link>https://markallison.co.uk/blog/which-adf-runtime/</link>
      <pubDate>Wed, 29 Mar 2023 08:26:42 +0000</pubDate>
      <guid>https://markallison.co.uk/blog/which-adf-runtime/</guid>
      <description>&lt;h2 id=&#34;self-hosted-or-managed-virtual-network-for-adf&#34;&gt;Self Hosted or Managed Virtual Network for ADF?&lt;/h2&gt;
&lt;p&gt;I was recently asked which runtime would be better to run ADF pipelines in Azure; use Private Managed Endpoints with the Managed Virtual Network, or provision a Self-Hosted Integration Runtime on a Virtual Machine?&lt;/p&gt;
&lt;h3 id=&#34;paas-vs-iaas&#34;&gt;PaaS vs. IaaS&lt;/h3&gt;
&lt;p&gt;My default position on which technology to use is PaaS &lt;em&gt;where possible&lt;/em&gt;. Organisations should focus on providing value to their business, not micro-managing infrastructure. PaaS reduces the operational burden of managing infrastructure in most cases.&lt;/p&gt;</description>
    </item>
    <item>
      <title>How to Move a VM to Another Vnet in Azure</title>
      <link>https://markallison.co.uk/blog/move-vm-to-another-vnet/</link>
      <pubDate>Sun, 19 Mar 2023 09:20:12 +0000</pubDate>
      <guid>https://markallison.co.uk/blog/move-vm-to-another-vnet/</guid>
      <description>&lt;p&gt;Hello everyone,&lt;/p&gt;
&lt;p&gt;In this blog post, I want to share with you a problem that I faced this week with moving a VM from one vnet to another in Azure. It was not as easy as I expected and it required some downtime.&lt;/p&gt;
&lt;h2 id=&#34;the-problem&#34;&gt;The problem&lt;/h2&gt;
&lt;p&gt;I had a VM that needed to move to another vnet as part of organisational change.&lt;/p&gt;
&lt;p&gt;I thought it would be a simple task of creating a new network interface card (NIC) in the target vnet and attaching it to the VM. However, it seems that it&amp;rsquo;s not possible to create a NIC in another Vnet and attach it to a VM attached to a different vnet. Also, as you may know a VM must have at least one NIC attached at all times which must be connected to a vnet.&lt;/p&gt;</description>
    </item>
    <item>
      <title>The Importance of Testing Your Azure Backups</title>
      <link>https://markallison.co.uk/blog/vm-restore-failure/</link>
      <pubDate>Tue, 28 Feb 2023 10:37:04 +0000</pubDate>
      <guid>https://markallison.co.uk/blog/vm-restore-failure/</guid>
      <description>&lt;h2 id=&#34;my-recent-experience&#34;&gt;My recent experience&lt;/h2&gt;
&lt;p&gt;Disaster recovery testing is a critical aspect of any organization&amp;rsquo;s infrastructure. It is crucial to regularly test the resilience of your systems and make sure that they are properly backed up and can be restored in case of an emergency. Recently, a VM that had been restored as part of disaster recovery testing would not start but entered an infinite blue-screen boot loop.&lt;/p&gt;
&lt;figure&gt;
    &lt;img src=&#34;2023-02-10_10-30-17.jpg&#34; alt=&#34;&#34; /&gt;
    
      &lt;figcaption&gt;Blue screen loop&lt;/figcaption&gt;
    
&lt;/figure&gt;
  
&lt;h2 id=&#34;testing-backups&#34;&gt;Testing Backups&lt;/h2&gt;
&lt;p&gt;As part of disaster recovery resilience testing, I restored a virtual machine from &lt;strong&gt;Azure Recovery Services Vault&lt;/strong&gt;. The first test was done using the latest snapshot backup, and it took around two minutes to complete. However, when I checked the overview page for the virtual machine in the Azure portal, I noticed that the virtual machine agent status was not ready. This meant that I couldn&amp;rsquo;t connect to the VM, not even from within the virtual network.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Troubleshooting Get-AzVirtualNetwork</title>
      <link>https://markallison.co.uk/blog/get-azvirtualnetwork-error/</link>
      <pubDate>Mon, 16 Jan 2023 12:15:23 +0000</pubDate>
      <guid>https://markallison.co.uk/blog/get-azvirtualnetwork-error/</guid>
      <description>&lt;p&gt;Are you encountering the following error message when working with Azure in PowerShell and running the command Get-AzVirtualNetwork?&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code class=&#34;language-Get-AzVirtualNetwork:&#34; data-lang=&#34;Get-AzVirtualNetwork:&#34;&gt;&amp;#39;Microsoft.Azure.Management.Network.Models.SecurityRule&amp;#39;, 
on &amp;#39;T MaxInteger[T](System.Collections.Generic.IEnumerable`1[T])&amp;#39; 
violates the constraint of type &amp;#39;T&amp;#39;.
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;This error can be caused by an incompatibility between PowerShell 7 and the &lt;code&gt;Az&lt;/code&gt; Module and &lt;a href=&#34;https://github.com/Azure/azure-powershell/issues/18721&#34;&gt;incompatibilty with .NET 7&lt;/a&gt;. To fix this issue, try the following steps:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Upgrade to the latest versions of PowerShell 7 and the Az module.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;If the issue persists, remove all versions of the Az Module on your system by using the command &lt;code&gt;Uninstall-Module Az -AllVersions&lt;/code&gt;.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Adf Failed To Deactivate Trigger</title>
      <link>https://markallison.co.uk/blog/adf-failed-deactivate-trigger/</link>
      <pubDate>Mon, 09 Jan 2023 13:21:56 +0000</pubDate>
      <guid>https://markallison.co.uk/blog/adf-failed-deactivate-trigger/</guid>
      <description>&lt;p&gt;A colleague had an issue this week with Azure Data Factory (ADF) in that a change to a trigger could not be published. &amp;ldquo;Ah, I know what this is&amp;rdquo;, I thought. Those of you familiar with ADF will know that changes to published triggers cannot be made if the trigger is enabled.&lt;/p&gt;
&lt;h2 id=&#34;troubleshooting-steps&#34;&gt;Troubleshooting Steps&lt;/h2&gt;
&lt;p&gt;I began troubleshooting by first of all disabling the trigger. This also resulted in failure. I then proceeded to detach the trigger from the pipeline, copy out the JSON definition and then save and publish, but also got the same error.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Protect Your Kids Online</title>
      <link>https://markallison.co.uk/blog/protect-your-kids-online/</link>
      <pubDate>Fri, 28 Oct 2022 20:46:34 +0100</pubDate>
      <guid>https://markallison.co.uk/blog/protect-your-kids-online/</guid>
      <description>&lt;p&gt;As the &amp;ldquo;IT guy&amp;rdquo; I sometimes get asked how to protect kids online from malware and adult content. This article will show you how to easily implement a solution.&lt;/p&gt;
&lt;p&gt;I recently bought a new router so I could segment my home network and get prepared for FTTP internet, and I thought I&amp;rsquo;d share with you how I set it up to protect my family home. Maybe it will help you.&lt;/p&gt;</description>
    </item>
    <item>
      <title>How to Setup IPv6 with Pfsense</title>
      <link>https://markallison.co.uk/blog/setup-ipv6-pfsense-zen/</link>
      <pubDate>Sun, 23 Oct 2022 09:27:13 +0100</pubDate>
      <guid>https://markallison.co.uk/blog/setup-ipv6-pfsense-zen/</guid>
      <description>&lt;p&gt;In my previous post I &lt;a href=&#34;https://markallison.co.uk/blog/setup-ipv6-at-home/&#34;&gt;talked about what I learnt about IPv6&lt;/a&gt;. In this post I want to show you how easy it is to set up IPv6 using pfSense as the router, and Zen Internet (UK) as the ISP.&lt;/p&gt;
&lt;h2 id=&#34;request-ipv6-from-zen&#34;&gt;Request IPv6 from Zen&lt;/h2&gt;
&lt;p&gt;&lt;a href=&#34;mailto:ipv6@zen.co.uk&#34;&gt;Email Zen&lt;/a&gt; and ask for IPv6, and it should be ready the same day, excluding weekends.&lt;/p&gt;
&lt;p&gt;You will receive an email from them with information like this:&lt;/p&gt;</description>
    </item>
    <item>
      <title>I Set up IPv6 at Home</title>
      <link>https://markallison.co.uk/blog/setup-ipv6-at-home/</link>
      <pubDate>Sat, 01 Oct 2022 11:06:31 +0100</pubDate>
      <guid>https://markallison.co.uk/blog/setup-ipv6-at-home/</guid>
      <description>&lt;h2 id=&#34;ipv4&#34;&gt;IPv4&lt;/h2&gt;
&lt;p&gt;As you may already know &lt;a href=&#34;https://www.iana.org/&#34;&gt;IANA&lt;/a&gt;, the global Internet Assigned Numbers Authority, have exhausted the IPv4 address space.&lt;/p&gt;
&lt;p&gt;Today, we are forced to use Network Address Translation (NAT) for home and mobile environments to translate the public IP address given to us by our ISP to internal private non-routable v4 addresses on our home devices. This works but is messy and problems will only increase as the number of devices in the world grows. We have already run out of IPv4 address space and some ISPs are implementing horrible solutions to get round it by using things like carrier grade NAT (CGN).&lt;/p&gt;</description>
    </item>
    <item>
      <title>Sql Virtual Machine Race Conclusion</title>
      <link>https://markallison.co.uk/blog/sqliaas-race-conclusion/</link>
      <pubDate>Thu, 30 Jun 2022 16:28:59 +0100</pubDate>
      <guid>https://markallison.co.uk/blog/sqliaas-race-conclusion/</guid>
      <description>&lt;p&gt;A couple of months ago &lt;a href=&#34;https://markallison.co.uk/blog/sqliaas-problem/&#34;&gt;I wrote about&lt;/a&gt; a race condition in a &lt;a href=&#34;https://docs.microsoft.com/en-us/azure/azure-sql/virtual-machines/?view=azuresql&#34;&gt;SQL IaaS VM&lt;/a&gt; using the Azure sqlvm resource. I have been working with Microsoft and have come to a better resolution than placing tempdb on a separate remote drive as mentioned in that article.&lt;/p&gt;
&lt;h2 id=&#34;suggestion&#34;&gt;Suggestion&lt;/h2&gt;
&lt;p&gt;Microsoft suggested to change the startup type of the SQL Server service to Automatic (Delayed Start). I have now put this into the bicep template for both SQL Server and SQL Server Agent service.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Clear Msdb Backup History Safely</title>
      <link>https://markallison.co.uk/blog/clear-msdb-backup-history/</link>
      <pubDate>Fri, 10 Jun 2022 06:46:13 +0100</pubDate>
      <guid>https://markallison.co.uk/blog/clear-msdb-backup-history/</guid>
      <description>&lt;p&gt;I came across a situation this week where the &lt;strong&gt;msdb&lt;/strong&gt; database had grown to a large amount (130 GB). This is the largest I&amp;rsquo;ve ever seen msdb and is a result of no scheduled maintenance of the backup history for several years.&lt;/p&gt;
&lt;h2 id=&#34;msdbdbosp_delete_backuphistory&#34;&gt;msdb.dbo.sp_delete_backuphistory&lt;/h2&gt;
&lt;p&gt;Why not just run &lt;code&gt;msdb.dbo.sp_delete_backuphistory&lt;/code&gt; I hear you say?&lt;/p&gt;
&lt;p&gt;Well, when the history tables have over 100 million rows each and the database files are on the C drive, running this proc will require huge amounts of transaction log space. Each delete statement will be cleaning out millions of rows per table in a single transaction.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Sql Virtual Machine Race Condition</title>
      <link>https://markallison.co.uk/blog/sqliaas-problem/</link>
      <pubDate>Tue, 12 Apr 2022 07:54:52 +0000</pubDate>
      <guid>https://markallison.co.uk/blog/sqliaas-problem/</guid>
      <description>&lt;p&gt;I&amp;rsquo;ve been having problems deploying a Sql Virtual Machine in Azure lately and decided to perform some tests to get to the bottom of the issue. I&amp;rsquo;d like to share some strange behaviour.&lt;/p&gt;
&lt;h2 id=&#34;problem&#34;&gt;Problem&lt;/h2&gt;
&lt;p&gt;If I deploy a new SQL VM using bicep, it deploys fine. If however, I redeploy the same VM the deployment fails with this error:&lt;/p&gt;
&lt;div class=&#34;admonition admonition-failure&#34;&gt;
  &lt;p class=&#34;admonition-title&#34;&gt;
      Ext_AutomatedBackupError 
  &lt;/p&gt;
  &lt;div class=&#34;admonition-content&#34;&gt;
    
* code: **Ext_AutomatedBackupError**
* Error: **Execution Timeout Expired**.  The timeout period elapsed prior to completion of the operation or the server is not responding.;System.Data.SqlClient.SqlException (0x80131904): Execution Timeout Expired.  The timeout period elapsed prior to completion of the operation or the server is not responding. ---&gt; System.ComponentModel.Win32Exception (0x80004005): The wait operation timed out.

  &lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;In the SQL Server ERRORLOG on the VM:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Where to store Azure Pipelines Variables?</title>
      <link>https://markallison.co.uk/blog/azure-pipelines-variables/</link>
      <pubDate>Fri, 04 Mar 2022 07:30:29 +0000</pubDate>
      <guid>https://markallison.co.uk/blog/azure-pipelines-variables/</guid>
      <description>&lt;h2 id=&#34;question&#34;&gt;Question&lt;/h2&gt;
&lt;p&gt;Where should variables be stored for deploying &lt;em&gt;infrastructure-as-code&lt;/em&gt; in Azure DevOps pipelines to Azure? Resources need to be deployed to different regions and environments, and attributes for these need to be stored somewhere.&lt;/p&gt;
&lt;h2 id=&#34;options&#34;&gt;Options&lt;/h2&gt;
&lt;p&gt;Six options spring to mind.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;&lt;a href=&#34;https://docs.microsoft.com/en-us/azure/azure-resource-manager/templates/parameter-files&#34;&gt;Parameter files&lt;/a&gt;&lt;/strong&gt;. Seems like the obvious choice.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;a href=&#34;https://docs.microsoft.com/en-us/azure/azure-resource-manager/templates/parameters#default-value&#34;&gt;Template file defaults&lt;/a&gt;&lt;/strong&gt; in &lt;code&gt;azuredeploy.json&lt;/code&gt; or &lt;code&gt;main.bicep&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;a href=&#34;https://docs.microsoft.com/en-us/azure/devops/pipelines/library/variable-groups?view=azure-devops&amp;amp;tabs=yaml&#34;&gt;Azure DevOps Library&lt;/a&gt;&lt;/strong&gt; variable groups. Seems good, a single place&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;a href=&#34;https://docs.microsoft.com/en-us/azure/devops/pipelines/process/variables?view=azure-devops&amp;amp;tabs=yaml%2Cbatch&#34;&gt;Azure Pipelines variables&lt;/a&gt;&lt;/strong&gt; in individual pipelines&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;a href=&#34;https://docs.microsoft.com/en-us/azure/azure-resource-manager/bicep/bicep-functions-files#loadtextcontent&#34;&gt;Configuration file&lt;/a&gt;&lt;/strong&gt; within the project source code&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;a href=&#34;https://docs.microsoft.com/en-us/azure/devops/pipelines/process/runtime-parameters?view=azure-devops&amp;amp;tabs=script&#34;&gt;Runtime parameters&lt;/a&gt;&lt;/strong&gt; for setting values at run time&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Let&amp;rsquo;s go through each option and then discuss my preferred approach.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Automate Setting the SqlIaaS Backup Container</title>
      <link>https://markallison.co.uk/blog/sqliaas-backup-container/</link>
      <pubDate>Fri, 25 Feb 2022 12:36:08 +0000</pubDate>
      <guid>https://markallison.co.uk/blog/sqliaas-backup-container/</guid>
      <description>&lt;p&gt;Even though Microsoft offer Azure Sql Database and Azure Sql Managed Instance, there are occasions when SQL Server in a VM is required.&lt;/p&gt;
&lt;h2 id=&#34;the-sqliaas-azure-resource&#34;&gt;The SqlIaaS Azure Resource&lt;/h2&gt;
&lt;p&gt;If you&amp;rsquo;ve read my posts before you will know that I deploy resources to the cloud using infrastructure-as-code, with my preferred language being bicep. As a lazy developer, I like to use built-in offerings and PaaS wherever possible. For SQL server on VMs in Azure, the resource &lt;code&gt;Microsoft.SqlVirtualMachine/sqlVirtualMachines&lt;/code&gt; is great.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Sql Server SPID -5</title>
      <link>https://markallison.co.uk/blog/sql-spid-5/</link>
      <pubDate>Wed, 23 Feb 2022 10:39:18 +0000</pubDate>
      <guid>https://markallison.co.uk/blog/sql-spid-5/</guid>
      <description>&lt;p&gt;I had an interesting issue today when a colleague was running a long running IO intensive query. I ran &lt;code&gt;sp_who2&lt;/code&gt; to view the activity and saw that the query was running multi-threaded, but was blocked by a SPID of -5.&lt;/p&gt;
&lt;p&gt;Yes, that&amp;rsquo;s SPID minus five, or negative five. (putting this here so that google searches maybe work?).&lt;/p&gt;
&lt;figure&gt;
    &lt;img src=&#34;2022-02-21_15-28-35.jpg&#34; alt=&#34;&#34; /&gt;
    
      &lt;figcaption&gt;blocking SPID -5&lt;/figcaption&gt;
    
&lt;/figure&gt;
  
&lt;h2 id=&#34;google-not-working&#34;&gt;Google not working&lt;/h2&gt;
&lt;p&gt;I tried to use Google to get information on this but it seems that Google doesn&amp;rsquo;t allow you to search for negative numbers. So searching for &lt;code&gt;SPID -5&lt;/code&gt; doesn&amp;rsquo;t show any decent information to understand what&amp;rsquo;s going on.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Run DBCC CHECKDB?</title>
      <link>https://markallison.co.uk/blog/sqlmi-checkdb/</link>
      <pubDate>Wed, 16 Feb 2022 09:20:58 +0000</pubDate>
      <guid>https://markallison.co.uk/blog/sqlmi-checkdb/</guid>
      <description>&lt;p&gt;As a standard practise for IaaS and on-premises SQL Servers, I usually like to install &lt;a href=&#34;https://ola.hallengren.com/sql-server-integrity-check.html&#34;&gt;Ola Hallengren&amp;rsquo;s maintenance scripts&lt;/a&gt;. Why invent the wheel when we already have a super-shiny one? These scripts include integrity checks, which run DBCC CHECKDB.&lt;/p&gt;
&lt;h2 id=&#34;is-dbcc-checkdb-needed-anymore&#34;&gt;Is DBCC CHECKDB needed anymore?&lt;/h2&gt;
&lt;p&gt;It depends. 😉&lt;/p&gt;
&lt;p&gt;It comes down to a cost/benefit analysis.&lt;/p&gt;
&lt;p&gt;I have been working with Sql Managed Instances quite closely over the past couple of years and wondered whether DBCC CHECKDB needs to be run on these. The whole point of CHECKDB is to notify us that something is wrong but also to &lt;em&gt;do something&lt;/em&gt; if the database becomes corrupt in some way. They are very IO intensive operations which can impact user queries on the server.&lt;/p&gt;</description>
    </item>
    <item>
      <title>What-If In Production</title>
      <link>https://markallison.co.uk/blog/powershell-what-if/</link>
      <pubDate>Wed, 26 Jan 2022 09:59:06 +0000</pubDate>
      <guid>https://markallison.co.uk/blog/powershell-what-if/</guid>
      <description>&lt;p&gt;What if you could do a dry run of your PowerShell script when making a change to your production environment?&lt;/p&gt;
&lt;p&gt;If you&amp;rsquo;ve read my other posts, you will know I am a big advocate of &lt;em&gt;infrastructure-as-code&lt;/em&gt;. Most of my work is done in the Microsoft Azure cloud, and although I encourage source controlling all assets within Azure, sometimes developers create things manually through the portal.&lt;/p&gt;
&lt;p&gt;Yes, I know! 🙄&lt;/p&gt;
&lt;h2 id=&#34;removing-azure-resources-safely&#34;&gt;Removing Azure Resources safely&lt;/h2&gt;
&lt;p&gt;A scheduled drift report should alert developers or DevOps engineers that the production state is out-of-sync with the source controlled code. If this happens, and some resources need removing, then the &lt;code&gt;-WhatIf&lt;/code&gt; switch comes in handy and provides confidence to remove items in production that shouldn&amp;rsquo;t be there.&lt;/p&gt;</description>
    </item>
    <item>
      <title>ADF HTTP/3 Issue</title>
      <link>https://markallison.co.uk/blog/adf-https3-issue/</link>
      <pubDate>Tue, 30 Nov 2021 07:44:13 +0000</pubDate>
      <guid>https://markallison.co.uk/blog/adf-https3-issue/</guid>
      <description>&lt;p&gt;One of my ADF pipelines started failing recently where a Generic REST API Linked Service gave the following error:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;525: SSL handshake failed&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Digging deeper into the logs, I see a message from Cloudflare.&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;It appears that the SSL configuration used is not compatible with Cloudflare. This could happen for a several reasons, including no shared cipher suites.
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;http3-quic&#34;&gt;HTTP/3 QUIC&lt;/h2&gt;
&lt;p&gt;There had been no code changes in ADF, but something on the source side had changed. After working with the data provider, it turns out that Cloudflare was using HTTP/3 which causes the ADF connection to fail.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Windows Terminal</title>
      <link>https://markallison.co.uk/blog/windows-terminal/</link>
      <pubDate>Wed, 13 Oct 2021 13:06:22 +0100</pubDate>
      <guid>https://markallison.co.uk/blog/windows-terminal/</guid>
      <description>&lt;p&gt;Windows Terminal was released in 2019 for Windows 10 on the Microsoft Store, and I only just found out about it. Not sure why I&amp;rsquo;ve been living under a rock all this time, but I&amp;rsquo;m absolutely loving this app.&lt;/p&gt;
&lt;p&gt;I found out about it after playing around with the GA release of Windows 11 last week and noticed that Windows Terminal was installed as part of the default build of the Windows 11 Pro edition.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Grant User JIT Access</title>
      <link>https://markallison.co.uk/blog/grant-user-jit/</link>
      <pubDate>Mon, 27 Sep 2021 10:28:47 +0100</pubDate>
      <guid>https://markallison.co.uk/blog/grant-user-jit/</guid>
      <description>&lt;p&gt;An issue came up this week where some external consultants needed access to remote onto an Azure Windows VM to configure a third-party application. The consultants were given AAD logins and are working from home with dynamic IP addresses.&lt;/p&gt;
&lt;p&gt;What is the best way to grant them access to RDP onto the VM?&lt;/p&gt;
&lt;p&gt;The preferred method would be via a private endpoint into the VNet via point-to-site VPN or Bastion, but external consultants can&amp;rsquo;t be granted access that way.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Connect to SQLMI with Managed Identity</title>
      <link>https://markallison.co.uk/blog/connect-mi-with-managedidentity/</link>
      <pubDate>Wed, 11 Aug 2021 15:42:06 +0100</pubDate>
      <guid>https://markallison.co.uk/blog/connect-mi-with-managedidentity/</guid>
      <description>&lt;p&gt;Consider the scenario where some PowerShell scripts need to be scheduled on an Azure virtual machine, which connects to an Azure SQL Managed Instance.&lt;/p&gt;
&lt;p&gt;The PowerShell script needs to run on a schedule and must be able to connect to the managed instance securely. You would rather not have to manage passwords.&lt;/p&gt;
&lt;p&gt;What&amp;rsquo;s the best way to do this? You guessed it, &lt;strong&gt;Managed Identity&lt;/strong&gt;. This post will describe two ways of doing it, one using Azure AD with a Managed Identity and one using SQL Authentication and Azure Key Vault using a &lt;strong&gt;Service Principal&lt;/strong&gt;.&lt;/p&gt;</description>
    </item>
    <item>
      <title>SQL Managed Instance Server Audit Fails</title>
      <link>https://markallison.co.uk/blog/mi-server-audit-fails/</link>
      <pubDate>Thu, 05 Aug 2021 08:56:42 +0100</pubDate>
      <guid>https://markallison.co.uk/blog/mi-server-audit-fails/</guid>
      <description>&lt;p&gt;I have set up server auditing for some managed instances in the same virtual cluster to record login success and failed events and write them to blob storage.&lt;/p&gt;
&lt;p&gt;Downstream, an ADF pipeline reads the events asynchronously and inserts them into a database for further analysis and reporting.&lt;/p&gt;
&lt;h2 id=&#34;server-audit-stops-writing&#34;&gt;Server audit stops writing&lt;/h2&gt;
&lt;p&gt;Recently the server audit stopped writing to blob storage, even though the server audit status was still running and enabled. I have seen failures before where the server audit failed because of an expiring SAS token, but in this case the SAS token has a long expiry date, so know it&amp;rsquo;s not that.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Bicep Resource Not Found</title>
      <link>https://markallison.co.uk/blog/bicep-resource-not-found/</link>
      <pubDate>Thu, 22 Jul 2021 10:02:11 +0100</pubDate>
      <guid>https://markallison.co.uk/blog/bicep-resource-not-found/</guid>
      <description>&lt;h2 id=&#34;bicep-stopped-deploying-with-this-error&#34;&gt;Bicep stopped deploying with this error&lt;/h2&gt;
&lt;p&gt;I&amp;rsquo;m trying to deploy a resource group which has two storage accounts in it with this PowerShell command using a bicep template:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-PowerShell&#34; data-lang=&#34;PowerShell&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nb&#34;&gt;New-AzResourceGroupDeployment&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;-ResourceGroupName&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;$resourcegroupName&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;-TemplateFile&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;.\&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;azuredeploy&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;py&#34;&gt;bicep&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;-TemplateParameterFile&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;.\&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;azuredeploy&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;py&#34;&gt;test&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;py&#34;&gt;parameters&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;py&#34;&gt;json&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&#34;admonition admonition-failure&#34;&gt;
  &lt;p class=&#34;admonition-title&#34;&gt;
      Error 
  &lt;/p&gt;
  &lt;div class=&#34;admonition-content&#34;&gt;
    
New-AzResourceGroupDeployment: Cannot retrieve the dynamic parameters for the cmdlet. Build succeeded: 0 Warning(s), 0 Error(s)

  &lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;I haven&amp;rsquo;t made any code changes, just not deployed this resource for a while. I decided to update bicep to the latest version (at the time of writing is Bicep CLI version 0.4.412 (f1169d063e)).&lt;/p&gt;</description>
    </item>
    <item>
      <title>Minimum data file size on MI is 128 GB!</title>
      <link>https://markallison.co.uk/blog/mi-exceeds-storage-account-size/</link>
      <pubDate>Mon, 10 May 2021 17:15:11 +0100</pubDate>
      <guid>https://markallison.co.uk/blog/mi-exceeds-storage-account-size/</guid>
      <description>&lt;h2 id=&#34;storage-underlying-a-managed-instance&#34;&gt;Storage underlying a Managed Instance&lt;/h2&gt;
&lt;p&gt;Microsoft Azure should not require you to have deep understanding of the underlying technologies used to provide the service, after all the whole point of PaaS is to abstract you away from implementation details. One of these details is storage of data files in the file system.&lt;/p&gt;
&lt;p&gt;When provisioning a General Tier Sql Managed Instance, the maximum storage size for the instance is capped at 8 TB. However this is not the whole story and it&amp;rsquo;s important to understand some of what is happening under the covers, especially if you are migrating an on-premises SQL Server instance to the cloud that contains a lot of databases or uses partitioning.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Deployments with Bicep and Azure DevOps</title>
      <link>https://markallison.co.uk/blog/deploy-bicep-with-azure-devops/</link>
      <pubDate>Sun, 11 Apr 2021 21:08:20 +0100</pubDate>
      <guid>https://markallison.co.uk/blog/deploy-bicep-with-azure-devops/</guid>
      <description>&lt;h2 id=&#34;goodbye-json&#34;&gt;Goodbye JSON&lt;/h2&gt;
&lt;p&gt;Since Microsoft released &lt;a href=&#34;https://github.com/Azure/bicep&#34;&gt;bicep version 0.3&lt;/a&gt; I thought I&amp;rsquo;d give it a try because anyone that&amp;rsquo;s authored ARM templates will know, they tend to make your eyes bleed after a while.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Bicep aims to drastically simplify the authoring experience with a cleaner syntax, improved type safety, and better support for modularity and code re-use.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;I&amp;rsquo;m sold!&lt;/p&gt;
&lt;p&gt;I reverse-engineered an existing simple template that deploys two storage accounts by using &lt;code&gt;bicep decompile&lt;/code&gt; and got a template like this:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Sql Comments Style</title>
      <link>https://markallison.co.uk/blog/sql-comments-style/</link>
      <pubDate>Tue, 06 Apr 2021 17:42:16 +0100</pubDate>
      <guid>https://markallison.co.uk/blog/sql-comments-style/</guid>
      <description>&lt;h2 id=&#34;should-we-stop-using----in-sql-comments&#34;&gt;Should we stop using &lt;code&gt;--&lt;/code&gt; in SQL comments?&lt;/h2&gt;
&lt;p&gt;Interesting blog post from &lt;a href=&#34;https://www.brentozar.com/archive/2021/04/never-ever-ever-start-t-sql-comments-with-two-dashes/&#34;&gt;Brent Ozar&lt;/a&gt; on whether we should stop using &lt;code&gt;--&lt;/code&gt; for SQL Comments. I use these comments a lot because they are quick and easy for me to type. I don&amp;rsquo;t like voluminous comments but this is a good point.&lt;/p&gt;
&lt;p&gt;If clicking the link is too much effort for you, he is saying you should do this&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-tsql&#34; data-lang=&#34;tsql&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;SELECT&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;*&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;FROM&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;dbo&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Users&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;WHERE&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;DisplayName&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;N&lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;Brent Ozar&amp;#39;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;&lt;/span&gt;&lt;span class=&#34;cm&#34;&gt;/* This line is a comment */&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;&lt;/span&gt;&lt;span class=&#34;ow&#34;&gt;AND&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Location&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;N&lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;Iceland&amp;#39;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;w&#34;&gt;&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;ORDER&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;BY&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Reputation&lt;/span&gt;&lt;span class=&#34;w&#34;&gt; &lt;/span&gt;&lt;span class=&#34;k&#34;&gt;DESC&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&lt;span class=&#34;w&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;instead of this&lt;/p&gt;</description>
    </item>
    <item>
      <title>Submit PRs</title>
      <link>https://markallison.co.uk/blog/submit-prs/</link>
      <pubDate>Wed, 24 Mar 2021 10:58:39 +0000</pubDate>
      <guid>https://markallison.co.uk/blog/submit-prs/</guid>
      <description>&lt;h2 id=&#34;found-an-error-in-microsoft-documentation&#34;&gt;Found an error in Microsoft documentation?&lt;/h2&gt;
&lt;p&gt;Submit a pull request!&lt;/p&gt;
&lt;p&gt;Much of the Microsoft documentation is open source on GitHub which means that if you spot an error in either the code examples, the grammar, spelling, a typo or copy-and-paste error, you can quickly fix it and people reading the docs after you will benefit. This is such a difference from when I started using Microsoft products back in the 90s where nothing was open source and all documentation was either in a printed manual or a &lt;a href=&#34;https://en.wikipedia.org/wiki/Microsoft_Compiled_HTML_Help&#34;&gt;chm file&lt;/a&gt;.&lt;/p&gt;</description>
    </item>
    <item>
      <title>⚠ Careful with Maintenance Window</title>
      <link>https://markallison.co.uk/blog/managedinstance-maintenancewindow/</link>
      <pubDate>Fri, 19 Mar 2021 13:41:54 +0000</pubDate>
      <guid>https://markallison.co.uk/blog/managedinstance-maintenancewindow/</guid>
      <description>&lt;h2 id=&#34;maintenance-window-now-in-preview&#34;&gt;Maintenance Window now in Preview&lt;/h2&gt;
&lt;p&gt;(at the time of writing)&lt;/p&gt;
&lt;p&gt;On 2nd March 2021, &lt;a href=&#34;https://techcommunity.microsoft.com/t5/azure-sql/maintenance-window-for-azure-sql-database-and-managed-instance/ba-p/2174835&#34;&gt;Microsoft announced&lt;/a&gt; a long-awaited feature, at least by me, to give choice over when OS and SQL patching occurs behind-the-scenes in Azure SQL Managed Instance. Before this feature, Microsoft would patch the Virtual Cluster supporting Managed Instances outside of regular business hours in the region your Managed Instance is located.&lt;/p&gt;
&lt;p&gt;You now get &lt;strong&gt;two&lt;/strong&gt; additional options:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Weekday window, 10PM to 6AM local time Monday – Thursday&lt;/li&gt;
&lt;li&gt;Weekend window, 10PM to 6AM local time Friday - Sunday&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;System default:&lt;/p&gt;</description>
    </item>
    <item>
      <title>EXECUTE denied on Managed Instance</title>
      <link>https://markallison.co.uk/blog/regread-failure-on-mi/</link>
      <pubDate>Wed, 17 Mar 2021 12:20:04 +0000</pubDate>
      <guid>https://markallison.co.uk/blog/regread-failure-on-mi/</guid>
      <description>&lt;h2 id=&#34;the-problem&#34;&gt;The problem&lt;/h2&gt;
&lt;p&gt;I came across an interesting (!) issue with an Azure Sql Managed Instance today. One of our users came across this error when trying to &lt;code&gt;SELECT&lt;/code&gt; from a view in a database where they are not a member of the &lt;code&gt;db_owner&lt;/code&gt; database role or any elevated server-level permission by right clicking the view in SSMS 18.8 and choosing &lt;strong&gt;Select Top 1000 Rows&lt;/strong&gt;.&lt;/p&gt;
&lt;figure&gt;
    &lt;img src=&#34;2021-03-17_11-40-04.png&#34; alt=&#34;&#34; /&gt;
    
      &lt;figcaption&gt;Select Top 1000 Rows in SSMS&lt;/figcaption&gt;
    
&lt;/figure&gt;
  
&lt;figure&gt;
    &lt;img src=&#34;2021-03-17_11-40-44.png&#34; alt=&#34;&#34; /&gt;
    
      &lt;figcaption&gt;EXECUTE denied on xp_instance_reg_read in mssqlsystemresource&lt;/figcaption&gt;
    
&lt;/figure&gt;
  
&lt;p&gt;The full text of the error is &lt;code&gt;The EXECUTE permission was denied on the object &#39;xp_instance_regread&#39;, database &#39;mssqlsystemresource&#39;, schema &#39;sys&#39;.&lt;/code&gt;
I verified that this was indeed the case with:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Az.Sql Module won&#39;t load</title>
      <link>https://markallison.co.uk/blog/az-sql-module/</link>
      <pubDate>Tue, 16 Mar 2021 18:17:22 +0000</pubDate>
      <guid>https://markallison.co.uk/blog/az-sql-module/</guid>
      <description>&lt;p&gt;Today, the &lt;code&gt;Az.Sql&lt;/code&gt; module would not load on my machine when attempting to manually fail over a SQL Managed Instance with this error:&lt;/p&gt;
&lt;figure&gt;
    &lt;img src=&#34;2021-03-16_18-19-15.png&#34; alt=&#34;&#34; /&gt;
    
      &lt;figcaption&gt;module could not be loaded&lt;/figcaption&gt;
    
&lt;/figure&gt;
  
&lt;p&gt;I followed the advice of the error message and tried to import the module to get further information.&lt;/p&gt;
&lt;figure&gt;
    &lt;img src=&#34;2021-03-16_18-19-54.png&#34; alt=&#34;&#34; /&gt;
    
      &lt;figcaption&gt;module is already loaded&lt;/figcaption&gt;
    
&lt;/figure&gt;
  
&lt;p&gt;Hmmm :thinking:&lt;/p&gt;
&lt;p&gt;I decided to uninstall the Azure PowerShell from my machine using the Windows 10 Settings App. Looks like an old version.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Loving Hugo</title>
      <link>https://markallison.co.uk/blog/loving-hugo/</link>
      <pubDate>Mon, 15 Mar 2021 12:02:11 +0000</pubDate>
      <guid>https://markallison.co.uk/blog/loving-hugo/</guid>
      <description>&lt;h2 id=&#34;hugo-is-great&#34;&gt;Hugo is great&lt;/h2&gt;
&lt;p&gt;Even though I&amp;rsquo;m late to the party, having not blogged for a while (see my older posts &lt;a href=&#34;https://sabin.io/blog/author/Mark%20Allison&#34;&gt;here&lt;/a&gt;), I came across a bug in Hugo today. To get a little bit more performance from my site I decided to use the &lt;code&gt;--minify&lt;/code&gt; option in the &lt;code&gt;hugo&lt;/code&gt; command for the &lt;code&gt;production&lt;/code&gt; build on netlify&amp;rsquo;s build server in &lt;code&gt;netlify.toml&lt;/code&gt; as you can see &lt;a href=&#34;https://github.com/markallisongit/blog/blob/f21a89b727b2d2f84d0dc54ea0724d61e3adf9f8/netlify.toml#L3&#34;&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;My navbar didn&amp;rsquo;t have icons in it before, and I thought it would look nicer with some icons added. On my local server it looked fine:&lt;/p&gt;</description>
    </item>
    <item>
      <title>New Blog</title>
      <link>https://markallison.co.uk/blog/new-blog/</link>
      <pubDate>Sun, 07 Mar 2021 17:30:59 +0000</pubDate>
      <guid>https://markallison.co.uk/blog/new-blog/</guid>
      <description>&lt;h2 id=&#34;built-with-hugo&#34;&gt;Built with Hugo&lt;/h2&gt;
&lt;style&gt;
    ZgotmplZ
  &lt;/style&gt;
  
&lt;p&gt;I&amp;rsquo;ve moved away from Wordpress as it was getting bloated, complicated to manage and expensive to host. I wanted something that was&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;fast&lt;/li&gt;
&lt;li&gt;easy to use&lt;/li&gt;
&lt;li&gt;cheap to host&lt;/li&gt;
&lt;li&gt;source controlled&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;I can now write blog posts in &lt;a href=&#34;https://www.markdownguide.org/&#34;&gt;markdown&lt;/a&gt; in &lt;a href=&#34;https://code.visualstudio.com/&#34;&gt;vscode&lt;/a&gt; and then push my changes to GitHub which lets me have a history, I can edit from anywhere by pulling and pushing from any machine, even my phone.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Using a Cloud Witness for Clusters</title>
      <link>https://markallison.co.uk/blog/using-a-cloud-witness-for-clusters/</link>
      <pubDate>Fri, 08 Jun 2018 10:28:43 +0000</pubDate>
      <guid>https://markallison.co.uk/blog/using-a-cloud-witness-for-clusters/</guid>
      <description>&lt;p&gt;On a client site recently a question was asked about the file share witness in a SQL Server failover cluster on-premises, and where to put it if you only have two sites. As always, it depends! Let’s look at some scenarios. Bear in mind that use of the Azure Cloud Witness requires Windows Server 2016 or later.&lt;/p&gt;
&lt;h2 id=&#34;topology-1&#34;&gt;Topology 1&lt;/h2&gt;
&lt;h4 id=&#34;three-node-cluster-with-2-nodes-at-primary-and-1-at-disaster-recovery-dr&#34;&gt;Three node cluster with 2 nodes at primary and 1 at disaster recovery (DR)&lt;/h4&gt;
&lt;p&gt;Most people want high availability at their “primary site” and are happy to have standalone capability at the business continuity (DR) site. To save storage costs, I would recommend a SQL Server failover clustered instance so you only have one set of storage at the primary site. On top of that you can place an availability group in asynchronous mode to a standalone server at your DR site. In this configuration there are several scenarios to consider, and they can all be served with a file share witness at the primary site, or use a cloud witness in azure.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Hardening Sentry One for Security</title>
      <link>https://markallison.co.uk/blog/hardening-sentry-one-for-security/</link>
      <pubDate>Fri, 27 Apr 2018 11:04:16 +0000</pubDate>
      <guid>https://markallison.co.uk/blog/hardening-sentry-one-for-security/</guid>
      <description>&lt;p&gt;If you have an environment where you need to lock down Sentry One as much as possible, then this article should help. It is well known that the Sentry One service account needs to be a member of the &lt;code&gt;Local Administrators&lt;/code&gt; group in each server it monitors, and also a member of the &lt;code&gt;sysadmin&lt;/code&gt; role for each SQL Server instance. At the moment this is still a requirement, but if you can live without the Windows metrics, then you could run Sentry One in &lt;strong&gt;Limited Mode&lt;/strong&gt; which will only gather SQL Server specific metrics. Some of our clients run in this configuration for security reasons.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Automating Sql Server Performance Testing</title>
      <link>https://markallison.co.uk/blog/automating-sql-server-performance-testing/</link>
      <pubDate>Sun, 15 Apr 2018 14:01:48 +0000</pubDate>
      <guid>https://markallison.co.uk/blog/automating-sql-server-performance-testing/</guid>
      <description>&lt;p&gt;You run performance tests as well as functional tests when deploying new code changes to SQL Server, right? Not many people do, I think you should, and this article will show you how to do it by harnessing an existing performance tool, rather than writing your own monitoring infrastructure from scratch.&lt;/p&gt;
&lt;p&gt;Any good performance monitoring tool that records information to a database will do fine, and we prefer to use &lt;strong&gt;Sentry One&lt;/strong&gt;.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Running a Sql Server Workload Using Powershell</title>
      <link>https://markallison.co.uk/blog/running-a-sql-server-workload-using-powershell/</link>
      <pubDate>Thu, 15 Feb 2018 14:41:18 +0000</pubDate>
      <guid>https://markallison.co.uk/blog/running-a-sql-server-workload-using-powershell/</guid>
      <description>&lt;p&gt;In February 2018, myself and Paul Anderton gave a presentation on how to correlate database deployments with performance issues within the context of a DevOps pipeline. We used Sentry One as our monitoring tool in a Performance Test environment so that we could catch badly performing deployments before they got to production and caused havoc. If you would like to see the recorded video, then you can download it from here: &lt;a href=&#34;http://info.sentryone.com/partner-webinar-performance-problems&#34;&gt;http://info.sentryone.com/partner-webinar-performance-problems&lt;/a&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>Visual Studio Code Extensions and Settings</title>
      <link>https://markallison.co.uk/blog/visual-studio-code-extensions-and-settings/</link>
      <pubDate>Sun, 04 Feb 2018 15:09:11 +0000</pubDate>
      <guid>https://markallison.co.uk/blog/visual-studio-code-extensions-and-settings/</guid>
      <description>&lt;p&gt;I primarily work in &lt;strong&gt;Visual Studio 2017&lt;/strong&gt; and &lt;strong&gt;Visual Studio Code&lt;/strong&gt;, using VS2017 for SSDT work, and VS Code for pretty much everything else. VS code is highly configurable, and as it’s a rainy Sunday, I thought I’d share my settings with you in case you are interested. A few colleagues at work have asked me what extensions and settings I have so, here they are as of Feb 2018.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Automating Adding Servers to Sentry One</title>
      <link>https://markallison.co.uk/blog/automating-adding-servers-to-sentry-one/</link>
      <pubDate>Mon, 20 Nov 2017 15:20:19 +0000</pubDate>
      <guid>https://markallison.co.uk/blog/automating-adding-servers-to-sentry-one/</guid>
      <description>&lt;h2 id=&#34;overview&#34;&gt;Overview&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Sentry One&lt;/strong&gt; is a great tool for monitoring many servers. For new installations, it can be a bit of a bind to add your existing servers into the tool to be monitored. I have written a PowerShell module to make this much easier and to validate that servers that you thought were being monitored, are in fact monitored.&lt;/p&gt;
&lt;p&gt;There is full documentation for the module in the Sentry One user guide which explains how to use the functions within it, but a brief explanation is shown below. it is worth mentioning that all the PowerShell cmdlets are doing is calling the SentryOne compiled PowerShell module provided when you install SentryOne.&lt;/p&gt;</description>
    </item>
    <item>
      <title>How to Check Sentry One Requirements</title>
      <link>https://markallison.co.uk/blog/how-to-check-sentry-one-requirements/</link>
      <pubDate>Sun, 12 Nov 2017 15:37:18 +0000</pubDate>
      <guid>https://markallison.co.uk/blog/how-to-check-sentry-one-requirements/</guid>
      <description>&lt;p&gt;I was at a client site recently and implemented Sentry One for them, a great monitoring system for SQL Server. It proved challenging because some servers were in a DMZ on a separate network and domain and some servers were in the same domain. All servers connected via a router and were firewalled off from each other with only the minimum ports open required for them to fully function and communicate.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Running Sql Server in an Azure Container Instance</title>
      <link>https://markallison.co.uk/blog/running-sql-server-in-an-azure-container-instance/</link>
      <pubDate>Tue, 24 Oct 2017 15:50:31 +0000</pubDate>
      <guid>https://markallison.co.uk/blog/running-sql-server-in-an-azure-container-instance/</guid>
      <description>&lt;p&gt;Azure Container Instances are still in Preview and not officially available for Windows yet, which made me smile. It took me a while to figure out how to get this working so I thought I’d share what I’ve found. Containers are great for lightweight testing of code before deployment to production servers because they can be created so quickly and they give the same environment to test in very reliably. Now that Microsoft is offering container instances in Azure it means you don’t have to worry about provisioning and configuring your own docker host/cluster. The options for deploying SQL Server are really getting large now, look at this list below!&lt;/p&gt;</description>
    </item>
    <item>
      <title>CI With Jenkins, Sql Server and Windows Containers</title>
      <link>https://markallison.co.uk/blog/continuous-integration-with-jenkins-sql-server-and-windows-containers/</link>
      <pubDate>Sun, 27 Aug 2017 16:20:35 +0000</pubDate>
      <guid>https://markallison.co.uk/blog/continuous-integration-with-jenkins-sql-server-and-windows-containers/</guid>
      <description>&lt;h2 id=&#34;why-use-windows-containers&#34;&gt;Why use Windows Containers?&lt;/h2&gt;
&lt;p&gt;When creating database applications we need consistency in all our environments to ensure quality releases. Traditionally developers might have their own instance of SQL Server on their workstation to develop against. Database projects would be created in SSDT and pushed to source control when ready for testing. If you’re not using SSDT for database development already, then you should seriously consider it to make your life easier and increase the quality of your releases. &lt;a href=&#34;https://the.agilesql.club/&#34;&gt;Ed Elliot&lt;/a&gt; explains why in &lt;a href=&#34;https://the.agilesql.club/2016/01/what-is-ssdt-all-about-aka-why-should-i-bother/&#34;&gt;this blog post&lt;/a&gt;.&lt;/p&gt;</description>
    </item>
    <item>
      <title>How to Install Sql Server on Windows Server Core</title>
      <link>https://markallison.co.uk/blog/how-to-install-sql-server-on-windows-server-core/</link>
      <pubDate>Thu, 20 Jul 2017 16:54:52 +0000</pubDate>
      <guid>https://markallison.co.uk/blog/how-to-install-sql-server-on-windows-server-core/</guid>
      <description>&lt;p&gt;As part of automation of database and application deployments, it makes sense to be able to create new SQL Server instances quickly and with minimal resources. I have already explored containers and written about it on this blog, but I’d like to turn your attention to setting up SQL Server on Windows Server Core for those of you that run SQL Server on-premise or within VMs in the cloud.&lt;/p&gt;
&lt;p&gt;In a domain environment it should be pretty simple to just create a PowerShell session to your target Windows Server where your account is a local administrator and then simply run setup at the command line to install SQL Server, right?&lt;/p&gt;</description>
    </item>
    <item>
      <title>When to Use Cmdletbinding in Powershell</title>
      <link>https://markallison.co.uk/blog/when-to-use-cmdletbinding-in-powershell/</link>
      <pubDate>Sun, 11 Jun 2017 17:23:02 +0000</pubDate>
      <guid>https://markallison.co.uk/blog/when-to-use-cmdletbinding-in-powershell/</guid>
      <description>&lt;h2 id=&#34;clean-code&#34;&gt;Clean Code&lt;/h2&gt;
&lt;p&gt;I am a big proponent of clean code. I use PowerShell a lot for automation, and want code to be clean. You are automating everything, right? If not, please see a slide from a recent meetup:&lt;/p&gt;
&lt;figure&gt;
    &lt;img src=&#34;IMG_20170606_191942.jpg&#34; alt=&#34;&#34; /&gt;
    
      &lt;figcaption&gt;Disturbing&lt;/figcaption&gt;
    
&lt;/figure&gt;
  
&lt;p&gt;For me, clean code in PowerShell means (and not limited to):&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Small self-contained functions that have a single responsibility&lt;/li&gt;
&lt;li&gt;Number of arguments to a function kept as small as possible&lt;/li&gt;
&lt;li&gt;Consistent formatting&lt;/li&gt;
&lt;li&gt;No duplication of code&lt;/li&gt;
&lt;li&gt;Modules that hide internal functions, and only expose what’s needed&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id=&#34;common-parameters&#34;&gt;Common Parameters&lt;/h2&gt;
&lt;p&gt;One way to make code a bit cleaner is to make use of PowerShell’s common parameters. If you would like a refresher as to what these are, there is extensive documentation in PowerShell itself which you can access with&lt;/p&gt;</description>
    </item>
    <item>
      <title>Git How to Work on a Feature Branch</title>
      <link>https://markallison.co.uk/blog/git-how-to-work-on-a-feature-branch/</link>
      <pubDate>Tue, 30 May 2017 18:03:09 +0000</pubDate>
      <guid>https://markallison.co.uk/blog/git-how-to-work-on-a-feature-branch/</guid>
      <description>&lt;h2 id=&#34;how-to-work-on-a-feature-branch-but-pull-in-later-commits-from-another-branch&#34;&gt;How to work on a feature branch but pull in later commits from another branch?&lt;/h2&gt;
&lt;p&gt;On a client site last week the question was raised: I want to work on a feature for a project which will take longer than other people merging their branches into the dev branch. I therefore want to merge any changes on the dev branch into mine, test my changes before pushing back to the dev branch, and then and ultimately master for a release.&lt;/p&gt;</description>
    </item>
    <item>
      <title>How to Move a Replication Subscriber</title>
      <link>https://markallison.co.uk/blog/how-to-move-a-replication-subscriber/</link>
      <pubDate>Sun, 12 Mar 2017 21:38:39 +0000</pubDate>
      <guid>https://markallison.co.uk/blog/how-to-move-a-replication-subscriber/</guid>
      <description>&lt;h2 id=&#34;how-to-move-a-replication-subscriber-to-a-new-server-with-no-downtime-to-the-publisher&#34;&gt;How to move a replication subscriber to a new server with no downtime to the publisher?&lt;/h2&gt;
&lt;p&gt;In a recent data centre migration for a client we had a problem where we needed to move a subscriber to a new data centre without incurring any downtime to the publisher or loss of data after the subscription migration. The application was sending hundreds of transactions per second to the publisher. An additional complication was an upgrade to SQL Server 2016 from SQL Server 2008 R2 on the subscriber.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Sql Server Container Performance</title>
      <link>https://markallison.co.uk/blog/sql-server-container-performance/</link>
      <pubDate>Sun, 12 Feb 2017 22:19:17 +0000</pubDate>
      <guid>https://markallison.co.uk/blog/sql-server-container-performance/</guid>
      <description>&lt;h2 id=&#34;is-sql-server-in-a-container-faster-than-a-vm&#34;&gt;Is SQL Server in a container faster than a VM?&lt;/h2&gt;
&lt;p&gt;I briefly looked at SQL Server containers when Windows Server 2016 was released. Containers offer the ability for rapid provisioning, and denser utilization of hardware because the container shares the base OS’s kernel. There is not a need for a Hyper-Visor layer in between. As a recap for those that are not up speed with containers, the traditional architecture of databases in a VM is like so:&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
