You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/cosmos-db/mongodb-compass.md
+9-8Lines changed: 9 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,42 +4,43 @@ description: Learn how to use MongoDB Compass to store and manage data in Azure
4
4
ms.service: cosmos-db
5
5
ms.subservice: cosmosdb-mongo
6
6
ms.topic: conceptual
7
-
ms.date: 06/24/2019
7
+
ms.date: 03/20/2020
8
8
author: LuisBosquez
9
9
ms.author: lbosq
10
10
---
11
11
12
-
# Use MongoDB Compass to connect to Azure Cosmos DB's API for MongoDB
12
+
# Use MongoDB Compass to connect to Azure Cosmos DB's API for MongoDB
13
13
14
-
This tutorial demonstrates how to use [MongoDB Compass](https://www.mongodb.com/products/compass) when storing and/or managing data in Cosmos DB. We use the Azure Cosmos DB's API for MongoDB for this walk-through. For those of you unfamiliar, Compass is a GUI for MongoDB. It is commonly used to visualize your data, run ad-hoc queries, along with managing your data.
14
+
This tutorial demonstrates how to use [MongoDB Compass](https://www.mongodb.com/products/compass) when storing and/or managing data in Cosmos DB. We use the Azure Cosmos DB's API for MongoDB for this walk-through. For those of you unfamiliar, Compass is a GUI for MongoDB. It is commonly used to visualize your data, run ad-hoc queries, along with managing your data.
15
15
16
16
Cosmos DB is Microsoft's globally distributed multi-model database service. You can quickly create and query document, key/value, and graph databases, all of which benefit from the global distribution and horizontal scale capabilities at the core of Cosmos DB.
17
17
18
+
## Pre-requisites
18
19
19
-
## Pre-requisites
20
20
To connect to your Cosmos DB account using Robo 3T, you must:
21
21
22
22
* Download and install [Compass](https://www.mongodb.com/download-center/compass?jmp=hero)
23
23
* Have your Cosmos DB [connection string](connect-mongodb-account.md) information
24
24
25
-
## Connect to Cosmos DB's API for MongoDB
25
+
## Connect to Cosmos DB's API for MongoDB
26
+
26
27
To connect your Cosmos DB account to Compass, you can follow the below steps:
27
28
28
29
1. Retrieve the connection information for your Cosmos account configured with Azure Cosmos DB's API MongoDB using the instructions [here](connect-mongodb-account.md).
29
30
30
31

31
32
32
-
2. Click on the button that says **Copy to clipboard** next to your **Primary/Secondary connection string** in Cosmos DB. Clicking this button will copy your entire connection string to your clipboard.
33
+
2. Click on the button that says **Copy to clipboard** next to your **Primary/Secondary connection string** in Cosmos DB. Clicking this button will copy your entire connection string to your clipboard.
33
34
34
35

35
36
36
-
3. Open Compass on your desktop/machine and click on **Connect** and then **Connect to...**.
37
+
3. Open Compass on your desktop/machine and click on **Connect** and then **Connect to...**.
37
38
38
39
4. Compass will automatically detect a connection string in the clipboard, and will prompt to ask whether you wish to use that to connect. Click on **Yes** as shown in the screenshot below.
39
40
40
41

41
42
42
-
5. Upon clicking **Yes** in the above step, your details from the connection string will be automatically populated. Remove the value automatically populated in the **Replica Set Name** field to ensure that is left blank.
43
+
5. Upon clicking **Yes** in the above step, your details from the connection string will be automatically populated. Remove the value automatically populated in the **Replica Set Name** field to ensure that is left blank.
43
44
44
45

title: Post-migration optimization steps with Azure Cosmos DB’s API for MongoDB
2
+
title: Post-migration optimization steps with Azure Cosmos DB's API for MongoDB
3
3
description: This doc provides the post-migration optimization techniques from MongoDB to Azure Cosmos DB's APi for Mongo DB.
4
4
author: LuisBosquez
5
5
ms.service: cosmos-db
6
6
ms.subservice: cosmosdb-mongo
7
7
ms.topic: conceptual
8
-
ms.date: 04/18/2019
8
+
ms.date: 03/20/2020
9
9
ms.author: lbosq
10
10
11
11
---
12
12
13
-
# Post-migration optimization steps when using Azure Cosmos DB’s API for MongoDB
13
+
# Post-migration optimization steps when using Azure Cosmos DB's API for MongoDB
14
14
15
-
After you migrate the data stored in MongoDB database to Azure Cosmos DB’s API for MongoDB, you can connect to Azure Cosmos DB and manage the data. This guide provides the steps you should consider after the migration. See the [Migrate MongoDB to Azure Cosmos DB’s API for MongoDB tutorial](../dms/tutorial-mongodb-cosmos-db.md) for the migration steps.
15
+
After you migrate the data stored in MongoDB database to Azure Cosmos DB's API for MongoDB, you can connect to Azure Cosmos DB and manage the data. This guide provides the steps you should consider after the migration. See the [Migrate MongoDB to Azure Cosmos DB's API for MongoDB tutorial](../dms/tutorial-mongodb-cosmos-db.md) for the migration steps.
16
16
17
17
In this guide, you will learn how to:
18
-
-[Connect your application](#connect-account)
19
-
-[Optimize the indexing policy](#indexing)
20
-
-[Configure global distribution for Azure Cosmos DB's API for MongoDB](#distribute-data)
21
-
-[Set consistency level](#consistency)
18
+
19
+
-[Connect your application](#connect-your-application)
20
+
-[Optimize the indexing policy](#optimize-the-indexing-policy)
21
+
-[Configure global distribution for Azure Cosmos DB's API for MongoDB](#globally-distribute-your-data)
22
+
-[Set consistency level](#set-consistency-level)
22
23
23
24
> [!NOTE]
24
25
> The only mandatory post-migration step on your application level is changing the connection string in your application to point to your new Azure Cosmos DB account. All other migration steps are recommended optimizations.
25
26
>
26
27
27
-
## <aid="connect-account"></a>Connect your application
28
+
## Connect your application
28
29
29
30
1. In a new window sign into the [Azure portal](https://www.portal.azure.com/)
30
31
2. From the [Azure portal](https://www.portal.azure.com/), in the left pane open the **All resources** menu and find the Azure Cosmos DB account to which you have migrated your data.
31
32
3. Open the **Connection String** blade. The right pane contains all the information that you need to successfully connect to your account.
32
-
4. Use the connection information in your application's configuration (or other relevant places) to reflect the Azure Cosmos DB's API for MongoDB connection in your app.
33
+
4. Use the connection information in your application's configuration (or other relevant places) to reflect the Azure Cosmos DB's API for MongoDB connection in your app.
For more details, please see the [Connect a MongoDB application to Azure Cosmos DB](connect-mongodb-account.md) page.
36
37
37
-
## <aid="indexing"></a>Optimize the indexing policy
38
+
## Optimize the indexing policy
38
39
39
40
All data fields are automatically indexed, by default, during the migration of data to Azure Cosmos DB. In many cases, this default indexing policy is acceptable. In general, removing indexes optimizes write requests and having the default indexing policy (i.e., automatic indexing) optimizes read requests.
40
41
41
42
For more information on indexing, see [Data indexing in Azure Cosmos DB's API for MongoDB](mongodb-indexing.md) as well as the [Indexing in Azure Cosmos DB](index-overview.md) articles.
42
43
43
-
## <aid="distribute-data"></a>Globally distribute your data
44
+
## Globally distribute your data
44
45
45
46
Azure Cosmos DB is available in all [Azure regions](https://azure.microsoft.com/regions/#services) worldwide. After selecting the default consistency level for your Azure Cosmos DB account, you can associate one or more Azure regions (depending on your global distribution needs). For high availability and business continuity, we always recommend running in at least 2 regions. You can review the tips for [optimizing cost of multi-region deployments in Azure Cosmos DB](optimize-cost-regions.md).
46
47
47
-
To globally distribute your data, please see [Distribute data globally on Azure Cosmos DB’s API for MongoDB](tutorial-global-distribution-mongodb.md).
48
+
To globally distribute your data, please see [Distribute data globally on Azure Cosmos DB's API for MongoDB](tutorial-global-distribution-mongodb.md).
49
+
50
+
## Set consistency level
48
51
49
-
## <aid="consistency"></a>Set consistency level
50
52
Azure Cosmos DB offers 5 well-defined [consistency levels](consistency-levels.md). To read about the mapping between MongoDB and Azure Cosmos DB consistency levels, read [Consistency levels and Azure Cosmos DB APIs](consistency-levels-across-apis.md). The default consistency level is the session consistency level. Changing the consistency level is optional and you can optimize it for your app. To change consistency level using Azure portal:
51
53
52
54
1. Go to the **Default Consistency** blade under Settings.
53
55
2. Select your [consistency level](consistency-levels.md)
54
56
55
-
Most users leave their consistency level at the default session consistency setting. However, there are [availability and performance tradeoffs for various consistency levels](consistency-levels-tradeoffs.md).
57
+
Most users leave their consistency level at the default session consistency setting. However, there are [availability and performance tradeoffs for various consistency levels](consistency-levels-tradeoffs.md).
56
58
57
59
## Next steps
58
60
@@ -62,9 +64,4 @@ Most users leave their consistency level at the default session consistency sett
62
64
*[Expire data with Azure Cosmos DB's API for MongoDB](mongodb-time-to-live.md)
63
65
*[Consistency Levels in Azure Cosmos DB](consistency-levels.md)
64
66
*[Indexing in Azure Cosmos DB](index-overview.md)
65
-
*[Request Units in Azure Cosmos DB](request-units.md)
66
-
67
-
68
-
69
-
70
-
67
+
*[Request Units in Azure Cosmos DB](request-units.md)
0 commit comments