-T
is indeed the same as Integrated Security=SSPI
.
You can check the SQL Server errorlog. You should find the login error there as well, but with more information why login failed.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
I have been working on using the bcp utility to transfer data to and from SQL Server. I am currently interested in understanding how to determine the authentication method being used by bcp when connecting to SQL Server.
Specifically, I would like to distinguish whether bcp is using a service account or an interactive user account for authentication. I have read about the -T option for trusted connections (Windows Authentication), but I want to confirm if bcp is indeed using this mechanism. Reason for this is i was able to connect with sql server on remote machine using this jdbc string jdbc:jtds:sqlserver://server:1433;db;Domain=domain;useNTLMv2=true;Integrated Security=SSPI
but not able to do the same using bcp.exe [db].[dbo].[table] in "file.txt" -S server,1433 -t "|**|" -e ..\logs\error.txt -w -T -k
i am getting SQLState = 28000, NativeError = 18456 Error = [Microsoft][ODBC Driver 13 for SQL Server][SQL Server]Login failed for user 'domain\user' if both will be using the same authentication means why i am getting this error only on bcp
i am getting this sql exception while trying to connect mssql and i am not able to find the reason , so kindly help me with this
-T
is indeed the same as Integrated Security=SSPI
.
You can check the SQL Server errorlog. You should find the login error there as well, but with more information why login failed.
Hi @ramasamy
For more details about error 18456, please refer to this doc: MSSQLSERVER_18456.
Best regards,
Cosmog Hong
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our Documentation to enable e-mail notifications if you want to receive the related email notification for this thread.