πŸ”’ Guided

Pre-launch preview. Authorised access only.

Incorrect code

Guided by A Guide to Cloud
Explore AB-900 AI-901
Guided DP-300 Domain 1
Domain 1 β€” Module 5 of 5 100%
5 of 28 overall

DP-300 Study Guide

Domain 1: Plan and Implement Data Platform Resources

  • Choose Your Azure SQL Platform Free
  • Deploy and Configure Azure SQL Free
  • Scale, Performance, and Compression Free
  • Migration Planning: Online vs Offline Free
  • Execute and Troubleshoot Migrations Free

Domain 2: Implement a Secure Environment

  • Entra Authentication for Azure SQL
  • Security Principals, Permissions, and T-SQL
  • Encryption: TDE, Always Encrypted, and VBS Enclaves
  • Network Security: Firewalls, Private Links, and Endpoints
  • Data Classification and Auditing
  • Data Masking, Ledger, and Row-Level Security

Domain 3: Monitor, Configure, and Optimize Database Resources

  • Performance Baselines and Monitoring Tools
  • Database Watcher and Extended Events
  • Query Store: Configure and Monitor
  • Blocking, DMVs, and Execution Plans
  • Index and Query Optimization
  • Database Maintenance: Indexes, Statistics, and Integrity
  • Automatic Tuning and Performance Settings

Domain 4: Configure and Manage Automation of Tasks

  • Automation Landscape: What Runs Where
  • SQL Server Agent Jobs
  • Deploy with ARM, Bicep, PowerShell, and CLI
  • Elastic Jobs and Azure Automation

Domain 5: Plan and Configure an HA/DR Environment

  • HA/DR Strategy: RPO, RTO, and Architecture
  • Backup and Restore: Strategy and Native Tools
  • Point-in-Time Restore, LTR, and Cloud Backup
  • Geo-Replication and Failover Groups
  • Always On: Availability Groups and FCIs
  • Log Shipping and HA/DR Operations

DP-300 Study Guide

Domain 1: Plan and Implement Data Platform Resources

  • Choose Your Azure SQL Platform Free
  • Deploy and Configure Azure SQL Free
  • Scale, Performance, and Compression Free
  • Migration Planning: Online vs Offline Free
  • Execute and Troubleshoot Migrations Free

Domain 2: Implement a Secure Environment

  • Entra Authentication for Azure SQL
  • Security Principals, Permissions, and T-SQL
  • Encryption: TDE, Always Encrypted, and VBS Enclaves
  • Network Security: Firewalls, Private Links, and Endpoints
  • Data Classification and Auditing
  • Data Masking, Ledger, and Row-Level Security

Domain 3: Monitor, Configure, and Optimize Database Resources

  • Performance Baselines and Monitoring Tools
  • Database Watcher and Extended Events
  • Query Store: Configure and Monitor
  • Blocking, DMVs, and Execution Plans
  • Index and Query Optimization
  • Database Maintenance: Indexes, Statistics, and Integrity
  • Automatic Tuning and Performance Settings

Domain 4: Configure and Manage Automation of Tasks

  • Automation Landscape: What Runs Where
  • SQL Server Agent Jobs
  • Deploy with ARM, Bicep, PowerShell, and CLI
  • Elastic Jobs and Azure Automation

Domain 5: Plan and Configure an HA/DR Environment

  • HA/DR Strategy: RPO, RTO, and Architecture
  • Backup and Restore: Strategy and Native Tools
  • Point-in-Time Restore, LTR, and Cloud Backup
  • Geo-Replication and Failover Groups
  • Always On: Availability Groups and FCIs
  • Log Shipping and HA/DR Operations
Domain 1: Plan and Implement Data Platform Resources Free ⏱ ~13 min read

Execute and Troubleshoot Migrations

Implement online and offline migrations to Azure. Migrate between Azure SQL services, use MI database copy and move, and troubleshoot common migration failures.

Executing migrations

β˜• Simple explanation

You’ve picked your new house and planned the move. Now it’s time to load the truck.

Offline is straightforward: pack everything, drive, unpack, done. Online is trickier β€” you’re forwarding mail while still living in the old house, then flipping the address at the last moment.

This module covers the actual execution β€” the tools, the steps, and what to do when things go wrong (because they will).

This module covers the implementation of migration strategies β€” step-by-step execution of both online and offline approaches, migrations between Azure SQL services, MI-specific copy/move operations, and troubleshooting common failures.

