报错如下:Array ( [0] => Array ( [0] => 08001 [SQLSTATE] => 08001 [1] => 27 [code] => 27 [2] => [Microsoft][SQL Server Native Client 11.0]Registry information is corrupt or missing. Make sure the provider is installed and registered correctly. [message] => [Microsoft][SQL Server Native Client 11.0]Registry information is corrupt or missing. Make sure the provider is installed and registered correctly. ) [1] => Array ( [0] => 08001 [SQLSTATE] => 08001 [1] => 27 [code] => 27 [2] => [Microsoft][SQL Server Native Client 11.0]Client unable to establish connection [message] => [Microsoft][SQL Server Native Client 11.0]Client unable to establish connection ) [2] => Array ( [0] => 08001 [SQLSTATE] => 08001 [1] => 0 [code] => 0 [2] => [Microsoft][SQL Server Native Client 11.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 11.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. ) ) 1

解决方案 »

  1.   

    SQLSTATE 08001 
    这是 SQLServer 没有开启远程连接
      

  2.   

    就是说连接远程(192.168.1.221)的数据库是通过我这边的服务器上的数据库连接上的,如果我的服务器上没有安装sqlserver就不能连接到远程的数据库对吗
      

  3.   

    不是!
    SQLServer 默认只提供本地服务(所有的数据库都是这样),如果要他提供远程服务,就必须开启远程连接服务