我正在将SQL连接到一个PHP网站(两者都在Azure上),
PHP中的一切似乎都很好,连接字符串也很完美。
当我试图连接到数据库时,它连接并执行所有操作,但当我试图连接到另一个数据库时,它会显示以下错误。
Array (
[0] => Array (
[0] => 08001
[SQLSTATE] => 08001
[1] => 5
[code] => 5
[2] => [Microsoft][ODBC Driver 11 for SQL Server]Named Pipes Provider: Could not open a connection to SQL Server [5].
[message] => [Microsoft][ODBC Driver 11 for SQL Server]Named Pipes Provider: Could not open a connection to SQL Server [5].
)
[1] => Array (
[0] => HYT00
[SQLSTATE] => HYT00
[1] => 0
[code] => 0
[2] => [Microsoft][ODBC Driver 11 for SQL Server]Login timeout expired
[message] => [Microsoft][ODBC Driver 11 for SQL Server]Login timeout expired
)
[2] => Array (
[0] => 08001
[SQLSTATE] => 08001
[1] => 5
[code] => 5
[2] => [Microsoft][ODBC Driver 11 for SQL Server]A network-related or
instance-specific error has occurred while establishing a
connection to SQL Server. Server is not found or not accessible.
Check if instance name is correct and if SQL Server is configured
to allow remote connections. For more information see SQL Server
Books Online.
[message] => [Microsoft][ODBC Driver 11 for SQL Server]A network-related
or instance-specific error has occurred while establishing a
connection to SQL Server. Server is not found or not accessible.
Check if instance name is correct and if SQL Server is configured to
allow remote connections. For more information see SQL Server Books
Online.
)
)而且,我还看到数据库上的锁签名没有连接。

此锁不会出现在连接成功的数据库上。
此外,这三个数据库(两个数据库和一个Web )都在相同的资源组上。
我使用连接字符串连接两个数据库,存储在网站的应用程序设置中。
发布于 2017-05-29 07:12:01
实际上,这是TDE (透明数据加密)图标,而不是Lock签名。见使用Azure SQL数据库的透明数据加密。
根据上面的错误消息,造成此问题的最可能原因是您使用的服务器名称不正确。下面是一些解决此问题的建议:


https://stackoverflow.com/questions/44220432
复制相似问题