migration
856 TopicsWhy Your BACPAC Import Is Slow: Finding the Real Bottleneck
A slow BACPAC import is not automatically an Azure SQL performance problem. When an import runs for hours or days, people usually blame the target database. Often, they're wrong. The import could be waiting on the workstation running it, the network between that machine and Azure, SqlPackage settings, or the target database. The progress bar won't tell you which one it is. Before you scale up or restart a two-day import, work out where the slowdown actually is. Where the work actually happens A BACPAC import is not a server-side restore. A client tool (SqlPackage, SSMS, or the Import/Export service acting as the client) does this: Opens and unpacks the BACPAC file Builds the schema model in memory and creates the objects in the target Reads the table data from the file and bulk-inserts it across the network Rebuilds indexes and enables constraints Any of these steps can be the slow one. That's why you need to look at four things: the client, the network, the target, and the method itself. Use SqlPackage, not the portal For a database of any real size, run the import with SqlPackage rather than the portal. You get control over parameters and proper logs. Use the latest .NET version, because performance improvements ship regularly. A good baseline command with logging turned on: ./SqlPackage /Action:Import \ /sf:"C:\bacpac\mydb.bacpac" \ /tsn:"myserver.database.windows.net" \ /tdn:"MyDb" \ /ua:true /tid:"contoso.onmicrosoft.com" \ /df:"C:\bacpac\import.log" \ /DiagnosticsLevel:Verbose If you're investigating performance, also turn on performance tracing before you run it: Set-Item -Path Env:DACFX_PERF_TRACE -Value true It makes the log much bigger, so only use it while you're diagnosing. 1. Check the client The machine running SqlPackage does more work than people expect. Memory: the schema model is built in memory, and a large schema can use a lot of it. Disk: the BACPAC file has to be unpacked, so make sure there's enough fast local disk space. CPU: check whether any cores are maxed out during the data phase. Watch Task Manager or Performance Monitor while the import runs. If the client is maxed out while the target database is idle, scaling up the database won't help. 2. Check the network Running an import from an on-premises laptop over a VPN is the most common reason it's slow. High latency and connections that drop now and then slow down every batch of rows. Watch how much the client is sending over the network. If it stays at a low, steady level while the client and target both have spare capacity, the network is probably the limit. The quickest test is to copy the BACPAC file to an Azure VM in the same region as the target and run SqlPackage from there. Use SSD storage and enable accelerated networking on the VM. If the import gets much faster, you've found the cause. 3. Check the target Run this on the target database while the import is running: SELECT TOP (30) end_time, avg_cpu_percent, avg_data_io_percent, avg_log_write_percent, max_worker_percent FROM sys.dm_db_resource_stats ORDER BY end_time DESC; How to read it: What you see What it means avg_log_write_percent near 100% Log throughput is the limit. Scale up for the import. avg_data_io_percent near 100% Data I/O is the limit. Scale up for the import. avg_cpu_percent high Compute is the limit, especially during index rebuilds. Everything low the target isn't the problem. Look at the client and network or try increasing parallelism. Microsoft's guidance is to temporarily scale the target to a higher service tier for the import and scale back down afterwards. Business Critical or Premium gives the best import performance. Treat the scale-up as an experiment: record the numbers before and after so you know whether it helped. If the target is barely busy, SqlPackage may simply not be sending enough work in parallel. The default is 8. You can raise it with MaxParallelism:16. Increase it gradually and keep watching the target. For large tables with many indexes, p:RebuildIndexesOfflineForDataPhase=True can also speed up the index rebuild phase. 4. Is it slow, or stuck? A progress bar that hasn't moved doesn't mean nothing is happening. Run these checks on the target. Is there still activity? SELECT r.session_id, s.program_name, r.status, r.command, r.wait_type, r.wait_time, r.total_elapsed_time FROM sys.dm_exec_requests AS r JOIN sys.dm_exec_sessions AS s ON s.session_id = r.session_id WHERE r.session_id <> @@SPID; Are row counts going up? Run this twice, a few minutes apart: SELECT OBJECT_SCHEMA_NAME(object_id) AS schema_name, OBJECT_NAME(object_id) AS table_name, SUM(row_count) AS rows_loaded FROM sys.dm_db_partition_stats WHERE index_id IN (0, 1) GROUP BY object_id ORDER BY rows_loaded DESC; If rows are still being added, the import is slow but alive. If you see no sessions and no rows being added, the client has probably lost its connection. Scaling up won't fix that. You'll need to fix the connection and run the import again into an empty database. 5. Should you be using a BACPAC at all? A BACPAC is a logical copy of your schema and data. That works well for small and medium databases, but it gets painful for large ones that can only be offline for a short time. If your pilot shows the import won't fit your downtime window even with the best setup, look at a migration service such as Azure Database Migration Service instead. Run a pilot before you promise a time Don't promise a fixed speed like "X GB per hour". Results depend on schema complexity, the number and size of indexes, data types, the network and the target tier. Instead: Import a representative sample, or the full BACPAC into a non-production target. Try it from a remote workstation and from an Azure VM close to the target. Try it on the current tier and on a temporarily higher tier. Try it with the default parallelism and with a higher value. Record how long each run takes, how long the largest tables take (you can get this from the log), and what the target's resource use was. Base your cutover estimate on these measurements and allow some extra time. After the import Check for disabled indexes. If an import was interrupted after the data loaded but before the index rebuild finished, some indexes can be left disabled: SELECT OBJECT_SCHEMA_NAME(object_id) AS schema_name, OBJECT_NAME(object_id) AS table_name, name AS index_name FROM sys.indexes WHERE is_disabled = 1; Compare row counts between the source and the target. Update statistics. Scale the database back down to its normal production size. Quick checklist Latest SqlPackage (.NET version), not the portal Diagnostic log enabled (/df), plus the perf trace if you're investigating Client CPU, memory and disk checked Network ruled in or out (test from an Azure VM in the same region) sys.dm_db_resource_stats checked during the import Target scaled up for the import, with numbers recorded before and after Parallelism tuned only if the target is underused Slow vs stuck confirmed with row counts Indexes, row counts and statistics checked afterwards, and the tier scaled back down When an import is slow, find out which part is slow before you change anything. References: Troubleshoot issues and performance with SqlPackage Import a BACPAC file to Azure SQL DatabaseSQL Data Sync Is Retiring: How to Choose the Right Replacement
SQL Data Sync has a retirement date. Your synchronization requirements don't. Data Sync will be retired on 30 September 2027. Most teams already know they have to move off it. What they're less sure about is which replacement will keep the behavior their application relies on. Microsoft lists several alternatives, including Azure Data Factory, Azure Functions, transactional replication, active geo-replication, read replicas and Fabric mirroring. They all move data, but they solve very different problems, so none of them is a drop-in replacement. This post walks through a requirements-first way to choose. What's changing Data Sync synchronizes the tables you select between Azure SQL Database and SQL Server databases, in both directions. Customers mostly use it for three things: Hybrid sync between SQL Server and Azure SQL Database Reporting copies, which move read workloads to another database Globally distributed reads, with copies of the data in other regions As the retirement gets closer, you may find that some operations, such as creating new sync groups, are blocked. That's expected as part of the retirement, not a provisioning fault, so start planning the move rather than troubleshooting the error. Step 1: Take inventory You can't choose a replacement until you know what you have. For each sync group, record its hub, its members, and the tables and columns it syncs. You can list sync groups in the portal or with PowerShell: Get-AzSqlSyncGroup -ResourceGroupName "<rg>" -ServerName "<server>" -DatabaseName "<hub-db>" Get-AzSqlSyncMember -ResourceGroupName "<rg>" -ServerName "<server>" -DatabaseName "<hub-db>" -SyncGroupName "<group>" Data Sync also adds tracking triggers and metadata to every database in the group. To see where it's present: SELECT OBJECT_SCHEMA_NAME(parent_id) AS schema_name, OBJECT_NAME(parent_id) AS table_name, name AS trigger_name FROM sys.triggers WHERE name LIKE '%[_]dss[_]%'; SELECT name FROM sys.tables WHERE schema_id = SCHEMA_ID('DataSync'); Next, find out who actually uses the synced data. Check the reports, jobs and applications that read from each member. That will tell you how much latency and drift you can accept. Step 2: Classify each workload Fill in this worksheet once per sync group: Question Example answer Source platform SQL Server 2019 on-premises Destination platform Azure SQL Database Direction One-way / bidirectional Is the destination written to? Read-only / writable Acceptable latency Seconds / minutes / hours Conflict handling needed? None / last-writer-wins / custom Daily change volume ~2 million rows Recovery expectation Resume from last point / full reload acceptable Your answers to direction and writable destination will rule out most of the options straight away. Step 3: Use the requirements to rule options out Requirement Rules out Still in play Bidirectional, both sides writable Geo-replication, read replicas, transactional replication (standard), Fabric mirroring Redesign to a single writer, or a custom solution (ADF / Functions) with your own conflict logic Read-only copy in the same database Everything heavier than needed Read scale-out (read replicas) Read-only copy in another region Read scale-out Active geo-replication, ADF incremental copy SQL Server → Azure SQL Database, near real time ADF batch schedules (if latency is tight) Transactional replication (Azure SQL Database as push subscriber) Azure SQL Database as the source of replication Transactional replication (Azure SQL Database can't be a publisher) ADF, Azure Functions, geo-replication Subset of tables or columns, with transformation Geo-replication, read replicas (whole database only) ADF, Azure Functions Analytics in Fabric – Fabric mirroring One point catches people out: active geo-replication and read replicas are not general-purpose sync. They give you a read-only copy of the whole database. You can't write to the secondary, and you can't pick tables. Bidirectional sync is the hardest case. No managed service replaces it directly. Before you build custom two-way sync, check whether the application really needs to write in two places. Moving to a single writer is often simpler and more reliable. Step 4: One-way incremental copy example For many reporting workloads, one-way incremental sync is all you need. Change tracking keeps it cheap. Run this on the source: ALTER DATABASE CURRENT SET CHANGE_TRACKING = ON (CHANGE_RETENTION = 7 DAYS, AUTO_CLEANUP = ON); ALTER TABLE dbo.Orders ENABLE CHANGE_TRACKING; On each run, pull only the rows that changed since the last version you stored: DECLARE @last bigint = (SELECT LastVersion FROM dbo.SyncWatermark WHERE TableName = 'dbo.Orders'); DECLARE @current bigint = CHANGE_TRACKING_CURRENT_VERSION(); IF @last < CHANGE_TRACKING_MIN_VALID_VERSION(OBJECT_ID('dbo.Orders')) THROW 50001, 'Watermark is older than retention. Full reload required.', 1; SELECT ct.SYS_CHANGE_OPERATION, ct.OrderId, o.* FROM CHANGETABLE(CHANGES dbo.Orders, @last) AS ct LEFT JOIN dbo.Orders AS o ON o.OrderId = ct.OrderId; -- After the destination applies the batch successfully: UPDATE dbo.SyncWatermark SET LastVersion = @current WHERE TableName = 'dbo.Orders'; You can run this from an ADF pipeline or an Azure Function. If a table has a reliable ModifiedDate column and you don't need to track deletes, a timestamp watermark also works. Compare that with a bidirectional requirement. There, you'd also have to detect when both sides changed the same row, choose a winner, and prevent your own writes from echoing back. That's a lot more to build and test, which is why it's worth confirming you really need it. Step 5: Pilot, run both, then validate Don't switch over in one go. Run the new pipeline alongside Data Sync for a while and compare the results. Row counts: SELECT COUNT_BIG(*) AS row_count FROM dbo.Orders; A quick content check (run it on both sides and compare). Checksums can collide, so treat a match as a strong signal rather than proof: SELECT CHECKSUM_AGG(BINARY_CHECKSUM(*)) AS table_checksum FROM dbo.Orders; Latency: SELECT DATEDIFF(SECOND, MAX(ModifiedDate), SYSUTCDATETIME()) AS seconds_behind FROM dbo.Orders; Also test recovery. Stop the pipeline for longer than your normal interval, start it again, and confirm it catches up without losing or duplicating rows. Step 6: Decommission Data Sync cleanly Once the new path has been stable through your validation period: Delete the sync group. This stops sync and removes the group's configuration. Uninstall the Data Sync agent from any on-premises SQL Server hosts. Check that the _dss_ triggers and DataSync schema objects are gone from every member. If any are left, drop them in a maintenance window, because leftover triggers add overhead to every write. Remove firewall rules and credentials that only Data Sync used. Migration checklist All sync groups and members inventoried Worksheet completed for each workload Bidirectional needs confirmed or designed out Replacement chosen using the decision table Pilot running in parallel with Data Sync Row count, checksum, latency and recovery checks passed Consumers switched to the new path Sync groups deleted, agents removed, metadata cleaned up Finished well before 30 September 2027 Final thought Turning off Data Sync is the easy part. The real work is understanding what your application expects from it today. Start with the requirements, and the right replacement usually becomes obvious. Reference: SQL Data Sync retirement migration - Azure SQL Database | Microsoft LearnSupport Live Session Migration for Windows 11 Enterprise Multi-Session AVD Hosts
Description Azure Virtual Desktop administrators regularly encounter maintenance scenarios where a Windows 11 Enterprise Multi-Session session host must be removed from service to apply urgent patches, investigate platform issues, replace a host, or perform emergency maintenance. The current approach requires placing the session host into drain mode and waiting for active user sessions to disconnect or forcing user logoff, which can disrupt productivity and user experience. It would be valuable if Azure Virtual Desktop supported live migration of active user sessions between Windows 11 Enterprise Multi-Session hosts within the same host pool, similar to the way virtual machine live migration minimises downtime during infrastructure maintenance. This capability would allow administrators to move active sessions from one session host to another without requiring user disconnection or application interruption. This feature would provide significant operational benefits, including: Reduced user disruption during planned and emergency maintenance. Faster remediation of unhealthy or degraded session hosts. Improved patching and update operations. Reduced dependency on large maintenance windows. Improved service availability for business-critical AVD environments. Better support for future hot patching and rolling maintenance scenarios. While Windows 11 Enterprise Multi-Session differs significantly from Windows Server and traditional VM live migration technologies, the ability to seamlessly relocate active user sessions between healthy hosts in a host pool would be a major enhancement for enterprise Azure Virtual Desktop deployments operating at scale.329Views7likes2CommentsLost trying to activate Office Professional 2021 on machine Frankensteined from an old one
We had a terrible old PC that was running Office Pro 21 with valid key.~ I was given an nicer PC which was effectively a shell with two blank drives and a better spec. I placed the C from the old PC into a newer build and did a fresh Windows install and the Old C became a slave drive but was not wiped. I thought I would be able to install Windows Pro again on the new drive as it was a valid code but it seems not. Perhaps it's for one device only. The Old C became the E and is still accessible but I can't use and access the Office Suite and activation states that the code has already been used or is invalid. I don't know how to approach this. The original code was valid, can the code only be used on one device? I'm not sure how to resolve this. I would really appreciate some advice about how to approach this as the website doesn't really provide the answer. Please do ask if you have require any more info and thanks in advance for any help.108Views0likes1CommentIMAP Migration from Google Workspace to Microsoft 365
Hello Team, Greetings!! We have recently been experiencing significant delays during IMAP migrations from Google Workspace to Microsoft 365 and would like to understand if there are any known issues or recent changes affecting IMAP migration performance. We are aware that Microsoft provides the native Google Workspace migration method, which would generally be preferable. However, in our migration scenarios, we have split routing/coexistence configured, with the domain configured as Internal Relay in Exchange Online. Because of this setup, we are currently unable to select/configure the required target delivery domain as expected during the native Google Workspace migration process. Could you please confirm: Whether there are any known issues, throttling, or performance degradation with IMAP migrations from Google Workspace to Microsoft 365 recently? Whether the Internal Relay/split-routing configuration can affect the native Google Workspace migration process or the availability of the target delivery domain option? Is there any recommended configuration or workaround that would allow us to use the native Google Workspace migration while maintaining split routing? Any guidance or recommended approach would be highly appreciated.312Views0likes1CommentM365 Tenant to Tenant Migration
Hi Community, One of our customer currently migrating some OneDrive DATA from their old tenant to a new one. Customer wants to keep same domain names. So they must first remove them from the old tenant to create them in the new one. But they're afraid to loose the (OneDrive) DATA associated with the accounts when they will be moved to the initial ".ONMICROSOFT.COM" domain (which will happen after domain name removal). Questions: 1. What exactly happens with the accounts of OneDrive DATA once the old domain (wherein it was originally hosted) is removed ? 2. What is the best practice in this context to retrieve any associated DATA during/after migration? They want to check the priority steps knowing that they want to keep its domain name in the new tenant, which mean they'll have to detach the domain from tenant source to create it in target tenant 3. Should they first create a temporary domain where users will be migrated to, remove the domain name from tenant source to free it and create it in target tenant, then create the users ? or can they simply remove the domain name which will cause the existing users belonging to this domain to be automatically moved the initial .ONMICROSOFT.COM domain (with all the dependencies and OneDrive Data) ? Any pointers would be of great help! Many thanks in advance!3.9KViews0likes3CommentsNeed to Restore PST Files to Office 365 Mailboxes - What's the Best Approach
Hey everyone, I have a task coming up where I need to restore several PST files back into Office 365 mailboxes. Haven't done this before at this scale and honestly not sure where to begin. I've looked at Microsoft's native import service through Purview but I have a few concerns: Some of the PST files are quite large — not sure how well it handles that I need to restore only specific folders for some users, not the entire PST I'm worried about data consistency after the restore Would prefer something that doesn't require too many admin roles or complex setup For those who have done PST to Office 365 restores — what approach worked best for you? Any tools, tips, or things to watch out for that you wish you knew before starting?823Views0likes5CommentsMigrate to Azure SQL Database, including Hyperscale, straight from Azure Arc (public preview)
The challenge Most organisations do not run in one place. Estates stretch across on-premises datacentres, hybrid deployments and the cloud, and every migration decision must balance application dependencies, operational requirements and a modernization roadmap that is already in motion. Mixed environments and legacy dependencies make that harder, and needing a different tool for assessment, migration, monitoring and management harder still. The result is more operational effort, inconsistency between teams, and modernization that moves slower than anyone wants. Azure Arc already solves the first half of that problem. It discovers and assesses SQL Server estates at scale, so you know which databases are ready to move. The second half has been the gap: once a database is identified as migration-ready, the path to Azure SQL Database runs outside Arc. You leave the experience you were working in, learn Azure Database Migration Service, configure a Self-hosted Integration Runtime, and juggle several tools to get one database across. That fragmentation costs time, and it is one of the reasons why assessments do not turn into migrations. What's new Azure Arc Database Migration now adds Azure SQL Database; including Hyperscale as a supported migration target, in public preview. You can migrate Arc enabled SQL Server databases to Azure SQL Database through a single, guided experience in the Azure portal. Behind that experience, the workflow integrates Azure Database Migration Service and streamlines Self-hosted Integration Runtime setup directly into the migration journey. You assess, configure, migrate, monitor and complete the migration without leaving Arc. This is a logical migration performed by DMS through the Self-hosted Integration Runtime, so there is no separate staging step for you to plan or maintain but it requires a planned downtime. Why Hyperscale For many teams, the database that most requires modernizing is also the largest one they run. Hyperscale is the Azure SQL Database service tier built for exactly that case: a fully managed platform designed to scale storage and compute independently as a workload grows, so a large SQL Server database can move to a managed service without being re-architected first. Making Hyperscale reachable from Arc matters because it removes a decision point from the middle of the journey. The databases Arc flags as migration-ready are often the ones whose size is used to rule out a managed destination; and now the assessment and the target sit in the same place. One portal, one operational model The principle has not changed: one portal for discovery, assessment and migration. The entire migration lifecycle is managed from a single tool in the Azure portal; assess readiness, select a target, configure settings, choose databases and tables to migrate, monitor progress and validate the results. Migrating to Azure SQL Database follows the same operational model already available for existing migration scenarios in Arc. The same migration dashboard, the same monitoring experience and the same guided workflow apply regardless of destination. That reduces the learning curve, keeps operational processes consistent, and lets your team choose the most appropriate Azure SQL platform for each database without changing migration methodology. How it works The flow starts where you already are, in the Database migration pane of your Arc-enabled SQL Server instance. Assess in Arc. Readiness assessments are generated automatically every weekend, and you can run one manually in a few minutes if you would rather not wait. SQL Server migration in Azure Arc is available by default for Arc-enabled SQL Server instances starting with SQL Server 2014 (12.x). Choose your target. Select Azure SQL Database, including the Hyperscale service tier, for the databases the assessment identified as ready. Set up DMS and SHIR, guided. The portal walks you through creating the Azure Database Migration Service resource and registering a Self-hosted Integration Runtime, inside the same workflow rather than as separate homework. Migrate. DMS performs a logical migration of your schema and data to the Azure SQL Database target through the integration runtime. Monitor and Completion. Track progress on the migration dashboard you already use, validate the results when the migration is completed. Microsoft Copilot is built into the Database migration pane to help you along the way. Why SHIR, and what it means for you The Self-hosted Integration Runtime secures bridge that it acts as the connectivity layer that enables Azure Database Migration Service to securely connect to the source SQL Server and the target Azure SQL Database for data movement. Azure DMS is a fully managed service for migrations to Azure data platforms and can be driven from the Azure portal, PowerShell or the Azure CLI — the runtime is simply how it gets to your source. In practice, setup is guided and one-time. You register the runtime once during the migration workflow, and subsequent migrations from the same environment reuse it. Nothing about how you operate your Arc-enabled instances changes. Learn more details in the technical documentation. Get started Trying the preview takes three things: an Arc-enabled SQL Server instance, a recent readiness assessment, and a target Azure SQL Database. In the Azure portal, open your Arc-enabled SQL Server instance, go to the Database migration pane, review the assessment results, and choose Azure SQL Database as your target. The portal takes it from there. Learn more: SQL Server migration in Azure Arc What is Azure Database Migration Service Create a Self-hosted Integration Runtime Step-by-step guidance for the new target We want your feedback For product feedback, feature requests, or migration pain points you'd like the team to track and act on, please share them through aka.ms/sqlfeedback under the Migration & Modernization category.547Views0likes0Comments