Issue with Azure Emulator and SQLLOCALDB

azure, azure-compute-emulator, sql-server-2008

Solution

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.

Problem

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

Original source