SharePoint - 'Login failed for user 'DOMAIN\username'.'

Asked By Mike on 28-Feb-11 03:32 PM
I am getting the following errors in SQL 2008 related to a SharePoint 2008 site:

SqlError: 'Login failed for user 'DOMAIN\username'.'    Source: '.Net SqlClient Data Provider' Number: 18456 State: 1 Class: 14 Procedure: '' LineNumber: 1 Server: 'np:\\.\pipe\MSSQL$Microsoft##SSEE\sql\query'
 

&

Event 18456 - The description for Event ID ( 18456 ) in Source ( MSSQL$MICROSOFT##SSEE ) cannot be found. The local computer may not have the necessary registry information or message DLL files to display messages from a remote computer. You may be able to use the /AUXSOURCE= flag to retrieve this description; see Help and Support for details. The following information is part of the event: DOMAIN\username,  [CLIENT: <named pipe>].

The user keeps changing to others in my domain.  Searching the internet has proved very fruitless.  I hope someone can help me.

Thanks,

Micheal C

James Murray replied to Mike on 28-Feb-11 03:45 PM
Hello Mike,

If you went to the doctor with leg pain they would ask you "When did this pain start occurring?" and you might say ,"Last week and it got progressively worse" or "When the tree fell on it an hour ago." The treatment and diagnosis for the two answers are immensely different. This is no different in the technology world except for the fact we aren't face to face so always bring that to the table when asking a question.

Was this working already and started cropping up today? or are you trying for the first time to give users access to ad-hoc queries via sharepoint for the first time?

It looks like your sharepoint server is trying to connect to your sql server via named pipes. It doesn't look like an issue (yet) with the connection through named pipes but the user trying to access the sharepoint item.

Have you given users datareader access to the database? Do you really want to?

Many times administrators will write a query and have a fixed sql or domain user connect and run the query and the output generates a report that appears on the sharepoint that is a snapshot of data on an interval.

Please provide more information as to what you are trying to do and what is your end result expectations?


Michael replied to Mike on 28-Feb-11 04:25 PM
James,

A problem with a SharePoint list I had created sporadically displayed a 'RENDER FAILED' to one user about a week ago.  At that point I went to the logs to see what I could find.  I was able to find the first error I posted, the SQLError: 'Login failed for user' for the user in question.  I did a lot of looking for solutions of the web and could not find anything to the particular issue.  Because I am fairly new to SharePoint, especially troubleshooting it, I did not want to chance messing the entire SharePoint/SQL installation up.

In my attempt to further understand the problem, I went to the Windows logs and discovered Event 18056.  Upon searching for this I came across internet posts about a corrupt database, but again because of the lack of experience with these technologies, I was not going to attempt any of the solutions.   Also, as I was looking at the windows logs for the Windows Internal Database, I saw there were a lot of similar errors just different event ids.  Here is just a few: 3406, 3407, 3408, 3454, 17137; all the the same message: "The description for Event ID in Source (MSSQL$MICROSOFT##SSEE) cannot be found."  Most of these are just information events.  The only error event is the 18056. 

Also, it appears to be giving me these similar errors since the installation of SQL/SharePoint.  This is the first (with the visual error to the user) that I looked more closely at the logs.

Hopefully, that is enough to help me out.  Let me know if you need any configuration files from my server.  Thank you in advanced for your help.

Thanks,

Micheal C


Michael replied to Michael on 07-Mar-11 11:27 AM
I wanted to send you a log file of the entries that include the login failed messages from this morning: Sharepoint log 3-7.zip
Michael replied to James Murray on 07-Mar-11 11:38 AM
James,

I just realized that my post explaining my problem was sent to myself.  If you are not able to access it from the thread, let me know and I can post it again directly to you.  If you were able to access it, let me know.  I also uploaded a file of log entries this morning.

Thanks,
Mike
James Murray replied to Michael on 07-Mar-11 12:14 PM
Hey Michael,

I finally got notification that you responded to the thread today.

I looked at your logs and its still a user permission issue.

Most likely you've added a report or sql output to your sharepoint, however you probably set the user authentication to "Windows Authentication".

This passes the users credentials through sharepoint and validates whether the user can run the query or not.

You can:

1. Add users as datareaders to the sharepoint.
2. Set up your report/sqloutput to use a specific sql or windows user to run the query.

I would recommend you do option #2.

Create a sql account like sharepointuser and give it a specific password. You'll give it the datareader role on the database you are querying.

In your sharepoint development suite you can keep the authentication of the item to be windows authentication but in the datasource object (sql) you'll change the credentials to sharepointuser and provide the sharepointuser's password.

I'm not trying to be vague but its been a nearly a decade since I've done sharepoint administration so its most likely changed alot and I don't have a sharepoint server installed anywhere to play with.

You are welcome to email me

I'd be happy to converse on another medium and we'll post our results in the end for the benefit of the website.