Skip to content

Latest commit

 

History

History
125 lines (78 loc) · 12.7 KB

sql-server-browser-service-database-engine-and-ssas.md

File metadata and controls

125 lines (78 loc) · 12.7 KB
title description author ms.author ms.date ms.service ms.subservice ms.topic helpviewer_keywords
SQL Server Browser Service (Database Engine and SSAS)
Learn about SQL Server Browser. This service listens for requests for SQL Server resources and provides information about installed SQL Server instances.
rwestMSFT
randolphwest
03/14/2017
sql
configuration
conceptual
services [SQL Server], security
SQL Browser service (See SQL Server Browser service)
Browser Service
SQL Server Browser service

SQL Server Browser Service (Database Engine and SSAS)

[!INCLUDE SQL Server] The [!INCLUDEssNoVersion]Browser program runs as a Windows service. [!INCLUDEssNoVersion] Browser listens for incoming requests for [!INCLUDEmsCoName] [!INCLUDEssNoVersion] resources and provides information about [!INCLUDEssNoVersion] instances installed on the computer. [!INCLUDEssNoVersion] Browser contributes to the following actions:

  • Browsing a list of available servers

  • Connecting to the correct server instance

  • Connecting to dedicated administrator connection (DAC) endpoints

For each instance of the [!INCLUDEssDE] and [!INCLUDEssAS], the [!INCLUDEssNoVersion] Browser service (sqlbrowser) provides the instance name and the version number. [!INCLUDEssNoVersion] Browser is installed with [!INCLUDEssNoVersion].

[!INCLUDEssNoVersion] Browser can be configured during setup or by using [!INCLUDEssNoVersion] Configuration Manager. By default, the [!INCLUDEssNoVersion] Browser service starts automatically:

  • When upgrading an installation.

  • When installing on a cluster.

  • When installing a named instance of the [!INCLUDEssDE] including all instances of SQL Server Express.

  • When installing a named instance of [!INCLUDEssASnoversion].

Background

Prior to [!INCLUDEssVersion2000], only one instance of [!INCLUDEssNoVersion] could be installed on a computer. [!INCLUDEssNoVersion] listened for incoming requests on port 1433, assigned to [!INCLUDEssNoVersion] by the official Internet Assigned Numbers Authority (IANA). Only one instance of [!INCLUDEssNoVersion] can use a port, so when [!INCLUDEssVersion2000] introduced support for multiple instances of [!INCLUDEssNoVersion], [!INCLUDEssNoVersion] Resolution Protocol (SSRP) was developed to listen on UDP port 1434. This listener service responded to client requests with the names of the installed instances, and the ports or named pipes used by the instance. To resolve limitations of the SSRP system, [!INCLUDEssVersion2005] introduced the [!INCLUDEssNoVersion] Browser service as a replacement for SSRP.

How SQL Server Browser Works

When an instance of [!INCLUDEssNoVersion] starts, if the TCP/IP protocol is enabled for [!INCLUDEssNoVersion], the server is assigned a TCP/IP port. If the named pipes protocol is enabled, [!INCLUDEssNoVersion] listens on a specific named pipe. This port, or "pipe," is used by that specific instance to exchange data with client applications. During installation, TCP port 1433 and pipe \sql\query are assigned to the default instance, but those can be changed later by the server administrator using [!INCLUDEssNoVersion] Configuration Manager. Because only one instance of [!INCLUDEssNoVersion] can use a port or pipe, different port numbers and pipe names are assigned for named instances, including [!INCLUDEssExpress]. By default, when enabled, both named instances and [!INCLUDEssExpress] are configured to use dynamic ports, that is, an available port is assigned when [!INCLUDEssNoVersion] starts. If you want, a specific port can be assigned to an instance of [!INCLUDEssNoVersion]. When connecting, clients can specify a specific port; but if the port is dynamically assigned, the port number can change anytime [!INCLUDEssNoVersion] is restarted, so the correct port number is unknown to the client.

Upon startup, [!INCLUDEssNoVersion] Browser starts and claims UDP port 1434. [!INCLUDEssNoVersion] Browser reads the registry, identifies all instances of [!INCLUDEssNoVersion] on the computer, and notes the ports and named pipes that they use. When a server has two or more network cards, [!INCLUDEssNoVersion] Browser returns the first enabled port it encounters for [!INCLUDEssNoVersion]. [!INCLUDEssNoVersion] Browser support ipv6 and ipv4.

