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


Msg 7416, Level 16, State 2, Line 1


Msg 7416, Level 16, State 2, Line 1

Author
Message
erikskinner
erikskinner
SSC Rookie
SSC Rookie (32 reputation)SSC Rookie (32 reputation)SSC Rookie (32 reputation)SSC Rookie (32 reputation)SSC Rookie (32 reputation)SSC Rookie (32 reputation)SSC Rookie (32 reputation)SSC Rookie (32 reputation)

Group: General Forum Members
Points: 32 Visits: 62
I have created a linked server using Mgmt Studio (so no scripting to insert).

I have included a "Script Linked Server as" -> Create to


/****** Object: LinkedServer [LinkName] Script Date: 06/02/2009 09:33:28 ******/
EXEC master.dbo.sp_addlinkedserver @server = N'LinkName', @srvproduct=N'any', @provider=N'SQLNCLI', @provstr=N'Server=ServerName;Database=DBName'
/* For security reasons the linked server remote logins password is changed with ######## */
EXEC master.dbo.sp_addlinkedsrvlogin @rmtsrvname=N'LinkName',@useself=N'False',@locallogin=NULL,@rmtuser=N'RemoteLogin',@rmtpassword='########'
EXEC master.dbo.sp_addlinkedsrvlogin @rmtsrvname=N'LinkName',@useself=N'False',@locallogin=N'LocalLogin',@rmtuser=N'RemoteLogin',@rmtpassword='########'

GO

EXEC master.dbo.sp_serveroption @server=N'LinkName', @optname=N'collation compatible', @optvalue=N'false'
GO

EXEC master.dbo.sp_serveroption @server=N'LinkName', @optname=N'data access', @optvalue=N'true'
GO

EXEC master.dbo.sp_serveroption @server=N'LinkName', @optname=N'dist', @optvalue=N'false'
GO

EXEC master.dbo.sp_serveroption @server=N'LinkName', @optname=N'pub', @optvalue=N'false'
GO

EXEC master.dbo.sp_serveroption @server=N'LinkName', @optname=N'rpc', @optvalue=N'false'
GO

EXEC master.dbo.sp_serveroption @server=N'LinkName', @optname=N'rpc out', @optvalue=N'false'
GO

EXEC master.dbo.sp_serveroption @server=N'LinkName', @optname=N'sub', @optvalue=N'false'
GO

EXEC master.dbo.sp_serveroption @server=N'LinkName', @optname=N'connect timeout', @optvalue=N'0'
GO

EXEC master.dbo.sp_serveroption @server=N'LinkName', @optname=N'collation name', @optvalue=null
GO

EXEC master.dbo.sp_serveroption @server=N'LinkName', @optname=N'lazy schema validation', @optvalue=N'false'
GO

EXEC master.dbo.sp_serveroption @server=N'LinkName', @optname=N'query timeout', @optvalue=N'0'
GO

EXEC master.dbo.sp_serveroption @server=N'LinkName', @optname=N'use remote collation', @optvalue=N'true'
GO



I am using a SQL Login to query specific tables on a remote server. I am not having any issues with the remote SQL Login it is working as expected. When I give the local SQL Login just dbo permission on the local database I recieve the following error:

Msg 7416, Level 16, State 2, Line 1
Access to the remote server is denied because no login-mapping exists.


I grant the local login sysadmin and the linked server works. So this begs the question, what permission specific to this local SQL Login do I have to grant without having to grant the login sysadmin?
landisjanine
landisjanine
Grasshopper
Grasshopper (13 reputation)Grasshopper (13 reputation)Grasshopper (13 reputation)Grasshopper (13 reputation)Grasshopper (13 reputation)Grasshopper (13 reputation)Grasshopper (13 reputation)Grasshopper (13 reputation)

Group: General Forum Members
Points: 13 Visits: 72
I am having the same problem. The local user is a SQL Authenticated user. The account exists on both local and remote server. I am running on SQL2008. I have granted execute rights to xp_prop_oledb_provider in the master catalog. What more is needed?
Jimmy Soni
Jimmy Soni
SSC Rookie
SSC Rookie (45 reputation)SSC Rookie (45 reputation)SSC Rookie (45 reputation)SSC Rookie (45 reputation)SSC Rookie (45 reputation)SSC Rookie (45 reputation)SSC Rookie (45 reputation)SSC Rookie (45 reputation)

Group: General Forum Members
Points: 45 Visits: 197
Was this issue solved???
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