azure data studio connection with azure sql server issue

Gupta, Sumit K 20 Reputation points
2025-05-29T16:43:08.6833333+00:00

Microsoft.Data.SqlClient.SqlException (0x80131904): 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: TCP Provider, error: 0 - A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.)

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.
141 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Manasa Akula 680 Reputation points Microsoft External Staff Moderator
    2025-05-30T19:31:16.56+00:00

    Hi @Gupta, Sumit K,
    Sorry to hear that it didn't work for you. Could you please try the steps mentioned below?

    The error Microsoft.Data.SqlClient.SqlException (0x80131904) typically indicates a problem with establishing a connection to a SQL Server database. This can be due to various reasons, such as:

    Network-related issues: The server might not be found or accessible. Ensure that the SQL Server instance name is correct and that remote connections are enabled.

    Login process errors: Sometimes, the connection is established, but an error occurs during the login process. This could be related to SSL certificate issues or authentication problems.

    Configuration settings: Incorrect settings in the connection string, such as timeout settings, encryption, or trusted connections, can also cause this error.

    Server Configuration management->SQL Server network config->protocols for 'servername' and check named pipes is enabled.

    change the Server Properties-->Security-->Server authentication from

    Windows Authentication mode to

    SQL Server and Windows Authentication mode.

    User's image

    Check these steps:

    1. Go to Sql Server Configuration management->SQL Server network config->protocols for 'servername' and check TCP/IP is enabled.
    2. Open SSMS in run, and check you are able to login to server using specfied username/password and/or using windows authentication.
    3. repeat step 1 for SQL native client config also.

    Could you please try firewall configuration was not correctly. So maybe it could help you!

    Configure the firewall to allow network traffic that is related to SQL Server and to the SQL Server Browser service.

    Four exceptions must be configured in Windows Firewall to allow access to SQL Server:

    A port exception for TCP Port 1433. In the New Inbound Rule Wizard dialog, use the following information to create a port exception: Select Port Select TCP and specify port 1433 Allow the connection Choose all three profiles (Domain, Private & Public) Name the rule “SQL – TCP 1433″ A port exception for UDP Port 1434. Click New Rule again and use the following information to create another port exception: Select Port Select UDP and specify port 1434 Allow the connection Choose all three profiles (Domain, Private & Public) Name the rule “SQL – UDP 1434 A program exception for sqlservr.exe. Click New Rule again and use the following information to create a program exception: Select Program Click Browse to select ‘sqlservr.exe’ at this location: [C:\Program Files\Microsoft SQL Server\MSSQL11.\MSSQL\Binn\sqlservr.exe] where is the name of your SQL instance. Allow the connection Choose all three profiles (Domain, Private & Public) Name the rule SQL – sqlservr.exe A program exception for sqlbrowser.exe Click New Rule again and use the following information to create another program exception: Select Program Click Browse to select sqlbrowser.exe at this location: [C:\Program Files\Microsoft SQL Server\90\Shared\sqlbrowser.exe]. Allow the connection Choose all three profiles (Domain, Private & Public) Name the rule SQL - sqlbrowser.exe

    Source: http://blog.citrix24.com/configure-sql-express-to-accept-remote-connections/

    Hope this helps. Please do let us know if you have any further queries.

    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.