how to fix the error occuring when trying the Update-Database command

NISSOU09 40 Reputation points
2024-04-01T12:10:03.4133333+00:00

when I try the command Update-Database i get the error 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) how can i fix it

Developer technologies | .NET | Entity Framework Core
Developer technologies | .NET | Other
Developer technologies | Visual Studio | Other
SQL Server | Other
0 comments No comments
{count} votes

Accepted answer
  1. Erland Sommarskog 121.9K Reputation points MVP Volunteer Moderator
    2024-04-01T12:26:59.0666667+00:00

    This is a generic message which means that the SQL Server instance you were trying to connect to was not reached.

    Common reasons include:

    • SQL Server not running.
    • Fat-fingering the server and / or the instance name.
    • Firewalls blocking.
    • And the list goes on.

    You can also try this general troubleshooter.


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.