[MS-OLEDBSTR]:

OLEDB Connection String Structure

Intellectual Property Rights Notice for Open Specifications Documentation

§  Technical Documentation. Microsoft publishes Open Specifications documentation for protocols, file formats, languages, standards as well as overviews of the interaction among each of these technologies.

§  Copyrights. This documentation is covered by Microsoft copyrights. Regardless of any other terms that are contained in the terms of use for the Microsoft website that hosts this documentation, you may make copies of it in order to develop implementations of the technologies described in the Open Specifications and may distribute portions of it in your implementations using these technologies or your documentation as necessary to properly document the implementation. You may also distribute in your implementation, with or without modification, any schema, IDL's, or code samples that are included in the documentation. This permission also applies to any documents that are referenced in the Open Specifications.

§  No Trade Secrets. Microsoft does not claim any trade secret rights in this documentation.

§  Patents. Microsoft has patents that may cover your implementations of the technologies described in the Open Specifications. Neither this notice nor Microsoft's delivery of the documentation grants any licenses under those or any other Microsoft patents. However, a given Open Specification may be covered by Microsoft Open Specification Promise or the Community Promise. If you would prefer a written license, or if the technologies described in the Open Specifications are not covered by the Open Specifications Promise or Community Promise, as applicable, patent licenses are available by contacting .

§  Trademarks. The names of companies and products contained in this documentation may be covered by trademarks or similar intellectual property rights. This notice does not grant any licenses under those rights. For a list of Microsoft trademarks, visit www.microsoft.com/trademarks.

§  Fictitious Names. The example companies, organizations, products, domain names, e-mail addresses, logos, people, places, and events depicted in this documentation are fictitious. No association with any real company, organization, product, domain name, email address, logo, person, place, or event is intended or should be inferred.

Reservation of Rights. All other rights are reserved, and this notice does not grant any rights other than specifically described above, whether by implication, estoppel, or otherwise.

Tools. The Open Specifications do not require the use of Microsoft programming tools or programming environments in order for you to develop an implementation. If you have access to Microsoft programming tools and environments you are free to take advantage of them. Certain Open Specifications are intended for use in conjunction with publicly available standard specifications and network programming art, and assumes that the reader either is familiar with the aforementioned material or has immediate access to it.

Revision Summary

Date / Revision History / Revision Class / Comments /
6/27/2008 / 1.0 / Major / First release.
10/6/2008 / 1.01 / Editorial / Changed language and formatting in the technical content.
12/12/2008 / 1.02 / Editorial / Changed language and formatting in the technical content.
8/7/2009 / 1.1 / Minor / Clarified the meaning of the technical content.
11/6/2009 / 1.1.2 / Editorial / Changed language and formatting in the technical content.
3/5/2010 / 1.1.3 / Editorial / Changed language and formatting in the technical content.
4/21/2010 / 1.1.4 / Editorial / Changed language and formatting in the technical content.
6/4/2010 / 1.1.5 / Editorial / Changed language and formatting in the technical content.
9/3/2010 / 1.1.5 / None / No changes to the meaning, language, or formatting of the technical content.
2/9/2011 / 1.1.5 / None / No changes to the meaning, language, or formatting of the technical content.
7/7/2011 / 1.1.5 / None / No changes to the meaning, language, or formatting of the technical content.
11/3/2011 / 1.1.5 / None / No changes to the meaning, language, or formatting of the technical content.
1/19/2012 / 1.1.5 / None / No changes to the meaning, language, or formatting of the technical content.
2/23/2012 / 1.1.5 / None / No changes to the meaning, language, or formatting of the technical content.
3/27/2012 / 1.1.5 / None / No changes to the meaning, language, or formatting of the technical content.
5/24/2012 / 1.1.5 / None / No changes to the meaning, language, or formatting of the technical content.
6/29/2012 / 1.1.5 / None / No changes to the meaning, language, or formatting of the technical content.
7/16/2012 / 1.1.5 / None / No changes to the meaning, language, or formatting of the technical content.
10/8/2012 / 1.1.5 / None / No changes to the meaning, language, or formatting of the technical content.
10/23/2012 / 1.1.5 / None / No changes to the meaning, language, or formatting of the technical content.
3/26/2013 / 1.1.5 / None / No changes to the meaning, language, or formatting of the technical content.
6/11/2013 / 2.0 / Major / Updated and revised the technical content.
8/8/2013 / 3.0 / Major / Updated and revised the technical content.
12/5/2013 / 4.0 / Major / Updated and revised the technical content.
2/11/2014 / 5.0 / Major / Updated and revised the technical content.
5/20/2014 / 5.0 / None / No changes to the meaning, language, or formatting of the technical content.
6/30/2015 / 6.0 / Major / Significantly changed the technical content.

