Solved

Microsoft query using ODBC asking for login credentials

Posted on 2008-10-09
3
703 Views
Last Modified: 2013-11-17
I am using Excel and retrieving external data from a SQL 2005 db via Microsoft qery using an ODBC data source.  The ODBC connection is a system DSN set to use SQL authentication.  I created the workbook and query as a domain admin.  I checked the "save password" checkbox under the Query definition section of the external data range properties.  Obviously, this all works fine as domain admin.

I get differing results as 2 test users.  One user it works fine for: no authentication challenge.  The other user it says "logon failed for user X", then promts for a password.  The SQL Server Login window that comes up has "Use Trusted Connection" checked and the Login ID and Password boxes are greyed out, but the Login ID is the correct one that I setup for the ODBC connection.

Each of these users is part of a different AD security group (i.e. user1 belongs to group1 and user2 belongs to group2).  Initially, group1 had read and write access to the database and group2 only had read.  I changed group2 to have the same rights as group1, but I still get prompted when opening the file as user2.  (I would like this to work with only read access)

Not sure what to look at next.  Any help?
Thanks,
Tim
0
Comment
Question by:timnorvel
  • 2
3 Comments
 

Author Comment

by:timnorvel
ID: 22681300
ok, this is obviously a rights issue.  I added the non-working user2 to group1 and it worked.  But, as I stated, the rights on the database for group1 and group2 are the same.  I also checked the rights on Excel file itself, and it is the same for both of them.  Where else can I check?  Where else do user rights come into play?

thanks
0
 
LVL 10

Expert Comment

by:pkhari
ID: 22713303
Hi

Some thoughts to try out

Guess you should disable the Trusted connection model, and go by passing the login name and password. Following links might give you a heads-up on this:

http://www.mrexcel.com/forum/showthread.php?t=343938

Hope this helps.

Cheers
P.K.
0
 

Accepted Solution

by:
timnorvel earned 0 total points
ID: 22723306
God, I am so stupid sometimes.  On the SQL server i was looking under the DB at the security section and saw that both groups had the same rights there.  But if I looked at the securtiy section up a level... for the sql server, not the specific db, the group 1 was not there.

It turns out that if you delete a user/group from that "upper level" security section it does not update the individual db's that user/group had rights to (and there's a popup window telling you as much, which I'm sure I quickly clicked through).

Anyway, I added it back in and Bob's your uncle.  Thanks.
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

How to quickly and accurately populate Word documents with Excel data, charts and images (including Automated Bookmark generation) David Miller (dlmille) Synopsis In this article you’ll learn how to use ExcelToWord! to copy data,charts, shapes …
Workbook link problems after copying tabs to a new workbook? David Miller (dlmille) Intro Have you either copied sheets to a new workbook, and after having saved and opened that workbook, you find that there are links back to the original sou…
Graphs within dashboards are meant to be dynamic, representing data from a period of time that will change each time the dashboard is updated with new data. Rather than update each graph to point to a different set within a static set of data, t…
This Micro Tutorial will demonstrate how to create pivot charts out of a data set. I also added a drop-down menu which allows to choose from different categories in the data set and the chart will automatically update.

746 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

7 Experts available now in Live!

Get 1:1 Help Now