Unable to connect to Azure SQL database from SSMS

Luiz Santana 1 Reputation point MVP
2022-02-03T07:09:37.287+00:00

Hello, good night.

I can't connect my Azure SQL Database with Management Studio, Dbeaver, visual code or Data Studio.

This problem has been happening for a few days. This happens with any server I have in the Azure environment.

I have already reinstalled SQL Server Management Studio, I have already released the firewall ports and I have released the IP in the Azure Environment.

Below are the prints of the process.

170799-erro-sql-001.png

****tracert result on azure ip****

Tracing route to 52.167.104.0 over a maximum of 30 hops

1 1 ms 1 ms 1 ms dsldevice.lan [192.168.1.254]
2 3 ms 3 ms 3 ms 100.127.127.2
3 3 ms 3 ms 3 ms 10.177.177.1
4 5 ms 4 ms 6 ms 10.110.2.37
5 4 ms 8 ms 8 ms 204.199.48.181
6 22 ms 15 ms 20 ms ae32-30G.CSR1.FCS1.FOR.gblx.net [67.16.184.177]
7 29 ms 16 ms 40 ms 4.68.111.157
8 59 ms 49 ms 49 ms 4.69.214.246
9 50 ms 50 ms 49 ms telia-level3-10.NewYork1.Level3.net [4.68.110.82]
10 57 ms 62 ms 61 ms 104.44.230.126
11 135 ms 140 ms 137 ms be-23-0.ibr02.gru30.ntwk.msn.net [104.44.34.18]
12 135 ms 135 ms 157 ms be-5-0.ibr02.rio30.ntwk.msn.net [104.44.28.27]
13 139 ms 135 ms 135 ms be-3-0.ibr02.rio02.ntwk.msn.net [104.44.28.205]
14 135 ms 136 ms 140 ms be-2-0.ibr04.orf70.ntwk.msn.net [104.44.18.55]
15 146 ms 138 ms 135 ms be-6-0.ibr04.bn6.ntwk.msn.net [104.44.29.143]
16 142 ms 139 ms 137 ms ae160-0.icr03.bn6.ntwk.msn.net [104.44.20.136]
17 * * * Request timed out.
18 * * * Request timed out.
19 * * * Request timed out.
20 * * * Request timed out.
21 * * * Request timed out.
22 * * * Request timed out.
23 * * * Request timed out.
24 * * * Request timed out.
25 * * * Request timed out.
26 * * * Request timed out.
27 * * * Request timed out.
28 * * * Request timed out.
29 * * * Request timed out.
30 * * * Request timed out.

Trace complete.

170833-erro-sql-002.png

170866-erro-sql-003.png

170800-erro-sql-004.png

170830-erro-sql-005.png

I need help to solve this problem.

Azure SQL Database
{count} votes

4 answers

Sort by: Most helpful
  1. Erland Sommarskog 121.4K Reputation points MVP Volunteer Moderator
    2022-02-03T23:12:57.893+00:00

    Reinstalling SSMS is not going to help. That is not where the problem lies. To me it seems like it is a firewall issue. That is, the firewall for your database is not set up to accept the address you are connecting from.

    I don't know how your connection looks like, but I have to update my firewall rules in Azure every now and then, since the IP-address I get from my broadband provider changes. (And I don't fancy opening the full range, so that some over customer can get to my databases.)

    Then again, SSMS usually detects this and offers me to update the firewall rules. You are running SSMS 18.10, aren't you?

    1 person found this answer helpful.
    0 comments No comments

  2. Patrick C 81 Reputation points
    2022-02-03T20:06:17.16+00:00

    Do you happen to have a VM in Azure you can use to test connectivity?

    0 comments No comments

  3. YufeiShao-msft 7,146 Reputation points
    2022-02-04T06:58:55.757+00:00

    Hi @Luiz Santana ,

    Whether the connection can be tested successfully by telneting to port 1433 of the Target server name
    enable the NSG had port 80, 433 and 1433 allowed through the firewall
    As per the Azure Connectivity architecture when the connection is within the Azure boundary we make use of Redirection which requires port Range 11000 to 11999 to be opened as well, when the host is outside of the Azure network it would be a Proxy connection making use of Port 1433 only.

    Error 10060: Configure Azure NSG for Azure DB and Azure DW Connectivity

    -------------

    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".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

  4. Luiz Santana 1 Reputation point MVP
    2022-02-16T04:37:18.277+00:00

    Unfortunately I still have the problem.

    I enabled the ports on the NSG, but without success. I released port 1433 on my router, but also without success.

    When I connect with the Smartphone's WIFI, the connection to Azure works correctly. This is very strange.

    174728-nsgprint-outbound.jpg


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.