This post was originally published here

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: ‘localhostSQLExpress’.
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
<pre class="wp-block-preformatted">
 
sqllocaldb i 

</pre>

  • Delete the existing LocalDB instance
    • If you feel more comfortable you can choose to stop the LocalDB instance before you delete
<pre class="wp-block-preformatted">
 
sqllocaldb d &amp;lt;LocalDB instance&gt; 

</pre>

  • Create your new LocalDB instance with the same name or a different one.
<pre class="wp-block-preformatted">
 
sqllocaldb c &amp;lt;LocalDB instance&gt; 

</pre>

  • 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

The post A fish out of water: Azure Storage Emulator Could not find a LocalDB Installation appeared first on SANDRO PEREIRA BIZTALK BLOG.