Reputation: 485
In cmd, I'm trying to create a fmt
file, my code is
bcp Database1.dbo.Table1 format nul -c -x -f c:\format.xml -T -S .\sql2005
Then I get error saying Format file could not be opened. Invalid name specified or access denied.
I wonder how I can check if the access is denied or not? And how I can give access the permission?
Upvotes: 2
Views: 2875
Reputation: 13
You are writing your file to the root of the C: drive if you have UAC enabled then you would need to run your CMD prompt as an administrator to get access to write to that location. If you create a sub-folder like c:\BCPTest\ then you should be able to write to that folder.
Upvotes: 1