Import Data to DocumentDB from SQL Server

facebooktwittergoogle_plusredditpinterestlinkedinmail

This article explains the steps to import Data to DocumentDB from SQL Server using Data migration tool. To get an introduction to DocumentDB please go through http://www.dotnetreference.com/blog/azure-documentdb/introduction-to-azure-documentdb/

DocumentDB data migration tool is a free and open source tool, you can download it from Microsoft download center. Migration tool support many data sources. Today you can import data from existing JSON file, MongoDB , Sql Server , CSV , Azure Table Storage and other DocumentDB databases.

Demo: Sql server to Azure DocumentDB migration.

Download the migration tool from http://www.microsoft.com/en-us/download/details.aspx?id=46436 and open the dtui application file.
Azuremig1

Azuremig2

Azuremig3
Select SQL from the import from dropdown and give your local database connection string. Click verify.

Azuremig4

After successful verification, enter the query or import query from a file and click next

Azuremig5

Go to azure portal and copy the connection string of our DoucmentDB account from there.

Azuremig6

Select DocumentDB bulk import option and past the connection string .
Azuremig7

You need the manually append your DocumentDB database name at the end of connection string. Select pricing tier etc

Azuremig8

Azuremig9

Azuremig10

Azuremig11

Azureimplast

After successful import, you can see the collection on the Azure portal.

You might also like:

The following two tabs change content below.

Tom Mohan

Tom Mohan is a technologist who loves to code and build. He enjoys working on Microsoft Technologies. Tom specializes in ASP.NET MVC, Web API , Azure, C# ,WPF, SQL etc and holds a Bachelor engineering degree in Computer Science. Certification : MCSD , MCTS