When trying to run SQL Compare as part of a PowerShell script, you receive the following error:
“Login failed. The login is from an untrusted domain and cannot be used with Windows authentication”
Sometimes the account can be locked out, or the password has changed or expired within SQL Server.
This can also be caused by a loopback check taking place which causes trusted connections via the loopback adapter to fail.
If the issue is not with the SQL Server login account or password mismatch, then the following registry change can be used to remove the check:
- Edit the registry using regedit. (Start > Run > Regedit)
- Navigate to: HKLM\System\CurrentControlSet\Control\LSA
- Add a DWORD value called “DisableLoopbackCheck”
- Set this value to 1
For additional information and an alternative using a Microsoft tool, please see the following article:
0
0
Was this article helpful?
0 out of 0 found this helpful
Articles in this section
- The operation could not be performed because OLE DB provider ... for linked server ... was unable to begin a distributed transaction (SQL Compare)
- Docker Cannot connect to SQL Server Browser
- How to create a filter for command line comparisons
- SQL Compare Error: The Login is from an Untrusted Domain
- Error: Exiting since no license was found
- "No text is available" in SQL view
- Performance issues with SQL Data Compare
- Why comparison behaviour is different between the GUI and command line?
- Server Aliases not working when connecting with SQL Compare/SQL Data Compare