Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Cannot connect to SQL Server using Windoows authentication;  Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection

Posted on 2005-05-09
6
Medium Priority
?
278 Views
Last Modified: 2012-06-21
I migrated a database from SQL Server on my local machine to a network server.  The development web site is still hosted on my local macheine.  When I try to connect to the relocated database, I get the following error:

Microsoft OLE DB Provider for SQL Server (0x80004005) - Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection.

I can access the production database (hosted on the same SQL Server) through the the production site (hosted on the same machine as SQL Server).  I have made sure the "anonymous" account from the local IIS has been added to the database, and even specified that my local machine can delegate services (Kerberos only).

My server admin kung-fu is quite weak and I am in need of a master :-)
0
Comment
Question by:pwilliams01
  • 2
  • 2
5 Comments
 
LVL 21

Assisted Solution

by:Kevin3NF
Kevin3NF earned 500 total points
ID: 13962545
user (null) generally means that the authentication is getting horked somewhere between your page and the SQL Server....you are looking in the right place

aside:
>>server admin kung-fu?<<  You been watching "The Core" ? :-)
0
 
LVL 38

Accepted Solution

by:
Jim P. earned 500 total points
ID: 13962977
Does the user/group exist on the new SQL Server?
EM -> MS SQL Server -> SQL Server Group -> %Server/Instance% -> Security -> Logins

Did you run sp_sidmap?
http://support.microsoft.com/default.aspx?scid=kb;en-us;298897
0
 

Author Comment

by:pwilliams01
ID: 13963401
Kevin3NE: You're right - I was close, but not at the core :-)

jimpen: The user exists in the network SQL Server, but I did not run sp_sidmap.

All: I found a solution, but it wasn't the one I would have liked.  The anonymous account was based on a login using Windows authentication.  I deleted the login and user, built the login using SQL authentication (account and password) and added the user back based on the new login.  Access has been restored!

I would have prefered connecting through a "pure" windows authent., but I can live with this, for now.  The new login is based on my local IIS anonymous account, which can only access the development dbase:  a potential security leak, but limited mostly to my own coding blunders.

Unless someone out there can guide me to NT authenication nirvana (in the next day or two), I will split the points between Kevin3NE and jimpen.

Thanks all!

P
0
 
LVL 38

Expert Comment

by:Jim P.
ID: 14129939
Well, if you look at the author's last comment--
"Unless someone out there can guide me to NT authenication nirvana (in the next day or two), I will split the points between Kevin3NE and jimpen."

Pretty much shows how he was going on the points.
0
 

Author Comment

by:pwilliams01
ID: 14143675
I am sorry about forgetting the awards ceremony.  My bad!
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Ever wondered why sometimes your SQL Server is slow or unresponsive with connections spiking up but by the time you go in, all is well? The following article will show you how to install and configure a SQL job that will send you email alerts includ…
In the first part of this tutorial we will cover the prerequisites for installing SQL Server vNext on Linux.
Via a live example, show how to backup a database, simulate a failure backup the tail of the database transaction log and perform the restore.
Viewers will learn how the fundamental information of how to create a table.
Suggested Courses

572 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question