Azure SQL Managed Instance: Moving a Whole SQL Server to the Cloud Without Rebuilding It

Azure SQL Managed Instance: Moving a Whole SQL Server to the Cloud Without Rebuilding It

A complete, plain-English guide to instances, private networking, service tiers, high availability, backups, migration paths, security, cost and the mistakes that trip up teams on their first move.

Imagine a company that has run its accounting system for fifteen years on a database server in the basement. The server hosts forty databases. Nightly jobs copy data between them, reports join tables from several of them at once, and a mail feature sends invoices straight from the database. Everyone agrees the basement server is old and risky. But rewriting the application to fit a new cloud database would take a year and might break things nobody remembers how to fix.

Azure SQL Managed Instance exists for exactly this situation. It gives you something that behaves almost exactly like your familiar SQL Server, with its jobs, its cross-database queries and its server-level settings, but Microsoft runs the machines, the patches, the backups and the failover for you. In this guide you will learn what a managed instance is, how it differs from its cousins, how it is wired into your network, how data stays safe, how to size and secure it, how to migrate to it, and which mistakes to avoid.

1What Azure SQL Managed Instance Is and Why It Exists

Start with the idea of a database “instance”, because the whole product is built around it.

What an instance is

A database system such as SQL Server is more than a pile of tables. When you install it on a server you get an instance: a running copy of the engine with its own settings, its own list of sign-in accounts, its own scheduled jobs, its own temporary workspace and its own system databases. Inside that instance live many ordinary databases. Programs that were written for SQL Server often lean on the instance itself, not only on the tables. They may run a job at two in the morning, query two databases in one statement, read a file from a network share or send an email from inside a stored procedure. All of those abilities belong to the instance.

What “managed” means

Azure SQL Managed Instance is a platform as a service, or PaaS, version of that whole instance. You get a real instance with nearly all of the features of the newest SQL Server engine, hosted in Azure and run by Microsoft. Microsoft handles the hardware, the operating system, the database software updates, the automated backups, the monitoring and the replacement of failed machines. You keep control of the databases, the logins, the jobs, the performance tuning and the data design. It is the “lift and shift with fewer chores” option.

Everyday analogy

Think of moving an entire office. Azure SQL Database is like giving each employee a desk in a shared co-working space: very easy, but you leave your filing cabinets and the office kettle behind. Managed Instance is like moving the whole office floor into a serviced building: same layout, same cabinets, same kettle, but the building manager handles the lights, the cleaning and the repairs. A virtual machine is like renting an empty floor and doing all of that yourself.

The Azure SQL family

PaaS

Azure SQL Database

Single databases and elastic pools, with the least administration. Best for new cloud-born applications that do not need instance-level features.

PaaS

Azure SQL Managed Instance

A managed full instance with very high compatibility. Best for moving existing SQL Server applications with little or no change.

IaaS

SQL Server on Azure VM

Your own SQL Server on a virtual machine. Most control, most work. Best for features or versions that no managed option offers.

What problems it solves

It lets companies leave aging servers without rewriting applications. It removes patching, backup scheduling and hardware replacement. It keeps familiar tools, such as SQL Server Management Studio, working. It ties into Azure security, monitoring and networking. And it provides built-in high availability that would cost a great deal of design and money to build on your own.

~100%
engine compatibility goal with the latest SQL Server database engine
2
main service tiers: General Purpose and Business Critical
1
private network address space it is deployed into, a dedicated subnet
i
Rule of thumb

If your application uses SQL Agent jobs, cross-database queries, linked servers or other instance-level features, and you want to avoid managing virtual machines, Managed Instance is usually the first thing to evaluate.

2Where It Came From: The Lift-and-Shift Problem

Every product answers a pain. The pain behind Managed Instance is a very ordinary one: old systems that work but cannot easily change.

The server in the basement

For decades, businesses installed SQL Server on their own machines. Over the years each server accumulated extras: dozens of databases, scheduled jobs, special sign-in accounts, connections to other systems, custom settings. Nobody planned the whole; it grew. The server became a small ecosystem, and the applications that used it depended on that ecosystem in ways that were hard to list.

The first cloud answer was not quite enough

When Microsoft launched its first managed database in the cloud, it offered single databases. These were wonderful for new applications, but a database-per-application model did not fit companies whose programs reached across databases, used jobs and relied on the instance. To move such systems you had to redesign them. Many organizations chose to rent virtual machines instead, which solved the hardware problem but left them with all the patching, backups and failover work.

A managed version of the instance

Microsoft’s answer was to host the instance itself as a managed service. It put a full engine in a private network, gave it near-complete compatibility, and kept the cloud benefits: automatic updates, backups, built-in availability and pay-as-you-go. The aim was that a typical SQL Server application could move over by restoring a backup, changing a connection string, and testing.

OptionYou keepMain drawback
Keep the basement serverTotal controlHardware age, patching, outages, capital cost
Rent a virtual machineTotal control of the engineYou still do patching, backups, availability
Single cloud databasesAlmost no admin dutiesInstance features missing, redesign needed
Managed InstanceInstance features and compatibilityPrivate network design, slower management operations, higher base cost
?
Why this matters

Many design choices of Managed Instance, such as living inside your own virtual network and being sized in whole instances rather than per database, follow from the goal of acting like a real server rather than a collection of separate databases.

3Core Concepts: Instances, Subnets and Virtual Clusters

A handful of terms appear in nearly every Managed Instance discussion. Learn them and the portal and documentation start to read clearly.

Compute

Managed instance

The resource you create. It has a vCore count, memory, storage and a tier, and hosts many user databases plus system databases such as master, msdb and tempdb.

Network

Dedicated subnet

A slice of your virtual network reserved for managed instances. Nothing else may live in it. It is delegated to the service.

Infrastructure

Virtual cluster

The set of machines inside that subnet that host one or more of your instances. It is created and managed by Azure.

Sharing

Instance pool

A way to place several small instances on the same underlying machines, to make small migrations cheaper and faster to create.

Identity

Logins and users

Server-level logins as in SQL Server, plus Microsoft Entra identities for modern authentication.

Operations

Management operations

Create, scale, update and delete actions that run for a while in the background and can be monitored.

Instance-level objects you will recognize

Because the instance is real, you get the familiar system databases. master holds the server’s own information such as logins. msdb holds the scheduled jobs, alerts and the backup history. tempdb is a shared scratch area that queries use for sorting and temporary tables. The model database is the template for new databases. You can create, drop and restore user databases as you would on any SQL Server.

Settings fixed at creation time

A few choices cannot be changed later, so decide carefully. The instance collation defines how text is sorted and compared by default, for example whether “a” and “A” are equal. The time zone of the instance determines how local dates are interpreted. Individual databases can use different collations, but the instance default is permanent. The network subnet of the instance can be changed only by moving the instance, which is a heavy operation. Choose these to match what your source server uses, so that behavior stays the same after the move.

Purchasing model

Managed Instance uses the vCore model only. You choose a number of virtual cores, which brings with it a fixed amount of memory per core, and you choose how much storage to reserve. You pay for the cores and for the storage you reserved, not for each database. There are no per-database DTU packages as in the single database service.

