Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>Azure DocumentDB MigrationNew to Visual Studio Code? Get it now.
Azure DocumentDB Migration

Azure DocumentDB Migration

Azure DocumentDB Migrations

|
1,886 installs
| (0) | Free
This extension helps you assess and migrate your databases to Azure DocumentDB.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Introduction

The Azure DocumentDB Migration extension for Visual Studio Code helps you assess and migrate your MongoDB workloads to Azure DocumentDB seamlessly. It offers two key capabilities:

1. Comprehensive Assessment

Quickly identify the actions needed for a smooth migration. The extension generates a detailed report at the account, database, and collection levels, categorizing findings as Critical, Warning, or Informational to help you prioritize. Key highlights include:

  • Live, resumable assessments: Follow per-step progress while an assessment runs, and resume failed, cancelled, or interrupted assessments.

  • Assessment-specific logs: Open logs shows only the selected assessment's diagnostics, including its resume attempts. Logs are stored in ~/.dmamongo/logs/DmaMongo-<assessment-ID-hash>.log; the shared DmaMongo.log is reserved for diagnostics outside an assessment run. Older shared logs are not included in the new assessment-specific files.

  • Unsupported Features and Syntax: Detects unsupported MongoDB features, commands, query syntax, and index types, along with usage frequency for prioritization.

  • Resource-Specific Recommendations: Provides actionable guidance for each affected resource, including technical details for remediation.

  • Environment Overview: Summarizes essential details of your MongoDB environment version, license, instance type, and database/collection statistics.

  • Compatibility and Platform Constraints: Highlights Azure DocumentDB specific quotas, and limits.

2. Online & Offline Migration

Accelerate your modernization journey with zero-cost migration in both online and offline modes. Migration jobs run entirely on Azure-managed resources, maintained by the Azure DocumentDB team, no infrastructure setup required.

  • Secure and Flexible: Initiate and monitor migrations without staying connected, ideal for large-scale or secure scenarios. Supports private endpoint-enabled targets for enterprise-grade security.

  • Target network validation: For public connectivity, targets with private endpoints and public access enabled show an Accept/Deny warning. Accept switches the wizard to Private and returns to the job configuration step; Deny keeps Public connectivity. Targets with public access disabled require private configuration or a different target. If network settings cannot be retrieved, no network warning is shown and existing validation still applies. Switching connectivity does not change the account's Azure network settings.

  • Source private endpoints: For Azure DocumentDB (vCore) sources using Private connectivity, select the source subscription, resource group, and private endpoint under Configure virtual network > Private source connection. Selecting an endpoint is optional; when selected, its DNS configuration must be valid before continuing, so the source DNS records can be published to the migration service.

  • Private source DNS resolution: For non-DocumentDB sources, under Configure virtual network > Private source FQDN resolution, optionally enter source hostnames and private IPs. This section is hidden for DocumentDB sources, which use DNS records from the selected source private endpoint. Blank rows are ignored; partially filled rows must be completed. These mappings populate privateConnectivityDetails.sourceDnsZones as {url, ipAddress} records. When no mappings are entered, the selected source private endpoint's DNS records are used automatically; otherwise the source DNS array is empty. Target endpoint records populate privateConnectivityDetails.targetDnsZone in the same format.

  • Broad Source Support: Migrate from self-hosted MongoDB, MongoDB Atlas, or other compatible sources all within a unified, intuitive VS Code experience.

Enjoy improved performance, reduced operational overhead, and a streamlined path to Azure DocumentDB without additional migration costs.

Troubleshooting

mongodb+srv:// connection fails with querySrv EBADRESP

On some networks (home routers, phone hotspots, and some VPN or corporate DNS servers), the DNS lookup for a mongodb+srv:// connection string fails before any connection is attempted. The cause is the DNS library bundled with recent VS Code builds, which rejects the DNS reply these servers send. The extension works around this automatically: it resolves the DNS records itself against the same DNS servers and connects with an equivalent mongodb:// connection string, kept in memory only. Your saved mongodb+srv:// connection string is not changed and is still the one used for migrations.

If the connection still fails:

  • Use a non-SRV mongodb://host1:port1,host2:port2/?tls=true&... connection string. List every host from the SRV record (nslookup -type=SRV _mongodb._tcp.<host>), and add any options from its TXT record (nslookup -type=TXT <host>).
  • Or switch the machine to a different DNS server. Note that this can affect VPN and private-endpoint name resolution.

The workaround can be controlled with environment variables, which must be set before VS Code starts:

Variable Effect
DOCUMENTDB_DISABLE_SRV_FALLBACK=1 Turns the workaround off.
DOCUMENTDB_DEBUG_FORCE_SRV_FALLBACK=1 Always uses the workaround (for testing).

To see how each mongodb+srv:// connection was resolved, set the extension's output channel log level to Trace and look for [SrvResolution] lines.

Telemetry

VS Code collects usage data and sends it to Microsoft to help improve our products and services. Read our privacy statement to learn more. If you don’t wish to send usage data to Microsoft, you can set the telemetry.enableTelemetry setting to false. Learn more in our FAQ.

Privacy Statement

To learn more about our Privacy Statement visit this link.

License

Copyright (c) Microsoft Corporation. All rights reserved. This extension is licensed under the EULA.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
  • Your Privacy Choices
  • Consumer Health Privacy
© 2026 Microsoft