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

avatar image

1.4k 100 114 121

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 voted first

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

avatar image

14.5k 3 7 15

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

more ▼

answered Jan 24, 2012 at 09:55 AM

avatar image

6.6k 21 26 34

(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.

Follow this question

By Email:

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



Answers and Comments

SQL Server Central

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



asked: Jan 24, 2012 at 08:09 AM

Seen: 39902 times

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

Copyright 2018 Redgate Software. Privacy Policy