1
votes

I am using the following command to import data into sql server:

bcp 
dbo.traderprodmap in c:temp\data.txt
 -c -t -S "SQLTRADERQA\TRADERQA" 
-d trader -Uabcprod123 -Pabc&prod

I get the following error:

SQLstate 28000 and nativeerror 18456 Login failed for user abcprod123

I have invoked the above command thru administrator mode. Double checked username and pwd . Can someone pls point out the issue here?

1
Why you are useing -t without field_term? Try to not use -t - user_0
Did that , gives the same error - MR K
Check SQL server error log for the cause of this error. It's authentication error, it has nothing to do with "-t" - sepupic
-U "abcprod123" -P "abc&prod" - sotn

1 Answers

0
votes

Escape the & in your password. Editted...

The ampersand is a special character in the windows command line.

Try escaping it with the Hat/Carrot (^). so Pabc^&prod