MSDN says that if table name is myTestFormatFiles
, table is created in the AdventureWorks2012
sample database under the dbo
schema, so the command is:
bcp AdventureWorks2012..MyTestFormatFiles format nul -c -t, -f myTestFormatFiles.Fmt -T
My case:
I tryed this one:
bcp TestDB..test_table format nul -c -t, -f d:\format.fmt -T
Here is the result:
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
I think something wrong with TestDB..test_table
. May be I need to specify k551l\sqlexpress
in command, something like k551l\sqlexpress..TestDB..test_table
.
What is my problem really?
add the server\instance names with by adding -S k551l\sqlexpress
to your command.