Provision a Free Azure SQL Managed Instance Step by Step

By:   |   Updated: 2024-02-09   |   Comments (2)   |   Related: > Azure SQL Managed Instance


Problem

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?

Solution

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:

  1. Common language runtime – CLR
  2. Native cross-database queries and transactions
  3. SQL Server Agent
  4. Service Broker – with limits
  5. 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

Getting Started

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.

Azure Portal - Create a resource

Step 2: In the search window, type Azure Managed Instance, then select the Azure Managed Instance prompt.

Create a Resource Page

Step 3: Select Create under the Azure SQL Managed Instance card on the Marketplace page, then choose Azure SQL Managed Instance.

Create an Azure Managed Instance

Basics Tab

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.

Apply the free offer.

Step 3: After you click the button to apply the free offer, your screen will look like the screenshot below, showing it's applied.

Free offer 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.

Project and Managed Instance details

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.

Compute + storage

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.

Compute + storage

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.

Authentication

At this point, you can review the other tabs, but since this is for a test, I only care about two things:

  1. Ensure the public endpoint is enabled. As illustrated in the screenshot below on the Networking tab, Microsoft enabled it by default.
public endpoint
  1. Enable the service principle on the Security tab by clicking On.
security

Now, I will click the Review + Create button, look it over, and click Create.

Review + 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.

deployment complete

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.

Start/Stop Schedule

On the working pane, I performed the following tasks:

  1. Changed the time zone.
  2. Deleted Tuesday from the schedule.
  3. Added Saturday and Sunday as scheduled items.
  4. Modified the rest of the start and stop times.
Stop and Start Schedule

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.

SQL Server Management Studio

Wrapping Up

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.

Key Points

  • 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.
Next Steps


sql server categories

sql server webinars

subscribe to mssqltips

sql server tutorials

sql server white papers

next tip



About the author
MSSQLTips author Jared Westover Jared Westover is a passionate technology specialist at Crowe, helping to build data solutions. For the past two decades, he has focused on SQL Server, Azure, Power BI, and Oracle. Besides writing for MSSQLTips.com, he has published 12 Pluralsight courses about SQL Server and Reporting Services. Jared enjoys reading and spending time with his wife and three sons when he's not trying to make queries go faster.

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

Comments For This Article




Sunday, February 11, 2024 - 7:25:04 AM - Manish Back To Top (91935)
Very nicely done, quite interesting and steps are explained very well. However, I am not able to see "Apply free offer (Preview)" for me.

Friday, February 9, 2024 - 1:17:43 PM - Mark Back To Top (91933)
This is awesome! I'm studying for DP300 and it's extremely helpful, gets me going in the right direction quickly.














Related Articles

Azure SQL Managed Instance vs. Azure SQL Database

Migrate to an Azure SQL Managed Instance

Enable Auditing for Azure SQL Managed Instance

Deploy and Configure Azure SQL Managed Instance