Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Version: 18.6.2.1
Date: March 31, 2026
ODBC is the primary native data access API for applications written in C and C++ for SQL Server. There's an ODBC driver for most data sources. Other languages that can use ODBC include COBOL, Perl, PHP, and Python. ODBC is widely used in data integration scenarios.
The ODBC driver comes with tools such as sqlcmd and bcp. The sqlcmd utility lets you run Transact-SQL statements, system procedures, and SQL scripts. The bcp utility bulk copies data between an instance of Microsoft SQL Server and a data file in a format you choose. You can use bcp to import many new rows into SQL Server tables or to export data out of tables into data files.
Code example in C++
For a C++ example that demonstrates how to use the ODBC APIs to connect to and access a database, see Sample ODBC Program.
Download
Documentation
Features
- Connection resiliency in the ODBC driver
- Custom Keystore Providers
- Data Classification
- DSN and connection string keywords and attributes
- SQL Server Native Client Features (the features available also apply, without OLEDB, to the ODBC Driver for SQL Server)
- Using Always Encrypted with the ODBC Driver for SQL Server
- Using Microsoft Entra ID with the ODBC Driver
- Use transparent network IP resolution with the ODBC driver
- Using XA Transactions
- Vector data type (ODBC)
- Connection encryption troubleshooting in the ODBC driver
Linux and macOS
- Install the Microsoft ODBC driver for SQL Server (Linux)
- Install the Microsoft ODBC driver for SQL Server (macOS)
- Connecting from Linux or macOS
- bcp utility
- Connecting with sqlcmd
- Data access tracing on Linux and macOS
- Frequently Asked Questions
- Installing the Driver Manager
- Known issues for the ODBC driver on Linux and macOS
- Programming Guidelines
- Release notes for the Microsoft ODBC driver for SQL Server on Linux and macOS
- Release notes for the Microsoft SQL Server tools on Linux and macOS
- High availability and disaster recovery
- Using Integrated Authentication
Windows
- Asynchronous Execution (Notification Method) Sample
- Driver-Aware Connection Pooling in the ODBC Driver for SQL Server
- Features of the Microsoft ODBC Driver for SQL Server on Windows
- Release Notes for Microsoft ODBC Driver for SQL Server on Windows
- System requirements, installation, and driver files