Registry keys for ODBC connections using sqlsrv32, sqlncli and sqlncli10

Here is the list of the registry keys used for ODBC connections when using SQLSRV32.dll / SQLNCLI.dll / SQLNCLI10.dll respectively.

Obviously keys for sqlsrv32 exist for SQLNCLI.dll and SQLNCLI10.dll for backwards compatibility.

And subsequently all keys for SQLNCLI.dll exists for SQLNCLI10.dll for the same reason.

The keys below are when using "User DSN", if you are using "System DSN", then the keys will be at:

HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBC.INI\

So:

User DSN: HKEY_CURRENT_USER\Software\ODBC\ODBC.INI\...

System DSN: HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBC.INI\...

Key

Sqlsrv32

Sqlncli

Sqlncli10

Default

Description

Address

X

X

X

The network address of the server to connect to.

AnsiNPW

X

X

X

yes

Specifies that the ANSI_NULLS, ANSI_WARNINGS, and ANSI_PADDINGS options be set ON.

AttachDBFileName

X

X

X

Specifies the name of the primary file for an attachable database.

AutoTranslate

X

X

X

yes

Means that the driver converts ANSI strings sent between the client computer and SQL Server by using Unicode

Database

X

X

X

This is the default database to be used for the DSN.

Description

X

X

X

A description of this particular DSN.

Driver

X

X

X

Driver used for the DSN; ie. sqlsrv32.dll, sqlncli.dll, sqlncli10.dll for SQL Server connections

Encrypt

X

X

X

no

Data that is passed through connections that are made using this DSN will be encrypted

Fallback

X

X

X

FastConnectOption

X

X

X

Language

X

X

X

Language you want to use for system messages

LastUser

X

X

X

The last user to use this DSN. Password can't be saved for security reasons.

Network

X

X

X

Networkprotocol to be used.

OemToAnsi

X

X

X

QueryLog_On

X

X

X

no

This specifies that the driver logs any query that takes longer than the Long query time value specified.

QueryLogFile

X

X

X

This specifies where the log file for [QueryLog_On] is written.

QueryLogTime

X

X

X

30000

This specifies the threshold for [QueryLog_On] in milliseconds.

QuotedId

X

X

X

yes

This means that SQL Server enforces ANSI rules regarding quote marks.

Regional

X

X

X

The driver will use the regional settings of the client computer for formatting currency, numbers, dates, and times.

Server

X

X

X

The SQL Server that the DSN will connect to.

StatsLog_On

X

X

X

No

This specifies that statistics be will logged.

StatsLogFile

X

X

X

This specifies where the log file for [StatsLog_On] is written.

TranslationDLL

X

X

X

TranslationName

X

X

X

TranslationOption

X

X

X

Trusted_Connection

X

X

X

no

Yes means that Windows Authentication will be used

UseProcForPrepare

X

X

X

This keyword is deprecated, and its setting is ignored by the SQL Server Native Client ODBC Driver.

Failover_Partner

X

X

The failover partner of the database in a mirrored setup.

MARS_Connection

X

X

no

This enables or disables multiple active result sets (MARS) on the connection.

RegPrecedence

X

X

TrustServerCertificate

X

X

When used with Encrypt, enables encryption using a self-signed server certificate.

FailoverPartnerSPN

X

The SPN for the failover partner. An empty string uses the default, driver-generated SPN.

ServerSPN

X

The SPN for the server. An empty string uses the default, driver-generated SPN.

I will update when I find the missing descriptions and/or the default values.

Some of the resources:

"Using Connection String Keywords with SQL Server Native Client"

https://msdn.microsoft.com/en-us/library/ms130822.aspx

"INFO: Registry Entries and Keywords for SQL Server Connection Strings"

https://support.microsoft.com/Default.aspx?kbid=229929