Table of Contents

1 Introduction 5

1.1 Glossary 5

1.2 References 6

1.2.1 Normative References 7

1.2.2 Informative References 7

1.3 Overview 8

1.4 Relationship to Protocols and Other Structures 8

1.5 Applicability Statement 8

1.6 Versioning and Localization 8

1.7 Vendor-Extensible Fields 8

2 Structures 9

2.1 Requirements for Connection Strings 9

2.1.1 Empty Connection String 9

2.1.2 Case-sensitivity 9

2.1.3 Multiple Occurrences of the Same Key 9

2.1.4 Conflicts Between Keys 9

2.2 ABNF Rules 9

2.2.1 Common ABNF Rules 9

2.2.2 OLE DB Connection String Format 9

2.2.2.1 KeyValuePair 10

2.2.2.2 Key 10

2.2.2.3 Value 10

2.2.2.4 SQUOTE, DQUOTE, SC 10

2.2.3 Keys with Compound Values 10

2.2.4 Using Symbolic Names in Values 11

2.3 Generic Keys 11

3 Structure Examples 14

3.1 Integrated Security 14

3.2 Standard Security Connection 14

3.3 Named Instance 14

3.4 IP Address as Data Source 14

3.5 Initial Catalog 14

3.6 Network Library 15

3.7 Encryption 15

3.8 Escaped Equals Sign 15

3.9 Leading and Trailing Spaces 15

3.10 Spaces Within a Connection String 15

3.11 Multiple Occurrences of the Same Key 15

4 Security Considerations 17

4.1 Security Considerations for Implementers 17

4.2 Index of Security Parameters 17

5 Appendix A: Product Behavior 18

6 Change Tracking 24

7 Index 26

1  Introduction

The OLE DB Connection String Structure is the format of the connection strings that are used by OLE DB consumers. A connection string is a string that is sent from an OLE DB consumer to an OLE DB provider and that specifies the information that is needed to establish a connection to a data source.

Sections 1.7 and 2 of this specification are normative and can contain the terms MAY, SHOULD, MUST, MUST NOT, and SHOULD NOT as defined in [RFC2119]. All other sections and examples in this specification are informative.

1.1  Glossary

The following terms are specific to this document:

Authentication Service (AS): A service that issues ticket granting tickets (TGTs), which are used for authenticating principals within the realm or domain served by the Authentication Service.

code page: An ordered set of characters of a specific script in which a numerical index (code-point value) is associated with each character. Code pages are a means of providing support for character sets (1) and keyboard layouts used in different countries. Devices such as the display and keyboard can be configured to use a specific code page and to switch from one code page (such as the United States) to another (such as Portugal) at the user's request.

connection: A link that two physical machines or applications share to pass data back and forth.

connection string: A character string expression that uniquely identifies the data store to use for a particular query or set of queries and the methods, including authentication information and configuration options, for connecting to that data store.

data source: A physical data source.

data source object: An instance of a COM class that exposes a set of OLE DB interfaces. A data source object can be used to establish a connection to a data source.

default database: The current database just after the connection is made.

domain: A capture of the data semantics. Example domains include email address, gender, and state.

generic key: A keyword in a connection string, the meaning of which is the same across all drivers.

Internet Protocol version 4 (IPv4): An Internet protocol that has 32-bit source and destination addresses. IPv4 is the predecessor of IPv6.

Kerberos: An authentication access type as defined by [RFC1964].

language code identifier (LCID): A 32-bit number that identifies the user interface human language dialect or variation that is supported by an application or a client computer.

named pipe: A named, one-way, or duplex pipe for communication between a pipe server and one or more pipe clients.

NT LAN Manager (NTLM) Authentication Protocol: A protocol using a challenge-response mechanism for authentication (2) in which clients are able to verify their identities without sending a password to the server. It consists of three messages, commonly referred to as Type 1 (negotiation), Type 2 (challenge) and Type 3 (authentication). For more information, see [MS-NLMP].

OEM character: See original equipment manufacturer (OEM) character.

