topic hubAdministration & Setupofficial - Microsoftreviewed - checked by Opus

Prepare

Preparation steps for migrating Business Central on-premises to Business Central online. It covers planning, data cleaning, SQL table alignment, compressed size estimation, performance tuning, upgrade considerations and the risks of migrating into live tenants.

Path: Administration > Migrate to Business Central online > Migrate from Business Central on-premises > Prepare · tier official · system administration · narrative reviewed (checked by Opus)

Overview

This section is the checklist to work through before running a cloud migration from Business Central on-premises. It starts with a planning page that helps you assess your current state, decide which company and extension data to migrate, estimate data size, prepare the database, and set up a governance plan with runbooks and a dry run cadence.

The other pages cover specific preparation tasks. They explain how to clean data (corrupted code fields and company names, compressing or archiving old data), how to make on-premises SQL table definitions match online ones, and how to estimate size with page compression, which all online tables use. Further pages cover upgrade considerations when coming from Dynamics NAV, performance tuning for large databases, and the risks of moving companies into a tenant that is already live.

Start with “Plan and Prepare for Business Central Cloud Migration”, then use the task pages that apply to your database. Read the live tenant page before you plan any migration into a tenant that is already in use.

Key points

  • Planning covers assessing current state, choosing company and extension data to migrate, estimating size, and building a governance plan with runbooks and dry runs.
  • Source and destination SQL tables must match on primary keys, field names, data types and field lengths for replication to work.
  • Clean data first: the Invoke-NAVSanitizeField cmdlet fixes corrupted code fields, and corrupted company names should be identified. Compress or archive outdated data.
  • All online tables use page compression, so on-premises database size can differ after migration. Use SQL Server compression estimates.
  • Performance for large databases can improve by deploying to Azure SQL, upscaling the database, reducing companies per batch, reorganizing indexes, updating statistics, and managing API data upgrades.
  • Migrating on-premises companies into live tenants after go-live is not officially supported and risks data loss, permission replacement (INTELLIGENT CLOUD permission set), per-database table issues, and duplicate upgrades.
  • Upgrade planning from Dynamics NAV covers extension V1 to V2 conversion, upgrade codeunits, per-tenant extensions, MenuSuite page and report search, CRM integration upgrade, and deprecated features to address before upgrading.

Learn pages

  • Align SQL Table Definitions for Cloud Migration: Learn which SQL table definitions must match between Business Central on-premises and online databases before you run cloud migration.
    • Prerequisite: Source and destination tables must have matching primary keys and field names with identical data types.
    • Replication checks field lengths and reports incompatible lengths as column-mapping errors.
    • Table names can differ if handled by table mapping during cloud migration setup.
    • Limit: Table and field IDs do not have to match for SQL replication.
    • Limit: Secondary keys do not have to match for SQL replication.
  • Business Central Upgrade Planning and Considerations: Review application, customization, schema, and data considerations when upgrading a Dynamics NAV solution to Business Central on-premises.
  • Clean Business Central Data Before Cloud Migration: Prepare Business Central on-premises data for cloud migration by sanitizing code fields, checking company names, and compressing or archiving old data.
    • Step: Open Business Central Administration Shell as administrator and run Invoke-NAVSanitizeField cmdlet against on-premises database.
    • Corrupted code fields contain invalid characters like lowercase letters and whitespace that must be deleted before migration.
    • Invoke-NAVSanitizeField cmdlet returns object containing number of rows modified, tables impacted, and potentially ignored records.
    • Company names with invalid characters prevent tables from being picked up for cloud migration.
    • Step: Use SQL query to identify corrupted company names with trailing spaces, leading spaces, line feeds, or carriage returns.
    • Compress and archive outdated data using Data Administration page 9035 before migration.
    • In the observatory: Page 9035 “Data Administration”
  • Estimate Compressed Data Size for Business Central Online: Estimate compressed data size for Business Central online before cloud migration by using SQL Server compression estimates for your source tables.
    • Data in Business Central online is compressed using SQL Server data compression feature.
    • All tables in online version compressed with CompressionType set to Page.
    • Data size in on-premises database may not match data size when migrated to online service.
    • Provided SQL stored procedure estimates compressed size of all or some tables in database.
    • Limit: Stored procedure sp_estimate_data_compression_savings fails if table has columns with ampersand in name.
  • Migrate Business Central Companies into Live Tenants: Learn about data loss, permissions, and upgrade risks when migrating Business Central on-premises companies into live online tenants.
    • Limit: Migrating companies to live tenants after going live is not officially supported and may cause data loss.
    • INTELLIGENT CLOUD permission set replaces system-scope assignments; SUPER and LOCAL assignments are retained.
    • Per-database table data created online can be lost if replaced during migration; Tenant Media should be safely migrated incrementally.
    • Limit: Running upgrade twice on cloud migration must be avoided; it risks updating data twice including per-database data.
    • Modifying data in replicated companies while system is live creates risk; users, jobs, or APIs might change data during migration.
    • No schema changes or extension installations allowed during replication; this causes data integrity issues.
    • Dataverse mapping and API integrations must be reconfigured on migrated companies after migration completes.
  • Optimize Business Central Cloud Migration Performance: Learn how to improve Business Central cloud migration performance by managing company batches, source database resources, and API data upgrades.
    • Deploy source database to Azure SQL Database instead of on-premises SQL Server to speed up replication.
    • Azure SQL Database eliminates need to install and maintain self-hosted integration runtime on-premises.
    • Monitor CPU and memory utilization in Azure portal using Metrics for Azure SQL Database.
    • Upscale Azure SQL Database when high CPU and memory consumption detected to improve performance.
    • Cloud migration recommends batches of fewer than 300 companies; not a hard limit but affects performance.
    • Break large-company migrations into smaller batches; migrate large companies individually if data sets exceed 50 GB.
    • Update statistics and reorganize indexes on all source database tables before migration.
    • Skip API data upgrade to avoid long-running upgrade; complete API upgrade after going live on tenant.
    • In the observatory: Page 40063 “Cloud Migration Management”, Page 9035 “Data Administration”, Page 9994 “API Data Upgrade List”
  • Plan and Prepare for Business Central Cloud Migration: This article provides recommendations to help you define your cloud migration strategy and get environments and users ready for cloud migration.
    • Step: Assess current on-premises environment including version, database size, customizations, and compliance requirements.
    • Per-database tables shared across companies and can be replicated regardless of which companies selected.
    • Prerequisite: Move all companies to tenant before going live; moving into live tenant can lead to data loss.
    • Extension data migrated only if extension installed in online environment and ReplicateData property set to true.
    • Limit: Data compression in online means on-premises database size may not match migrated data size.
    • Change tracking retention period should be at least three days for migration strategy.
    • Prerequisite: Keep environments on Business Central version used when cloud migration set up; do not update on-premises.
    • Create migration runbook documenting owners, dependencies, timelines, decision gates, and rollback options.
    • In the observatory: Page 40063 “Cloud Migration Management”

Key facts from Microsoft Learn (CC BY 4.0), in our own words (D106); open the page for the full text.

Source: Microsoft Learn (CC BY 4.0). Descriptions are Learn’s own.

What Learn documents here 7 Learn pages