I keep getting this massage when I try to connect to the SQL server

Kh. K 0 Reputation points
2023-02-13T14:55:05.37+00:00

TITLE: Connect to Server


Cannot connect to DESKTOP-Q0NAI1F\SQLEXPRESS.


ADDITIONAL INFORMATION:

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) (Microsoft SQL Server, Error: -1)

For help, click: https://docs.microsoft.com/sql/relational-databases/errors-events/mssqlserver--1-database-engine-error


BUTTONS:

OK


SQL Server | Other
{count} votes

3 answers

Sort by: Most helpful
  1. Zahid Butt 961 Reputation points
    2023-02-13T19:26:33.4+00:00
    0 comments No comments

  2. Erland Sommarskog 122.4K Reputation points MVP Volunteer Moderator
    2023-02-13T22:33:26.0666667+00:00

    This means that the SQL Server instance you are trying to connect to is not running or does not exist at all. There could also be firewalls in place. You can try this troubleshooter.

    0 comments No comments

  3. Seeya Xi-MSFT 16,661 Reputation points
    2023-02-14T02:55:43.28+00:00

    Hi @Kh. K,

    That Microsoft document Erland posted is very comprehensive.

    Step 1:Verify that the instance is running
    Step 2: Verify that the SQL Server Browser service is running

    Step 3: Verify the server name in the connection string

    Step 4: Verify the aliases on the client machines
    Step 5: Verify the firewall configuration
    Step 6: Verify the enabled protocols on SQL Server
    Step 7: Test TCP/IP connectivity
    Step 8: Test local connection
    Step 9: Test remote connection

    Best regards,

    Seeya


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    0 comments No comments

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.