[sql-server] How do I fix the error 'Named Pipes Provider, error 40 - Could not open a connection to' SQL Server'?

Open SQL Server Configuration Manager

  1. Select SQL Server Services from right.
  2. Find your server from right and go to its properties (with right click)
  3. Change log on method to Local System.

enter image description here

enter image description here