<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>SQL on Ajo Mathew</title><link>https://blog.ajomathew.dev/tags/sql/</link><description>Recent content in SQL on Ajo Mathew</description><generator>Hugo -- gohugo.io</generator><language>en-US</language><lastBuildDate>Mon, 25 May 2020 00:00:00 +0000</lastBuildDate><atom:link href="https://blog.ajomathew.dev/tags/sql/rss.xml" rel="self" type="application/rss+xml"/><item><title>After (lot of ) Hacks - A working way to deploying Azure SQL on Virtual Machine using terraform</title><link>https://blog.ajomathew.dev/2020/05/25/lot-of-hacks-to-deploy-terraform-azure-sql-vm/</link><pubDate>Mon, 25 May 2020 00:00:00 +0000</pubDate><guid>https://blog.ajomathew.dev/2020/05/25/lot-of-hacks-to-deploy-terraform-azure-sql-vm/</guid><description>&lt;p&gt;I am very new with terraform. I was trying out terraform to deploy an SQL VM to Azure. SQL VM in Azure has undergone many changes recently from using &lt;code&gt;SqlVmIaasExtension&lt;/code&gt; to manage SQL VM instance to a new resource type &lt;a href="https://github.com/Azure/azure-quickstart-templates/blob/master/101-sql-vm-new-storage/azuredeploy.json" target="_blank" rel="noopener"&gt;&lt;code&gt;Microsoft.SqlVirtualMachine/SqlVirtualMachines&lt;/code&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;To implement &lt;a href="https://docs.microsoft.com/en-us/azure/virtual-machines/windows/sql/virtual-machines-windows-sql-performance#disks-guidance" target="_blank" rel="noopener"&gt;the best practice&lt;/a&gt; of SQL, we had to fall to PowerShell DSC. Now Azure natively support &lt;a href="https://docs.microsoft.com/en-us/azure/virtual-machines/windows/sql/virtual-machines-windows-sql-server-storage-configuration" target="_blank" rel="noopener"&gt;disk management(new Storage Type)&lt;/a&gt; via SqlVirtualMachine resource type.&lt;/p&gt;
&lt;p&gt;I wanted to get new Storage type implemented via terraform &lt;a href="https://www.terraform.io/docs/providers/azurerm/r/mssql_virtual_machine.html" target="_blank" rel="noopener"&gt;&lt;code&gt;azurerm_mssql_virtual_machine&lt;/code&gt;&lt;/a&gt;. This resource in terraform under module &lt;code&gt;azurerm&lt;/code&gt; supports everything except new storage types.&lt;/p&gt;</description></item><item><title>Grant SQL Server account access to Lock Pages in Memory using PowerShell DSC.</title><link>https://blog.ajomathew.dev/posts/2017-03-07-grant-sql-server-account_access/</link><pubDate>Tue, 07 Mar 2017 00:00:00 +0000</pubDate><guid>https://blog.ajomathew.dev/posts/2017-03-07-grant-sql-server-account_access/</guid><description>&lt;p&gt;Lock Pages in Memory is a setting that can be set on 64-bit operating systems that essentially tell Windows not to swap out SQL Server memory to disk.&lt;/p&gt;
&lt;p&gt;I was implementing SQL server hardening via PowerShell DSC and one of the requirement was to have Lock Pages In Memory enabled for SQL Service account. There was a powershell script created and available from &lt;a href="http://keepingitgeek.blogspot.com/2015/01/grant-sql-server-account-access-to-lock.html" target="_blank" rel="noopener"&gt;blog post&lt;/a&gt; by keepingitgeek.&lt;/p&gt;
&lt;p&gt;I converted this to a DSC module for my use. The code snippet is added below.&lt;/p&gt;</description></item></channel></rss>