Getting the error: "Access to the remote server is denied because no login-mapping exists"

  • Hi experts,

    I need to create an user on SQL Server 2005 read-only, meaning only able to run a stored procedure. This stored procedure is accessing a SQL Server 2000 database in order to retrieve part of the data.

    I'm getting this error:

    Access to the remote server is denied because no login-mapping exists.

    I added the local user to the user mapping table on Linked Server / Security, assigning the remote user and password. I've also specify "for login not defined above..." another valid user id e password but it still doesn't work.

    If I assign the "sysadmin" role to the "read-only" user, everything works, this leads me think this is a security issue but I don't know how to fix it, I run out of idea. I don't want regular users to access as sysadmin, I want to control what they can do, can you please help?

    Thanks,

  • Does the readonly login have access to the underlying database? The fact it works with sa leads me to beleieve that the user needs some further permission at db level to execute the query.

    Gethyn Elliswww.gethynellis.com

  • I specified the mapping, so it should work

    userA on dbSQL---> userB on dbOracle

    This is my understanding... userA does not exists on dbOracle, but the mapping exists.

    Thanks

  • Are you using a SQL Server login or a Windows Login. I've had trouble when mapping SQL Server Logins to Linked Servers, but the Windows Logins work well.

    (There's something about this in BOL, however I can't find the article at the moment.)

    Also, remember you are mapping a LOGIN From the "Main" Server to a USER on the "Linked Server", which is not the same as a login.

  • Unfortunately SQL logins, I cannot use Windows login because of the policy of my company. I ended up giving to the user "sysadmin" privileges and it worked. Of course I don't like this at all and I miss sql server 2000....

    Thanks,

    Claudia

  • Make sure the login exists on the remote server

    SERVERA (could be sa here)

    SERVERB (put the login thats exists in here).

    Then you can have sa and then impersonate the remote user will be whats on serverb.

    Just for ease add both users to SERVERA and SERVERB make sure works.

    Also the login must have access to the server B database your trying to set link up with.

  • Try dropping and recreating the user id on both servers. Finally worked for me after pulling my hair out for 2 hours. Orginally the problem was caused when I scripted and executed drop and create of the linked server. Can't explain as the user id and password were the same as always on both servers, but it worked.:-D

Viewing 7 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic. Login to reply