BCP with windows authentication

I am trying bcp utility to export whole table. I use windows authentication. Below I pasted the code I use (real names replaced with artificial, but syntax retained):

bcp db_name.dbo.table_name out C:\table_name -S"servername\instnace , portnumber" -T

I get error message

What I am doing wrong?

I don't think you are doing anything wrong (other than spelling "instnace" wrong!). Just enter your password

That is actually the problem, there is no password, it is a "windows authentication" and in the command I have -T for trusted connection, so no password should be required, correct?

I figured it out: I had also sybase installed and it tried to access sybase and not mssql server. Since i dont need sybase I deinstalled it and then bcp run without asking for password.

1 Like