Cannot connect to Azure SQL database, even with whitelisted IP

前端 未结 3 1213
逝去的感伤
逝去的感伤 2020-12-30 02:27

I am currently unable to connect to my Azure SQL database from a separate remote standalone dedicated box in a private datacenter.

I have an Azure SQL database where

3条回答
  •  时光取名叫无心
    2020-12-30 02:57

    To summarize.

    Windows Azure SQL Database (formerly known as SQL Azure) works exclusively and only on TCP port 1433. It only support SQL Server Authentication, TCP connection and TDS protocol as of today.

    In order to successfully establish connection to SQL Azure one must fulfil the following requirements:

    • Create SQL Azure server & Database
    • Setup SQL Azure Server's firewall rules to accept connections from the IP address of application that will connect to that server
    • Make sure the box (be it Virtual, or home, or whatever) has no blocking outbound TCP port 1433
    • Explicitly force encryption in connection string
    • Explicitly chose to not trust server certificate in connection string

    Please note that many (if not all) ISPs (Internet Service Providers) and Hosters, as well as IT staff within companies DO block outgoing TCP Port 1433 due to the SQL Slammer worm. This outgoing port blocking appears to be one of the most faced issues of newcommers to SQL Azure.

    UPDATE Nov. 2015

    As of August 2015, there is preview feature that enables you to use Azure AD to authenticate to Azure SQL Database. You can read more on this new preview feature here: https://azure.microsoft.com/en-us/documentation/articles/sql-database-aad-authentication/

提交回复
热议问题