none
Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection. RRS feed

  • Question

  • I am receiving the following message when connecting via query analzyer to SQL server using windows authentication.(error 18452). I have a login created with the sys admin server role on the server. When I connect using SQL authentication it works.

    I added myself to the local admin group on the server, this allows it to work. The same situation is seen with another user.

    I am using windows 2000 sp4 server and SQL 2000 SP3, connecting from NT4. I get the same issue if I use TCP or named pipes. We have been using SQL security but are moving to windows authentication - but this issue is stopping us.

    I have checked and upgraded my version of MDAC to match the server version 2.7 (sp1)


    Any help would be much appreciated.


    Thanks

    Ian

    Tuesday, October 24, 2006 4:32 PM

Answers

  • Are you otherwise able to access server resources from the workstations, for example, can you access a share that explicitly gives access only to the domain account you were using when trying to connect to SQL Server?

    Thanks
    Laurentiu

    Thursday, October 26, 2006 5:58 PM
    Moderator

All replies

  • Hi Ian,

    I am suspecting that you are using local windows accounts. If you are using local windows accounts and if these accounts (same user name and password) do not exist on the remote SQL Server machine, then when they go out of your machine they go out as NULL user meaning that your current context doesn't have network credentials. Please let me know if you are running into this.

    Thanks,

    Bala.

    Tuesday, October 24, 2006 7:23 PM
  • No were are using domain accounts - sorry I didn't make this clear. Both the server and workstation and users belong to the same domain.
    Wednesday, October 25, 2006 7:17 AM
  • What is the service account for the SQL Server instances? Has this worked before or is it the first time you're trying to set up Windows authentication between these two SQL Server instances?

    Thanks
    Laurentiu

    • Proposed as answer by Joshua Einstein Wednesday, February 23, 2011 10:03 PM
    • Unproposed as answer by Joshua Einstein Wednesday, February 23, 2011 10:03 PM
    Wednesday, October 25, 2006 11:55 PM
    Moderator
  • This has never worked as far as I'm aware. The issue is on a server with only the default instance installed. The account is a domain account which is a member of the local administrators group. The issue is between the clients (NT4 workstations) and the server (W2K).

    Thanks
    Ian

    Thursday, October 26, 2006 3:35 PM
  • Are you otherwise able to access server resources from the workstations, for example, can you access a share that explicitly gives access only to the domain account you were using when trying to connect to SQL Server?

    Thanks
    Laurentiu

    Thursday, October 26, 2006 5:58 PM
    Moderator
  • I think you have pointed me in the right direction, I set up a share on the box explicity giving the account permission but get the message when connecting to a network drive :- Logon failure: the user has not been granted the requested logon type on this computer.

    I think that the group policy may be preventing this type of connection and will speak to the people involved regarding this (I can have local admin permissions but can't change the group policies)

    Thanks for your help


    Ian

    Wednesday, November 1, 2006 10:10 AM
  • Thanks patricia, but no mixed mode is selected. In fact you can't turn off windows authentication which is posing the problem.

    We believe it is down to an overly restrictive group policy but are dependant on others to make the change - and still waiting.

    Monday, November 6, 2006 12:45 PM
  •  

    here how I resolved it
     1-Go to your report's property
     2- Go to datasource and check  Credentials stored securely in the report server
      enter user name password
     3- Check Use as Windows credentials when connecting to the data source
     4- Apply
    Please if you need any help let me know

    Good Luck

    Ahmed dardeer

    Monday, November 12, 2007 1:29 PM
  •  

    I received this error while creating publish after enabling distributor and publisher, please advise. Error is :-

    Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection.

    (Source: arora  (Data source); Error number: 18452
    • Proposed as answer by zico1 Friday, August 14, 2009 2:52 PM
    Wednesday, December 5, 2007 10:49 AM
  • The reason the user '(null)' is because you are using domain authentication.  Which is failing because of delegation.  On the sql side the Service principal name needs to be setup correctly.

    This will solve the issue for sql

    http://support.microsoft.com/kb/811889

    if you are using asp.net you will have to follow additional articles.

    http://www.ftpex.com/WSUS.html

    • Proposed as answer by brunohelius Sunday, May 1, 2011 9:15 PM
    Thursday, April 10, 2008 7:43 PM
  • I didn't think I had the delegation issue as I was logged onto the MOSS server itself and still got the '(null)' issue to a remote SQL server (1 hop).

     

    However, Gayan had a good workaround - use the "RevertToSelf" for the "AuthenticationMode" setting to assume the identity of the Application Pool:  http://gpeiris.blogspot.com/2007/07/login-failed-for-user-nt.html.

     

    Seems to work well and I get the benefit of connection pooling.

    Thursday, May 22, 2008 12:16 AM
  • By double hop it means the ability of iis to pass your credentials to another box or service.  All delegation or impersonation is doing is using kerberos authentication to get a ticket and pass that ticket on behalf of the user.  Without kerberos IIS has no way to pass your authentication to another services without delegation Kerberos does not work. 

     

    Thursday, May 22, 2008 1:25 PM
  • Hi, i solved this problem by changing my string connection from : Server=SERVERNAME;trusted_connection=true;DataBase=DataBaseName;uid=UserName;pwd=password;
    To:
    Data Source=SERVERNAME;Initial Catalog=DataBaseName;User Id=UserName;Password=password;
    Friday, June 6, 2008 12:05 PM
  • In case of Integrated windows authentication, also uncheck the Anonymous Access box in the Directory Security --> Edit
    Monday, July 13, 2009 1:19 PM
  • Here is a work around that's been successful for me by creating a new data source.

    Go to Shared Data Source
      => Then Add New Data Source
         => Change name to whatever Source is
            => Then click Edit - Change the Server Name to the one that you want
               => Use SQL Server Authentication - input username & password then check save password and Test Connection
                     to make sure it all works.

    From there refresh and change to the Data Source you just created and all should be fine.

    Hope that helps
    Thursday, July 16, 2009 2:23 PM
  • When someone connect to SQL Server using Windows authentication without being pre-authenticated, the token in Kerberos authentication never existed, that is why "failed for user '(null)'" because windows does not know who it is. To stop this from happening, you have to stop the users who are not authenticated in your windows domain trying to connect to SQL Server using windos authentication.
    Tuesday, April 5, 2011 2:06 PM
  • Trying to connect place a Outlook Business Contact Manager 2007 database on our remote server (Windows Server 2003).

    Per Microsoft instructions, I installed SQL Server 2005 Express Edition.

    I am unable to connect and when I try troubleshooting by running this command:

    sqlcmd -E -S xxxxx\mssmlbiz,5356  (where xxxx is my server name and mssmlbiz is the instance)

    I get this:

    Msg 18452, Level 14, State 1, Server xxxxx\MSSMLBIZ, Line 1 Login failed for user ''. The user is not associated with a trustd SQL Server connection.

    I am stuck.

    Tuesday, April 5, 2011 5:33 PM
  • So I had this problem too, trying to use SSMS to connect to SQL 2000 box.  From the same client computer I can connect using windows authentication to 2 other SQL 2000 Boxes all on the same domain but all in different remote offices, eg difference sub nets I guess.

    Solution this time:

    Set up a Client Alias in SQL Server Configuration Manager> SQL Native Client 10.0 Config (32 bit)> Aliases,

    Right Click, New Alias

    Alias name is same as Servername,

    Pipe Name (don't change, leave as defaulted)

    Use Named Pipes as the protocol, if I use TCP/IP I get the the error, use Named Pipes goes away. 

    Servername is Servername

    I suspect I have circumnavigated a wider issue to do with the network DNS or similar, but this worked for me.  Hope it helps..


    EDIT you need to have the named pipes protocol enabled at the server end obviously

    • Proposed as answer by Leelondon Monday, May 19, 2014 2:34 PM
    • Edited by Leelondon Monday, May 19, 2014 2:39 PM
    Monday, May 19, 2014 2:34 PM
  • Dear, first check your DNS server, resolving this good, but change their IP settings
    Wednesday, June 25, 2014 1:49 PM