Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

trusted connection error from Query Analyzer

Status
Not open for further replies.

cjblake

MIS
Apr 7, 2006
8
US
On one of my SQL Server installations I have a linked server defined. I have created a stored proc that queries the linked server. If I log into the server as me (I'm an administrator) and use Query Analyzer to run the SP, it runs fine. If I am using QA from my own PC, I get: Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection.

Any ideas on what is causing this? I will be wanting to have this sp run from a .net application with another (non admin account), but I figured I'd start here at this point.

Thanks so much for any input!

CJ
 
Hi, Denis.

Thanks for your post. I checked and unfortunately it is already mixed authentication. I was hoping it would be so easy! Any other ideas?

Thanks!
CJ
 
The 2 servers are in the same domain. My user is added in both servers. (I can run this fine logged in as me from the SQL Server, but not from my machine, so I was thinking that the issue couldn't be related to my account.)

Thanks again,
CJ
 
Check that the MDAC level is the same on all the systems. Microsoft has a program for download called Component Checker. That will tell you the level of MDAC on the system it's run on.

-SQLBill

Posting advice: FAQ481-4875
 
You need to setup the linked server to use a SQL Account when logging into the remote SQL Server.

You are butting up against the NTLM double hop.

Here is the MSKB on the issue.
Yes, yes, I know that it says SQL 7 and NT 4.0 on it, but it's still valid to day with SQL 2005 and Windows 2003, and will continue to be valid until microsoft changes the way NTLM works (which probably won't ever happen).

Denny
MCSA (2003) / MCDBA (SQL 2000) / MCTS (SQL 2005)

--Anything is possible. All it takes is a little research. (Me)
[noevil]
 
Denny, Thanks so much for your post!

Finally! It works now that I added that.

Cheers!

CJ
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top