AZZA-KHAMEES
asked on
Login failed for user
Hi experts
i have a query that retrieve data from 2 differents server, but once i execute the query i am getting this error
i am running the query in server1, with username: usr1
i already provide usr1 read permission on [Server2].Database2.dbo.Ge tUserDetai ls
also how can i check if i added a link to server1 into server2
i have a query that retrieve data from 2 differents server, but once i execute the query i am getting this error
Login failed for user 'usr1'
i am running the query in server1, with username: usr1
select userid, m.name, Cardid, m.dircode,
from [Server1].Database1.dbo.member m
JOIN [Server2].Database2.dbo.GetUserDetails p
on p.cprno = m.cardid
WHERE PerUserName='mftrame'
i already provide usr1 read permission on [Server2].Database2.dbo.Ge
also how can i check if i added a link to server1 into server2
You're going to need to provide quite a bit more detail on this. This isn't a SQL error with a query. The query is fine. What is the set up there? You mention linked servers. What credentials are being used between the 2 servers? How are they linked?
ASKER
thank you for the reply
i run this query
and i found that server2 was added in linked servers for server1
i run this query
USE master;
GO
EXEC sp_linkedservers
and i found that server2 was added in linked servers for server1
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.