SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


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


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

Author
Message
Claudia-343424
Claudia-343424
SSC Journeyman
SSC Journeyman (86 reputation)SSC Journeyman (86 reputation)SSC Journeyman (86 reputation)SSC Journeyman (86 reputation)SSC Journeyman (86 reputation)SSC Journeyman (86 reputation)SSC Journeyman (86 reputation)SSC Journeyman (86 reputation)

Group: General Forum Members
Points: 86 Visits: 64
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,
Gethyn Ellis
Gethyn Ellis
UDP Broadcaster
UDP Broadcaster (1.5K reputation)UDP Broadcaster (1.5K reputation)UDP Broadcaster (1.5K reputation)UDP Broadcaster (1.5K reputation)UDP Broadcaster (1.5K reputation)UDP Broadcaster (1.5K reputation)UDP Broadcaster (1.5K reputation)UDP Broadcaster (1.5K reputation)

Group: General Forum Members
Points: 1455 Visits: 2878
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 Ellisgethynellis.com
Claudia-343424
Claudia-343424
SSC Journeyman
SSC Journeyman (86 reputation)SSC Journeyman (86 reputation)SSC Journeyman (86 reputation)SSC Journeyman (86 reputation)SSC Journeyman (86 reputation)SSC Journeyman (86 reputation)SSC Journeyman (86 reputation)SSC Journeyman (86 reputation)

Group: General Forum Members
Points: 86 Visits: 64
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
Jim Dillon-291542
Jim Dillon-291542
Old Hand
Old Hand (344 reputation)Old Hand (344 reputation)Old Hand (344 reputation)Old Hand (344 reputation)Old Hand (344 reputation)Old Hand (344 reputation)Old Hand (344 reputation)Old Hand (344 reputation)

Group: General Forum Members
Points: 344 Visits: 176
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.
Claudia-343424
Claudia-343424
SSC Journeyman
SSC Journeyman (86 reputation)SSC Journeyman (86 reputation)SSC Journeyman (86 reputation)SSC Journeyman (86 reputation)SSC Journeyman (86 reputation)SSC Journeyman (86 reputation)SSC Journeyman (86 reputation)SSC Journeyman (86 reputation)

Group: General Forum Members
Points: 86 Visits: 64
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
TRACEY-320982
TRACEY-320982
Ten Centuries
Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)

Group: General Forum Members
Points: 1302 Visits: 1014
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.
mcroce
mcroce
Grasshopper
Grasshopper (24 reputation)Grasshopper (24 reputation)Grasshopper (24 reputation)Grasshopper (24 reputation)Grasshopper (24 reputation)Grasshopper (24 reputation)Grasshopper (24 reputation)Grasshopper (24 reputation)

Group: General Forum Members
Points: 24 Visits: 167
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
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search