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
Create a *my_script.js* script file to run from the MongoDB shell.
140
+
Create a *my_script.js* script file to run it from the MongoDB shell.
141
141
142
142
```JavaScript
143
143
let dogDocs = [
@@ -181,14 +181,15 @@ Create a *my_script.js* script file to run from the MongoDB shell.
181
181
```
182
182
183
183
This script file creates two collections and inserts documents with data into those collections.
184
+
Save my_script.js file in a folder accessible to the MongoDB shell session.
184
185
185
-
Run the script from the MongoDB shell.
186
+
Run the script from the MongoDB shell connected to the primary MongoDB cluster.
186
187
187
188
```MongoDB Shell
188
189
load(my_script.js);
189
190
```
190
191
191
-
In the MongoDB shell, read data from the database.
192
+
In the MongoDB shell connected to the primary MongoDB cluster, read data from the database.
192
193
193
194
```MongoDB Shell
194
195
db.dogs.find();
@@ -204,7 +205,7 @@ db.cats.find();
204
205
205
206
:::image type="content" source="media/quickstart-cross-region-replication/global-distribution-page-on-primary-cluster.png" alt-text="Screenshot of the global distribution preview page in the primary cluster properties.":::
206
207
207
-
1. Select *cluster replica name* to open the read cluster replica properties in the Azure portal.
208
+
1. Select *cluster replica name*in the **Read replica** field to open the read cluster replica properties in the Azure portal.
208
209
209
210
1. On the MongoDB vCore replica cluster page, under **Settings**, select **Networking**.
210
211
@@ -225,16 +226,17 @@ Get the connection string for the read cluster replica in another region.
225
226
1. Copy the value from the **Connection string** field.
226
227
227
228
> [!IMPORTANT]
228
-
> The connection string of the read replica cluster in the portal contains unique replica cluster name that you selected during replica creation. The username and password values for the read replica cluster are always the same as the ones on its primary cluster.
229
+
> The connection string of the read replica cluster contains unique *replica cluster name* that you selected during replica creation. The username and password values for the read replica cluster are always the same as the ones on its primary cluster.
229
230
230
231
1. In command line, use the MongDB shell to connect to the read replica cluster using its connection string.
0 commit comments