Connecting Azure Cosmos DB with Azure Storage Explorer by using Connection String

By | January 25, 2018

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 SettingsConnection String Copy the Primary Connection String.

Obtaining Connection String for Azure Cosmos DB

Obtaining Connection String for Azure Cosmos DB

 

Connect Azure Storage Explore with Cosmos DB

From the Azure Storage Explorer left the tree, navigate to Local and AttachedAzure Cosmos DB Accounts, and right click on to it. choose Connect to Azure Cosmos DB.

 

Connect to Azure Cosmos DB

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.

Connect with Azure Cosmos DB API

Connect with Azure Cosmos DB API

Click on OK – It will pull all the related Databases, Sorted Procedure, Triggers etc. from your Azure Cosmos DB Account.

Explore Azure Cosmos DB

Explore Azure Cosmos DB

 

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.

Detach Cosmos DB From Storage Explorer

Detach Cosmos DB From 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.

2 thoughts on “Connecting Azure Cosmos DB with Azure Storage Explorer by using Connection String

  1. Pingback: Dew Drop - January 26, 2018 (#2652) - Morning Dew

  2. Pingback: Azure Weekly: Jan 29, 2018 – Build Azure

Leave a Reply

Your email address will not be published. Required fields are marked *

Verify Captcha * Time limit is exhausted. Please reload the CAPTCHA.