Offline migration: step by step

To Azure SQL Managed Instance (native backup/restore)

Kenji’s preferred method for databases with an acceptable downtime window:

  1. Take a full backup to Azure Blob Storage
BACKUP DATABASE NorthStarERP
TO URL = 'https://northstarstorage.blob.core.windows.net/backups/NorthStarERP.bak'
WITH CREDENTIAL = 'AzureStorageCredential', COMPRESSION;
  1. Restore on MI
RESTORE DATABASE NorthStarERP
FROM URL = 'https://northstarstorage.blob.core.windows.net/backups/NorthStarERP.bak';
  1. Validate β€” check row counts, run application smoke tests
  2. Redirect applications β€” update connection strings to MI endpoint

Key requirements:

  • Backup must be in Azure Blob Storage (MI can’t restore from local disk)
  • Use CREDENTIAL for storage authentication (SAS token or managed identity)
  • Backup must be compatible with the MI SQL version
  • COPY_ONLY backups recommended to avoid breaking on-prem log chains

To Azure SQL Database (BACPAC)

Priya uses BACPAC for new customer database provisioning:

  1. Export BACPAC from source (via SSMS, SqlPackage, or Azure Portal)
  2. Upload to Azure Blob Storage
  3. Import into Azure SQL Database (via Portal or SqlPackage)
# Export using SqlPackage
SqlPackage /Action:Export /ssn:source-server /sdn:MyDB /tf:MyDB.bacpac

# Import into Azure SQL Database
SqlPackage /Action:Import /tsn:myserver.database.windows.net \
  /tdn:MyDB /tu:admin /tp:Password /sf:MyDB.bacpac
πŸ’‘ BACPAC limitations

BACPAC files include both schema and data β€” but be aware:

  • No incremental sync β€” it’s a point-in-time snapshot
  • Size limit: Import can be slow for databases over 150 GB
  • Schema validation on import can fail if unsupported features are used
  • For large databases, consider DMS or native backup/restore (to MI) instead

Online migration: step by step

Azure DMS online migration to SQL Database

  1. Create a DMS instance in the Azure portal
  2. Create a migration project β€” specify source (on-prem SQL Server) and target (Azure SQL DB)
  3. Run pre-migration assessment β€” validates compatibility
  4. Start migration β€” DMS performs initial full data copy
  5. Continuous sync β€” DMS tails the transaction log, replicating ongoing changes
  6. Monitor sync status β€” check for replication lag in the DMS dashboard
  7. Cutover β€” when sync is caught up, stop application writes, wait for final sync, switch connection strings

Log Replay Service (LRS) to Managed Instance

Kenji’s method for the mission-critical ERP database:

  1. Configure continuous log backup shipping to Azure Blob Storage
  2. Start LRS in continuous mode
Start-AzSqlInstanceDatabaseLogReplay -ResourceGroupName "NorthStarRG" `
  -InstanceName "northstar-mi" -DatabaseName "NorthStarERP" `
  -StorageContainerUri "https://northstarstorage.blob.core.windows.net/logbackups" `
  -StorageContainerSasToken "sv=2021-06-08..." `
  -AutoComplete
  1. LRS restores full backup, then continuously restores differential and log backups
  2. Monitor progress β€” check restore status, replication lag
  3. Cutover β€” take a final log backup, LRS restores it, database comes online
  4. Redirect applications to MI
ℹ️ LRS auto-complete vs manual complete
  • Auto-complete: LRS completes automatically when it detects the last log backup (with NORECOVERY flag removed). Set the -AutoComplete flag.
  • Manual complete: You explicitly trigger the cutover with Complete-AzSqlInstanceDatabaseLogReplay. Gives more control over timing.

Auto-complete is simpler; manual is safer for mission-critical databases where you want to verify sync status before cutover.

Migrating between Azure SQL services

Sometimes the migration is within Azure β€” moving from one service to another:

From β†’ ToMethod
SQL Database β†’ SQL DatabaseDatabase copy, geo-replication, BACPAC
SQL Database β†’ Managed InstanceDMS, BACPAC export/import
Managed Instance β†’ SQL DatabaseBACPAC export/import (may lose MI-specific features)
Managed Instance β†’ Managed InstanceMI database copy, MI link, native backup/restore
SQL VM β†’ Managed InstanceDMS, native backup/restore, LRS
SQL VM β†’ SQL DatabaseDMS, BACPAC

MI database copy and move

