x

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?
more ▼

asked Jan 24, 2012 at 08:09 AM in Default

technette gravatar image

technette
1.2k 86 99 109

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?
Jan 24, 2012 at 08:38 AM Chris shaw
(comments are locked)
10|1200 characters needed characters left

2 answers: sort oldest

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.
more ▼

answered Jan 24, 2012 at 08:42 AM

JohnM gravatar image

JohnM
6.9k 1 3 7

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.
Jan 24, 2012 at 08:44 AM JohnM
There are additional states / reasons for SQL 2008 & R2, but that should be a good starting point.
Jan 24, 2012 at 09:53 AM ThomasRushton ♦
(comments are locked)
10|1200 characters needed characters left

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
more ▼

answered Jan 24, 2012 at 09:55 AM

Shawn_Melton gravatar image

Shawn_Melton
5.4k 20 21 29

(comments are locked)
10|1200 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

New code box

There's a new way to format code on the site - the red speech bubble logo will automatically format T-SQL for you. The original code box is still there for XML, etc. More details here.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

SQL Server Central

Need long-form SQL discussion? SQLserverCentral.com is the place.

Topics:

x37

asked: Jan 24, 2012 at 08:09 AM

Seen: 32905 times

Last Updated: Jan 24, 2012 at 08:09 AM