In the previous post (Working with Azure Storage Explorer for Azure Cosmos DB ), we have discussed how we can use Azure Storage Explorer to connect and manage Azure Cosmos DB. Apart from connecting with Azure Cosmos DB using Azure Subscription, you can directly connect with Cosmos DB using the connection string. This is an alternative way of connecting to Azure Cosmos DB, and in this case, you don’t load all other Azure resources under your subscription. Just connect with what you need.
Use following steps to connect Azure Cosmos DB and Azure Storage Explorer using a connection string.
Obtain the Connection String
From the Azure Portal, Navigate to the respective Cosmos DB Resource, and from the left side panel Settings – Connection String Copy the Primary Connection String.
Connect Azure Storage Explore with Cosmos DB
From the Azure Storage Explorer left the tree, navigate to Local and Attached – Azure Cosmos DB Accounts, and right click on to it. choose Connect to Azure Cosmos DB.
Select the respective API for the Database (In this case I have MongoDB), and update the copied Connection String obtained from the Azure Portal.
Click on OK – It will pull all the related Databases, Sorted Procedure, Triggers etc. from your Azure Cosmos DB Account.
Detach the Cosmos DB from Storage Explorer
If you have multiple Cosmos DB Connected, or you want to disconnect any specific Cosmos DB, you can right-click on the respective account and Detach it from the Azure Storage Explorer.
With this, you can connect and work with Azure Cosmos DB using Azure Storage Explorer without attaching any other resources from your subscription.
Hope this helps.
Pingback: Dew Drop - January 26, 2018 (#2652) - Morning Dew
Pingback: Azure Weekly: Jan 29, 2018 – Build Azure