Lecture 17 on Chap 7

download Lecture 17 on Chap 7

of 13

Transcript of Lecture 17 on Chap 7

  • 8/12/2019 Lecture 17 on Chap 7

    1/13

    Configuring SQL Server

    Network Communication

  • 8/12/2019 Lecture 17 on Chap 7

    2/13

    INTRODUCTION

    SQL Server 2008 is a client-server application designed to

    efficiently exchange data and instructions over one or morenetwork 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.

  • 8/12/2019 Lecture 17 on Chap 7

    3/13

    SQL Server 2008 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.

  • 8/12/2019 Lecture 17 on Chap 7

    4/13

    SQL Server 2008 provides support for fourprotocols:

    Shared Memory

    TCP/IP

    Named Pipes

    Virtual Interface Adapter (VIA)

    By default, the only network protocols enabled formost 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.

  • 8/12/2019 Lecture 17 on Chap 7

    5/13

    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 Server2008 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.

  • 8/12/2019 Lecture 17 on Chap 7

    6/13

    SHARED MEMORY

    Shared memory is the simplest protocol to use and has

    no configurable settings.

    Because clients using the shared memory protocol canonly 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 configuredincorrectly.

    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.

  • 8/12/2019 Lecture 17 on Chap 7

    7/13

    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 theInternet.

    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,

  • 8/12/2019 Lecture 17 on Chap 7

    8/13

  • 8/12/2019 Lecture 17 on Chap 7

    9/13

    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)

    No DelayThis option specifies whether the TCPprotocol queues small packets to send out larger

    packets. This queuing is typically undesirable in

    transaction-based systems, and so it should be left in its

    default configuration of No.

  • 8/12/2019 Lecture 17 on Chap 7

    10/13

  • 8/12/2019 Lecture 17 on Chap 7

    11/13

    NAMED PIPES:

    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-servercommunication, as well as local area network (LAN) communication.

    The Named Pipes protocol has some enhancements in SQL Server 2008 including support

    for encrypted traffic provides easy access to Remote Procedure Calls (RPC) within a single

    security domain, and so is advantageous to these applications.

    Named Pipes has two configurable properties: Enabled and Pipe Name. The Enabled

    property works the same as the Shared Memory protocol.

  • 8/12/2019 Lecture 17 on Chap 7

    12/13

    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 interprocess 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.

  • 8/12/2019 Lecture 17 on Chap 7

    13/13

    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.