2.2.6.3 LOGIN
Stream Name
-
LOGIN
Stream Function
Defines the login record rules for use with SQL Server.
Stream Comments
The packet header type is 0x02.
The length of a LOGIN record needs to be larger than 563 bytes and needs to be smaller than 573 bytes.
Stream-Specific Rules
-
HostName = 30BYTE cbHostName = BYTE UserName = 30BYTE cbUserName = BYTE Password = 30BYTE cbPassword = BYTE HostProc = 8BYTE cbHostProc = BYTE AppType = 6BYTE lInt2 = BYTE lInt4 = BYTE lChar = BYTE lFloat = BYTE lUseDB = BYTE lDumpLoad = BYTE lInterface = BYTE lType = BYTE lDBLIDFlags = BYTE AppName = 30BYTE cbAppName = BYTE ServerName = 30BYTE cbServerName = BYTE RemotePassword = 255BYTE cbRemotePassword = BYTE TDSVersion = DWORD ProgName = 10BYTE cbProgName = BYTE ProgVersion = DWORD Language = 30BYTE cbLanguage = BYTE SetLanguage = BYTE PacketSize = 6BYTE cbPacketSize = BYTE Padding = *8BYTE
Stream Definition
-
LOGIN = HostName cbHostName UserName cbUserName Password cbPassword HostProc 16FRESERVEDBYTE AppType cbHostProc lInt2 lInt4 lChar lFloat FRESERVEDBYTE lUseDB lDumpLoad lInterface lType 6FRESERVEDBYTE lDBLIBFlags AppName cbAppName ServerName cbServerName RemotePassword cbRemotePassword TDSVersion ProgName cbProgName ProgVersion 3FRESERVEDBYTE Language cbLanguage SetLang 45FRESERVEDBYTE PacketSize cbPacketSize Padding
Stream Parameter Details
Stream parameter details are described in the following table.
Parameter |
Description |
---|---|
HostName |
Name of the host. |
UserName |
The user ID used to validate access to the server. |
Password |
The password used to validate access to the server. |
HostProc |
The host process identification in hex format. |
AppType |
The unique client ID, for example: MAC address for the client machine. |
lInt2 |
The byte order for all integer values exchanged between the client and the server unless otherwise specified.
|
lInt4 |
The type of int4 for the client. The server ought to ignore this field. |
lChar |
The character set used on the client:
|
lFloat |
The type of floating point representation used by the client.
|
lUseDB |
Set if the client desires warning messages on execution of the USE SQL statement. If this flag is not set, the client is not informed when the database changes.
|
lDumpLoad |
Set if dump/load or BCP capabilities are needed by the client.
|
lInterface |
The type of SQL language that the client will send to the server. Only 0 and 1 are supported by SQL Server.
|
lType |
The source of the connection.
|
lDBLIBFlags |
Indicates whether SSPI negotiation is required.
|
AppName |
The name of the application. |
ServerName |
The network name for the server the client is connecting to. |
RemotePassword |
Remote password. The server ought to ignore the field. |
TDSVersion |
The TDS version of the client. For TDS 4.2, the value is 0x04020000 and is sent as big-endian. The value ought to be ignored by the server. If the following two conditions are met, TDS 4.2 ought to be used for communication between the client and the server:
|
ProgName |
The name of the client program. |
ProgVersion |
The version of the client program. |
Language |
The name of the initial language to be used once login is complete. |
SetLang |
A flag to request notification of language changes.
|
PacketSize |
The desired packet size being requested by the client. |
Padding |
Padding data to the login record. The number of bytes can be any number between 0 and 8. The server ought to ignore this field. |
Login Data Validation Rules
All fields except Padding have a fixed length. Each data field has a corresponding length field that indicates how many bytes of the data field are to be used. For example, cbHostName indicates how many bytes of HostName are to be used. The remaining bytes of the data field are to be ignored.