Insights & Blog

SQL Server 2008/2012 to Azure SQL: Migration Challenges, Compatibility and Best Practices

SQL Server 2008 and 2012 are out of support, but Azure SQL still runs them at level 100/110. Target choice, tools, scripts and a safe path to raise compatibility.

By Hetal KSoftware Architecture, .NET & APIs

SQL Server 2008 Object Explorer showing databases at compatibility levels 100 and 110, Agent jobs, linked servers and DTS packages, plus legacy T-SQL, flowing into Azure SQL Managed Instance, Azure SQL Database, Azure Data Factory and Query Store, with a compatibility level upgrade script

A SQL Server 2012 to Azure SQL migration (or a move from SQL Server 2008 or 2008 R2) takes databases that have been out of support for years and lands them on a managed platform that is always patched. SQL Server 2008 and 2008 R2 left extended support in July 2019 and SQL Server 2012 in July 2022, and their Extended Security Update periods have also ended. The good news: Azure SQL still accepts these databases at their original compatibility level. The work is in the old features, the newer query optimizer and choosing the right Azure target.

Technically reviewed by Harshita Pipaliya.

This is the tenth article in our Legacy Modernization Series. For the general checklist on compatibility, downtime and cost for any SQL Server version, see our SQL Server to Azure SQL migration checklist. This guide focuses on what is specific to 2008 and 2012 estates.

Executive summary

  • Support: SQL Server 2012 support ended on July 12, 2022, with three years of Extended Security Updates after that (Microsoft Learn). SQL Server 2008 and 2008 R2 ended in July 2019, with ESUs that have also expired. SQL Server 2014 and 2016 have now reached end of support too (Microsoft Learn).
  • Compatibility: Azure SQL Database and Azure SQL Managed Instance both support database compatibility levels “170, 160, 150, 140, 130, 120, 110, 100”, so 2008 (100) and 2012 (110) databases can run unchanged at first (Microsoft Learn).
  • Tooling changes: Azure Data Studio “is retired as of February 28, 2026”, and the Azure SQL migration extension was retired with it. Use Azure Migrate for assessment and sizing, and Azure Database Migration Service (DMS) or Log Replay Service (LRS) for the move (Microsoft Learn).
  • Online options are narrower for old versions: Managed Instance link does not support sources older than SQL Server 2016, but LRS restores standard backups and “supports migrations from any source” (Microsoft Learn).
  • Our recommendation: most 2008/2012 estates fit Azure SQL Managed Instance best, because it keeps SQL Agent, cross-database queries, CLR and linked servers. Migrate at the existing compatibility level, capture a Query Store baseline, then raise the compatibility level deliberately.

Support status in 2026

VersionEnd of extended supportExtended Security Updates
SQL Server 2008 / 2008 R2July 9, 2019Ended (an extra year was offered only on Azure)
SQL Server 2012July 12, 2022Three years after end of support; ended July 2025
SQL Server 2014July 9, 2024Free ESUs on Azure VMs; paid elsewhere
SQL Server 2016July 14, 2026ESUs available through a paid subscription
Azure SQL Database / Managed InstanceEvergreen, always patchedNot needed

What this means: a SQL Server 2008 or 2012 instance receives no security fixes at all. Moving it to an Azure VM no longer extends support for these versions, so the realistic options are upgrading or moving to a managed Azure SQL service.

Why 2008 and 2012 databases are harder to move

  • Discontinued features. Code written for 2008 can use features removed in later versions, such as sp_dboption, the old RAISERROR integer 'string' syntax and COMPUTE BY.
  • Optimizer changes. The cardinality estimator changed in SQL Server 2014 (compatibility level 120). Raising the level can make some queries faster and others slower.
  • Instance-level dependencies. SQL Agent jobs, linked servers, Database Mail, SSIS and DTS packages, logins and server roles live outside the database.
  • CLR assemblies. Newer versions enable clr strict security by default, so unsigned SAFE assemblies that loaded on 2008 may need signing.
  • Old backups and old drivers. Backup to URL needs SQL Server 2012 SP1 CU2 or later, and very old client drivers may not support TLS 1.2.

