How To Start Cosmos DB Emulator

How To Start Cosmos DB Emulator

This Azure tutorial will discuss how to start Cosmos DB Emulator.

How To Start Cosmos DB Emulator

Well, you are at the right place to know how to start a Cosmos DB emulator.

Assuming you have already installed the Azure Cosmos DB Emulator by now. If you have not yet installed it, you can download and install the Azure Cosmos DB Emulator now.

Once you have successfully installed the Azure Cosmos DB Emulator on your machine, you can follow the two quick steps below to start the Azure Cosmos DB Emulator.

  1. Click on the Start button.
  2. Search for the “Emulator” and click on the search result “Azure Cosmos DB Emulator,” as highlighted below.
cosmos db emulator

This is How do I open cosmos emulator?.

How to start cosmos DB emulator from command line?

You can also start the Azure Cosmos DB emulator from the command line.

  1. Open the Command prompt with Run as administrator mode.
  2. Go inside the Azure Cosmos DB installation folder by using the below command.
C:\WINDOWS\system32>cd C:\Program Files\Azure Cosmos DB Emulator

3. Now run the below command.

C:\Program Files\Azure Cosmos DB Emulator>.\Microsoft.Azure.Cosmos.Emulator.exe /AllowNetworkAccess /Key=C2y6yDjf5/R+ob0N8A7Cgv30VRDJIWEHLM +4QDU5DE2nQ9nDuVTqobD4b8mGGyPMbIZnqyMsEcaGQy67XIw/Jw==

Cosmos DB Emulator Localhost Refused To Connect

Sometimes, your Azure Cosmos DB Emulator localhost might not connect, and you might get the error “No connection could be made because the target machine actively refused it.”. To fix this issue, you need to follow the below information.

Cause of the Error

The cause of this error is that your local Azure Cosmos DB Emulator is not running.

Cosmos DB Emulator Localhost Refused To Connect [Solution]

The solution to fix this error is Just to check if your local Azure Cosmos DB Emulator is running or not.

This is how to fix the Cosmos DB Emulator Localhost Refused To Connect error.

How to start CosmosDB Emulator automatically upon machine startup?

Well, to start the Azure CosmosDB Emulator automatically, the information below can help you.

  1. Use the below command as a batch file or include it in a script.
"C:\Program Files\Azure Cosmos DB Emulator\CosmosDB.Emulator.exe" /noui

2. Run it with the help of a task scheduler.

You may also like following the articles below

Wrapping Up

Well, in this article, we have discussed How To Start Cosmos DB Emulator. I hope you have enjoyed this article !!!