QuestionAzure SQL DatabaseManaged Instance
Unit you buyA database or a poolA whole instance with many databases
Scope of jobs, logins and settingsServer-level, limitedInstance-level like SQL Server
Network placementPublic service endpoint, optional private endpointInside your own virtual network
Serverless and HyperscaleAvailableNot available
Typical starting sizeA fraction of a coreSmall instances from a couple of cores upward

4Service Tiers, Hardware and Sizes

Two tiers and a few hardware families cover nearly every case. The tier decides how data is stored and how copies are kept, so it affects speed, availability and price at the same time.

General Purpose

The General Purpose tier is the standard choice. Compute runs on a node, while the data and log files live on remote, highly available Azure storage that is separate from compute. If the node fails, Azure starts a new node and attaches the same storage. The temporary database, tempdb, sits on fast local disk. Storage delay is a little higher than local disks, and in the classic design the input and output speed of a file depends on the size of that file, so many tiny files may get low throughput. A newer variant of the tier improves this and offers larger storage; check current documentation for what your region provides.

Business Critical

The Business Critical tier is built for the heaviest transaction workloads and the lowest delay. Data lives on fast local solid-state disks. Four copies of each database run on four nodes: one primary and three secondaries that continuously apply every change, using the same technology as Always On availability groups. A commit is confirmed only after enough secondaries have safely stored the change. If the primary fails, a secondary takes over very quickly. One secondary can answer read-only queries, so reports can be moved off the main workload. This tier also supports in-memory tables for extremely high transaction rates.

FeatureGeneral PurposeBusiness Critical
Storage designRemote storage separate from computeLocal SSD on four replicas
Storage delayLow to moderateLowest
Failover speedModerateFastest
Readable secondaryNo built-in oneYes, one included
In-memory OLTPNot supportedSupported
Relative priceLowerRoughly double for the same cores
Best forMost business applicationsHeavy transactions, strict delay and availability targets

Hardware generations

Each tier can run on different hardware families, which differ in processor generation and in memory per core. The standard family offers a balanced amount of memory per core, roughly five gigabytes. A premium family uses newer processors and more memory per core, roughly seven gigabytes. A memory-optimized family offers a much higher memory ratio, in the range of thirteen gigabytes per core, for databases that benefit from large caches. Memory matters because the engine keeps recently used data pages in memory, so more memory often means fewer slow disk reads.

Sizes

Instances come in steps of cores, such as four, eight, sixteen, twenty-four, thirty-two, forty, sixty-four and eighty, with smaller sizes available through instance pools. You also reserve storage separately, up to a maximum that depends on the tier and size, and you can usually grow it later. There are limits on the number of databases per instance and on log throughput, so check the current limits table when sizing.

!
Size changes are not instant

Changing cores or tier on a managed instance is a management operation that may take minutes to hours, because machines may need to be prepared and data moved. Plan scaling in advance and avoid designing a system that needs to resize at short notice.

5Architecture and Components

The picture below shows how a managed instance sits inside your network and how the management side of Azure reaches it.

flowchart LR
  subgraph VNET["Your virtual network"]
    APP["Applications and tools"]
    subgraph SUB["Dedicated delegated subnet"]
      GW["Gateway nodes"]
      subgraph VC["Virtual cluster"]
        N1["Node with SQL engine: instance A"]
        N2["Node with SQL engine: instance B"]
      end
    end
  end
  ONP["On premises network via VPN or ExpressRoute"] --> GW
  APP -->|"Private endpoint on port 1433"| GW
  GW --> N1
  GW --> N2
  N1 --> ST["Azure storage for data, log and backups"]
  MGMT["Azure control plane and management service"] -.->|"Managed through a management endpoint"| VC
  PUB["Optional public endpoint on port 3342"] -.-> GW
Figure 1: A managed instance inside a delegated subnet, reachable privately and managed by Azure

The virtual cluster

When you create the first instance in a subnet, Azure builds a virtual cluster there, a group of machines it owns and runs. Your instances are placed on these machines, and their data is stored on the storage that matches the tier. You cannot sign in to the machines; you see only the instance. Later instances in the same subnet can reuse the same cluster, which makes them faster to create than the first.

The gateway

Applications connect to the instance’s host name, which resolves to a private address in your subnet. A gateway layer accepts the connection, checks it and finds the node currently hosting the instance. After a failover or a move, the gateway directs new connections to the new location, so the host name never changes. Connections inside your network can be redirected to talk to the node directly for lower delay, while connections that arrive across certain network paths use the proxy mode where the gateway stays in the middle.

The management plane

Azure needs to reach the cluster to create, update, back up and heal it. It does this through a dedicated management endpoint, which is why the subnet must allow certain traffic and must be delegated to the service. Modern deployments use intent-based network rules, where the service itself maintains the required route and security rules on the subnet, rather than leaving every rule to you. Putting your own unrelated resources in that subnet, or removing the managed rules, can break operations.

Storage and backups

Data files live on Azure storage in General Purpose, or on local disk in Business Critical. In both tiers, automated backups are written to separate Azure storage with the redundancy you choose. This means a failed node does not take backups with it, and a restore can happen on a different node entirely.

i
Think of it as a small data center in your subnet

The subnet, the cluster and the instances are a managed island inside your network. You control who can talk to it; Azure controls what runs inside.

6Networking in Depth: Living Inside Your Virtual Network

Networking is the part of Managed Instance that surprises newcomers most, and the part where early mistakes are most expensive. Understand it first and everything else becomes easier.

Why a dedicated subnet

Unlike Azure SQL Database, which is reached through a public service address, a managed instance is deployed into your virtual network and receives a private IP address from your own address range. This is what makes it feel like a server in your own data center: on-premises systems, other Azure resources and virtual machines reach it over private paths, and nothing on the public internet can touch it unless you choose to allow that. The cost of this closeness is planning. The instance needs its own subnet, and that subnet needs enough free addresses to host the cluster now and to grow later. The documented minimum size is small, around thirty-two addresses, but larger subnets give room for more instances and for service operations that temporarily need extra addresses.

Subnet rules

The subnet must be delegated to the managed instance service, which gives Azure permission to configure it. It must not hold other types of resources. It needs a route table and a network security group, and in the modern model these are maintained by the service itself so that the management traffic can always flow. Your job is to add your own rules around them, for example to control which application subnets may connect to the instance, never to delete the rules Azure created.

Endpoints

Default

Private endpoint

Reached by a host name that resolves to a private address, on the standard SQL port 1433, or redirect ports for direct connections. This is the normal path for applications.

Optional

Public endpoint

A separate host name that can be enabled on port 3342 for access from the internet, always protected by the subnet’s network security group. Use rarely and with narrow allowed addresses.

Management

Management endpoint

Used only by Azure to administer the cluster. You do not connect to it, but you must not block it.

