1
我SQL数据库连接到PHP网站(两者都是在Azure上),在PHP在SQL数据库眼看锁 - 天青
一切似乎都很正常,并且连接字符串也是完美的。
当我尝试连接到数据库时,它连接并执行所有操作,但是当我尝试连接到另一个数据库时,它显示以下错误。
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应用程序)都在相同的资源组。
我连接使用存储在网站上的应用程序设置连接字符串两个数据库。