Monday, March 19, 2012

servers - sql7 to sql2000

I am trying to run cross server queries from sql7 to sql2000.
I want to be able to use the NT login to authenticate accoss the link. I have created the linked server with "logins current security context" - however, when I run the sql2000 query from the sql7 server, l get the following message:

Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'.

it works fine sql2000 to sql2000

any ideas how I get this to work?What login did you specify in the Security Context?
If you are trying to use NT authen, make sure the 'NT AUTHORITY\ANONYMOUS' user exists in the db you are connecting to( not only the Master), run from your db to check:

select master..syslogins.name as login_name,
sysusers.name as user_name
from master..syslogins inner join sysusers
on master..syslogins.sid = sysusers.sid

Make sure the same user exists and was granted permissions at Win NT.|||You can also try connecting to other sql server using OPENROWSET

eg from BOL

SELECT a.*
FROM OPENROWSET('MSDASQL',
'DRIVER={SQL Server};SERVER=seattle1;UID=sa;PWD=MyPass',
pubs.dbo.authors) AS a
ORDER BY a.au_lname, a.au_fname

No comments:

Post a Comment