UFT to SQL Server conecction which is located at different domain
The uid &amp; password attributes are used for SQL Server Authentication. You cannot use those connection string values with Windows Authentication. I suspect you are getting login failures with error 18456, state of either 2 or 6. The state portion of the failure message will give you the detailed reason for failure. This post by Aaron Bertand gives a detailed rundown of most/all possible failure reasons. 

If you want to use Windows Authentication to connect to SQL Server from a different domain, you would need to have a trust established between the two domains. With the trust established, you would replace the uid &amp; password attributes with Trusted_Connection=True;

If your second domain is not trusted, and you cannot establish a trust, then you would need to use SQL Server Authentication instead. You would need to create the SQL Server login, and then your existing connection string format would work.