Choosing the target: SQL Database, Managed Instance or SQL Server on a VM

TargetBest forTrade-offs
Azure SQL Managed InstanceMost 2008/2012 line-of-business databases with Agent jobs, cross-database queries, CLR or linked serversHigher entry cost than single databases; VNet design required
Azure SQL DatabaseSelf-contained databases for modern apps, SaaS and elastic poolsNo SQL Agent, cross-database queries, CLR, Service Broker or Database Mail
SQL Server on Azure VMsApps needing OS access, SSIS/SSRS on the same box or unsupported featuresYou patch and upgrade SQL Server yourself; still upgrade off 2008/2012

Feature comparison (from Microsoft’s Azure SQL features comparison):

FeatureAzure SQL DatabaseAzure SQL Managed Instance
SQL Server AgentNo (use elastic jobs)Yes
Cross-database queriesNo (use elastic query)Yes
CLRNoYes, without file system access
Service BrokerNoYes
Linked serversNoYes, to SQL Server and SQL Database
Database MailNoYes

Feature compatibility for 2008/2012 workloads

Legacy itemTypical issueRemediation
Compatibility level 100/110Runs as-is, but misses newer optimizer behaviourMigrate at 100/110, then raise with Query Store
Discontinued T-SQLFails at deployment or run timeFind with assessment tools and code search; rewrite
text, ntext, imageDeprecated, still workPlan a move to varchar(max), nvarchar(max), varbinary(max)
SQL Agent jobsNot in SQL DatabaseManaged Instance Agent, elastic jobs or Azure Data Factory
Cross-database queriesNot in SQL DatabaseManaged Instance, or consolidate schemas
CLR assembliesStrict security; no file access on MISign assemblies; move file logic to app tier
Linked servers to Oracle, Excel, AccessLimited or unsupportedAzure Data Factory, app-tier integration
DTS / SSIS packagesDTS unsupported since 2012Rebuild in Azure Data Factory or SSIS on Azure (next article)
Windows loginsNo on-premises AD in Azure SQLMicrosoft Entra ID authentication
Database mirroring, log shipping for DRReplaced by the platformBuilt-in high availability, geo-replication, failover groups
Encrypted columns, TDETDE certificates must move with backupsMigrate certificates before restore; consider Always Encrypted

This table combines Microsoft’s documented feature support with our delivery experience; confirm each item with an assessment of your own databases.

Migration methods and tools in 2026

MethodTargetDowntimeNotes for 2008/2012 sources
Azure Migrate (assessment)Alln/aDiscovery, readiness and sizing recommendations for Azure SQL targets
Native backup and restoreManaged Instance, VMOfflineBackup to URL needs 2012 SP1 CU2+; for 2008, back up to disk and upload to Blob Storage
Log Replay Service (LRS)Managed InstanceNear-onlineRestores full, differential and log backups; one LRS job runs at most 30 days
Managed Instance linkManaged InstanceOnlineNot supported for sources before SQL Server 2016
Azure Database Migration ServiceSQL Database, MI, VMOffline or onlineManaged service; check current source-version support for your path
Transactional replicationSQL Database (as subscriber)Near-onlineUseful for minimal downtime into SQL Database
BACPAC export/importSQL DatabaseOfflineSimple for small databases; slow for large ones

Tooling note: Azure Data Studio and its migration extension were retired on February 28, 2026. If older runbooks reference Data Migration Assistant or Azure Data Studio, update them to Azure Migrate and DMS.

Code and script patterns

The scripts below are illustrative and simplified. Test on a copy first.

1. Find databases still on old compatibility levels (run on the source):

SELECT name, compatibility_level, recovery_model_desc, state_desc
FROM sys.databases
WHERE database_id > 4
ORDER BY compatibility_level;

2. See which deprecated features are actually used since the last restart:

