Managed instances in Azure SQL is the new deployment options that provides near 100% compatibility with on-premise SQL Server (Enterprise) database engine features. It provides a native virtual network (VNet) implementation that addresses common security concerns, and a business model favorable for on-premises SQL Server customers.
The managed instance deployment option preserves all PaaS capabilities (automatic patching and version updates, automated backups, high-availability ), that drastically reduces management overheads.
This deployment option is best if you have to lift and shift your application to Azure, with very minimal code changes.
Using the fully automated Data Migration Service (DMS) in Azure, customers can lift and shift their on-premises SQL Server to a managed instance that offers compatibility with SQL Server on-premises and complete isolation of customer instances with native VNet support.
Let’s quickly see how to create the managed instance in Azure SQL.
Using Azure Portal
You will need azure subscription to follow the next steps in this article. If you don’t have an Azure subscription, create a free account.
Sign in to the Azure portal and click on “Create a resource” button. Search for “Azure SQL”. You will be presented the below screen.
Click on create button and you will be shown the next screen which shows all the deployment option. Click on create button of the second card which has “SQL Managed instance” header.
This will bring you to the create managed instance panel. The create managed instance panel is shown in below snapshot. It is a multi step wizard and there are 4 screens
- Networking for creating the virtual network
- Additional settings for collation
The this steps looks to be as shown in below snapshot. You need to provide below details:
- Subscription, Azure subscription under which resource should be created
- Resource Group, under which resource should be logically placed
- Managed instance name, unique name to identify the instance
- Region, the Azure region (physical location) where managed instance will be created
- Compute + storage, the vCores and amount of storage you want to allocate to the managed instance
- Administrator username and password, which you can use to login to managed instance.
Once these details are provided, you can click on next button.
This asks for virtual network settings. You can keep the default settings as we are just trying to understand how to create the managed instance.
It also asks which type of connection you need and whether you want to enable public endpoint. We can keep these settings to default.
Then click on next to go to Additional settings.
On this screen, you need to select the collation for the managed instance.
It also asks the timezone which should be applied to managed instance. I prefer to keep DB instance in UTC timezone, but you can select the timezone you need.
It also asks if you want to enable the geo replication. If you are already aware about geo-replication, you may be aware that it is very useful to decrease the latency while accessing your application and helps to improve overall performance of your application. It can also help in high availability and business continuity in case there is an unfortunate disaster in the primary Azure region.
The Geo-Replication settings here asks if you want to use this managed instance as failover secondary instance.
I have kept it default (No), but for production scenarios, you might want to enable it depending on the need of your application.
Then you can click on Next to go to Review screen.
Review screen will show you all the inputs you have entered on previous three screens. It will also show you a note that managed instance creation may take upto 6 hours.
Then you can click on Create button to start creation of managed instance.
Once managed instance is created, you can navigate to the resource and add the databases from the overview panel.
I hope you enjoyed this article. Let me know your thoughts.