2.2.5 SVR_RESP

The server responds to all client requests with an SVR_RESP (section 2.2.5). There is a slight variation in the message format for a response to a CLNT_UCAST_DAC (section 2.2.4) request, as described in the next section. This particular SVR_RESP message is sent in response to a CLNT_BCAST_EX (section 2.2.1), a CLNT_UCAST_EX (section 2.2.2), and a CLNT_UCAST_INST (section 2.2.3) request.


0

1

2

3

4

5

6

7

8

9
1
0

1

2

3

4

5

6

7

8

9
2
0

1

2

3

4

5

6

7

8

9
3
0

1

SVR_RESP

RESP_SIZE

RESP_DATA (variable)

...

SVR_RESP (1 byte): A single byte whose value MUST be 0x05.

RESP_SIZE (2 bytes): The length, in bytes, of subsequent response data RESP_DATA.

RESP_DATA (variable): A variable-length MBCS string that does not need to be byte-aligned. The maximum size of RESP_DATA MUST be 1,024 bytes if the server is responding to a CLNT_UCAST_EX (section 2.2.2) or a CLNT_UCAST_INST request. If the server is responding to a CLNT_BCAST_EX request, the maximum size of RESP_DATA MUST be 4,096 bytes.

Note  

  • The server sends back an SVR_RESP only if there is at least one instance for which it can send back endpoint information. If no such instances exist, the server ignores the client request.

  • The content of the RESP_DATA string corresponds to the type of request received. For example, a CLNT_UCAST_EX request is answered with a CLNT_UCAST_EX response string. The formal syntax of the message is provided in Augmented Backus-Naur Form (ABNF), as specified in [RFC4234].

  • All responses to client requests contain information about one or more of the following transports:

RESP_DATA = CLNT_BCAST_EX_RESPONSE / CLNT_UCAST_EX_RESPONSE / CLNT_UCAST_INST_RESPONSE

CLNT_BCAST_EX_RESPONSE = CLNT_UCAST_EX_RESPONSE

CLNT_UCAST_EX_RESPONSE = *[CLNT_UCAST_INST_RESPONSE]

CLNT_UCAST_INST_RESPONSE = "ServerName" SEMICOLON SERVERNAME SEMICOLON 
"InstanceName" SEMICOLON INSTANCENAME SEMICOLON "IsClustered"  
SEMICOLON YES_OR_NO SEMICOLON "Version" SEMICOLON VERSION_STRING  
[NP_INFO] [TCP_INFO] [VIA_INFO] [RPC_INFO] [SPX_INFO] [ADSP_INFO] 
[BV_INFO] SEMICOLON SEMICOLON ; see Note 1

Name

Value

SEMICOLON

SEMICOLON = ";"

SERVERNAME

The name of the server. The SERVERNAME MUST be no greater than 255 bytes.

INSTANCENAME

A text string that represents the name of the server instance being described. The INSTANCENAME MUST be no greater than 255 bytes but SHOULD be no greater than 16 MBCS characters.

YES_OR_NO

YES_OR_NO=YES_OR_NO = "Yes" / "No"

VERSION_STRING

A text string that conveys the version of the server instance. The VERSION_STRING MUST be no greater than 16 bytes. VERSION_STRING MUST NOT be empty and MUST appear as follows:

VERSION_STRING=1*[0-9"."]

NP_INFO

NP_INFO=SEMICOLON "np" SEMICOLON PIPENAME

PIPENAME

A text string that represents the pipe name [PIPE].

TCP_INFO

TCP_INFO=SEMICOLON "tcp" SEMICOLON TCP_PORT

TCP_PORT

A text string that represents the decimal value of the TCP port that is used to connect to the requested server instance. TCP_PORT SHOULD be a valid TCP port; see Note 2.

VIA_INFO

VIA_INFO=SEMICOLON "via" NETBIOS VIALISTENINFO; see Note 3.

VIALISTENINFO

VIALISTENINFO =1*["," VIANIC ":" VIAPORT].

VIANIC

A text string that represents the VIA [VIA] network interface card (NIC) identifier. VIANIC SHOULD be a valid VIA Adapter NIC number.

VIAPORT

A text string that represents the decimal value of the VIA NIC's port. VIAPORT SHOULD be a valid VIA Adapter port number.

NETBIOS

A text string that MUST be no greater than 15 bytes and that represents the NetBIOS name of a machine where the server resides.

RPC_INFO

SEMICOLON ”rpc” SEMICOLON COMPUTERNAME

COMPUTERNAME

MUST NOT be greater than 1,024 bytes but SHOULD be no more than 127 MBCS characters.

SPX_INFO

SPX_INFO=SEMICOLON ”spx” SEMICOLON SERVICENAME

SERVICENAME

MUST NOT be greater than 1,024 bytes but SHOULD be no more than 127 MBCS characters.

ADSP_INFO

ADSP_INFO=SEMICOLON ”adsp” SEMICOLON ADSPOBJECTNAME

ADSPOBJECTNAME

MUST NOT be greater than 1,024 bytes but SHOULD be no more than 127 MBCS characters.

BV_INFO

BV_INFO=SEMICOLON ”bv” SEMICOLON ITEMNAME SEMICOLON GROUPNAME SEMICOLON ORGNAME

ITEMNAME

MUST NOT be greater than 1,024 bytes but SHOULD be no more than 127 MBCS characters.

GROUPNAME

MUST NOT be greater than 1,024 bytes but SHOULD be no more than 127 MBCS characters.

ORGNAME

MUST NOT be greater than 1,024 bytes but SHOULD be no more than 127 MBCS characters.

Note  

  1. NP_INFO, TCP_INFO, and VIA_INFO may be listed in any order and MUST be listed no more than once; multiple protocols can be sent in the response. NP_INFO MUST be less than 1,024 bytes but SHOULD be no longer than a valid pipe name [PIPE].

  2. If the request is received on an IPv4 socket, the response provides the instance's port associated with an IPv4 address, and likewise for IPv6.

  3. VIA_INFO MUST cumulatively be no greater than 1,024 bytes and SHOULD cumulatively be no greater than 128 bytes.

  • The size of the SQL Server Resolution Protocol response MUST be no greater than 1,024 bytes per instance. When returning protocol information, the server SHOULD include information for a particular protocol as long as the aggregate information for the instance fits within the 1-KB limit. If the information for a protocol would cause the total protocol information to exceed 1 KB—for example, trying to add an 800-byte pipe name when 500 bytes of protocol information have already been collected—that protocol information is not sent. The information for the next protocol (if any) SHOULD be included in the response (assuming that it does not cause the response to exceed the 1-KB limit). Furthermore, the server SHOULD NOT include protocol information if the information returned would not be valid. For example, if the TCP port is unavailable, TCP would not be included in the response.

Page view tracker