Azure Error: A network-related or instance-specific error occurred while establishing a connection to SQL Server

倾然丶 夕夏残阳落幕 提交于 2019-12-01 21:20:42

From Mihaela's comment: You need to add "tcp: " in front of server name. I.e. tcp:<servername>.database.windows.net


EDIT:

This is specified in the [documentation] (https://msdn.microsoft.com/en-us/library/system.data.sqlclient.sqlconnection.connectionstring(v=vs.110).aspx)

Data Source must use the TCP format or the Named Pipes format.

TCP format is as follows:

•tcp:\

•tcp:,

The TCP format must start with the prefix "tcp:" and is followed by the database instance, as specified by a host name and an instance name.

The host name MUST be specified in one of the following ways:

•NetBIOSName

•IPv4Address

•IPv6Address

The instance name is used to resolve to a particular TCP/IP port number on which a database instance is hosted. Alternatively, specifying a TCP/IP port number directly is also allowed. If both instance name and port number are not present, the default database instance is used.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!