question

technette avatar image
technette asked

SQLState:'28000', SQL Server Error: 18456

I have created a view and have connected to the view through Excel. I am trying to give a user acceess and give him the ability to refresh the excel document. I have given the user access rights to view. Everything works fine in my environment but when I send a link to a Microsoft Data Connection or send an Excel file with everything already set up to the user, I get the following error: Connection failed: SQLState: '28000' SQL Server Error: 18456 [Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for user 'myuser' I tried to follow the following documentation but the solutions don't work: http://support.microsoft.com/kb/165866 Can someone help me?
odbc
1 comment
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Is it safe to assume that you are using a SQL Server Account, and that you are not changing the login when you send it over to the user?
0 Likes 0 ·
JohnM avatar image
JohnM answered
If you look in the SQL Server log, you should see an entry for the failed login. You'll also find the "state" of the issue which then you can go to here: http://blogs.msdn.com/b/sql_protocols/archive/2006/02/21/536201.aspx to gain a little more insight as to what the problem might be. If you can let us know what the state of the error might be, that might give us a clue.
2 comments
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Also, what version of SQL Server are you using? The URL I provided references SQL 2005, but I would bet that it's fairly consistent for 2008, however I haven't confirmed that.
0 Likes 0 ·
There are additional states / reasons for SQL 2008 & R2, but that should be a good starting point.
0 Likes 0 ·
Shawn_Melton avatar image
Shawn_Melton answered
If you are setting up everything in Excel and then sending the user the Excel worksheet (xls or xlsx) I do not believe the ODBC connection information is sent along with it. You might want to look at sending them a [query file][1] that will save the connection information and query. When they open this file up it will pull the information into a Excel worksheet for them. [1]: http://office.microsoft.com/en-us/excel-help/about-sharing-data-connections-HP005262328.aspx
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.