OLE DB: A set of interfaces that are based on the Component Object Model (COM) programming model and expose data from a variety of sources. These interfaces support the amount of Database Management System (DBMS) functionality that is appropriate for a data store and they enable a data store to share data.

OLE DB consumer: A software component that requests information through a set of OLE DB interfaces.

OLE DB provider: A software component that returns information to an OLE DB consumer through a set of OLE DB interfaces. Each provider exposes data access to a particular type of data source.

path: An ordered list of roles to follow to reach a specific entity.

plaintext: In cryptography, ordinary readable text before it is encrypted into ciphertext, or after it has been decrypted.

provider-specific key: A key in a connection string, the meaning of which is determined by an individual provider.

remote procedure call (RPC): A context-dependent term commonly overloaded with three meanings. Note that much of the industry literature concerning RPC technologies uses this term interchangeably for any of the three meanings. Following are the three definitions: (*) The runtime environment providing remote procedure call facilities. The preferred usage for this meaning is "RPC runtime". (*) The pattern of request and response message exchange between two parties (typically, a client and a server). The preferred usage for this meaning is "RPC exchange". (*) A single message from an exchange as defined in the previous definition. The preferred usage for this term is "RPC message". For more information about RPC, see [C706].

session: A unidirectional communication channel for a stream of messages that are addressed to one or more destinations. A destination is specified by a resource URL, an identity URL, and a device URL. More than one session can be multiplexed over a single connection.

stored procedure: A precompiled collection of SQL statements and, optionally, control-of-flow statements that are stored under a name and processed as a unit. They are stored in a SQL database and can be run with one call from an application. Stored procedures return an integer return code and can additionally return one or more result sets. Also referred to as sproc.

Unicode: A character encoding standard developed by the Unicode Consortium that represents almost all of the written languages of the world. The Unicode standard [UNICODE5.0.0/2007] provides three forms (UTF-8, UTF-16, and UTF-32) and seven schemes (UTF-8, UTF-16, UTF-16 BE, UTF-16 LE, UTF-32, UTF-32 LE, and UTF-32 BE).

XML: The Extensible Markup Language, as described in [XML1.0].

MAY, SHOULD, MUST, SHOULD NOT, MUST NOT: These terms (in all caps) are used as defined in [RFC2119]. All statements of optional behavior use either MAY, SHOULD, or SHOULD NOT.

1.2  References

Links to a document in the Microsoft Open Specifications library point to the correct section in the most recently published version of the referenced document. However, because individual documents in the library are not updated at the same time, the section numbers in the documents may not match. You can confirm the correct section numbering by checking the Errata.

1.2.1  Normative References

We conduct frequent surveys of the normative references to assure their continued availability. If you have any issue with finding a normative reference, please contact . We will assist you in finding the relevant information.

[MS-ODBCSTR] Microsoft Corporation, "ODBC Connection String Structure".

[MS-SSAS] Microsoft Corporation, "SQL Server Analysis Services Protocol".

[MS-TDS] Microsoft Corporation, "Tabular Data Stream Protocol".

[RFC1002] Network Working Group, "Protocol Standard for a NetBIOS Service on a TCP/UDP Transport: Detailed Specifications", STD 19, RFC 1002, March 1987, http://www.rfc-editor.org/rfc/rfc1002.txt

[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, March 1997, http://www.rfc-editor.org/rfc/rfc2119.txt

[RFC2460] Deering, S., and Hinden, R., "Internet Protocol, Version 6 (IPv6) Specification", RFC 2460, December 1998, http://www.rfc-editor.org/rfc/rfc2460.txt

[RFC4234] Crocker, D., Ed., and Overell, P., "Augmented BNF for Syntax Specifications: ABNF", RFC 4234, October 2005, http://www.rfc-editor.org/rfc/rfc4234.txt

[RFC791] Postel, J., Ed., "Internet Protocol: DARPA Internet Program Protocol Specification", RFC 791, September 1981, http://www.rfc-editor.org/rfc/rfc791.txt

[RFC793] Postel, J., Ed., "Transmission Control Protocol: DARPA Internet Program Protocol Specification", RFC 793, September 1981, http://www.rfc-editor.org/rfc/rfc793.txt

1.2.2  Informative References

[MSDN-CDIM] Microsoft Corporation, "Impersonation Levels", http://msdn.microsoft.com/en-us/library/ms686632.aspx