flowchart TD
  subgraph HUB["Hub virtual network"]
    FW["Firewall and DNS"]
    VPN["VPN or ExpressRoute gateway"]
  end
  subgraph APPNET["Application virtual network"]
    WEB["App service or virtual machines"]
  end
  subgraph MINET["Managed instance virtual network"]
    MI["Managed instance in delegated subnet"]
  end
  CORP["On premises data center"] --> VPN
  VPN --> FW
  WEB -->|"VNet peering"| FW
  FW -->|"VNet peering"| MI
  WEB -.->|"Direct peering when allowed"| MI
Figure 2: A common hub-and-spoke layout where applications and on-premises systems reach the instance privately

Connecting from other places

Applications in the same virtual network connect directly. Applications in other virtual networks connect through virtual network peering, which links two networks so they can talk privately. Offices and data centers connect through a VPN gateway or a dedicated ExpressRoute circuit. Services such as Azure App Service can reach the instance through a network integration feature that places their outbound traffic inside your network. For each path, name resolution matters. The instance’s host name includes a unique DNS zone identifier, and every network that connects must resolve that name to the private address, either through Azure private DNS or through forwarding in your own DNS servers.

Network rules you will write

GoalWhere to configureTip
Allow an application subnet to connectNetwork security group on the managed instance subnetAllow only the needed ports from only the needed sources
Allow redirect-mode connectionsSame group, extra port rangeWithout them, clients fall back to the slower proxy path
Let on-premises systems connectVPN or ExpressRoute plus routes and DNSTest name resolution from an on-premises machine
Allow the internet inEnable the public endpoint and open port 3342 for chosen addresses onlyPrefer private paths; treat this as an exception
Let the instance reach other resourcesOutbound rules and routesNeeded for backups to storage, linked servers and mail relays
!
Do not put a firewall in the way of management traffic

Sending all subnet traffic through a network appliance that blocks the service’s management addresses will make operations fail and can even make the instance unhealthy. Follow the documented requirements before adding custom routes.

7Internal Working: Inside the Engine

A managed instance runs the same engine family as SQL Server, so knowing a few engine ideas explains most performance behavior.

From text to answer

When you send a query, the engine parses it, then asks the query optimizer to build a plan: a recipe that says which indexes to use, in what order to join tables and how to sort. The optimizer chooses by consulting statistics, small summaries of how values are distributed in each column. The plan is cached and reused. The executor then runs the plan, reading data pages and returning rows. When statistics are stale the optimizer can choose a poor plan, so the engine keeps them fresh automatically.

Memory, pages and the buffer pool

Data is stored in eight kilobyte pages. Recently used pages are kept in a memory area called the buffer pool. A read served from memory is far faster than one that must fetch from storage. This is why memory per core is one of the key choices of hardware generation, and why good indexes, which reduce the pages a query must touch, are so valuable.

Write-ahead logging

Changes are first written to the transaction log, and the commit is confirmed only after that record is safely stored. The changed data pages are written to the data files later in the background. After a crash, the engine replays the log to redo committed changes and undo unfinished ones. Because of this rule a confirmed transaction survives failures. Managed Instance also uses accelerated database recovery, which makes recovery and rollback fast even after very long transactions.

Everyday analogy

A baker writes each order on a ticket and pins it to a rail before baking. If the oven trips the power, the tickets on the rail tell exactly which loaves were promised. The rail is the log; the finished loaves on the shelf are the data files.

Locks and row versions

When many people work at once, the engine uses locks to stop conflicting changes. A database can also use row versioning, keeping older copies of rows so readers see a consistent snapshot and do not wait for writers. In Managed Instance, as in the cloud database service, new databases use read committed snapshot isolation by default, though a database restored from an older server keeps the setting it had. If your source application depended on classic locking behavior, check this setting during migration.

tempdb: the shared scratch area

Every query that sorts large results, builds temporary tables or uses row versions touches tempdb. It is shared by all databases in the instance, so one greedy query can slow its neighbors. In Managed Instance, tempdb lives on fast local disk, and its size is tied to the instance size. Watch it in monitoring, and avoid designs that create huge temporary tables.

Query Store and automatic tuning

The Query Store records the plans and run-time statistics of queries, creating a history you can compare week to week. With it, the engine can spot a plan regression, when a query suddenly slows because a worse plan was chosen, and the automatic tuning feature can force the earlier good plan back. Query Store is on by default for new databases but may be off in a database that was restored from an old server, so enable it deliberately.

Compatibility levels and update policy

Each database has a compatibility level that controls which optimizer and language behaviors it follows. Restored databases keep their old level until you raise it. Managed Instance also has an update policy choice: one policy keeps the instance on the newest engine features as Microsoft releases them, while another pins the available feature set to a specific SQL Server release such as 2022, so behavior stays predictable. Pick the one that fits how fast your team can test changes.

MechanismPurposeWhat to do about it
Optimizer and statisticsPick a cheap planKeep statistics fresh; write queries the optimizer can reason about
Buffer poolCache pages in memoryChoose enough memory per core; add useful indexes
Write-ahead logSafe, recoverable commitsMind log write throughput on busy systems
Row versioningReaders do not wait for writersKeep transactions short so version storage stays small
tempdbShared scratch spaceWatch size and contention; avoid giant temporary results
Query StorePlan and performance historyTurn it on; use it to find regressions
Compatibility levelOptimizer and language behaviorRaise deliberately after testing

8Data Flow and Lifecycle: From Click to Commit, and From Create to Retire

Two timelines matter. The short one is a single transaction. The long one is the life of the instance itself, from creation through updates to deletion.

sequenceDiagram
  participant App as Application
  participant GW as Gateway
  participant P as Primary node
  participant S as Secondary replicas
  App->>GW: Connect to instance host name and sign in
  GW->>P: Route the session
  App->>P: Begin transaction, change rows in two databases
  P->>P: Write log records
  P->>S: Send log records in Business Critical
  S-->>P: Acknowledge hardened log
  P-->>App: Commit confirmed
  P->>P: Flush data pages later
  Note over P,S: One transaction can span databases on the same instance
Figure 3: A transaction commit that spans two databases on one instance in the Business Critical tier

A transaction that crosses databases

One of the biggest reasons people choose Managed Instance is that a single transaction can change several databases on the same instance and still be atomic: all of it commits or none does. Reports can join tables across databases in one statement. In Azure SQL Database this is limited, and applications would need redesign. On a managed instance it simply works, just like on a server.

Step by step

1

Connect

The application resolves the instance host name to a private address, opens a pooled connection and signs in with a login, an Entra identity or a managed identity.

2

Plan and execute

The engine finds or builds a plan, takes locks or reads versions and changes pages in memory.

3

Harden the log

The log record is written durably, and in Business Critical to enough secondaries.

4

Confirm

Only now does the engine report success to the application.

5

Flush and back up

Pages are written to data files later, and log backups are taken regularly in the background.

The life of the instance: management operations

Creating, scaling, changing tiers, updating and deleting an instance are management operations. They run in the background and can take a long time. Creating the first instance in a new subnet may take hours because the virtual cluster has to be built. Adding another instance to an existing cluster is quicker. Scaling cores or storage can take minutes to hours depending on what must move. During many operations the instance stays online and then switches over at the end, causing a short disconnect, so retry logic is still required. Only one major operation runs at a time on an instance, and some operations queue behind others, so schedule changes with patience.

