Home All Groups Group Topic Archive Search About

getting native error 18456 Error = login failed for user(username) when using BCP

Author
23 Mar 2006 5:53 AM
RPK
Hi ,
can any one help in exporting data to a flat file by using BCP,
iam trying to use BCP but iam getting following error

Error : native error 18456  Error = login failed for user when using
BCP

thanks well in advance

Author
23 Mar 2006 6:09 AM
Uri Dimant
exec master..xp_cmdshell 'BCP northwind..orders OUT
c:\test1.txt -c -C850 -SServer -Usa -Ppwd'


Show quote
"RPK" <praveen.rampa***@gmail.com> wrote in message
news:1143093192.808073.125810@u72g2000cwu.googlegroups.com...
> Hi ,
> can any one help in exporting data to a flat file by using BCP,
> iam trying to use BCP but iam getting following error
>
> Error : native error 18456  Error = login failed for user when using
> BCP
>
> thanks well in advance
>
Author
23 Mar 2006 6:26 AM
RPK
Hi ,
iam using the following statement from command line:

bcp pubs.dbo.authors out c:\pubs.txt -n -Slocal -Udomain\username -Ppwd

but still iam getting an error : login failed for the user as Native
error  = 18456
Author
23 Mar 2006 8:35 AM
Erland Sommarskog
RPK (praveen.rampa***@gmail.com) writes:
> Hi ,
> iam using the following statement from command line:
>
> bcp pubs.dbo.authors out c:\pubs.txt -n -Slocal -Udomain\username -Ppwd
>
> but still iam getting an error : login failed for the user as Native
> error  = 18456

domain\username is not likely to be correct. For -U you specify an
SQL server login, you cannot specify a Windows login. You can however,
instead of -U and -P user -T to specify that you want to login with
a trusted connection; that is SQL Server will use your Windows credentials.


--
Erland Sommarskog, SQL Server MVP, esq***@sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx

AddThis Social Bookmark Button