When [!INCLUDEssNoVersion] clients request [!INCLUDEssNoVersion] resources, the client network library sends a UDP message to the server using port 1434. [!INCLUDEssNoVersion] Browser responds with the TCP/IP port or named pipe of the requested instance. The network library on the client application then completes the connection by sending a request to the server using the port or named pipe of the desired instance. SQL Server Browser Service does not provide port resolution for default instances.

For information about starting and stopping the [!INCLUDEssNoVersion] Browser service, see Start, Stop, Pause, Resume, Restart the Database Engine, SQL Server Agent, or SQL Server Browser Service.

Using SQL Server Browser

If the [!INCLUDEssNoVersion] Browser service is not running, you are still able to connect to [!INCLUDEssNoVersion] if you provide the correct port number or named pipe. For instance, you can connect to the default instance of [!INCLUDEssNoVersion] with TCP/IP if it is running on port 1433.

However, if the [!INCLUDEssNoVersion] Browser service is not running, the following connections do not work:

  • Any component that tries to connect to a named instance without fully specifying all the parameters (such as the TCP/IP port or named pipe).

  • Any component that generates or passes server\instance information that could later be used by other components to reconnect.

  • Connecting to a named instance without providing the port number or pipe.

  • DAC to a named instance or the default instance if not using TCP/IP port 1433.

  • The OLAP redirector service.

  • Enumerating servers in [!INCLUDEssManStudioFull], Enterprise Manager, or Query Analyzer.

If you are using [!INCLUDEssNoVersion] in a client-server scenario (for example, when your application is accessing [!INCLUDEssNoVersion] across a network), if you stop or disable the [!INCLUDEssNoVersion] Browser service, you must assign a specific port number to each instance and write your client application code to always use that port number. This approach has the following problems:

  • You must update and maintain client application code to ensure it is connecting to the proper port.

  • The port you choose for each instance may be used by another service or application on the server, causing the instance of [!INCLUDEssNoVersion] to be unavailable.

Clustering

[!INCLUDEssNoVersion] Browser is not a clustered resource and does not support failover from one cluster node to the other. Therefore, in the case of a cluster, [!INCLUDEssNoVersion] Browser should be installed and turned on for each node of the cluster. On clusters, [!INCLUDEssNoVersion] Browser listens on IP_ANY.

Note

When listening on IP_ANY, when you enable listening on specific IPs, the user must configure the same TCP port on each IP, because [!INCLUDEssNoVersion] Browser returns the first IP/port pair that it encounters.

Installing, Uninstalling, and Running from the Command Line

By default, the [!INCLUDEssNoVersion] Browser program is installed at C:\Program Files (x86)\Microsoft SQL Server\90\Shared\sqlbrowser.exe.

The [!INCLUDEssNoVersion] Browser service is uninstalled when the last instance of [!INCLUDEssNoVersion] is removed.

[!INCLUDEssNoVersion] Browser can be started from the command prompt for troubleshooting, by using the -c switch:

<drive>\<path>\sqlbrowser.exe -c  

Security

Account Privileges

[!INCLUDEssNoVersion] Browser listens on a UDP port and accepts unauthenticated requests by using [!INCLUDEssNoVersion] Resolution Protocol (SSRP). [!INCLUDEssNoVersion] Browser should be run in the security context of a low privileged user to minimize exposure to a malicious attack. The logon account can be changed by using the [!INCLUDEssNoVersion] Configuration Manager. The minimum user rights for [!INCLUDEssNoVersion] Browser are the following:

  • Deny access to this computer from the network

  • Deny logon locally

  • Deny Log on as a batch job

  • Deny Log On Through Terminal Services

  • Log on as a service

  • Read and write the [!INCLUDEssNoVersion] registry keys related to network communication (ports and pipes)

Default Account

Setup configures [!INCLUDEssNoVersion] Browser to use the account selected for services during setup. Other possible accounts include the following:

  • Any domain\local account

  • The local service account

  • The local system account (not recommended as has unnecessary privileges)

Hiding SQL Server

Hidden instances are instances of [!INCLUDEssNoVersion] that support only shared memory connections. For [!INCLUDEssNoVersion], set the HideInstance flag to indicate that [!INCLUDEssNoVersion] Browser should not respond with information about this server instance.

Using a Firewall

To communicate with the [!INCLUDEssNoVersion] Browser service on a server behind a firewall, open UDP port 1434, in addition to the TCP port used by [!INCLUDEssNoVersion] (e.g., 1433). For information about working with a firewall, see "How to: Configure a Firewall for [!INCLUDEssNoVersion] Access" in [!INCLUDEssNoVersion] Books Online.

See Also

Network Protocols and Network Libraries
Hide an Instance of SQL Server Database Engine