Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Getting the error: "Access to the remote server is denied because no login-mapping exists" Expand / Collapse
Author
Message
Posted Monday, March 31, 2008 5:41 PM
Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: Saturday, March 21, 2009 12:49 PM
Points: 50, 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,
Post #477318
Posted Monday, April 7, 2008 5:41 AM
Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Friday, October 17, 2014 7:12 AM
Points: 1,030, Visits: 2,796
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 Ellis

gethynellis.com
Post #480700
Posted Monday, April 7, 2008 2:28 PM
Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: Saturday, March 21, 2009 12:49 PM
Points: 50, 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
Post #481162
Posted Friday, April 18, 2008 8:48 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Wednesday, October 7, 2009 7:46 AM
Points: 126, 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.
Post #487268
Posted Saturday, April 19, 2008 10:17 AM
Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: Saturday, March 21, 2009 12:49 PM
Points: 50, 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
Post #487592
Posted Sunday, April 20, 2008 6:07 PM
Right there with Babe

Right there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with Babe

Group: General Forum Members
Last Login: Thursday, July 31, 2014 7:04 PM
Points: 724, Visits: 1,002
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.
Post #487673
Posted Friday, April 15, 2011 1:31 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Thursday, November 13, 2014 10:30 AM
Points: 6, Visits: 142
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.
Post #1094366
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse