This Azure tutorial will discuss how to start Cosmos DB Emulator.
Table of Contents
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.
- Click on the Start button.
- Search for the “Emulator” and click on the search result “Azure Cosmos DB Emulator,” as highlighted below.
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.
- Open the Command prompt with Run as administrator mode.
- 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.
- 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
- How To Create An Azure Cosmos DB Account
- How to Create Azure Free Account (Step by Step tutorial)
- All About Partitioning In Azure Cosmos DB
- Azure Cosmos DB Emulator not working.
- CRUD Operations In Azure Cosmos DB C#
- Azure Cosmos DB Emulator port 8081 is already in use.
Well, in this article, we have discussed How To Start Cosmos DB Emulator. I hope you have enjoyed this article !!!
I am Rajkishore, and I have over 14 years of experience in Microsoft Azure and AWS, with good experience in Azure Functions, Storage, Virtual Machine, Logic Apps, PowerShell Commands, CLI Commands, Machine Learning, AI, Azure Cognitive Services, DevOps, etc. Not only that, I do have good real-time experience in designing and developing cloud-native data integrations on Azure or AWS, etc. I hope you will learn from these practical Azure tutorials. Read more.