Maintenance and updates

Azure applies engine and platform updates automatically. You do not choose to install a patch, but you can set a maintenance window, a recurring time such as weekday nights or weekends, in which planned maintenance is allowed to happen. Unplanned events, such as a hardware fault, are handled at any time. After a maintenance step, your application will see a brief reconnect, which is why short, well-tested retry code is not optional.

Stopping and deleting

Because compute is billed while the instance exists, unused instances should be removed or, where the platform offers it, stopped. Deleting an instance deletes its databases, but backups from the retention window may remain available for restore for a time. Always take a final copy before deleting something that might be needed later.

i
Plan changes like a small project

Because operations are slow and exclusive, bundle changes together, run them in your quiet window, and tell the application owners. Avoid chains of many tiny scale operations.

9High Availability and Disaster Recovery

Two questions sit inside “reliable”: what if one machine breaks, and what if a whole region goes dark? Managed Instance answers each with different tools.

Built-in availability

Every instance is protected against machine failure at no extra charge. In General Purpose, a failed node is replaced by a new one that attaches the same storage, usually within a short time. In Business Critical, a secondary replica that is already running takes over almost immediately. The availability service level is 99.99 percent for typical configurations. During a failover, existing connections are dropped and new ones are routed to the new primary, so applications must reconnect.

Zone redundancy

In regions with availability zones, you can enable zone redundancy, which spreads the replicas across separate buildings with independent power and cooling. Losing a whole zone then does not take down the instance. It is a setting on the instance that adds cost but needs no application change, and it should be used for systems where a zone outage would be unacceptable.

Auto-failover groups for region failures

To survive the loss of a region, keep a second managed instance in another region and connect them with an auto-failover group. Data is copied asynchronously from the primary instance to the secondary. The group offers two stable names: a read-write listener that always points to the current primary, and a read-only listener that points to the secondary. When failover occurs, the names move, so connection strings stay the same. Failover can be started manually, or automatically after a grace period you set. The two instances need network connectivity to each other, typically through peering between their virtual networks, and matching DNS zone settings.

The managed instance link

The link feature connects a SQL Server running elsewhere, such as in your data center or on a virtual machine, to a managed instance using the same technology as availability groups. Data flows continuously from the source to the instance. This can be used to migrate with minimal downtime, to offload reporting to Azure, or as a disaster recovery site for an on-premises server. For certain versions, a failover can even move back from Azure to SQL Server. Supported source versions and rules change over time, so verify them before planning.

flowchart LR
  subgraph R1["Primary region"]
    MI1["Primary managed instance with zone redundancy"]
  end
  subgraph R2["Secondary region"]
    MI2["Secondary managed instance readable"]
  end
  APP["Application"] -->|"Read write listener"| FG["Auto failover group endpoints"]
  RPT["Reporting"] -->|"Read only listener"| FG
  FG --> MI1
  FG -.-> MI2
  MI1 -.->|"Asynchronous replication"| MI2
  SQL["On premises SQL Server"] -.->|"Managed instance link"| MI1
Figure 4: Auto-failover group between regions, plus a link from on-premises SQL Server
ProtectionSurvivesTypical data gapTypical recovery
Built-in replicas or node replacementMachine failureNoneSeconds to minutes
Zone redundancyZone failureNoneSeconds to minutes
Auto-failover groupRegion failureSeconds of recent dataMinutes
Geo-restore from backupsRegion failure, no secondaryUp to about an hourHours
Point-in-time restoreHuman or software errorBack to a chosen momentMinutes to hours
?
Replicas are not backups

A replica copies a mistaken delete as quickly as a good change. Recovering from human error needs backups and point-in-time restore, described next.

10Backup, Restore and Retention

Backups are automatic and need no schedule from you. What you decide is how long they are kept, where copies live and how you restore from them.

The automatic chain

The service takes full backups about weekly, differential backups every twelve hours or so, and transaction log backups every few minutes. Together they allow restoring a database to nearly any second within the retention period, called point-in-time restore. The short-term retention window is seven days by default and can be set between one and thirty-five. For longer needs, long-term retention keeps weekly, monthly and yearly full backups for up to ten years, which helps with audit and legal rules.

Where backups live

Backups are stored in storage managed by Azure, with redundancy you choose: local, zone, geo or geo-zone. Geo-redundant backups are copied to the paired region and make geo-restore possible if the home region is lost and no secondary instance exists. Backup storage up to the size of your reserved instance storage is generally included, and more is billed.

Restore creates something new

A point-in-time restore does not overwrite the existing database. It creates a new database on the same instance, or on another instance in the same region, at the moment you choose. You then inspect it, copy back the rows you need or swap names. This is safer, since a wrong choice of time can simply be repeated. It also means you need free storage and, for large restores, patience.

Native backups you control

Unlike the cloud database service, a managed instance also supports ordinary SQL Server backup commands, with some limits. You can take copy-only backups to Azure Blob Storage and restore databases from backups that sit in storage. This makes it possible to bring a database from an on-premises server by restoring a backup file, and to send a copy back out for a developer to inspect. The automatic backups remain in service control, and you cannot delete them, but your own copy-only backups are yours.

Restore type

Point in time

Bring a database back to a minute, hour or day within retention. The standard answer to a wrong update.

Restore type

Deleted database

Recover a database that was dropped, within the retention window.

Restore type

Long-term backup

Create a database from a weekly, monthly or yearly archive for audit or investigation.

Restore type

Cross-instance and geo-restore

Restore to another instance, or to another region from geo-redundant backups.

i
Rehearse the restore

Once a quarter, restore a database to a test instance and check that the application can use it. Time the exercise; the number you measure is your real recovery time.

11Instance-Level Features: The Reason Many Teams Choose It

The strongest argument for Managed Instance is a list of abilities that live at the instance level and are missing or limited in single cloud databases. This chapter walks through the most important ones.

SQL Server Agent: scheduled jobs

The SQL Server Agent runs jobs on a timetable: nightly index maintenance, data loads, report generation, cleanup. Jobs are made of steps, can send alerts, and are stored in the msdb database. Managed Instance supports the agent, so existing job definitions can be scripted from the old server and recreated, with some changes where steps relied on things that no longer exist, such as local file paths or operating system commands.

Cross-database queries and transactions

Many applications split data over several databases on the same server: one for customers, one for orders, one for reporting. A query can name tables from several of them, and a transaction can change them together. On a managed instance this works unchanged, as the databases share the instance. This single feature saves months of redesign for large legacy systems.

Linked servers and distributed transactions

A linked server lets a query read from another database system as if it were local. Managed Instance supports linked servers to other managed instances and to SQL Server, with restrictions on the sign-in methods and other target types. For transactions that must span instances, a server trust group can be set up between instances so that distributed transactions can commit across them.

Database Mail, Service Broker and CLR

Database Mail sends email from inside the database, for example order confirmations or alerts. Service Broker provides reliable message queues inside the database, within one instance. CLR integration lets you run compiled .NET code as database functions, though in a managed service it runs with restrictions and cannot touch the file system. If your old system used any of these, check each use against current support notes.

