Quantcast
Channel: SQLServerCentral » SQL Server 2014 » Administration - SQL Server 2014 » Latest topics
Viewing all articles
Browse latest Browse all 6525

Linked Server to Availability Group Listener

$
0
0
I need to create a Linked Server pointing at an Availability Group Listener. The Availability Group consists of four servers at two sites, so the connection string must contain the “multisubnetfailover” option. Additionally; I need the Linked Server to point to a secondary server not the primary, so again the connection string must contain the “applicationintent” option. Security must be handled by SQL Server usernames, Kerberos is not an option.I use this t-SQL to create my linked server.EXEC master.dbo.sp_addlinkedserver @server = N'TestLinkedServer' ,@srvproduct = N'SQL' ,@provider = N'SQLNCLI11' ,@datasrc = N'TEST_AG_LISTENER' ,@provstr = N'Integrated Security=SSPI;Initial Catalog=TestDatabase;Data Source=TEST_AG_LISTENER;ApplicationIntent=ReadOnly;MultiSubnetFailover=Yes' ,@catalog = N'TestDatabase'GOEXEC master.dbo.sp_addlinkedsrvlogin @rmtsrvname=N'TestLinkedServer',@useself=N'False',@locallogin=NULL,@rmtuser=N'RemoteUserAcc',@rmtpassword='*****'The problem I find however, is that unless a user account that tries to query the linked server has SYSADMIN rights, the SQL Server where the Linked Server has been created gives an error "Msg 7416, Level 16, State 2, Line 5 Access to the remote server is denied because no login-mapping exists."What security permissions do I need to grant an account to allow it to query the linked server?

Viewing all articles
Browse latest Browse all 6525

Latest Images

Trending Articles



Latest Images