Re: Trusted SQL Server connection (SQL 2005)
- From: Erland Sommarskog <esquel@xxxxxxxxxxxxx>
- Date: Tue, 18 Sep 2007 07:53:58 +0000 (UTC)
idoek (idoek@xxxxxxxxxxxxxxxxxxxxxxxxx) writes:
At first I thought your answer is correct, but then I logged into a
Windows machine where I know the administrator cannot access the local
SQL Server 2005 using Windows Authentication.
(When I try to login to the SQL Server 2005 I get the following error:
"Login failed for user ''. The user is not associated with a trusted SQL
Server connection. (.Net SqlClient Data Provider)")
I don't think that message means that your Windows login does not have
access to SQL Server. In such case the error message should have listed
the name of the Windows login.
When the login name is blank, this indicates that SQL Server cannot even
get hold of the name of the Windows login.
To illustrate this, here is what I tried at work. First I connected to our
development server, and I got:
Msg 18456, Level 14, State 1, Server CRUSH, Line 1
Login failed for user 'EU\sommaerl'.
(Of old habits everyone uses sa for development). Then I tried to connect to
a production server at a customer site:
HResult 0x4814, Level 14, State 1
Login failed for user '(null)'. Reason: Not associated with a trusted SQL
Server connection.
HResult 0x2746, Level 16, State 1
TCP Provider: An existing connection was forcibly closed by the remote
host.
This is a completely different domain, and there is no trust between our
domain and theirs.
Now, what is funny in your case is that this appear to happen with a
Windows login on the local machine. Why this happens I have very little
idea. All I can say that looking at users and permissions in SQL Server
is not going to help you. This is a problem with something outside SQL
Server, or SQL Server's interaction with the outside.
--
Erland Sommarskog, SQL Server MVP, esquel@xxxxxxxxxxxxx
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx
.
- References:
- Re: Trusted SQL Server connection (SQL 2005)
- From: Erland Sommarskog
- Re: Trusted SQL Server connection (SQL 2005)
- Prev by Date: Re: Set up permissions for developers
- Next by Date: Re: Query/View Privileges
- Previous by thread: Re: Trusted SQL Server connection (SQL 2005)
- Next by thread: Re: hi
- Index(es):
Relevant Pages
|
|