SQL Server Performance Forum – Threads Archive
Error at "trusted SQL Server connection" help!!!Hi I’ve got a common error using SQL server 2005 "The user is not associated with a trusted SQL Server connection" I’m building a application using C# when using a standalone environment, it worked well. But, now I have the following environment. A.
Domain XXX B. Remote machine
Domain YYY I changed SQL server to support SQL and WIN authentication mode and I have changed SQl server surface area configuration to support TCP/IP and Named Pipes for remote connections. But I still have two problems: 1. When using the IP – serverName of the dataserver, the error is System.Data.SqlClient.SqlException: Login failed for user ”. The user is not associated with a trusted SQL Server connection..
1. When using the server name(MYServerName), I have this error:
System.Net.Sockets.SocketException: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. Besides, I have tried from my remote machine to use a sqlcmd -E -S tcp:myhost command but I have the same answer. Any help, I will thank.
please post the Connection string… and also check whether the server is Remote Connection enabled… and BTW which authentication u r using
check the connection string parameters
Contributing Editor, Writer & Forums Moderator
http://www.SQL-Server-Performance.Com Visit my Blog at
If you are using a dynamic port then you must ensure to refer the same on the connection string, as it might changes the SQL is restarted. Satya SKJ
Microsoft SQL Server MVP
Writer, Contributing Editor & Moderator
This posting is provided AS IS with no rights for the sake of knowledge sharing. The greatest discovery of my generation is that a human being can alter his life by altering his attitudes of mind.
Here is my connection string<br /><br />"Data Source=MyIPServername;Integrated Security=no;Current Language=English;User ID=MyUsername<img src=’/community/emoticons/emotion-4.gif’ alt=’;P’ />assword=MyPassword;Initial Catalog=MyDBName;"
Thanks to all. I just have resolved the problem. <br /><br />It was my string connection:<br /><br />string connectionString = "Data Source=MYIP;Initial Catalog=MYDB;User ID=sa<img src=’/community/emoticons/emotion-4.gif’ alt=’;P’ />assword=MYSAPASSWORD";<br /><br />Thanks for your help, anyway.