SQL Server的通信协议问题 [英] SQL Server communication protocol issue

查看:350
本文介绍了SQL Server的通信协议问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用VSTS 2008 + C#+ ADO.Net + SQL Server 2008的我是什么类型的通信协议的SQL Server 2008将使用的问题,我的问题的详细信息,

I am using VSTS 2008 + C# + ADO.Net + SQL Server 2008. My questions about what kinds of communication protocols SQL Server 2008 will be using, more details of my questions,

  1. 如果在连接​​字符串看起来是这样的,无论是命名管道或TCP / IP使用?将不同的通信协议被用于依赖于是否在同一台机器上的客户端和SQL Server?

  1. If the connection string looks like this, whether Named Pipe or TCP/IP is used? Will different communication protocol being used dependent on whether client and SQL Server on the same machine?

数据源= labtest1;初始目录= CustomerDB; Trusted_Connection = TRUE;异步

Data Source=labtest1;Initial Catalog=CustomerDB;Trusted_Connection=true;Asynchronous

在SQL Server配置管理器,也有所谓的SQL Server网络配置和SQL本机客户端10.0配置项目。我觉得他们两个有命名管道或TCP / IP配置选项(通信协议),什么是之间的SQL Server网络配置的差异,SQL本机客户端10.0配置?

In SQL Server Configuration Manager, there are items called "SQL Server Network Configuration" and "SQL Native Client 10.0 Configuration". I find both of them has configuration options (for communication protocols) of Named Pipe or TCP/IP, what are the differences between "SQL Server Network Configuration" and "SQL Native Client 10.0 Configuration"?

在此先感谢, 乔治

推荐答案

据SQL Server 2008联机丛书,这是发生了什么:

According to SQL Server 2008 Books Online, this is what happens:

本地连接的服务器上

当你从本地客户端(客户端应用程序和SQL Server在同一台计算机上)连接到数据库引擎中,连接使用的共享内存协议默认情况下。 SQL Server本机客户端接受任何下列格式使用共享内存协议本地连接:

When you connect to the Database Engine from a local client (the client application and SQL Server are on the same computer), the connection uses shared memory protocol by default. SQL Server Native Client accepts any of the following formats to connect locally using the shared memory protocol:

  • 在\命名实例(本地)
  • (本地)\命名实例
  • 在本地主机
  • 在本地主机\命名实例
  • 在一个单一的句点。
  • 。\对于命名实例

要使用的其他协议(用于故障排除),做该协议执行下列操作之一启用本地连接:

To connect locally using another protocol (for troubleshooting), do one of the following with the protocol enabled:

  • 连接到客户端别名指定的协议。欲了解更多信息,请参见别名,在SQL Server配置管理器的帮助。
  • preFIX用协议(例如,NP:或TCP)的计算机的名称。
  • 连接到的IP地址这导致一个TCP / IP连接。
  • 连接到完全限定域名(FQDN),这将导致一个TCP / IP连接(例如,..com

通过网络连接

默认情况下,SQL Server客户端的默认协议是 TCP / IP 。如果连接不能使用TCP / IP进行,其他启用的协议尝试。共享内存连接,不能赚了网络。使用SQL Server配置管理器来启用或禁用客户端协议,并改变它的连接尝试的顺序。

By default, the default protocol for SQL Server clients is TCP/IP. If the connection cannot be made using TCP/IP, the other enabled protocols are attempted. A shared memory connection cannot be made over a network. Use SQL Server Configuration Manager to enable or disable client protocols, and to change the order in which connection attempts are made.

在SQL Server配置管理器,您可以定义为使客户端协议 - 我会认为这是客户端试图连接到SQL Server的顺序。取其协议是由服务器所支持的第一个是将被使用。

In the Sql Server Configuration Manager, you can define an order for the client protocols - I would assume that's the order the client tries to connect to SQL Server with. Whichever protocol is the first being supported by the server will be used.

至于配置实用程序:

  • 在SQL Server网络配置是所有关于网络协议上的东西在服务器端配置。
  • 在SQL Native Client配置的客户端配置

如果你有这两个就可以了dev的框,你会看到两个。在普通PC连接到SQL Server通常不具有SQL Server本身就可以安装在本地,所以服务器端的设置是没有意义的存在,很明显。

If you have a dev box with both on it, you'll see both. A regular PC connecting to a SQL Server typically doesn't have SQL Server itself installed on it locally, so the server-side settings are meaningless there, obviously.

马克·

这篇关于SQL Server的通信协议问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