简体   繁体   中英

How to connect to an Azure SQL DB in SSMS

I have been struggling to connect to my Azure SQL DB from Power BI and SSMS.

I've configured the firewall settings for the server to include my client IP address, enabled 'Azure services and resources' and am able to query my database with both Azure AD and username and password.

I've read that I should troubleshoot by running ping, telnet and tracert and it's failing to reach the server. I'm not sure of the next steps that I should take though.

My power BI error:

在此处输入图像描述

My cmd output:

在此处输入图像描述

My ssms output:

在此处输入图像描述

Is there something basic that I am missing? All of the tutorials I've read and watched seem to connect first time without an issue. I assume this is straightforward enough but I can't seem to find a solution anywhere.

Any help and advice is much appreciated:)

SSMS 17.2 version 14.0.17177.0

If you have successfully configured your azure SQL to accept traffic from your IP then the issue seems to be with your local firewall blocking outbound connections

Things I would try:

  • From Azure Portal connect to your database and try to use the query editor online to see if you are able to connect
  • Use https://www.whatismyip.com/ to verify your public IP matches the one that's on the Azure SQL configuration (your error doesn't indicate that the server blocked the connection but worth double checking anyway)
  • Lastly is to check from the local machine you are connecting that the "outbound" connection on port 1433 are not blocked. If you are connecting FROM an azure VM then you need to configure the NSG to allow outbound connection. If you are connecting from a local machine then you need to check if there's a local firewall or a VPN that's blocking this connection

From your description and the steps you described the last option above seems like the most likely scenario

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM