Solved

Login failed for user '(null)'.

Posted on 2006-06-23
12
285 Views
Last Modified: 2008-02-01
TITLE: Connect to Server
------------------------------

Cannot connect to ServerName.

------------------------------
ADDITIONAL INFORMATION:

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.
0
Comment
Question by:kmcbrearty
12 Comments
 
LVL 13

Expert Comment

by:MikeWalsh
ID: 16973611
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)
0
 
LVL 13

Expert Comment

by:MikeWalsh
ID: 16973615
0
 
LVL 3

Expert Comment

by:chhapia_chintak
ID: 16974367
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

0
 
LVL 28

Expert Comment

by:imran_fast
ID: 16974962
>>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.
0
 
LVL 13

Expert Comment

by:MikeWalsh
ID: 16975004
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.
0
Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 28

Expert Comment

by:imran_fast
ID: 16975156
MikeWalsh,
This is true believe me.
0
 
LVL 13

Expert Comment

by:MikeWalsh
ID: 16975171
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..
0
 
LVL 28

Expert Comment

by:imran_fast
ID: 16977479
MikeWalsh,
Let's see what happened. Yeah i do request for your email and i will mail you soon.
0
 
LVL 3

Author Comment

by:kmcbrearty
ID: 16983998
MikeWalsh,

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?
0
 
LVL 13

Expert Comment

by:MikeWalsh
ID: 16984502
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.
0
 

Accepted Solution

by:
CetusMOD earned 0 total points
ID: 17064387
Closed, 500 points refunded.
CetusMOD
Community Support Moderator
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Having an SQL database can be a big investment for a small company. Hardware, setup and of course, the price of software all add up to a big bill that some companies may not be able to absorb.  Luckily, there is a free version SQL Express, but does …
JSON is being used more and more, besides XML, and you surely wanted to parse the data out into SQL instead of doing it in some Javascript. The below function in SQL Server can do the job for you, returning a quick table with the parsed data.
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
Viewers will learn how the fundamental information of how to create a table.

747 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now