SELECT instance_name AS deprecated_feature, cntr_value AS times_used
FROM sys.dm_os_performance_counters
WHERE object_name LIKE '%Deprecated Features%'
  AND cntr_value > 0
ORDER BY cntr_value DESC;

3. On the target, capture a baseline before raising the compatibility level:

ALTER DATABASE CURRENT SET QUERY_STORE = ON;
ALTER DATABASE CURRENT SET QUERY_STORE (OPERATION_MODE = READ_WRITE);

-- Run representative workload at the original level (e.g. 110), then:
ALTER DATABASE CURRENT SET COMPATIBILITY_LEVEL = 160;

-- If a query regresses, force its previous good plan from Query Store:
-- EXEC sp_query_store_force_plan @query_id = 42, @plan_id = 7;

4. SQL Server 2012 SP1 CU2+ backup straight to Blob Storage for Managed Instance:

CREATE CREDENTIAL [https://mystorage.blob.core.windows.net/backups]
WITH IDENTITY = 'SHARED ACCESS SIGNATURE', SECRET = '<SAS token without leading ?>';

BACKUP DATABASE Sales
TO URL = 'https://mystorage.blob.core.windows.net/backups/Sales_full.bak'
WITH COPY_ONLY, CHECKSUM, COMPRESSION;

The exact credential syntax for backup to URL differs between SQL Server versions; check Microsoft’s documentation for yours.

SQL Server 2008/2012 to Azure SQL target architecture: on-premises SQL Server 2008 and 2012 instances with Agent jobs, linked servers, CLR and DTS/SSIS packages are assessed with Azure Migrate and moved by Log Replay Service, backup and restore, DMS or replication into Azure SQL Managed Instance and Azure SQL Database, with Azure Data Factory, private networking, Entra ID, Key Vault, failover groups and Query Store
  1. Azure SQL Managed Instance for instance-dependent databases, with Agent jobs and linked servers kept where needed.
  2. Azure SQL Database or elastic pools for self-contained databases behind modern apps.
  3. Private networking: private endpoints or VNet integration, no public endpoints, and ExpressRoute or VPN back to on-premises during transition.
  4. Microsoft Entra ID authentication, managed identities for apps, and secrets in Azure Key Vault.
  5. Integration: Azure Data Factory for ETL and DTS/SSIS replacements; see SharePoint vs Dataverse vs Azure SQL when app data could live elsewhere.
  6. Operations: automatic backups, failover groups for disaster recovery, Query Store and Azure Monitor.

Still running SQL Server 2008 or 2012? Talk to our Azure data team about an assessment and a target recommendation.

Step-by-step migration roadmap

  1. Discover and assess (1 to 3 weeks): inventory instances, databases, jobs, linked servers, logins, SSIS/DTS packages and connection strings; run Azure Migrate.
  2. Choose targets per database: Managed Instance, SQL Database or VM, using the feature table above.
  3. Remediate: rewrite discontinued T-SQL, sign CLR assemblies, replace DTS, update old client drivers for TLS 1.2.
  4. Build the landing zone: networking, Entra ID, Key Vault, monitoring and policy.
  5. Rehearse: migrate copies, run application tests at the original compatibility level, capture Query Store baselines.
  6. Migrate: LRS or backup/restore for Managed Instance, DMS or replication for SQL Database, in waves by application.
  7. Optimize: raise compatibility levels, fix regressions, right-size compute and decommission the old servers.

For downtime and cost planning details, use our SQL Server to Azure SQL migration checklist.

Security and identity

  • Authentication: move from Windows and SQL logins to Microsoft Entra ID; keep SQL logins only where an app cannot change yet.
  • Encryption: TDE is on by default for new Azure SQL databases; migrate existing TDE certificates before restoring encrypted backups.
  • Network: private endpoints, firewall rules and no public access by default.
  • Auditing and threat detection: enable auditing and Microsoft Defender for SQL.
  • Drivers: old applications may use clients that can’t negotiate TLS 1.2. Test connectivity early; this often forces small application changes, which our VB6 and VB.NET guides cover.

Testing, cutover and support

Testing

  • Row counts and checksums per table between source and target.
  • Application regression tests at the original compatibility level, then again after raising it.
  • Performance tests with Query Store comparisons.

Cutover

  • Freeze writes, apply the final log or differential backup (LRS) or stop replication, switch connection strings, and keep the source read-only for rollback.

Support

  • Azure SQL Database and Managed Instance are patched by Microsoft. Review the Managed Instance update policy and plan compatibility level upgrades as part of normal releases.

Cost, effort and timeline

The ranges below are indicative planning assumptions, not benchmarks or quotes. Azure consumption is extra; Azure Hybrid Benefit can reduce it if you have eligible licences.

Estate profileTypical scopeIndicative cost (USD)Indicative duration
SmallUp to 10 databases, under 500 GB, few jobs$10,000 to $40,0001 to 2 months
Medium10 to 100 databases, Agent jobs, linked servers, SSIS$40,000 to $200,0002 to 6 months
Large100+ databases, multiple instances, CLR, DTS, strict downtime$200,000 to $750,000+6 to 12+ months

Cost drivers: discontinued features in code, instance-level dependencies, ETL packages, downtime requirements and the number of applications to retest. See legacy application modernization cost and ROI.

FAQs

Can a SQL Server 2008 database be migrated directly to Azure SQL?

Yes. Azure SQL Database and Managed Instance support compatibility level 100, which is SQL Server 2008’s level. Backups can be restored to Managed Instance through Log Replay Service or native restore, and SQL Database migrations can use DMS, replication or BACPAC. Remove discontinued features first.

Is SQL Server 2012 still supported?

No. SQL Server 2012 extended support ended on July 12, 2022, and its three-year Extended Security Update period ended in July 2025.

Should we choose Azure SQL Database or Managed Instance?

Choose Managed Instance when databases rely on SQL Agent, cross-database queries, CLR, Service Broker, linked servers or Database Mail. Choose SQL Database for self-contained databases behind modern applications.

Do we need to change the compatibility level?

Not on day one. Migrate at 100 or 110 to reduce risk, capture a Query Store baseline, then raise the level and fix any regressions using Query Store.

Can we migrate online from SQL Server 2012?

Managed Instance link needs SQL Server 2016 or later, so it isn’t an option. Log Replay Service gives near-online migration to Managed Instance from standard backups, and transactional replication can feed Azure SQL Database.

What happened to Data Migration Assistant and Azure Data Studio?

Azure Data Studio and its Azure SQL migration extension were retired on February 28, 2026. Use Azure Migrate for assessment and Azure Database Migration Service or Log Replay Service for the migration.

How long does a SQL Server 2008/2012 migration take?

Small estates can move in one to two months. Large estates with many instances, CLR, DTS packages and strict downtime windows often take six to twelve months.

Conclusion

SQL Server 2008 and 2012 databases are out of support, but Azure SQL still runs them at their original compatibility level. That makes a managed move achievable: assess, pick Managed Instance or SQL Database per database, remediate discontinued features and instance dependencies, migrate with LRS or DMS, then raise compatibility levels with Query Store as your safety net.

Previous in this series: InfoPath and SharePoint Designer Workflows to Power Apps and Power Automate. Next: DTS/SSIS to Azure Data Factory.

Related services: Microsoft Azure · Legacy Software Modernization · Hire Azure Architects · Hire Data Engineers · DevOps Services

Sources

Plan your SQL Server to Azure SQL migration

Prominent.tech helps teams move SQL Server 2008 and 2012 databases to Azure SQL Managed Instance and Azure SQL Database, with assessment, remediation, low-downtime migration and post-move tuning. Talk to our Azure data team or explore our Microsoft Azure services.

From insight to implementation

Turn these ideas into a practical plan

Discuss how the ideas in this article apply to your business, systems and data. We’ll help you identify a focused first step.