Author : MD TAREQ HASSAN | Updated : 2021/01/22
What is Azure SQL Managed Instance?
- A fully managed and evergreen (always up to date with the latest SQL features and functionality) platform as a service
- SQL Managed Instance provides an entire SQL Server instance within a managed service
- SQL Managed Instance provides two levels of isolation, at the compute level and at the network level
- Managed SQL Server (Managed by Microsoft Azure)
- Single instance
- Multiple instances
- My own explanation: “Managed Instance” here means managed instance of SQL Server (managed by Microsoft)
- Has native vNet integration (connect to your Azure vNet using private ip, can be connected to on-premise using vpn)
Azure SQL Managed Instance == “SQL Server” on Azure service fabric
When to use?
- Need increased control over the network traffic between data-tier and app (i.e. apps hosted in Azure App Service)
- If you want to connect SQL server to
- Azure vNet
- on-premise network via vpn
- If you wear 100% compatibility with SQL server engine
- Migrating an entire system to Azure cloud
- a system normally consists of multiple applications a and that means multiple databases are needed
- ‘Azure SQL database’ is not suitable for entire system beause ‘Azure SQL database’ is a single (managed) database
- although ‘Azure SQL database’ elastic pool provides multiple databases, still it’s single database for each user
- Mordernization:
- Modernise existing applications with Azure SQL Managed Instance and support modern cloud applications with Azure SQL Database
- Modernising your existing applications or supporting modern cloud applications
- When you want a fully managed SQL Server in Azure cloud
Azure SQL Managed Instance vs Azure SQL Database
- Azure SQL Managed Instance: PaaS for full fledged SQL Server
- Azure SQL Database: PaaS for single Database (pool will provide multiple single databases, databases are isolated from each other)
Virtual network integration
One of the key benefits of Managed Instance is the native support for vNet integration
- Other azure resources in the same vNet can access Azure SQL Managed Instance easily
- On-premise PCs can access via VPN (vNet and on-premise network will be connected via VPN tunnel)
Integrating vNet while creating Managed Instance:
- Create vNet
- Go to resource groups > select target vNet (that created in previous step)
- subnets > add subnet dedicated for Azure SQL Managed Instance
- subnet must be dedicated for managed instance only (no other azure resource can be in this subnet)
- for convinience, give a name that indicated managed instance i.e. foo-azure-sql-db-mi-subnet
- while creating managed instance, select that subnet ‘foo-azure-sql-db-mi-subnet’ and then it will configured automatically (with required settings needed) during creation of managed instance
Creating Managed Instance
- Go to: https://portal.azure.com/#create/Microsoft.AzureSQL
- SQL databases > Resource type: Managed instance (direct link: https://portal.azure.com/#create/Microsoft.SQLManagedInstance)
- Fillup details
- Create
It’s better to plan Admin id and password
Admin ID: fooprojectasmiu1
Password: Foo.bar.baz.1