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

Entity Framework Core
Entity Framework Core
A lightweight, extensible, open-source, and cross-platform version of the Entity Framework data access technology.
696 questions
.NET
.NET
Microsoft Technologies based on the .NET software framework.
3,389 questions
Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
4,616 questions
SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
12,743 questions
0 comments No comments
{count} votes

Accepted answer
  1. Erland Sommarskog 101.1K Reputation points MVP
    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