Replication and Machine Learning Services

Managed Instance can take part in transactional replication, as a publisher, distributor or subscriber, which helps migrate or synchronize data with other servers. It also offers Machine Learning Services for running R and Python scripts next to the data, so models can score rows without moving them out.

Server-level settings and logins

Because it is an instance, you manage server-level logins, server roles, credentials, linked server definitions and the instance’s own configuration options. Many applications connect with an instance login and expect it to exist. Migrating those logins, with their permissions, is part of any move.

FeatureAzure SQL DatabaseManaged InstanceWhat to check
SQL Agent jobsNoYesSteps that call the operating system
Cross-database queries and transactionsLimitedYes, within the instanceCalls to databases on other servers
Linked serversNoYes, with limitsAuthentication and target type
Database MailNoYesMail relay and network rules
Service BrokerNoYes, within the instanceCross-instance messaging
CLRVery limitedYes, with restrictionsAssemblies that read or write files
Transactional replicationSubscriber onlyPublisher, distributor and subscriberSource and target versions
Machine Learning ServicesNoYesPackage availability
Native backup and restore with files in Azure storageNoYesCopy-only rules

What remains missing

A short list of items still does not carry over. There is no access to the operating system or the file system, so jobs that run command-line programs or write to local disks must change. Some rarely used features, such as FILESTREAM for storing files in the file system, are not supported. Some instance settings are fixed by the platform. Always run an assessment tool against your source server to list the exact items that apply to you.

!
High compatibility is not total compatibility

Plan for a test phase in which every job, every report and every integration runs against the new instance. The surprises are usually in forgotten scripts, hard-coded server names and file path assumptions, not in the main application code.

12Security: Network, Identity, Encryption and Auditing

A database holds the most valuable data in a company, so it deserves several independent locks. Each layer below assumes the previous one may fail.

Layer 1: the network

The strongest protection of a managed instance is that it lives on a private address inside your virtual network. By default nothing from the public internet can reach it. Access is controlled by the network security group on its subnet, by the routes and firewalls in your network design, and by which networks you connect through peering, VPN or ExpressRoute. If you enable the public endpoint, restrict it to named source addresses and review it often. Many organizations leave it off entirely.

Layer 2: authentication

Managed Instance supports SQL authentication with logins and passwords, as old applications expect. It also supports Microsoft Entra authentication, which uses the company’s central identity system: people sign in with their normal account and multi-factor prompts, and removing a person from the directory removes their access. Applications running in Azure can use a managed identity, which proves who they are without any stored password. An Entra-only setting can switch off SQL logins when you are ready. Where legacy applications need Windows-style sign-in, check the current options for Kerberos-based authentication with Entra identities.

Layer 3: authorization

Authorization decides what each identity may do. Server roles and database roles give broad rights, and permissions on tables, views and stored procedures give narrow ones. Follow the principle of least privilege: the application account gets only what it needs. Row-level security filters rows by who is asking. Dynamic data masking hides parts of sensitive values for users without special permission.

Layer 4: encryption

Transparent data encryption, or TDE, encrypts data files, logs and backups at rest and is on by default. Keys can be service-managed or customer-managed in Azure Key Vault, which lets you rotate or revoke them. Connections use TLS, and you can require a minimum version. Always Encrypted protects chosen columns so that even administrators see only scrambled values, because the application holds the keys. Ledger tables add a cryptographic record that proves history has not been quietly changed.

Layer 5: auditing and detection

SQL Audit records events such as sign-ins, queries and permission changes to storage, a log analytics workspace or an event hub. Microsoft Defender for SQL adds vulnerability assessment, which scans for risky settings, and threat detection, which warns of unusual access or injection attempts. Data discovery and classification labels columns holding personal or financial data.

ThreatMain defense
Stranger scanning the internetPrivate address, no public endpoint, strict network security group
Stolen or reused passwordEntra authentication with multi-factor sign-in, managed identities, Entra-only mode
Over-powered application accountLeast-privilege roles, separate accounts per application
One tenant seeing another’s dataRow-level security and tested filters
Stolen backup or diskTransparent data encryption, customer-managed keys
Administrator reading secretsAlways Encrypted for chosen columns, auditing
SQL injectionParameterized queries, threat detection, least privilege
Quiet tamperingLedger tables, audit logs sent to protected storage
!
Never concatenate user input into query text

When text typed by a user becomes part of a query, an attacker can add commands of their own. Always pass user values as parameters, so the database treats them strictly as data.

13Performance, Scalability and Sizing

A managed instance slows down for only a few reasons: too little compute or memory, too much work per query, waiting on locks, or a slow path to storage. Sizing treats the first; good design treats the rest.

Scaling up and down

You change the number of cores, the tier or the reserved storage through a management operation. The instance usually stays online until a final switch, which drops connections briefly. Operations take longer than scaling a single database, so plan ahead and avoid resizing as a reaction to a sudden spike. Storage can generally grow, but shrinking is limited, so reserve with some headroom, not too much, because you pay for what you reserve.

Input and output speed in General Purpose

In the classic General Purpose design, the speed of each data or log file depends on the size of that file, because storage performance is tied to size. A database with many small files can show surprisingly low throughput compared with its total size. Teams sometimes fix this by making files larger, by consolidating them, or by moving the busiest databases to Business Critical, which uses local disks and does not have this effect. Read the current documentation, since newer General Purpose options change the rules.

Memory and the cache

The buffer pool holds hot pages. If the working set is bigger than memory, the engine keeps fetching pages from storage and everything slows. A higher memory-per-core hardware family is often cheaper than adding cores, if the real problem is cache misses. Metrics for page life and for read activity will tell which situation you are in.

Scaling out reads

In Business Critical, one built-in secondary replica accepts read-only connections when the connection string says the intent is read only. Reports and exports can use it, keeping the primary free for transactions. An auto-failover group’s read-only listener gives a similar benefit from the secondary region, with a short delay in freshness.

Queries come first

The worst slowdowns are often self-inflicted. Missing or unused indexes, fetching more columns than needed, running one query per row inside a loop and mismatched data types that block index use are the usual suspects. Fixing the top query often reduces load more than doubling the cores.

A worked sizing example

A company wants to consolidate 40 databases from two old servers onto one managed instance. Monitoring over a month shows the databases together average 10 cores of CPU use. At the busiest hour of the month end, the combined peak reaches 18 cores. They add 25 percent headroom, giving 22.5 cores. The next available size is 24 cores. On the standard hardware family with about 5.1 gigabytes of memory per core, that is roughly 122 gigabytes of memory, which they compare with the combined working set of their hot data. Storage: the databases total 2.4 terabytes, so with 30 percent growth planned over the next year they reserve about 3.1 terabytes and review it every quarter. Notice that they sized for the combined peak, not for the sum of each database’s individual peak, which would be many times larger.

Step 1

Measure real load

Collect CPU, memory, input and output and log rate from the source for at least a full business cycle, including month end.

Step 2

Find the combined peak

Add up usage for the same time window, not each database’s separate maximum.

Step 3

Add headroom

Twenty to thirty percent keeps latency stable under surprise load and during failovers.

