Skip to content

Commit 782d274

Browse files
Merge pull request #279876 from sajeetharan/vCore-migration
MongoDB doc updates
2 parents 10a764e + e84acb2 commit 782d274

File tree

2 files changed

+12
-6
lines changed

2 files changed

+12
-6
lines changed

articles/cosmos-db/mongodb/how-to-setup-rbac.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,12 @@ MongoClient client = new MongoClient(uri);
129129
mongosh --authenticationDatabase <YOUR_DB> --authenticationMechanism SCRAM-SHA-256 "mongodb://<YOUR_USERNAME>:<YOUR_PASSWORD>@<YOUR_HOST>:10255/?ssl=true&replicaSet=globaldb&retrywrites=false&maxIdleTimeMS=120000"
130130
```
131131

132+
## Authenticate using MongoDB Compass/Azure Data Studio
133+
```bash
134+
connectionString = "mongodb://" + "<YOUR_USER>" + ":" + "<YOUR_PASSWORD>" + "@" + "<YOUR_HOSTNAME>" + ":10255/" + "?ssl=true&retrywrites=false&replicaSet=globaldb&authmechanism=SCRAM-SHA-256&appname=@" + "<YOUR appName FROM CONNECTION STRING IN AZURE PORTAL>" + "@"
135+
+"&authSource=" +"<YOUR_DATABASE>";
136+
```
137+
132138
## Azure CLI RBAC Commands
133139
The RBAC management commands will only work with newer versions of the Azure CLI installed. See the Quickstart above on how to get started.
134140

articles/cosmos-db/mongodb/vcore/how-to-migrate-native-tools.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -157,13 +157,13 @@ Migrate a collection from the source MongoDB instance to the target Azure Cosmos
157157

158158
```bash
159159
mongorestore \
160-
--db <database-name> \
161-
--collection <collection-name> \
162-
--ssl \
163-
--uri <target-connection-string> \
164-
<dump-directory>/<database-name>/<collection-name>.bson
160+
--ssl \
161+
--uri <target-connection-string> \
162+
<dump-directory>/<database-name>/<collection-name>.bson
165163
```
166-
164+
> [!NOTE]
165+
> You can also restore a specific collection or collections from the dump-directory /directory. For example, the following operation restores a single collection from corresponding data files in the dump-directory / directory. ``` mongorestore --nsInclude=test.purchaseorders <dump-directory>/ ```
166+
167167
1. Monitor the terminal output from *mongoimport*. The output prints lines of text to the terminal with updates on the restore operation's status.
168168
169169
---

0 commit comments

Comments
 (0)