Anda di halaman 1dari 14

Configuring SQL Server Network Communication

SQL Server 2008 is a client-server application designed to

efficiently exchange data and instructions over one or more network connections. Understanding the network connections and how they can be configured is a big part of the database administrators job. Client software enables client computers to connect to an instance of Microsoft SQL Server 2008 on a network. A "client" is a front-end application that uses the services provided by a server such as the SQL Server Database Engine. The computer that hosts this application is referred to as the client computer.

SQL Server 2005 Network Protocols

SQL Server 2008 Communication with clients: Being Enterprise Data platform , it also provides ways of accessing data. Possesses the ability to communicate over different protocols. To connect to SQL Server Database Engine, must have a network protocol enabled. Can service requests on several protocols at the same time. Clients connect to SQL Server with a single protocol. If the client program does not know which protocol SQL Server is listening on, configure the client to sequentially try multiple protocols. Use SQL Server Configuration Manager to enable, disable, and configure network protocols. By default, SQL Server will accept network connections via TCP/IP. The local Shared Memory protocol is also enabled by default to enable local connections without having to incur the overhead of a network protocol. In addition to the TCP/IP, Named Pipes, and Shared Memory protocols, the Virtual Interface Adapter(VIA) protocol is available.

SQL Server 2008 provides support for four protocols: Shared Memory TCP/IP Named Pipes Virtual Interface Adapter (VIA) By default, the only network protocols enabled for most editions of SQL Server are TCP/IP and Shared Memory. The SQL Server Configuration Manager is used to configure server protocols. With this tool, each supported protocol can be enabled, disabled, and configured as required.

Opening the SQL Server Configuration Manager displays a

node for configuring SQL Server services, SQL Server network protocols, and SQL Native Client protocols. To configure the Server protocols, expand the SQL Server 2008 Network Configuration node and select the instance to be configured. The right-hand pane shows all four of the supported protocols and their status. To display the configurable properties of any of the protocols, double-click the protocol, or right-click the protocol and select Properties to launch the corresponding Properties window.

SHARED MEMORY Shared memory is the simplest protocol to use and has no configurable settings. Because clients using the shared memory protocol can only connect to a SQL Server instance running on the same computer, it is not useful for most database activity. Use the shared memory protocol for troubleshooting when you suspect the other protocols are configured incorrectly. It has only one configurable property: Enabled. The Enabled property can be set to Yes or No, resulting in a status of Enabled or Disabled.

TCP/IP The TCP/IP protocol is the primary and preferred protocol for most SQL Server installations. TCP/IP is a common protocol widely used over the Internet. It communicates across interconnected networks of computers that have diverse hardware architectures and various operating systems. TCP/IP includes standards for routing network traffic and offers advanced security features. It is the most popular protocol that is used in business today. It is configured on two separate tabs on the TCP/IP Properties window: the Protocol tab and the IP Addresses tab,

The Protocol tab has the following four configurable properties: EnabledThis works the same as the other protocols. Keep AliveThis specifies how many milliseconds SQL Server waits to verify an idle connection is still valid by sending a KEEPALIVE packet. The default is 30,000 milliseconds. Listen AllThis specifies whether SQL Server will listen on all IP addresses configured on the server. (IPALL)

IP Address tab: The IP Addresses tab contains configuration settings for each configured IP address on the server and one section for the configuring of all IP addresses. The IPALL section can be used to configure all the IP address settings instead of individually configuring them.

Named Pipes is a protocol developed for local area networks.
A part of memory is used by one process to pass information to another process, so that the

output of one is the input of the other. The second process can be local (on the same computer as the first) or remote (on a networked computer). Named Pipes uses Inter-Process Communication (IPC) channels for efficient inter-server communication, as well as local area network (LAN) communication. Named Pipes has two configurable properties: Enabled and Pipe Name. The Enabled property works the same as the Shared Memory protocol. The Pipe Name specifies the inter-process pipe that SQL Server will listen on. The default pipe is \\.\pipe\sql\query.

Named Pipes vs. TCP/IP Sockets In a fast local area network (LAN) environment, Transmission Control Protocol/Internet Protocol (TCP/IP) Sockets and Named Pipes clients are comparable with regard to performance. However, the performance difference between the TCP/IP Sockets and Named Pipes clients becomes apparent with slower networks, such as across wide area networks (WANs) or dial-up networks. This is because of the different ways the inter-process communication (IPC) mechanisms communicate between peers. For named pipes, network communications are typically more interactive. A peer does not send data until another peer asks for it using a read command. A network read typically involves a series of peek named pipes messages before it starts to read the data. These can be very costly in a slow network and cause excessive network traffic, which in turn affects other network clients.

It is also important to clarify if you are talking about local pipes or network pipes. If the

server application is running locally on the computer that is running an instance of SQL Server, the local Named Pipes protocol is an option. Local named pipes runs in kernel mode and is very fast. For TCP/IP Sockets, data transmissions are more streamlined and have less overhead. Data transmissions can also take advantage of TCP/IP Sockets performance enhancement mechanisms such as windowing, delayed acknowledgements, and so on. This can be very helpful in a slow network. Depending on the type of applications, such performance differences can be significant. TCP/IP Sockets also support a backlog queue. This can provide a limited smoothing effect compared to named pipes that could lead to pipe-busy errors when you are trying to connect to SQL Server. Generally, TCP/IP is preferred in a slow LAN, WAN, or dial-up network, whereas named pipes can be a better choice when network speed is not the issue, as it offers more functionality, ease of use, and configuration options.