Step 4

Choose tier and hardware

Pick Business Critical for strict delay and availability, memory optimized for large caches, standard for the rest.

Step 5

Test on a copy

Replay or simulate the workload on a trial instance and compare response times.

Step 6

Review monthly

Right-size after launch based on real data, not hopes.

14Monitoring, Logging and Metrics

Four views answer almost every question: what the platform measures, what the engine remembers, what the logs say, and what alerts tell you before users do.

Platform metrics

Azure Monitor shows numbers for each instance without any setup: average CPU percentage, storage space used and reserved, input and output requests and bytes, and, for the tier, measures such as log write rate. You can chart them, build dashboards and set alerts. Because the instance is shared by many databases, a single high number may come from one of them, so drill in with the engine’s own views.

Engine-level insight

The engine’s dynamic management views, called DMVs, show running requests, waiting tasks, blocking chains, memory use and index usage. The Query Store keeps the history of plans and runtime numbers per database. Extended Events capture detailed events for short investigations. Intelligent Insights and tuning recommendations point to patterns like regressions or resource limits. If you used SQL Server tools before, most of them work the same way.

Logs and auditing

Diagnostic settings can stream resource usage statistics, errors and, through SQL Audit, security events into a Log Analytics workspace, a storage account or an event hub. Send audit data to a protected location so an intruder cannot erase their own tracks. The errorlog and the history stored in msdb also remain available for jobs and backups.

Alerts that matter

Alert

Sustained high CPU

Above 80 percent for ten minutes. Check the top queries before resizing.

Alert

Storage near the reserved limit

When used space reaches 80 percent of reserved, writes will soon fail. Grow in advance, remembering operations take time.

Alert

Failed jobs

An agent job that stops quietly can mean stale reports for days. Alert on job failure.

Alert

Long-running operations

A management operation taking far longer than usual deserves attention or a support case.

Alert

Replication lag

A growing gap to the secondary shows how much data a failover could lose.

Alert

Security events

Defender findings and unusual sign-ins should reach a person fast.

A calm way to investigate slowness

1

Which resource is high?

Look at CPU, memory pressure, input and output and log rate at the instance level.

2

Which database and which queries?

Use the engine’s views and Query Store to find the top consumers.

3

What are they waiting for?

Wait types separate lock waits from log writes, data reads and CPU.

4

What changed?

Compare plans, deployments, statistics updates and traffic patterns.

5

Fix, then size

Tune queries and indexes first. Resize only if a healthy workload still needs more.

15Understanding the Bill: Compute, Storage and Licensing

The monthly cost is built from a few meters. If you know them, you can predict, reduce and explain the bill.

Meter 1

Compute

Billed per virtual core per hour while the instance exists, whether or not it is busy. This is usually the biggest part.

Meter 2

Storage

Billed for the storage you reserve, not the amount you fill.

Meter 3

Backup storage

Included up to the reserved storage size, then billed. Long-term retention and geo copies add more.

Meter 4

License

Included in the price, or removed from the price when you apply Azure Hybrid Benefit with your own SQL Server licenses.

Meter 5

Secondary instances

A failover group secondary is a full instance with its own compute and storage cost.

Meter 6

Network and add-ons

Data leaving Azure or crossing regions, plus services such as Defender and log analytics.

Ways to pay less

Right-size from real data and review it often. Apply the Azure Hybrid Benefit if you own SQL Server licenses with Software Assurance, which can cut the compute price substantially. Buy reserved capacity for one or three years for steady production instances. Use General Purpose unless you truly need Business Critical. Consolidate small databases onto fewer instances, and use instance pools for small instances. Remove abandoned test instances, and reduce retention on non-critical data. Microsoft has also offered limited free trials for new instances; check the current terms before relying on them.

A worked cost example

The prices below are made-up round numbers to show the shape of the saving. Take a General Purpose instance with 8 cores, running all month, 730 hours. If the license is included at 0.45 dollars per core-hour, compute costs 8 times 0.45 times 730, which is 2,628 dollars. With Azure Hybrid Benefit the rate falls to 0.20 per core-hour, giving 8 times 0.20 times 730, or 1,168 dollars, a saving of about 55 percent. Now add a three-year reservation worth, say, a further 30 percent off that rate, and the figure drops to about 818 dollars. The workload and the instance did not change at all; only the way it is paid for did.

Beware of idle instances

A managed instance bills while it exists. A developer instance that sits unused for the weekend costs as much as one running a heavy report. Where the service offers a stop and start capability, use it for non-production instances, and check availability and terms. Otherwise delete and recreate from a restore when needed, remembering that creation can take a while.

i
Costs hide in the copies

A production instance with a failover group secondary, a readable replica, long-term retention and zone redundancy may cost two to three times a bare instance. Make sure each extra has a reason someone can state out loud.

16Migration: Getting There from Your Existing SQL Server

Migration is the main reason most teams meet Managed Instance. The good news is that there are several well-trodden paths. The skill is choosing one that matches your database size and your tolerance for downtime.

Step zero: assess

Before moving anything, run Microsoft’s assessment tools against the source server. They list features in use, flag the ones that are unsupported or changed, estimate the instance size and sometimes suggest a tier. Treat the report as a to-do list. Common findings are jobs that call the operating system, references to local file paths, old compatibility levels, and server-level settings that must be recreated.

The main paths

Offline

Native backup and restore

Take a backup on the source, copy it to Azure Blob Storage and restore it onto the instance. Simple and reliable. Downtime lasts from the final backup until the new instance is ready.

Online

Log Replay Service

Restore a full backup, then continuously apply log backups as they arrive. At cutover you stop the source, apply the last log and switch. Downtime is short.

Online

Managed instance link

Stream changes continuously from SQL Server using availability group technology. Cutover is a controlled failover. Good for large databases and for keeping a fallback.

Guided

Azure Database Migration Service

A managed service that orchestrates offline or online migrations, usually built on the replay approach, with monitoring and a wizard in Azure Data Studio or the portal.

Small

Export and import of data packages

Works for small databases but is slow for large ones and does not carry instance-level objects such as jobs and logins.

Replication

Transactional replication

Use the instance as a subscriber to stay in sync during a long migration, useful for partial moves.

flowchart LR
  SRC["Source SQL Server"] -->|"1 Full backup"| BLOB["Azure Blob Storage"]
  SRC -->|"2 Continuous log backups"| BLOB
  BLOB -->|"3 Restore and replay"| LRS["Log Replay Service on managed instance"]
  LRS -->|"4 Stay in restoring state"| DB["Target database restoring"]
  CUT["Cutover: stop writes, last log backup"] --> LRS
  LRS -->|"5 Complete"| LIVE["Database online and writable"]
  APP["Applications"] -.->|"6 Switch connection string"| LIVE
Figure 5: An online migration that replays log backups until the moment of cutover

Moving the instance-level pieces

Databases are only half of the move. You must also carry across the logins and their permissions, the agent jobs and schedules, the alerts and operators, the linked server definitions, the Database Mail profiles and any server-level settings that the application relies on. Script these from the source and recreate them. Test every job once on the new instance, because jobs that worked for years may fail silently on the first run.

