Provision a Free Azure SQL Managed Instance Step by Step
After a long planning period, I decided to provision an Azure Managed Instance for testing purposes. Before taking the plunge, I wanted my wife's approval since the bill would show up on our bank statement. She was on board but had one major stipulation: keep the cost down. In fact, free is best. I've told her horror stories of people spending thousands of dollars a month in the cloud without even realizing it. Is it possible to create a free Azure Managed Instance?
This article walks through each step of provisioning an Azure Managed Instance. I'll start by considering why you might want to pick a Managed Instance over an Azure SQL database. Next, we'll explore Microsoft's latest offering: a free Managed Instance (for 12 months). Finally, I'll modify the built-in schedule to align with my typical working hours. This tiny step ensures we don't waste our free 720 compute hours. By the end of this article, you'll have a blueprint for provisioning a free Azure Managed Instance today.
Why a Managed Instance?
A Managed Instance is Microsoft's best Platform as a Service (PaaS) offering for matching a SQL Server in Azure. If you don't want the overhead of an IaaS solution, a Managed Instance is the way to go. If your existing SQL solution involves multiple databases and you need a lift-and-shift approach, a Managed Instance will be better than multiple Azure SQL databases. What does a Managed Instance offer that's lacking in an Azure SQL Database? For this environment, I need five features:
- Common language runtime – CLR
- Native cross-database queries and transactions
- SQL Server Agent
- Service Broker – with limits
- Ability to restore databases to SQL Server – SQL 2022 only.
Microsoft published this informative table highlighting the differences between the two offerings. I would use it as the final authority of what each service provides. You never know what new features Microsoft might add to Azure SQL database in the next six months.
Keep the Cost Down
One of the main differences between an Azure SQL database and a Managed Instance is the cost of operation. Microsoft offers a free Azure SQL database for testing purposes. Even if you didn't choose the free route, you can create a serverless Azure SQL database and pause the compute when it's not in use. If you rarely use it, you can get away with spending a few dollars a month.
On the other hand, a Managed Instance, even for my needs to create a Proof of Concept (POC), might cost a thousand dollars a month without the bells and whistles. However, with the November 2022 feature wave, Microsoft introduced the ability to pause compute. This feature enables running a Managed Instance for under $100 a month. Even better, you can't beat the price with the free 12-month offer. However, when the offer runs out and you want to keep your playground, pausing the compute with a sensible schedule is key to reducing that monthly bill. It's like running the air conditioner in the summer; I prefer it cooler at night and off during the day.
Create a Free Azure Managed Instance
Since we know we want the free 12-month option, let's get started. The first step is to navigate to the Azure Portal. If you don't have an Azure subscription, you can sign up for one and get Azure credit for other services.
Step 1: Click Create a resource from the home page.
Step 2: In the search window, type Azure Managed Instance, then select the Azure Managed Instance prompt.
Step 3: Select Create under the Azure SQL Managed Instance card on the Marketplace page, then choose Azure SQL Managed Instance.
The Basics tab is where most of the magic happens. Remember, you need the November 2022 feature wave to pause the compute. Perhaps in the future, they'll call it something else. My best advice is to look for something indicating you can pause the compute.
Step 1: At the top, you should notice a banner showing the November 2022 feature wave is available for your subscription.
Step 2: Further down, you should see a button for the free option, Apply free offer (Preview); if so, click it.
Step 3: After you click the button to apply the free offer, your screen will look like the screenshot below, showing it's applied.
After confirming our Manage Instance is free for the next 12 months, fill in the remaining details using the steps below.
Project and Managed Instance Details
Below are the steps I used to fill in the Project and Managed Instance section.
Step 1: Select your Subscription if it doesn't populate automatically.
Step 2: Create a Resource group or use an existing one. I picked an existing one created from a previous demo.
Step 3: Enter your Manage Instance name; remember, it must be unique. I'm not sharing mine for obvious reasons.
Step 4: Select your Region; I chose EAST US because of my location.
Compute + Storage
Since applying the free offer, I can only change one thing on the Compute + storage. Let's click the Configure Managed Instance link and find out what it is.
Typically, you could change several features, including service tier, storage, and hardware generation.
After applying the free option, Microsoft gives us 4 vCores and 64 GB of storage, which is not too shabby. It's the lowest vCore option, but it's hard to complain about something free. However, you can increase the vCore count to 8, as shown in the screenshot below. It might seem like a no-brainer to up the count. But the downside I foresee is when the free trial runs out - you're used to running 8 and downgrading to 4 to save money, and then performance decreases. But that's a problem for the future me. I'm going with 8.
Finally, click Apply, and we can move on to authentication.
I'll choose Use both SQL and Microsoft Entra authentication for the authentication method. If you want only one, feel free to pick another option. Make sure to write down the admin login and password. These things are so easy to forget.
At this point, you can review the other tabs, but since this is for a test, I only care about two things:
- Ensure the public endpoint is enabled. As illustrated in the screenshot below on the Networking tab, Microsoft enabled it by default.
- Enable the service principle on the Security tab by clicking On.
Now, I will click the Review + Create button, look it over, and click Create.
If you want to scroll social media or visit YouTube, now's the time. It took two hours before my Managed Instance was ready. But, after seeing the screenshot below, I raised both arms in victory.
Changing the Schedule
The default schedule for the compute runs from 9:00 am to 5:00 pm Monday through Friday. For my endeavors, I mainly work on the weekends. Let's see if we can modify the default schedule.
On the Resource menu on the left, under the Settings option, click Start/Stop Schedule.
On the working pane, I performed the following tasks:
- Changed the time zone.
- Deleted Tuesday from the schedule.
- Added Saturday and Sunday as scheduled items.
- Modified the rest of the start and stop times.
It only took three minutes to make the schedule changes. If you know how to set an alarm on your mobile phone, you have the skills to change the schedule.
If our Managed Instance is running, let's connect via SQL Server Management Studio. Before we do that, make sure you configure the Managed Instance network security group (NSG) to allow traffic to the public endpoint.
After completing the steps above, I can connect and see my brand-new Managed Instance.
With the addition of a 12-month free Managed Instance, creating one is easier than ever. You don't need to worry about a huge credit card bill. There are several restrictions with the free offer, like limiting vCore hours to 720 per month, 64 GB storage limit, and the current inability to switch your free instance to a paid one. Microsoft might change restrictions as time passes, so check their documentation for the latest news. Despite the limits, this new offer is great for anyone exploring a Managed Instance and doesn't want to pay.
In the comments below, let me know if you've created one and your experience.
- With the stop-and-start functionality introduced in feature wave 2022, running a Managed Instance for under $100 a month is possible. However, the 12-month free offer is even better. Remember to follow your schedule to keep the compute hours under control. If you run out, Microsoft pauses your compute until next month.
- If you're in the market for a lift and shift approach from on-premises to Azure without the IaaS overhead, consider looking into a Managed Instance.
- When an application consists of a single database without plans to expand, skip a Managed Instance and go for an Azure SQL database; your wallet will thank you in the long run.
- If you're interested in learning more about a Managed Instance, I wrote the article Azure SQL Managed Instance vs. Azure SQL Database. In it, I highlight my favorite features a Managed Instance offers and how an Azure SQL database can come up short.
- Since this article focused on provisioning a Managed Instance, the next step is to move any on-premises database to it. For a detailed article, check out Migrating SQL Server Databases to Azure Managed Instances with Native Backups.
- Also, check out John Martin's article: Introduction to Azure SQL Database Managed Instances. It provides an overview for someone considering a Managed Instance.
About the author
This author pledges the content of this article is based on professional experience and not AI generated.
View all my tips
Article Last Updated: 2024-02-09