Net-Library (SQL Server)


Net-library is a network interface layer that Microsoft SQL Server uses to communicate with database client software.

How It Works

Net-Libraries are specific to each type of interprocess communication (IPC) mechanism. A Net-Library can be loaded for each IPC mechanism being used – for example, one Net-Library for named pipes communication and another for TCP/IP sockets. Net-Libraries are used at both the server and client levels. This allows clients on different networks to be supported simultaneously using the built-in Microsoft Windows NT and Windows 2000 support for running multiple network protocols simultaneously on one system.




Net-Libraries on SQL Server listen for incoming connection attempts from database clients. SQL Server has a multiprotocol networking library that listens using named pipes, TCP/IP ports, and Sequenced Packet Exchange (SPX) sockets.

Different Net-Library options available:

  • Shared Memory – When you have a client which is on the same physical machine as your SQL Server, you can use this simplest net library which provides faster communication than other Net-Libraries as it bypasses the physical network stack. The reason is, it uses the Windows Shared Memory feature to communicate between SQL Server and the client. You might use this Net-Library while troubleshooting if other Net-Libraries are not working properly.
  • TCP/IP – TCP/IP (Transmission Control Protocol/Internet Protocol) is the default protocol on the clients running on the Windows platform. It allows communication across interconnected networks of computers with diverse hardware and operating systems. TCP/IP is considered as the first choice after Shared Memory, because of its inherent network traffic routing standards and advanced security features.
  • Named Pipes – Named Pipes protocol uses a part of the memory of one process to store/pass the information to another process, it means the output of one process becomes the input for another process. The other process could be either on the local machine or could be on a remote machine (networked machine). This protocol is used in fast local area networks for better performance.
  • VIA – VIA stands for Virtual Interface Adaptor. This protocol works with VIA hardware. Please refrain from using this protocol in your newer development as it has been deprecated and will be removed in future releases of SQL Server.





Configuring Net-Libraries

To configure client and server net-libraries we can use SQL Server Configuration Manager. Go to SQL Native Client Configuration (on SQL Server 2008 and R2) and specify a default Net-Library for all the connections being made by this client or specify a specific Net-Library to connect to a specific SQL Server instance:

Configuring Net-Libraries
Configuring Net-Libraries

See also




Editor

Articles posted after being checked by editors.

Recent Content