Sql,防火墙,端口,命名管道提供程序

时间:2014-02-20 15:21:58

标签: php sql tcp port firewall

当我连接到网站时,我收到以下错误

Array ( [0] => Array ( [0] => 08001 [SQLSTATE] => 08001 [1] => 2 [code] => 2 [2] => [Microsoft][SQL Server Native Client 10.0] 
Named Pipes Provider: Could not open a connection to SQL Server [2]. 
[message] => [Microsoft][SQL Server Native Client 10.0]Named Pipes Provider: Could not open a connection to SQL Server [2]. ) 
[1] => Array
( [0] => HYT00 [SQLSTATE] => HYT00 [1] => 0 [code] => 0 
[2] => [Microsoft][SQL Server Native Client 10.0]Login timeout expired [message] => [Microsoft][SQL Server Native Client 10.0]Login timeout expired ) 
[2] => Array ( [0] => 08001 [SQLSTATE] => 08001 
[1] => 2 [code] => 2 
[2] => [Microsoft][SQL Server Native Client 10.0]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][SQL Server Native Client 10.0]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. ) ) 

我使用以下设置从Application Server PHP连接到数据库服务器

$serverName = "tcp:161.202.147.54\DZUHE00219,2311"; 
        $myUser = "CHAD\myLoging"; 
        $myPass = "MyPassword"; 
        $connectionInfo = array( "Database"=>"zentraleDatenbank", "UID"=>$myUser, "PWD"=>$myPass);
        $conn = sqlsrv_connect( $serverName, $connectionInfo);

我尝试使用Servername进行不同的选择。用tcp,没有tcp,Servername。什么都没有帮助。

首先,我认为这可能是防火墙的问题。防火墙未激活。其次我认为它可能是港口。但我可以使用Visual Studio从Application Server连接到具有完全相同的cridentials的DB。

有谁知道出了什么问题?

0 个答案:

没有答案