1 Plan and Implement Data Platform Resources Flashcards
Deploying a SQL Server Virtual Machine
- Create, SQL Database
- Server name needs to be unique throughout Azure
- Admin account password must be at least 12 characters long
- If adding existing data, select a backup or sample data
- You should use Managed Service Accounts (MSA) for a single computer running a service
What is a gMSA
Group Managed Service Account, used for assigning the MSA to multiple servers
Deploying Azure SQL Managed Instance
- Create, SQL Managed Instance
- You need
- Subscription and resource group
- Managed instance name
- Region
- Managed instance admin login and password
Deploying VM with SQL Server
- Create a Virtual Network - In IP Addresses –default(subnet)– Edit subnet, add the Service Endpoint “Microsoft.SQL”
- Create the Azure VM - In Networking, select “Private endpoint”, then “+Add Private Endpoint” and select the subnet from above.
- When created, in “Firewalls and virtual networks”, click “+Add client IP”, and “Allow Azure services and resources to access this server”.
Patching + Updates for Azure SQL and Managed Instance
- Built in patching
- Both will use the latest stable database engine version
OS Updates
- As per standard Microsoft Windows Update
- Windows may do some updates automatically
Patching SQL Server - IaaS
Enabling Automated Patching
- Requires SQL 2008R2 or above, and Windows Server 2008 R2 or above
- In SQL Server settings which created the VM OR In the Azure resource, go to Settings > SQL Server Configuration > Patching.
- May take several minutes
- Settings include day, start hour, window duration (# of minutes to download and install)
When can you configure Automated Patching
- When creating a new VM
- For existing VMs, by going to the Azure Portal > the relevant VM > Settings > SQL Server Configuration > Patching
- By using Powershell
What are the Powershell commands for enabling Automated Patching?
New-AzVMSqlServerAutoPatchingConfig -Enable (setting the schedule)
Set-AzVmSqlServerExtension (installing the extension with the schedule)
What is Automatic Registration?
- This daily checks whether there are any unregistered VMs in the subscription, and if so, registers them in lightweight mode.
- To take advantage of all the features, you would still need to manually upgrade.
- To enable, go to Azure Portal > SQL virtual machines (plural) > At the top, click “Automatic SQL Server VM registration”
What are the requirements for deploying Azure SQL Database?
- PaaS
- Azure manages the database
- Resources are always running unless dropped (apart from serverless, when paused)
- Best for modern cloud applications, and fast time-to-market for new solutions are needed.
- Can use Azure Hybrid Benefit (Windows Server for VMs only, and SQL Server licenses with Software Assurance) and reserved capacity to reduce cost.
- Hybrid Benefit doesn’t apply to serverless
What are the requirements for deploying Azure SQL Managed Instance?
- PaaS
- Azure manages the database
- Resources are always running unless dropped
- Best for most migrations to the cloud. May need some changes
- Best for new applications or existing on-prem applications for use in the cloud.
- Can use Azure Hybrid Benefit (Windows Server for VMs only, and SQL Server licenses with Software Assurance) and reserved capacity to reduce cost.
What are the requirements for deploying SQL Server on VMs
- IaaS
- You need to manage the VM, and gives you control of the database
- You can shut down resources when not in use
- Lift-and-shift. As easy as moving from one on-prem server to another.
- Higher cost than PaaS
- Best when you don’t want any database changes, or when you require OS-level access.
- Can use Azure Hybrid Benefit (Windows Server for VMs only, and SQL Server licenses with Software Assurance) and reserved capacity to reduce cost.
What are the functional benefits/impact of Azure SQL Database?
- Most commonly used SQL Server features
- Trace flags not supported
- Built-in backups, patching, and recovery
- Databases up to 100 TB
- Supports server less compute [the alternative is “provisioned”]
- CLR not supported
- Based on the latest stable Enterprise Edition
- Can use Elastic Job Agent service
What are the functional benefits/impact of Azure SQL Managed Instance?
- High compatibility with SQL Server
- Only a limited number of (global) trace flags are supported
- Built-on backups, patching, and recovery.
- Up to currently available instance size, subject to # of vCores
- CLR supported
- Based on latest stable Enterprise Edition
- Can use SQL Agent jobs
What are the functional benefits/impacts of SQL Server on Azure VM?
- All on-premises capabilities
- Trace flags supported
- You manage backup and patches.
- Instances up to 256 TB (Databases of up to edition size)
- Lift-and-shift
- Choose which version, edition, and OS you use.
- Can use SQL Agent jobs
What is the HA/DR for Azure SQL Database?
- Up to 99.995% availability
- Minimum SQL is 99.99% availability, except for Hyperscale, which is 99.9% - 99.95
- At the Basic, Standard and General Purpose level, you can use locally redundant availability.
- At the Premium and Business Critical level or elastic pools, can use a 3 to 4 node cluster with Locally or Zone Redundant Availability. You can also add read-only replicas (“Read-Scale-out” feature)
- At the General Purpose level using Gen5 compute hardware in certain regions, can use Zone redundant configuration (preview).
What is HA/DR for Azure SQL Managed Instance?
- 99.99% availability
- At the Basic, Standard, and General Purpose level, can use locally redundant availability. At the Premium and Business Critical level, or elastic pools, an use a 3 to 4 node cluster with Locally Redundant Availability. You can also add read-only replicas (the “Read Scale-out” feature).
What is HA/DR for SQL Server on Azure VM?
- Up to 99.995 availability. However, this requires a second VM, and using AlwaysOn availability groups. Minimum SLA is 95% for the VM.
- Can configure availability replicas, using a domain controller VM.
What are the backup, restore, and redundancy options for Azure SQL database?
- Automatic backups, including full, differential, and transaction log, for 7-35 days.
- Can configure full database backups to Azure Storage for long-term backup retention.
- Point-in-time restores
- Can configure Active geo-replication (up to 4 readable secondary databases)
- Can configure auto-failover groups
What are the backup, restore, and redundancy options for Azure SQL Managed Instance?
- Automatic backups, including full, differential, and transaction log, for 7-35 days.
- Can perform copy-only backups for long-term retention (preview).
- Point-in-time restores
- No Active geo-replication
- Can configure auto-failover groups.
What are the backup, restore, and redundancy options for SQL Server on Azure VM?
- Can configure backups
- With appropriate backups, can do point-in-time restores
- Can configure geo-replication storage (asynchronously). Data file and log file needs to be on the same disk.
- Can configure Azure failover cluster instances using shared storage.
What are the security aspects of Azure SQL Database?
- Auditing works at the database level
- .xel log files are stored in Azure Blob storage
- Can use Azure Defender for SQL, which includes: Vulnerability assessment and Thread detection (costs around .02/instance/hour)
- Data encryption, using Transport Layer Security (TLS), Transparent Data Encryption (TDE), and Always Encrypted. Firewalls
- SQL authentication or Azure Active Directory (Microsoft Entra ID)
What are the security aspects of SQL Managed Instance?
- Auditing works at the server level.
- .xel log files are stored in Azure Blob storage
- Can use Azure Defender for SQL, which includes: Vulnerability assessment and threat detection (costs around .02/instance/hour)
- Data encryption, sing Transport Layer Security (TLS), Transparent Data Encryption (TDE), and Always Encrypted. Firewalls
- SQL authentication or Azure Active Directory authentication (Microsoft Entra ID)