A fish out of water: Azure Storage Emulator Could not find a LocalDB Installation

I usually use the series A fish out of water when I want to write something that goes a little bit off-topic on my main blog topic: Enterprise Integration. But this time is different. This was kind of the first thing I thought when I saw this error happen since that didn’t make sense at all.

To contextualize better this reason and blog post, I have been testing the new Logic Apps (Preview) for a while, and if you already try it before, you will know that this new type of Logic Apps runs on top of Azure Function Runtime. This means that now you can run Logic Apps anywhere: in the cloud, on-premises, locally on your laptop, or wherever you need to.

One of the requirements necessary to have the full Logic Apps designer support in VS Code is the Microsoft Azure Storage Emulator 5.10 tool

Microsoft Azure Storage Emulator 5.10 tool – This tool is necessary to have the full Logic Apps designer support in VS Code. This tool will use a local Microsoft SQL Server Express LocalDB instance (you can also use a SQL Server instead) to emulate Azure storage services.

Everything was working properly for the last four months or more, however for no plausible reason today while I was trying to start the Microsoft Azure Storage Emulator I got this error:

Probing SQL Instance: ‘(localdb)\MSSQLLocalDB’.
Caught exception while probing for SQL endpoint. A network-related or instance-specific error occurred while discovering a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 50 – Local Database Runtime error occurred. Error occurred during LocalDB instance startup: SQL Server process failed to start.
)
Number of SqlErrors Reported: 1
SqlError: System.Data.SqlClient.SqlError: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 50 – Local Database Runtime error occurred. Error occurred during LocalDB instance startup: SQL Server process failed to start.
)
Could not find a LocalDB Installation.
Probing SQL Instance: ‘localhost\SQLExpress’.
Caught exception while probing for SQL endpoint. A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 – Error Locating Server/Instance Specified)
Number of SqlErrors Reported: 1
SqlError: System.Data.SqlClient.SqlError: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 – Error Locating Server/Instance Specified)
No available SQL Instance was found.
One or more initialization actions have failed. Resolve these errors before attempting to run the storage emulator again.

Cause

Again, I can’t find any plausible reason for this to start happend, except the fact that my machine installed some system updates.

Solution

I don’t know if all these steps are necessary or not, I was just simple frustrated about this situation because I need to present this topic in my upcoming sessions this week, so I didn’t test all the hypotheses available properly. Nevertheless, I managed to solve this issue by simply recreating my LocalDb instances and allowing the emulator to recreate his db files.

Here is the steps necessary to perform these tasks:

  • Get your current LocalDB instance name
 
sqllocaldb i 
  • Delete the existing LocalDB instance
    • If you feel more comfortable you can choose to stop the LocalDB instance before you delete
 
sqllocaldb d <LocalDB instance> 
  • Create your new LocalDB instance with the same name or a different one.
 
sqllocaldb c <LocalDB instance> 
  • and finally, you need to delete the following Azure Storage Emulator database files to allow the emulator to recreate db files on the first start.
    • C:\Users\<Username>\DevelopmentStorageDbxxx.mdf
    • C:\Users\<Username>\DevelopmentStorageDbxxx_log.ldf
Author: Sandro Pereira

Sandro Pereira lives in Portugal and works as a consultant at DevScope. In the past years, he has been working on implementing Integration scenarios both on-premises and cloud for various clients, each with different scenarios from a technical point of view, size, and criticality, using Microsoft Azure, Microsoft BizTalk Server and different technologies like AS2, EDI, RosettaNet, SAP, TIBCO etc. He is a regular blogger, international speaker, and technical reviewer of several BizTalk books all focused on Integration. He is also the author of the book “BizTalk Mapping Patterns & Best Practices”. He has been awarded MVP since 2011 for his contributions to the integration community.

Leave a Reply

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

BizTalk360
BizTalk Server

Over 500+ customers across
30+ countries depend on BizTalk360

Learn More
Serverless360
Azure

Manage and monitor serverless
components effortlessly

Learn More
Atomicscope
Business Users

Monitor your Business Activity in iPaaS
or Hybrid integration solutions

Learn More

Back to Top