Login7 packet

The Login7 packet is sent by the client to the server to establish credentials and to requests specific options and settings. This packet is always encrypted, even if the connection is otherwise unencrypted. The encryption and decryption are automatically handled by Gallium Data.

Complete documentation is available in the Microsoft documentation.


Properties

int tdsVersion: The highest TDS version used by the client (e.g. 0x00000074 for TDS 7.4)

int packetSize: The packet size requested by the client (often something like 8,000).

byte[] clientProgramVersion: an array of 4 bytes containing the version of the interface library used by the client.

long clientPid: the process ID of the client.

long connectionPid: the connection ID of the primary server.

int clientTimeZone: unused.

int clientLcid: the language code identifier (LCID) value for the client collation.

String hostname: the client machine name.

String username: the client user ID. This is only set when using SQL Server authentication and is blank when using Windows authentication.

String password: the client user password, if authentication is done with a password -- this is blank when using Windows authentication. You may be surprised that the password is sent to the server -- so were we. Because the whole packet is encrypted, it's not the end of the world, but it is a questionable choice on the part of Microsoft.

String appName: the client application name.

String serverName: the server name. This is normally changed by Gallium Data to reflect the real database server's name.

String clientName: the interface library name.

String language: the initial language.

String database: the initial database.

byte[] clientId: the unique client ID - usually an array of 6 bytes.

byte[] sspi: SSPI data.

String attachDbFile: the name of a database file to be attached.

String changePassword: new password for the specified login.


Options

boolean fByteOrder: the byte order used by the client (always 0).

boolean fChar: character set on the client, false=ASCII, true=EBCDIC. Note: EBCDIC is not supported by Gallium Data at this point.

byte fFloat: the type of floating point representation used by the client. 0=IEEE 754, 1=Vax, 2=ND5000. This should always be 0.

boolean fDumpLoad: set if dump/load or BCP capabilities are needed by the client.

boolean fUseDB: set if the client requires warning messages on execution of the USE SQL statement.

boolean fDatabase: set if the change to the initial database must succeed for the connection to succeed.

boolean fSetLang: set if the client requires warning messages on execution of a language change statement.

boolean fLanguage: set if the change to initial language must succeed for the connection to succeed.

boolean fODBC: set if the client is the ODBC driver.

boolean fTranBoundary: undocumented.

boolean fCacheConnect: undocumented.

byte fUserType: 0 = USER_NORMAL (regular logins), 1 = USER_SERVER (reserved), 2 = USER_REMUSER (Distributed Query login), 3 = USER_SQLREPL (replication login).

boolean fIntSecurity: whether integrated security is required by the client.

byte fSQLType: the type of SQL used by the client, 0=default, 1=T-SQL.

boolean fOLEDB: set if the client is the OLEDB driver.

boolean fReadOnlyIntent: set if the client does not intends to make any changes to the database.

boolean fChangePassword: set if the password should be changed (in which case changePassword should also be set).

boolean fUserInstance: the client requests that a separate process be spawned as a user instance.

boolean fSendYukonBinaryXML: set to request XML to be returned as binary XML.

boolean fUnknownCollationHandling: determines how strictly collation is enforced.