A migration plan in order

1

Assess and decide

List blockers, choose the tier and size, and decide the migration method from database sizes and downtime limits.

2

Build the network

Create the subnet, rules, DNS and connectivity from on-premises and from application networks before creating the instance.

3

Create the instance

Choose collation and time zone to match the source, then wait for the long first deployment.

4

Rehearse

Migrate a copy, run all jobs and integrations, and compare query results and speed.

5

Cut over

Pause writes, finish the sync, switch connection strings and verify.

6

Keep a fallback, then retire

Keep the source available for a set period, then decommission it once the new instance has proven itself.

!
Test speed, not only correctness

The same query may use a different plan on a newer engine or with different storage speed. After migration, check Query Store for plans that changed, and consider keeping the old compatibility level for a short time while you verify.

17Advantages, Disadvantages and Trade-offs

A fair look at strengths and limits helps you decide when Managed Instance is right and when its neighbors are better.

Advantages

  • Near-complete SQL Server compatibility, including agent jobs and cross-database queries
  • Minimal application changes when migrating
  • No hardware, operating system or engine patching to manage
  • Built-in high availability, automated backups and point-in-time restore
  • Private network placement with strong isolation
  • Entra authentication, encryption, auditing and Defender built in
  • License savings through Azure Hybrid Benefit and reservations

Disadvantages

  • Higher base cost than a single small database
  • Management operations are slow, from minutes to hours
  • Needs a dedicated, well-planned subnet and network rules
  • No operating system access; some features remain unsupported
  • No serverless pause and no Hyperscale tier
  • Instance-wide resource sharing means one busy database can affect others
  • Some settings, such as collation and time zone, are fixed at creation

How it compares with nearby choices

OptionStrengthPick it when
Azure SQL Managed InstanceManaged instance with high compatibilityMigrating SQL Server apps that use instance features
Azure SQL DatabaseLowest effort, serverless, Hyperscale, elastic poolsNew cloud applications and multi-tenant products
SQL Server on Azure VMFull control of operating system and engine versionFeatures or versions not offered by managed options
Azure Database for PostgreSQL or MySQLManaged open-source enginesTeams standardized on those engines
Azure Cosmos DBGlobally distributed documentsMassive scale-out and flexible schemas
Amazon RDS for SQL ServerComparable managed SQL Server on another cloudYour platform lives there

The three main trade-offs

Compatibility versus convenience. More instance features mean more things to move, test and own. Isolation versus cost. One instance with many databases is cheaper, but they share resources; several smaller instances isolate better and cost more. Agility versus control. A managed service removes chores but also removes the ability to tune the operating system, so decisions you could once make with a command line now have to fit the platform’s rules.

18Design Patterns and Anti-Patterns

A small set of shapes appears in healthy Managed Instance deployments, and a small set of mistakes appears in the unhealthy ones.

Patterns that work

Pattern

Hub and spoke networking

Place the instance in its own spoke network, connect applications and on-premises through a hub with shared firewall and DNS. Rules stay central and clear.

Pattern

Consolidation by workload

Group databases with similar load and security needs on one instance, and separate noisy or highly sensitive ones onto their own.

Pattern

Read offloading

Point reports at the readable secondary with read-only intent so heavy queries do not slow transactions.

Pattern

Phased modernization

Lift the whole system to Managed Instance first, then gradually move newer or simpler parts to Azure SQL Database, once the instance features are no longer needed.

Pattern

Link for hybrid recovery

Use the instance link to keep a continuously updated copy in Azure of an on-premises server, giving cloud disaster recovery before full migration.

Pattern

Infrastructure as code

Describe subnets, rules, instances and settings in templates, so environments are repeatable and reviewed.

Anti-patterns to avoid

ANTI-PATTERN 01Avoid
What it looks like

Choosing a tiny subnet, or sharing the subnet with virtual machines or other services.

Why it hurts

The instance cannot grow, operations fail for lack of addresses, and conflicting rules break management traffic. Moving an instance to a new subnet later is a big project.

Better choice

Reserve a generously sized, dedicated, delegated subnet from the start.

ANTI-PATTERN 02Avoid
What it looks like

Putting every database from every system onto one giant instance.

Why it hurts

One runaway query or a maintenance operation affects every application, and security boundaries blur.

Better choice

Group by workload and risk, accept several instances where isolation matters.

ANTI-PATTERN 03Avoid
What it looks like

Using the instance for workloads that need automatic pauses, quick scaling or per-minute resizing.

Why it hurts

Operations are slow and compute is billed continuously, so spiky or idle workloads waste money.

Better choice

Use Azure SQL Database serverless or elastic pools for variable loads.

ANTI-PATTERN 04Avoid
What it looks like

Exposing the public endpoint to the whole internet for convenience.

Why it hurts

It throws away the main security advantage of the product and invites constant attacks on logins.

Better choice

Use private paths, and if the public endpoint is unavoidable, allow only named source addresses and require strong authentication.

19Best Practices and Common Mistakes

These habits come from teams that have moved and run instances in production. Most cost little and prevent most painful stories.

1

Design the network first

Decide subnet size, rules, DNS and connectivity before creating the instance. Document them.

2

Match collation and time zone to the source

They cannot be changed afterward, and mismatches cause subtle sorting and date bugs.

3

Use Entra identities and managed identities

Reduce shared passwords, grant least privilege and consider Entra-only authentication.

4

Build retry logic

Handle brief disconnects after failovers, maintenance and scale changes, and make writes safe to repeat.

5

Turn on Query Store and review it

It is your history of plans, and the basis for fixing regressions.

6

Set a maintenance window

Choose a time when planned updates do least harm to the business.

7

Practice recovery

Restore to a test instance quarterly and rehearse failover for failover groups.

8

Watch cost and capacity monthly

Right-size cores and storage, remove idle instances and review reservations.

Common mistakes

Mistake

Underestimating deployment time

The first instance in a subnet may take hours. Plan project timelines and change windows accordingly.

Mistake

Breaking management routes

Overriding route tables or blocking required traffic can leave the instance unhealthy.

Mistake

Forgetting logins and jobs

Databases arrive but the application cannot sign in or the nightly job never runs, because instance-level objects were not migrated.

Mistake

Reserving too little or too much storage

Too little causes write failures, too much wastes money. Monitor and adjust with margin.

Mistake

Ignoring tempdb and file layout

Heavy temporary work or many small files in General Purpose can hurt speed unexpectedly.

Mistake

Treating replicas as backups

A bad delete reaches every replica instantly. Only backups bring data back.

Plan the network, migrate the instance-level pieces, and rehearse recovery before the day it matters.

20Failure Scenarios and Recovery

Failures come from hardware, software, people and attackers. The table pairs the usual ones with a first response.

