Login failed for user '(null)'.

TITLE: Connect to Server

Cannot connect to ServerName.


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

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&EvtSrc=MSSQLServer&EvtID=18452&LinkId=20476

I can not figure out why this keeps happening.  Last time it happened I restored my computer using a quick restore point.  Obviously this is not a very good solution.  We have more than one SQL Server on our network.  I am able to connect just fine to the other one, but for some reason continue to have problems with this one.

This particular server has both SQL Server 2005 and 2000 installed on it.  I am trying to connect to SQL Server 2000 using Windows Authentication.  I was able to connect to the server just fine yesterday.  The only thing that I think could make a difference is that I just changed my domain password.  I am the only one in the office that seems to have this issue.  I am also the only one that has Enterprise Manager and SQL Server Management Studio.  I have logged off my computer and logged back in, and restarted SQL Server 2000.

Any suggestions as to how to fix this issue would be greatly appreciated.
Who is Participating?

Improve company productivity with a Business Account.Sign Up

CetusMODConnect With a Mentor Commented:
Closed, 500 points refunded.
Community Support Moderator
sounds dumb but since you have both one must be a named instance, make sure you are connecting to the proper server. one would probably just be servername, the other one would be servername\instanceName (though it is possible both are instances, but it is not possible that neither are an named instance)
What Kind of Coding Program is Right for You?

There are many ways to learn to code these days. From coding bootcamps like Flatiron School to online courses to totally free beginner resources. The best way to learn to code depends on many factors, but the most important one is you. See what course is best for you.

The first thing to check is that whether the SQL Server is configured to use Mixed Mode Authentication or Integrated Authentication.

To do that, do the following steps :-

1. Click Start - Programs - Microsoft SQL Server - Enterprise Manager to open the Enterprise Manager.
2. Connect to the appropriate Server if the SQL is a client installation.
3. Right click on the Server Node and click on Properties.
4. This opens the Properties Dialog.
5. Switch to the Security Tab.
6. Under the Security section, make sure the Option SQL Server and Windows is selected.
7. This ensures that your SQL Server is running under Mixed Mode Authentication.

The Next step is to ensure that the ASPNET account (IIS_WPG in case of Windows server 2003) has the appropriate access to the Database.

To do that, do the following steps:

1. Open SQL Server Enterprise Manager (Start - Programs - Microsoft SQL Server - Enterprise Manager), select the appropriate server, and expand the Security folder.
2. In the Logins check whether the IIS_WPG is listed.
3. If it is not listed, right-click on Logins and select New Login
4. In the Name: textbox either enter [Server/Domain Name]\IIS_WPG or click on the ellipses button to open the Windows NT user/group picker.
5. Select the current machine’s IIS_WPG group and click Add and OK to close the picker.
6. You then need to also set the default database and the permissions to access the database. To set the default database choose from the drop down list,
7. Next, click on the Database Access tab and specify the permissions.
8. Click on the Permit checkbox for every database that you wish to allow access to. You will also need to select database roles, checking db_owner will ensure your login has all necessary permissions to manage and use the selected database.
9. Click OK to exit the property dialog.

Hope this helps

>>The only thing that I think could make a difference is that I just changed my domain password.

Then wait for few hours or a day. It is mostly from the active direclty and will be fixed automatically.
imran - if that were true, wouldn't the errormessage be different?. He did not change his domain account just his domain password? Also, depdnding on his set up the replication probably happened pretty quick.
This is true believe me.
Imran - sorry not trying to argue, you have quite a lot of good answers out there, but I am just saying that in most environments replication of DC information doesn't take 3 hours or days, at least not in environments I work in.. It is possible, but I also wasn't sure if that would be the error message received. I would expect a login failure for a known name.. But it sounds like you are saying that is definitely the problem and it should be resolved, so we will end up seeing if it is true. I think it is plausible, but probably not the issue :-) You never e-mailed me, by the way.. A while ago you asked for my e-mail address..
Let's see what happened. Yeah i do request for your email and i will mail you soon.
kmcbreartyAuthor Commented:

You were on the right track.  It is working now but I am not entirely sure how to correct this so it doesn't happen again.  I restarted my computer and noticed that the mapped drives that are I have to that server were not able to reconnect.  So I attempted to browse to that computer through Explorer.  I was prompted to enter my password.  I entered my password and checked the box to remember my password.  I was then able to connect the mapped drive and SQL Server 2000 and 2005.

Why wouldn't my computer update my password to access SQL Server and the Network Resources on that machine?
Well that was Imran who was on that track. Normally when you change your password it should replicate pretty quick, and if it didn't you would receive a passowrd error because all that SQL would care about would be your SID and are you authenticated.

So you may have either made other changes in attempt to resolve the issue and one of those solved it, or Imran was right and your DNS replication somehow took a long time..

An example though.. I just changed my password and can connect just fine to every server on the network within every location of my company across domains that have trust and everything. I doubt this was a replication issue, I think you had an issue on your client computer and your restart is what helped you. Either you had your password cached and need to break that connection to resolve it or there was some other issue.

I would suggest you post a question in community support asking to have this question closed with points refunded since you answered it yourself.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.