Azure SQL Managed Instance supports database copy and move operations β€” particularly useful for:

  • Moving databases between MIs in different subscriptions or regions
  • Creating copies for testing/dev environments
  • Disaster recovery setup

Database copy

Creates a copy of a database on the same or different MI:

  • Same instance: Quick internal copy
  • Cross-instance: Uses managed instance link technology
  • The copy is a point-in-time snapshot
  • Source database remains online during copy

Database move

Transfers a database from one MI to another:

  • Source database is removed after successful transfer
  • Works across subscriptions and regions
  • Uses Azure Resource Manager for orchestration
πŸ’‘ Exam tip: copy vs move

The exam distinguishes between copy and move:

  • Copy = database exists on BOTH source and target after the operation
  • Move = database exists ONLY on the target after the operation (removed from source)

Both operations are initiated through the Azure portal, PowerShell, or CLI β€” not through T-SQL.

Troubleshooting migrations

Migrations fail. Kenji’s learned these lessons the hard way:

Common failure patterns

ProblemCauseFix
Compatibility errorsSource uses features not supported on targetRun DMA assessment first; remediate or choose different target
Timeout during importLarge database, slow network, insufficient target tierIncrease target tier temporarily; use native backup instead of BACPAC for large DBs
Login/user orphaningLogins exist on source server but not targetMap orphaned users with ALTER USER ... WITH LOGIN or create new logins
Collation mismatchSource and target have different default collationsSet explicit collation in CREATE DATABASE or use COLLATE in queries
Storage credential failuresSAS token expired, wrong permissions, wrong containerRegenerate SAS token with Read/List permissions; verify container path
DMS sync lag increasingSource generating changes faster than DMS can replicateIncrease DMS tier, reduce source write load, check network bandwidth
LRS stuck on a log backupMissing or corrupt log backup fileCheck blob storage for gaps in log sequence; re-take the missing backup

Post-migration validation checklist

  1. Row counts β€” compare source and target for all tables
  2. Checksum validation β€” verify data integrity
  3. Schema comparison β€” objects, indexes, constraints, permissions
  4. Application testing β€” run functional tests against the new target
  5. Performance testing β€” compare query execution times
  6. Security validation β€” logins, users, permissions, encryption status
  7. Monitoring setup β€” configure alerts on the new target

Tomas asks Sam: β€œWhat if the migration fails halfway through?” Sam replies: β€œThat’s why we always keep the source running until validation is complete. Offline migration? Don’t delete the source for at least two weeks. Online migration? Keep DMS running until you’re confident in the target.”

Question

What is an orphaned user in the context of migration?

Click or press Enter to reveal answer

Answer

An orphaned user is a database user that exists in the migrated database but has no matching login on the target server. Fix with ALTER USER ... WITH LOGIN or by creating the login on the target.

Click to flip back

Question

What's the difference between MI database copy and move?

Click or press Enter to reveal answer

Answer

Copy: database exists on both source and target after the operation. Move: database exists only on the target β€” it's removed from the source.

Click to flip back

Question

When using native backup/restore to migrate to MI, where must the backup file be stored?

Click or press Enter to reveal answer

Answer

Azure Blob Storage. MI cannot restore from local disk or network shares. Use BACKUP ... TO URL with a storage credential (SAS token or managed identity).

Click to flip back

Knowledge Check

Kenji migrated a database to Azure SQL MI using native backup/restore. Users report they can't log in. The error says 'user not found.' What is the most likely cause?

Knowledge Check

Priya needs to move a database from one Azure SQL Managed Instance to another in a different Azure subscription. The source database should not exist after the operation. What should she use?

Knowledge Check

During an LRS online migration to MI, Tomas notices the restore is stuck and not progressing. What should he check first?

🎬 Video coming soon

You’ve completed Domain 1! You now understand how to choose, deploy, scale, and migrate Azure SQL platforms.

Next up: Entra Authentication for Azure SQL β€” secure your databases with Microsoft Entra ID authentication.

← Previous

Migration Planning: Online vs Offline

Next β†’

Entra Authentication for Azure SQL

Guided

I learn, I simplify, I share.

A Guide to Cloud YouTube Feedback

© 2026 Sutheesh. All rights reserved.

Guided is an independent study resource and is not affiliated with, endorsed by, or officially connected to Microsoft. Microsoft, Azure, and related trademarks are property of Microsoft Corporation. Always verify information against Microsoft Learn.