When connected to a local server sql server reported about the error:
Title: ------------------------------ connection to the server can not connect to localhost. ---. . . . .
Open the windows service management interface (win + R keys)
Then find
It can connect again