BCP command usage in SQL Server
The bcp Command-Line Utility
You use the bcp (bulk copy program) tool to address the bulk movement of data. This utility is bidirectional, allowing for the movement of data into and out of a SQL Server database.
bcp uses the following syntax:
bcp [database_name.] schema.{table_name | view_name | "query" {in
data_file | out data_file | queryout data_file | format nul}
[-a packet_size] [-b batch_size] [-c]
[-C { ACP | OEM | RAW | code_page } ]
[-d database_name] [-e err_file] [-E]
[-f format_file] [-F first_row] [-h"hint [,...n]"]
[-i input_file] [-k] [-K application_intent]
[-L last_row] [-m max_errors] [-n]
[-N] [-o output_file]
[-P password] [-q] [-r row_term]
[-R] [-S [server_name[\instance_name]]
[-t field_term] [-T] [-U login_id]
[-v] [-V (80 | 90 | 100 )] [-w]
[-x]
/?
Some of the commonly used options—other than the ones used to specify the database, such as user ID, password, and so on—are the –F and –L options. These options allow you to specify the first and last row of data to be loaded from a file, which is especially helpful in large batches. The –t option allows you to specify the field terminator that separates data elements in an ASCII file. The –E option allows you to import data into SQL Server fields that are defined with identity properties.
Tip
The BULK INSERT T-SQL statement and SSIS are good alternatives to bcp. The BULK INSERT statement is limited to loading data into SQL Server, but it is an extremely fast tool for loading data. SSIS is a sophisticated GUI that allows for both data import and data export, and it has capabilities that go well beyond bcp.
BCP command usage in SQL Server的更多相关文章
- BCP 导出导入数据(SQL Server)
BCP指令工具可通过安装SQL Server获得. 1. 根据现有的数据库生成表的format文件(导入导出数据的时候需要) bcp db_test.dbo.Table1 format nul -c ...
- Run same command on all SQL Server databases without cursors
original: https://www.mssqltips.com/sqlservertip/1414/run-same-command-on-all-sql-server-databases-w ...
- SQL Server - SQL Server/ bcp 工具如何通信
问题-BCP通讯 ref: https://stackoverflow.com/questions/40664708/bcp-cannot-connect-to-aws-sql-server-but- ...
- OGG-00782 - OGG 11.2.1.0.2 FOR Windows x64 Microsoft SQL Server
OS ENV:主机名: WIN-NO42QRNPMFAOS 名称: Microsoft Windows Server 2008 R2 Datacenter OS ...
- SQL Server 2008性能故障排查(三)——I/O
原文:SQL Server 2008性能故障排查(三)--I/O 接着上一章:CPU瓶颈 I/O瓶颈(I/O Bottlenecks): SQLServer的性能严重依赖I/O子系统.除非你的数据库完 ...
- Ubuntu 安装 SQL Server
SQL Server现在可以在Linux上运行了!正如微软CEO Satya Nadella说的,"Microsoft Loves Linux",既Windows 10内置的Lin ...
- SQL Server 扩展事件
SQL Server 扩展事件(Extended Event)是用于服务器的常规事件处理系统,是追踪SQL Server系统运行状态的神器,同时也是一个日志记录工具,扩展事件完全可以取代SQL追踪(S ...
- How can I create a dump of SQL Server?
https://blogs.msdn.microsoft.com/askjay/2009/12/29/basic-debugging-concepts-and-setup/ You can creat ...
- [转]UTF-8 encoding support for the BCP utility and BULK INSERT Transact-SQL command in SQL Server 2014 SP2
本文转自:https://support.microsoft.com/en-us/help/3136780/utf-8-encoding-support-for-the-bcp-utility-and ...
随机推荐
- jquery Ajax中的dataType简析
jquery中的ajax有好几种运用方式,但是基本上都是使用的$.ajax()方法,很多人经常会使用它来从后台获取json格式的数据,但是经常发现返回的json字符串并不能自动的转换成js里的json ...
- LevelDB源码之四LOG文件
“LOG文件在LevelDb中的主要作用是系统故障恢复时,能够保证不会丢失数据.因为在将记录写入内存的Memtable之前,会先写入Log文件,这样即使系统发生故障,Memtable中的数据没有来得及 ...
- 如何用Ajax实现地址栏省市级联动(数据库表数据源)
HTML: <tr> <th> <label for="textfield"><span class="red"> ...
- 7)Java数据类型
Java中的数据类型分为基本数据类型和引用数据类型: 1)基础数据类型有: boolean, byte.short.char, int.float.long, dou ...
- C# 调用系统API 内核 简单样例
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.R ...
- Java 第三天 Gradle和其它
Gradle 是以 Groovy 语言为基础,面向Java应用为主.基于DSL(领域特定语言)语法的自动化构建工具. 下载地址 http://www.gradle.org/downloads 环境变量 ...
- 第十二章 管理类型(In .net4.5) 之 操作字符串
1. 概述 本章包括 字符串基本操作 以及 查找.遍历.格式化字符串. 2. 主要内容 2.1 在.net平台中使用字符串 C#中,string是用来保存文本信息的.是一个被当做值类型使用的引用类型. ...
- Python sequence (序列)
序列简介 sequence 是一组有序元素的组合 序列可以是多个元素,也可以一个元素都没有 序列有2种:tuple(定值表).List(表) D:\python\Python_Day>pytho ...
- RMAN - 备份异机恢复
OS: Oracle Linux Server release 5.7 DB: Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - ...
- GIS中栅格数据的拼接
Datamanager Tools——Raster——Raster Dataset——Mosaic to New Raster 如果最大值是实际的真值,选择masaic operator要保留Max ...