问题描述
我在导入使用bcp
实用程序的较新版本导出的数据时遇到问题.
I'm having problems importing data exported using a more recent version of the bcp
utility.
我需要导出的数据与SQL Server 2012兼容.
I need my exported data to be compatible with SQL server 2012.
据我了解,导出数据时需要添加-V110
选项.
It is my understanding that I need to add the -V110
option when exporting data.
但是,即使我将-V110
添加到bcp
命令中,我也总是在FMT
文件上获得版本12.0(这是我的bcp版本).
However, even if I add the -V110
to the bcp
command I always get version 12.0 (which is my bcp version) on the FMT
file.
这是我的bcp
通话的示例:
bcp [DB].[dbo].[Table1] format nul -c -f "E:\TMP\DATA\Table1.FMT" -V110 -S [SERVER] -t , -T
有人知道我在做什么错吗?
Does anybody know what am I doing wrong?
推荐答案
我设法通过安装用于SQLServer®的Microsoft®命令行实用程序11并将bcp.exe位置添加到路径变量中来解决了此问题.现在,我可以使用bcp 11导出版本11.您可以从此处 https://www.microsoft.com/zh-cn/download/details.aspx?id=36433
I managed to solve this problem by installing Microsoft® Command Line Utilities 11 for SQL Server® and adding the bcp.exe location to the path variables. Now I can export version 11 using bcp 11. You can download it from here https://www.microsoft.com/en-us/download/details.aspx?id=36433
这篇关于批量插入,无法批量加载.格式文件的未知版本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!