Merk
Tilgang til denne siden krever autorisasjon. Du kan prøve å logge på eller endre kataloger.
Tilgang til denne siden krever autorisasjon. Du kan prøve å endre kataloger.
Applies to:
SQL Server
Azure SQL Database
Azure SQL Managed Instance
Azure Synapse Analytics
Analytics Platform System (PDW)
SQL database in Microsoft Fabric
The bulk copy program utility (bcp) bulk copies data between an instance of SQL Server and a data file in a user-specified format.
For detailed information about using bcp with Azure Synapse Analytics, see Load data with bcp.
Identify installed version
To determine the installed version of bcp, run the following command:
bcp -v
If multiple versions of bcp are installed on Windows, the PATH environment variable determines which one runs. To list every copy of bcp.exe on the search path, use the following command:
where bcp.exe
For information about how to set the command path in the PATH environment variable, see Environment variables.
bcp versioning
The bcp utility is versioned independently of the SQL Server release it ships with:
| bcp major version | Distribution |
|---|---|
| 18 | Ships with SQL Server 2025 (17.x). Adds -Y (TLS encryption mode) and -u (trust server certificate) switches. |
| 15 | Distributed as Microsoft Command Line Utilities 15 for SQL Server, and bundled with SQL Server 2019 (15.x) and SQL Server 2022 (16.x) tools. |
Download the latest version
The following instructions are for bcp running on Windows. For instructions on installing bcp on Linux and macOS, as well as system requirements, see Install the sqlcmd and bcp SQL Server command-line tools on Linux.
| Package | Platform |
|---|---|
| Microsoft Command Line Utilities 15 for SQL Server | x64 x86 |
The Microsoft Command Line Utilities package contains both bcp and sqlcmd (ODBC). It also installs (or requires) the Microsoft ODBC Driver for SQL Server.
Note
The standalone bcp download might not have the same release and build number as the bcp that ships with the latest SQL Server cumulative update (CU). This behavior is expected. The standalone download still contains all fixes included in the latest CU.
System requirements
The following system requirements are for bcp running on Windows.
- Windows 10 and later versions
- Windows Server 2016 and later versions
- Microsoft ODBC Driver for SQL Server (driver 18 is recommended)
Related content
- bcp utility
- How to use the bcp utility
- Authenticate with Microsoft Entra ID in bcp
- Prepare data for bulk export or import
- BULK INSERT (Transact-SQL)
- OPENROWSET (Transact-SQL)
- Format files to import or export data (SQL Server)
Get help
- Ideas for SQL: Have suggestions for improving SQL Server?
- Microsoft Q & A (SQL Server)
- DBA Stack Exchange (tag sql-server): Ask SQL Server questions
- Stack Overflow (tag sql-server): Answers to SQL development questions
- Microsoft SQL Server License Terms and Information
- Support options for business users
- Additional SQL Server help and feedback
Contribute to SQL documentation
Did you know that you can edit SQL content yourself? If you do so, not only do you help improve our documentation, but you also get credited as a contributor to the page.
For more information, see Edit Microsoft Learn documentation.