all groups > sql server connect > june 2004 >
You're in the

sql server connect

group:

log into one sql server from another server


log into one sql server from another server ngan
6/24/2004 11:22:49 AM
sql server connect:
I have two servers that have IIS and SQL 2000. the first
one is where I have my webpages. The second one is where
I have my sql tables. The second server's IIS has
anonymous login unchecked (same with the first server). I
want to use the person's windows login for authentication.

In the first server's include file, my connection code is:
Dim cn
set cn=server.createobject("ADODB.Connection")
cn.open "Provider=sqloledb;Data
Source=secondservername;Initial Catalog=Client;Integrated
Security=SSPI"

When I try to view a webpage with the include file, I get
this error:
Microsoft OLE DB Provider for SQL Server (0x80040E4D)
Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'.

Where is this error coming from?

If I put the webpages on the secondserver, the pages are
viewed just fine.

Ngan

Re: log into one sql server from another server Sue Hoegemeier
6/24/2004 7:12:54 PM
You need to use delegation in AD with kerberos enabled to
use Windows logins across linked servers. You can find more
info on this in books online under the topic:
Security Account Delegation
You are probably experiencing the issues addressed in the
following article:
PRB: Message 18456 from a Distributed Query
http://support.microsoft.com/?id=238477
If you aren't using AD, kerberos then you will need to use
the work around with SQL logins as mentioned in the above
article.

-Sue

On Thu, 24 Jun 2004 11:22:49 -0700, "ngan"
[quoted text, click to view]
AddThis Social Bookmark Button