Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Microsoft query using ODBC asking for login credentials

Posted on 2008-10-09
3
Medium Priority
?
742 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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:PK Hari
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

Learn Veeam advantages over legacy backup

Every day, more and more legacy backup customers switch to Veeam. Technologies designed for the client-server era cannot restore any IT service running in the hybrid cloud within seconds. Learn top Veeam advantages over legacy backup and get Veeam for the price of your renewal

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this post we will learn different types of Android Layout and some basics of an Android App.
How to get Spreadsheet Compare 2016 working with the 64 bit version of Office 2016
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …
This Micro Tutorial will demonstrate how to use longer labels with horizontal bar charts instead of the vertical column chart.

721 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