Microsoft KB Archive/229929

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

Article ID: 229929

Article Last Modified on 2/23/2007

-

APPLIES TO


 * Microsoft Data Access Components 2.1
 * Microsoft Data Access Components 2.5
 * Microsoft Data Access Components 2.6
 * Microsoft Data Access Components 2.7
 * Microsoft ODBC Driver for Microsoft SQL Server 3.7
 * Microsoft OLE DB Provider for SQL Server 7.0
 * Microsoft OLE DB Provider for SQL Server 7.01
 * Microsoft OLE DB Provider for SQL Server 2000 2000.80.194
 * Microsoft ODBC Driver for SQL Server 2000 2000.80.194

-



This article was previously published under Q229929



SUMMARY
This article describes the different registry entries that are created when you create a data source name (DSN) by using the Microsoft SQL Server ODBC Driver.



MORE INFORMATION
IMPORTANT: This article contains information about modifying the registry. Before you modify the registry, make sure to back it up and make sure that you understand how to restore the registry if a problem occurs. For information about how to back up, restore, and edit the registry, click the following article number to view the article in the Microsoft Knowledge Base:

256986 Description of the Microsoft Windows Registry

The information presented in this article is for troubleshooting purposes only. There may be other parameters that are not documented here.

When you create a system DSN in the ODBC Data Source Administrator in Control Panel, and you use the Microsoft SQL Server ODBC driver, the DSN settings are saved in a registry key under the following with the same name of your DSN:

If you create a user DSN, the settings are saved in a registry key under the following:

The Microsoft SQL Server ODBC Driver setup also writes parameters to the Odbc.ini registry entry. There are several parameters in the Microsoft SQL Server ODBC Driver setup that have a default value.

When you first start to configure a DSN for SQL Server you will see that some of the parameters already have values. If you do not change the default value of a parameter you will not see a corresponding registry entry.

For example, there is a parameter in the setup named Use ANSI quoted identifiers, which is selected by default. If you clear that parameter you will see an entry in the corresponding DSN, under Odbc.ini in the registry, named QuotedId and the value is No. By default the value is Yes and you will not see the value in the registry if you keep the default value in your setup.

In case of authentication, the default is SQL Server Authentication. If you select NT Authentication you will see a registry entry named Trusted_Connection set to Yes. Therefore, if you do not have any entry in the registry that corresponds to Trusted_Connection, this means that you are using SQL Server Authentication. You can also set this Trusted_Connection to No from your program to get SQL Server Authentication.

The following table lists several parameters and their default values:
In future versions of the SQL Server ODBC driver there may be some additional parameters. All of the parameters have a default value, so it will not affect your current setup. This is why some parameters have no entries in the registry.

If you select the default value for a parameter there will be no corresponding registry entry. You will find a registry entry only when you change the default value. You can also overwrite the default behavior by setting the keywords in your connection string.

There are two other keywords that are also very important, Network and Address. Neither of these two keywords are found under the SQL Server ODBC entries in the registry.

These keywords control the network connectivity. You can set up the network protocol that your client uses to connect to SQL Server by clicking the Client Configuration button in the ODBC Data Source Administrator for SQL Server. If you edit the Client Configuration, you will find a corresponding registry entry under:

You can use the following in the connection string of your application:

NOTE: You can also use the preceding keywords when you are connecting to SQL Server using the OLE DB Provider for SQL Server (SQLOLEDB) directly with your connection string.

Additional query words: oledb

Keywords: kbinfo KB229929

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.