saintjab
saintjab

Reputation: 1642

Database name for found

I am trying to migrate my data from Parse to Azure DocumentDB. I copied the Connection String from the Portal to the Parse DashBoard for migration but I am getting error: 'You need to provide a database name'. What am I doing wrong? mongodb://server:password==@database_name.documents.azure.com:port/?ssl=true

Upvotes: 2

Views: 176

Answers (1)

David Makogon
David Makogon

Reputation: 71055

The issue is that, with DocumentDB, the top-level name (in your example, database_name) is the account name. Within that account, you have one or more databases. For example, here's my DocumentDB account, with a Parse database:

enter image description here

That database name needs to be added to your connection string. Using your example, it would be added like this:

mongodb://server:password==@database_name.documents.azure.com:port/parse?ssl=true

Notice the /parse part at the end: That's the database within the DocumentDB account.

What you're calling @database_name in your connection string is, in fact, the DocumentDB account name. So really, the proper way to think about it is:

mongodb://server:password==@docdb_account_name.documents.azure.com:port/docdb_database_name?ssl=true

Upvotes: 4

Related Questions