Connect to SQL Server Database Engine using SQL Server Authentication - error

Tahmid Bari 0 Reputation points
2023-04-28T22:05:45.2266667+00:00

Hi Microsoft Team,

I am attempting to connect to our SQL Server 2019 database engine using SQL Server Management Studio (SSMS) 19.0.2, however I'm receiving the error message - Cannot connect to the server. When I use SQL Server Management Studio v18.10, I am able to connect to the same SQL Server database engine.

Could you kindly advise me if the current version (19.0.2) of SSMS prohibits access to SQL 2019 database engine? Thank you.

SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
13,967 questions
Azure Data Studio
Azure Data Studio
A cross-platform database tool for data professionals using on-premises and cloud data platforms on Windows, macOS, and Linux.
118 questions
{count} votes

5 answers

Sort by: Most helpful
  1. Vahid Ghafarpour 21,725 Reputation points
    2023-04-29T03:17:51.37+00:00

    There could be several reasons why you are unable to connect to the SQL Server 2019 database engine using SSMS 19.0.2. Here are some steps you can try to troubleshoot the issue:

    1. Check if the SQL Server service is running on the server.
    2. Ensure that you are using the correct server name and instance name.
    3. Check if the SQL Server is configured to allow remote connections.
    4. Verify if the SQL Server is configured to use TCP/IP protocol.
    5. Ensure that the SQL Server Browser service is running.
    6. Check if the Windows Firewall is blocking the connection to the SQL Server.
    7. Check if any antivirus software or security software is blocking the connection.
    8. Check if there are any network connectivity issues.

    If you have tried all of the above steps and still unable to connect, you can try the following:

    1. Use the IP address of the server instead of the server name.
    2. Try connecting using SQL Server Authentication instead of Windows Authentication.
    3. Try reinstalling SSMS 19.0.2 or applying any available updates.
    1 person found this answer helpful.
    0 comments No comments

  2. Erland Sommarskog 112.7K Reputation points MVP
    2023-04-29T08:47:38.7266667+00:00

    Can you show us the full error message?

    As there is no difference between SSMS 18 and SSMS 19 in this regard, it boils down to one of two things:

    1. You are not spelling the server/instance name correctly.
    2. You need to set some connection option for the connection to work. Go to the Options tab in SSMS 18 and SSMS 19 to compare your settings.
    1 person found this answer helpful.
    0 comments No comments

  3. AniyaTang-MSFT 12,446 Reputation points Microsoft Vendor
    2023-05-01T06:22:14.15+00:00

    Hi @Tahmid Bari

    According to official documentation: https://learn.microsoft.com/en-us/sql/ssms/download-sql-server-management-studio-ssms?view=sql-server-ver16#supported-sql-offerings, version 19.0.2 of SSMS is available for SQL Server 2014 and later, and provides the most important support for working with the latest cloud features in Azure SQL Database and Azure Synapse Analytics.

    Please check the suggestions above to troubleshoot the error of not connecting, or provide us with more detailed error information so that we can solve the problem for you.

    Best regards,

    Aniya

    0 comments No comments

  4. Volker Ph 0 Reputation points
    2023-06-13T09:00:37.1866667+00:00

    Hello,

    I have the same problem.

    Setup: SSMS 18.12.1 and SSMS 19.1 installed locally on the SQL Server 19 machine.
    SQL Server version:

    Microsoft SQL Server 2019 (RTM-CU20) (KB5024276) - 15.0.4312.2 (X64)   Apr  1 2023 12:10:46   Copyright (C) 2019 Microsoft Corporation  Standard Edition (64-bit) on Windows Server 2019 Standard 10.0 <X64> (Build 17763: ) (Hypervisor) 
    

    Network connections: TCP/IP with TLS and Shared Memory

    Local connection attempt to instance on the same Windows Server:

    18.12.1: connection with Windows Authentication suceeds.

    19.1: Error:

    TITLE: Connect to Server
    
    ------------------------------
    
    Cannot connect to SERVER\INSTANCE.
    
    ------------------------------
    
    ADDITIONAL INFORMATION:
    
    A connection was successfully established with the server, but then an error occurred during the login process. (provider: SSL Provider, error: 0 - The target principal name is incorrect.) (Microsoft SQL Server, Error: -2146893022)
    
    For help, click: https://docs.microsoft.com/sql/relational-databases/errors-events/mssqlserver--2146893022-database-engine-error
    
    ------------------------------
    
    The target principal name is incorrect
    
    ------------------------------
    
    BUTTONS:
    
    OK
    
    ------------------------------
    
    

    What is that "target principal"?

    Kind regards,
    Volker.


  5. 2023-12-12T12:03:25.28+00:00

    TITLE: Connect to Server


    Cannot connect to 197.59.20.190.


    ADDITIONAL INFORMATION:

    Property Login was not set. (Microsoft.SqlServer.ConnectionInfo)


    BUTTONS:

    OK


    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.