【发布时间】: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