Monday, March 26, 2012

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

We have a problem on a SQL Server 2000 with SP3a and
latest security patch running on Windows 2003.
We have several other SQL-servers aswell but this one
seems to have problems with Windows Authentication. It
worked properly first but then when we changed to Windows
authentication and then back to SQL Server and Windows
authentication it stopped working properly. I have
successfully got this problem in my lab aswell (see
below).
The problem: We're running the SQL Service using a
domainaccount (sql1) which is in the local Administrators
group on the server. If I login using this account I can
open Ent Manager using Windows Authentication. I login to
Windows using another domainaccount (user1) that is also
a member of Administrators on the server, when I open up
Ent Manager I get "Login failed for user '(null)'.
Reason: Not associated with a trusted SQL Server
connection.". This is also logged in the Event Log. If I
use SQL Authentication it works. Same goes when I try to
connect remotly to a database with an ODBC-connection.
If I check the permissions I can see that
BUILTIN\Administrators have the System Administrators
role. I also try to att DOMAIN\user1 manually and give
permission. Still doesn't work. The SQL Server is
configured for both SQL Server and Windows Authentication.
I have restarted the server to make sure settings are
changed. I've also looked through MS KB's and found a
registrykey:
HKLM\Software\Microsoft\MSSQLServer\MSSQLServer\Lo ginMode
and it's set to 2.
In my lab I installed SQL2000. I could use Ent Manager
with both sql1 and user1. Then I switched to Windows mode
and then back to SQL Server and Windows and restarted the
server. Now I have the problem mentioned above and I can
only use sql1 to open Ent Manager.
I've looked through many posts in this forum but none
have supplied with me with any solution.
This is usually a problem with Kerberos and authentication. You can look at
this article for help:
http://support.microsoft.com/default.aspx?scid=kb;[LN];811889
The error you are getting is different but they are usually caused by the
same thing or similar things.
The article mentions a setspn utility. You can downlod it from here:
http://www.microsoft.com/windows2000...sting/setspn-o
.asp
Rand
This posting is provided "as is" with no warranties and confers no rights.

No comments:

Post a Comment