ScenarioWhat you noticeRecovery
Node failure or platform updateBrief disconnects, short errorsAutomatic failover or node replacement; application retries and reconnects
Zone outageShort disruptionZone redundancy keeps replicas in other zones
Region outagePrimary region unreachableFail over the auto-failover group, or geo-restore if no secondary exists
Accidental delete or bad updateWrong or missing dataPoint-in-time restore to a new database, then copy rows back
Dropped databaseDatabase goneRestore the deleted database within retention
Storage reserve exhaustedWrites fail with space errorsIncrease reserved storage, free space, shorten large transactions
Subnet or route change breaks operationsManagement operations fail or instance reports unhealthyRestore required rules and routes; open a support case if needed
Blocking pile-upRequests wait, workers fillFind the head blocker in system views and fix the long transaction
Plan regression after updateA fast query becomes slowCompare plans in Query Store and force the earlier plan
Agent job silently failingStale reports or loadsAlert on job failure, fix steps that relied on the operating system
Compromised credentialsUnusual sign-ins or readsDisable the account, rotate secrets, review audit logs and Defender alerts

Recovery objectives in plain words

Two numbers guide a plan. The recovery point objective is how much recent data you can afford to lose, measured in time. The recovery time objective is how long the system may be unavailable. Zone redundancy offers near-zero loss and a fast switch. An auto-failover group offers seconds of possible loss and minutes of switch time. Backups offer a flexible point in time but a longer restore. Write both numbers down for each system, then pick the cheapest combination that meets them.

Everyday analogy

Think of protecting an important essay. Auto-save protects against a power cut. A copy on another computer protects against a stolen laptop. A dated folder of old versions protects against deleting the best paragraph last week. Each covers a different bad day.

Failing over with confidence

1

Confirm the problem

Check Azure service health and your metrics so you do not fail over because of an application bug.

2

Choose the failover type

Use planned failover when the primary is reachable so no data is lost. Use forced failover only when it is not, and accept possible loss.

3

Verify the application

Listener names move, so connections should recover. Check sign-ins, jobs and linked systems.

4

Rebuild protection

Create a new secondary so you are protected again, and plan any move back.

5

Write it down

Record timing and surprises, and improve the runbook.

21Real-World Usage Examples

Five common situations show how the ideas combine. Figures are illustrative, not from a particular customer.

An accounting system leaves the basement

A mid-sized company runs forty databases, agent jobs and a mail feature on one aging server. An assessment shows only a few file path references need fixing. They create a General Purpose instance sized from monitoring data, rehearse with native backup and restore, recreate logins and jobs, and cut over in a weekend. Applications change only their connection string.

A retailer with strict availability needs

An online retailer moves its order platform to Business Critical with zone redundancy, since every minute of downtime costs sales. Reports use the readable secondary. An auto-failover group to a second region covers a regional outage, and the team rehearses a planned failover every quarter.

A large database migrated with minimal downtime

A software company has a 6 terabyte database that cannot be offline for more than a few minutes. They use the instance link to stream changes from their on-premises SQL Server for several weeks, validate reports on the instance, and then perform a controlled failover on a Sunday night. The old server stays online as a fallback for two weeks.

Hybrid disaster recovery before full migration

A hospital group is not ready to move production but needs a better disaster recovery site. It links its on-premises SQL Server to a managed instance, which receives data continuously. If the data center fails, the team can bring the Azure copy online, and the same instance later becomes the migration target.

Small systems consolidated in an instance pool

An agency has many small line-of-business databases that each need modest power but must keep instance features. Placing several small instances in an instance pool lets them share underlying machines, so they are faster to create and cheaper than several full-size instances.

i
The common thread

Each story starts with an assessment, plans the network, chooses a tier by the cost of downtime, migrates the instance-level objects, and rehearses recovery before relying on it.

22Frequently Asked Questions

Short answers to the questions people ask most when they first meet Azure SQL Managed Instance.

Q1How is Managed Instance different from Azure SQL Database?
Managed Instance is a whole SQL Server instance with agent jobs, cross-database queries and other instance features, placed inside your virtual network. Azure SQL Database is a single database or pool with less administration and fewer instance features.
Q2Why does the first deployment take so long?
Azure must build a virtual cluster in your subnet. Later instances in the same subnet are faster.
Q3Can I connect to it from the internet?
Only if you enable the public endpoint, which uses port 3342 and must be restricted by network rules. The default is a private address only.
Q4Which tier should I choose?
General Purpose suits most business applications. Business Critical suits heavy transactions, strict availability and the lowest storage delay, at about twice the price per core.
Q5Can I change collation or time zone later?
No. The instance collation and time zone are fixed at creation, so match them to your source server.
Q6Do I need to take backups?
No. Automatic backups run for you. You choose retention and redundancy, can add long-term retention and can also take copy-only backups to Blob Storage.
Q7Does a restore overwrite my database?
No. A point-in-time restore creates a new database, which you then compare, copy from or switch to.
Q8How do I migrate with almost no downtime?
Use the Log Replay Service, the Azure Database Migration Service in online mode, or the managed instance link, and plan a short cutover when the final changes are applied.
Q9Can I use SQL Agent?
Yes. Jobs, schedules, alerts and operators work, though steps that call the operating system or local files must change.
Q10Is there a serverless option?
No. Managed Instance bills continuously while it exists. For idle-heavy workloads consider Azure SQL Database serverless, or stop and start features where offered.
Q11How do I protect against a region failure?
Create a second instance in another region and join them in an auto-failover group, with network connectivity between them. Geo-redundant backups also allow geo-restore.
Q12Can I use my existing SQL Server licenses?
Yes. Azure Hybrid Benefit lets you apply eligible licenses with Software Assurance to reduce the compute price.
Q13How many databases can one instance host?
Many, but there is an upper limit that depends on tier and size. Check the current limits table when planning consolidation.
Q14Why do I see a brief disconnect after scaling or maintenance?
Operations end with a switch to prepared resources, which drops open connections. Applications should retry and reconnect.
Q15Can I query other databases and servers?
Queries across databases on the same instance work normally. Linked servers to other instances and SQL Servers are supported with some limits on sign-in methods.
Q16How do I reduce the bill?
Right-size from real data, apply Azure Hybrid Benefit and reservations, choose General Purpose unless you need more, remove idle instances and review every extra replica.

23Summary and Key Takeaways

What to remember about Azure SQL Managed Instance

  • It is a managed whole instance. You get nearly full SQL Server compatibility, with agent jobs, cross-database queries and server-level objects, while Azure runs the machines, patches and backups.
  • It lives inside your network. A dedicated, delegated subnet, a private address and carefully maintained rules are the foundation; plan them before you create anything.
  • Pick the tier by the cost of downtime. General Purpose fits most systems with remote storage, and Business Critical adds local SSD, four replicas, a readable secondary and the lowest delay.
  • Layer your availability. Built-in replicas handle machine failure, zone redundancy handles a building, auto-failover groups handle a region, and backups with point-in-time restore handle human error.
  • Migration is a project with paths. Assess first, choose backup and restore, replay of log backups or the instance link by size and downtime, and carry logins, jobs and settings along with the databases.
  • Secure in layers. Private networking, Entra and managed identities, least privilege, encryption, auditing and Defender each cover a different threat.
  • Size from data and watch the cost. Use combined peak load, keep headroom, apply Hybrid Benefit and reservations, and remember that operations are slow, so plan changes in advance.