Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Issue with Azure Emulator and SQLLOCALDB

When in try to start Azure Storage Emulator I get the following error.

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 Sql Errors Reported: 1 Sql Error: 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)

All the Components have been correctly installed . Kindly Help Thanx

like image 297
user1553604 Avatar asked Sep 12 '25 10:09

user1553604


1 Answers

I managed to fix it by deleting and creating my LocalDb instance. In my case it happened because I installed Azure SDK 2.2 over version 2.1.

The step-by-step to fix it:

  • Run sqllocaldb i to get your instance name:
     C:\Users\myUser>sqllocaldb i
     v11.0
  • Stop LocalDB instance:
    C:\Users\myUser>sqllocaldb p v11.0
    LocalDB instance "v11.0" stopped.
  • Delete your LocalDB instance:
    C:\Users\myUser>sqllocaldb d v11.0
    LocalDB instance "v11.0" deleted.
  • Create your LocalDB instance with the same name:
    C:\Users\myUser>sqllocaldb c v11.0
    LocalDB instance "v11.0" created with version 11.0.
  • Delete database files to allow emulator to recreate db files
   C:\Users\myUser\DevelopmentStorageDb22.mdf
   C:\Users\myUser\DevelopmentStorageDb22_log.ldf

That should fix your issues.

like image 103
douglaslps Avatar answered Sep 15 '25 01:09

douglaslps