Login Failed for User ''. The user is not associated with a trusted SQL Server connection. [CLIENT: X.X.X.X]

  • Hello,

    I'm noticing a distinct pattern with this error. First will come "Error: 18452, Severity: 14, State: 1". Then immediately after that comes "Login Failed for User ''. The user is not associated with a trusted SQL Server connection. [CLIENT: X.X.X.X]" Then the very next entry in the error log is an entry saying a specific user A successfully logged in.

    User 'A' is a user specifically for a PHP page to insert data to a table. To be sure of the pattern, I altered the PHP page to login with user 'B' instead of user 'A'. Same exact pattern with user 'B'.

    I dug through articles on the net to no avail. The only thing of seeming relevance was a brief post on network troubles. This doesn't make sense to me, since the PHP page resides on the SQL Server machine. So, CLIENT is the DB Server! Also, prior to inserting data, the PHP page returns values from several stored procedures, and based on those results, makes appropriate inserts. I disabled these calls to stored procedures and am still getting the error.

    I'm pulling my hair out with this error. I'm getting roughly 400-500 of these every 10 minutes in the error log! I hope I included enough information here to be of value. Any help or recommendations would be thoroughly appreciated.

    Thank you so much!

  • Can you post the exact message (without sensitive info) from the SQL Server logs? Just one set.

    Did you check if the PHP pages have code that is trying to connect multiple times. I have run into an issues ASP where due to the files were included, connections were getting opened twice. It took a while before I caught this issue. Although in my case, I was not recording any login failures.

    Thanks

  • Hi!

    Thanks for the response. Here are three consecutive lines:

    2009-07-23 16:03:01.950LogonError: 18452, Severity: 14, State: 1.

    2009-07-23 16:03:01.950LogonLogin failed for user ''. The user is not associated with a trusted SQL Server connection. [CLIENT: X.X.X.X]

    2009-07-23 16:03:01.960LogonLogin succeeded for user 'A'. Connection: non-trusted. [CLIENT: 127.0.0.1]

    As for the PHP pages opening more than one connection, I don't know if that is going on but I will try to check that immediately. There is a clue here that I wasn't even picking up on. The CLIENT in the third line is the client I've got in the PHP page, but the X.X.X.X IP is the public IP of that server.

    Thanks so much!

  • Hello,

    While checking to see that connections were being properly closed, it occurred to me that there were a couple queries that the PHP page was trying to execute before making a connection to the database. Pushing the connection call to the top of the PHP solved the problem.

    Thank you so much for your help, I really appreciate it.

  • You are welcome. I am glad I could help out.

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply