Where does the bcp format file go when created using the BCP utility?
I am trying to create a bcp format file for a table in my database using the bcp utility. Based on what I found here, I came up with the following cmd command:
bcp dbName..tableName format nul -c -f tableName.fmt -T
It works with no output. First of all, is that 开发者_开发百科what's supposed to happen? Does that mean that it ran successfully?
Second, what happened to my format file? I can't find it anywhere. I searched my hard drive, as well as the drive that the server's on, and it's not there. I would think that it would be on the drive that I ran the command from, but I actually ran it from a query window. Can that be the problem?
Thanks in advance!
For me, it is created in "C:\Windows\System32"
But you can just specify your own location using a root file path, and then create the file anywhere you want:
bcp dbName..tableName format nul -c -f "c:\logs\tableName.fmt" -T
The format file should have been created in the directory where the bcp command was run:
精彩评论