Command "Update-database" not connecting to SQL server

30 views Asked by At

When I try to use the “Update-database” command, I always end up with this problem:

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 starting Local DB instance: SQL Server process startup failed.)

I'm using an HP EliteBook 860 16 inch G10 Notebook PC with Windows 11 23H2 installed.

To solve this error, I tried a few ways:

  • Redo the program from scratch;
  • Check that the connection string is correct (spoiler: it is);
  • Uninstall and install the program;
  • Uninstall Avira and use instead Windows defender;
  • Disable the firewall;
  • Install Microsoft’s SQL server instead of using the one that Visual Studio gives by default (Spoiler: not even the SQL server I installed works).

Despite I did all these ways, none of these solutions changed the situation.

0

There are 0 answers