Solved

Login failed for user '(null)'.

Posted on 2006-06-21
6
314 Views
Last Modified: 2010-04-16
i have a linked server that i use in my stored procedures.
i keep getting this when i run the application should i add something to the connection string
Login failed for user '(null)'.

0
Comment
Question by:jemigossaye
  • 3
  • 2
6 Comments
 
LVL 7

Expert Comment

by:dttri
ID: 16952879
Greetings,
Can you post your source code here? And can you login directly using SQL built-in tools?
0
 
LVL 25

Expert Comment

by:dstanley9
ID: 16952903
It sounds like delegation is not working.  I'm assuming you;ve got an ASP.NET app trying to access SQL on another server.

You can either use a SQL login in the connection string or get delegation working.  

Here are some articles to help implement delegation:

http://support.microsoft.com/default.aspx?scid=kb;en-us;810572
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vsent7/html/vxconASPNETDelegation.asp
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnpag2/html/PAGHT000023.asp
http://odetocode.com/Blogs/scott/archive/2005/02/24/1053.aspx

0
 

Author Comment

by:jemigossaye
ID: 16953514
hi,
 i tryed using <identity impersonate =" True"/> but no difference
and in my connection string i removed integrated security = sspi and it now have a different error
saying this
Access to the remote server is denied because no login-mapping exists
0
3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

 
LVL 25

Expert Comment

by:dstanley9
ID: 16953602
Sorry, didn't catch that you were using a linked server.  I don't know about login mapping, but delegation requires more than just turing on impersonation. It allows the first SQL setver to access the second SQL server using the original credentials (the password is not sent, only the user ID and a "ticket" authenticating the user).

Delegation requires some setup in Active Directory as well. In addition, the two SQL servers must be communicating via TCP/IP, not Named Pipes.  THis can be checked by running a Trace on the linked server and accessing it from the first server.
0
 

Author Comment

by:jemigossaye
ID: 16953767
hi,

well what i don't understand is that when i run the stored procedure form the query analyzer it gives the same error saying Login failed for user '(null)'
0
 
LVL 25

Accepted Solution

by:
dstanley9 earned 250 total points
ID: 16953822
Are you running query analyzer from another machine?  Delegation is stil lthe issue in that case as well.  The credentials (username/password) used to access the first server cannot be used to access resources on other servers (i.e. the linked server) without delegation.
0

Featured Post

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

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

Extention Methods in C# 3.0 by Ivo Stoykov C# 3.0 offers extension methods. They allow extending existing classes without changing the class's source code or relying on inheritance. These are static methods invoked as instance method. This…
In order to hide the "ugly" records selectors (triangles) in the rowheaders, here are some suggestions. Microsoft doesn't have a direct method/property to do it. You can only hide the rowheader column. First solution, the easy way The first sol…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

803 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