What is the difference between using 'Trusted_Connection=Yes' and providing explicit credentials in sqlcmd?

Question

Grade: Education Subject: Support
What is the difference between using 'Trusted_Connection=Yes' and providing explicit credentials in sqlcmd?
Asked by:
107 Viewed 107 Answers

Answer (107)

Best Answer
(322)
'Trusted_Connection=Yes' uses Windows Authentication, meaning the sqlcmd process will attempt to connect using the current Windows user's credentials. Providing explicit credentials (username and password) forces SQL Server Authentication. Ensure the chosen authentication method is configured correctly on the SQL Server.