【问题标题】:BCP Utility. Creating format-fileBCP 实用程序。创建格式文件
【发布时间】:2017-03-04 17:00:48
【问题描述】:

MSDN说如果表名是myTestFormatFiles,则表是在AdventureWorks2012示例数据库中dbo架构下创建的,所以命令是:

bcp AdventureWorks2012..MyTestFormatFiles format nul -c -t, -f myTestFormatFiles.Fmt -T

我的情况:

我试过这个:

bcp TestDB..test_table format nul -c -t, -f d:\format.fmt -T

结果如下:

SQLState = 08001, NativeError = 2
Error = [Microsoft][SQL Server Native Client 11.0]Named Pipes Provider: Could no
t open a connection to SQL Server [2].
SQLState = 08001, NativeError = 2
Error = [Microsoft][SQL Server Native Client 11.0]A network-related or instance-
specific error has occurred while establishing a connection to SQL Server. Serve
r is not found or not accessible. Check if instance name is correct and if SQL S
erver is configured to allow remote connections. For more information see SQL Se
rver Books Online.
SQLState = S1T00, NativeError = 0
Error = [Microsoft][SQL Server Native Client 11.0]Login timeout expired

我认为TestDB..test_table 有问题。可能我需要在命令中指定k551l\sqlexpress,比如k551l\sqlexpress..TestDB..test_table

我的问题到底是什么?

【问题讨论】:

    标签: sql sql-server bcp


    【解决方案1】:

    通过将-S k551l\sqlexpress 添加到您的命令来添加服务器\实例名称。

    【讨论】:

    • @zer_ik 乐于助人!
    猜你喜欢
    • 1970-01-01
    • 2020-02-21
    • 1970-01-01
    • 1970-01-01
    • 2015-09-20
    • 2011-03-29
    • 1970-01-01
    • 1970-01-01
    • 2020-02-02
    相关资源
    最近更新 更多