SQL Server中的bcp实用工具(批量复制程序)简介

介绍 (Introduction)

The Bulk copy program aka bcp is the console application used to export and import data from text files to SQL Server or vice versa.

大容量复制程序(又称为bcp)是控制台应用程序,用于将数据从文本文件导出和导入到SQL Server,反之亦然。

It is very popular because it is fast and easy to download.

它非常流行,因为它快速且易于下载。

This tool is installed by default with SQL Server. It is usually installed in the following path:

默认情况下,此工具与SQL Server一起安装。 通常将其安装在以下路径中:

Drive: \\Program Files\Microsoft SQL Server\Client SDK\ODBC\130\Tools\Binn\bcp.exe

驱动器:\\ Program Files \ Microsoft SQL Server \ Client SDK \ ODBC \ 130 \ Tools \ Binn \ bcp.exe

In this article we will learn how to:

在本文中,我们将学习如何:

  1. Get the bcp arguments

    获取bcp参数
  2. Get the version

    获取版本
  3. Export data from a SQL Server table to a file

    将数据从SQL Server表导出到文件
  4. Export data from a SQL Server query to a file

    将数据从SQL Server查询导出到文件
  5. Run bcp using PowerShell

    使用PowerShell运行bcp
  6. Run bcp on SSIS

    在SSIS上运行bcp
  7. Invoke a batch file in SSIS

    在SSIS中调用批处理文件

要求 (Requirements)

  1. SQL Server installed

    已安装SQL Server
  2. bcp installed bcp
  3. The Adventureworks database installed

    已安装Adventureworks数据库
  4. SSIS Installed

    已安装SSIS
  5. SSDT installed

    已安装SSDT

开始吧 (Get started)

1. Get the bcp arguments

1.获取bcp参数

In the command line, write bcp. This will show you the possible arguments that can be used:

在命令行中,编写bcp。 这将向您显示可以使用的可能参数:

bcp /? Is the same than bcp. It shows you the possible parameters:

bcp /? 与bcp相同。 它显示了可能的参数:

2. Get the version

2.获取版本

You can get the version of the bcp using the -v argument:

您可以使用-v参数获取bcp的版本:

  • 0
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值