Jump into concepts and practice - no test required
or
Recommended
Test this pattern10 questions across easy, medium, and hard to know if this pattern is strong
Azure SQL Database vs SQL Managed Instance
📖 Scenario: You are working as a cloud engineer for a company that wants to move its database workloads to Azure. The company needs to understand the differences between Azure SQL Database and SQL Managed Instance to choose the right service for their needs.
🎯 Goal: Build a simple comparison setup in Azure that shows the basic configuration of an Azure SQL Database and a SQL Managed Instance. This will help the company see how each service is created and configured.
📋 What You'll Learn
Create an Azure SQL Database resource with a specific name and configuration
Create an Azure SQL Managed Instance resource with a specific name and configuration
Add configuration variables for performance tier and storage size
Apply tags to both resources for environment and project identification
💡 Why This Matters
🌍 Real World
Companies moving databases to Azure need to choose between Azure SQL Database and SQL Managed Instance based on their workload requirements. This project shows how to set up both services.
💼 Career
Cloud engineers and database administrators use these skills to deploy and manage Azure database services securely and efficiently.
Progress0 / 4 steps
1
Create Azure SQL Database resource
Create an Azure SQL Database resource named mySqlDatabase with the server name mySqlServer and the edition set to Basic.
Azure
Hint
Start by defining an azurerm_sql_server resource with the name mySqlServer. Then create an azurerm_sql_database resource named mySqlDatabase that uses this server and sets the edition to Basic.
2
Add configuration variables for performance and storage
Add two variables: performance_tier set to GeneralPurpose and storage_size_gb set to 32. These will be used to configure the SQL Managed Instance.
Azure
Hint
Use variable blocks to define performance_tier and storage_size_gb with the specified default values.
3
Create Azure SQL Managed Instance resource
Create an Azure SQL Managed Instance resource named mySqlManagedInstance using the variables performance_tier and storage_size_gb for its configuration. Set the resource group to myResourceGroup and location to eastus.
Azure
Hint
Create an azurerm_sql_managed_instance resource named mySqlManagedInstance. Use the variables performance_tier and storage_size_gb for the SKU and storage size. Use a placeholder subnet ID for now.
4
Add tags to both resources
Add tags to both mySqlDatabase and mySqlManagedInstance resources. Use the tags environment = "dev" and project = "database-migration".
Azure
Hint
Add a tags block inside both resource definitions with the keys environment and project set to the specified values.
Practice
(1/5)
1. Which Azure service provides a fully managed single database with simple setup and maintenance?
easy
A. Azure Cosmos DB
B. SQL Managed Instance
C. Azure Blob Storage
D. Azure SQL Database
Solution
Step 1: Understand service purpose
Azure SQL Database is designed as a simple, fully managed single database service in the cloud.
Step 2: Compare with other options
SQL Managed Instance offers more features and compatibility but is not as simple as Azure SQL Database. Blob Storage and Cosmos DB serve different purposes.
Final Answer:
Azure SQL Database -> Option D
Quick Check:
Simple managed single database = Azure SQL Database [OK]
Hint: Simple managed single DB? Think Azure SQL Database [OK]
Common Mistakes:
Confusing SQL Managed Instance with Azure SQL Database
Choosing storage services like Blob Storage
Selecting Cosmos DB which is NoSQL
2. Which option correctly describes a key feature of SQL Managed Instance in Azure?
easy
A. Limited SQL Server compatibility
B. Only supports single databases
C. Full SQL Server compatibility with network control
D. No support for SQL Server Agent
Solution
Step 1: Identify SQL Managed Instance features
SQL Managed Instance offers full SQL Server compatibility and allows more control over network settings.
Step 2: Eliminate incorrect options
It supports SQL Server Agent and multiple databases, so options A, B, and C are incorrect.
Final Answer:
Full SQL Server compatibility with network control -> Option C
Quick Check:
Full compatibility + network control = SQL Managed Instance [OK]
Hint: Full SQL Server features? Choose SQL Managed Instance [OK]
Common Mistakes:
Thinking SQL Managed Instance has limited compatibility
Believing it does not support SQL Server Agent
Confusing single database support with Azure SQL Database
3. Given an application requiring SQL Server Agent jobs and linked server support, which Azure service will work without modification?
medium
A. Azure SQL Database
B. SQL Managed Instance
C. Azure Table Storage
D. Azure Data Lake
Solution
Step 1: Check feature support
SQL Managed Instance supports SQL Server Agent jobs and linked servers, unlike Azure SQL Database.
Step 2: Match application needs
The app needs these features without changes, so SQL Managed Instance fits best.
Hint: Needs SQL Server Agent? Pick SQL Managed Instance [OK]
Common Mistakes:
Assuming Azure SQL Database supports SQL Server Agent
Confusing storage services with database services
Ignoring linked server requirements
4. A developer tries to migrate an on-premises SQL Server database with cross-database queries to Azure SQL Database but faces errors. What is the likely cause?
medium
A. Azure SQL Database does not support cross-database queries
B. SQL Managed Instance does not support cross-database queries
C. On-premises SQL Server uses unsupported data types
D. Azure SQL Database requires manual schema conversion
Solution
Step 1: Understand cross-database query support
Azure SQL Database does not support cross-database queries natively, causing errors.
Step 2: Compare with SQL Managed Instance
SQL Managed Instance supports cross-database queries, so it's not the cause.
Final Answer:
Azure SQL Database does not support cross-database queries -> Option A
Quick Check:
Cross-database queries missing in Azure SQL Database [OK]
Blaming SQL Managed Instance for cross-database query issues
Assuming all data types are supported without checking
Ignoring Azure SQL Database feature limits
5. You need to move a legacy app using SQL Server features like linked servers, SQL Server Agent jobs, and cross-database queries to Azure with minimal changes. Which service should you choose and why?
hard
A. SQL Managed Instance, because it supports full SQL Server features and network control
B. Azure SQL Database, because it is simpler and fully managed
C. Azure Cosmos DB, because it supports multiple data models
D. Azure Blob Storage, because it stores large amounts of data
Solution
Step 1: Identify required SQL Server features
The app uses linked servers, SQL Server Agent jobs, and cross-database queries which require full SQL Server compatibility.
Step 2: Match features to Azure services
SQL Managed Instance supports these features and network control, enabling minimal changes during migration.
Final Answer:
SQL Managed Instance, because it supports full SQL Server features and network control -> Option A
Quick Check:
Legacy SQL Server features need SQL Managed Instance [OK]
Hint: Legacy SQL Server features? Use SQL Managed Instance [OK]
Common Mistakes:
Choosing Azure SQL Database despite missing features
Confusing Cosmos DB or Blob Storage as SQL replacements