title: Error message from database execution: Access to the remote server is denied because no login-mapping exists
body: <p><strong>Environment &amp; Details</strong>  </p>
  
  <ul>
  <li>Environment – SQL Server 2014.</li>
  <li>All DB’s are participating in
  availability group. </li>
  <li>To connect to Read only node of Server, we
  created the linked server on both node. </li>
  <li>Internally,we have provided the Server DNS name and “ApplicationIntent=ReadOnly” as part of linked connection string. The linked server always read the data from secondary/read node.</li>
  <li>Linked server is using [ReadOnly] SQL user. This user has data reader permission on the selected database. </li>
  <li>Above Linked server – worked fine. And we are using the linked server in SQL jobs, which runs under the “sa” context. </li>
  </ul>
  
  <p><strong>Problem</strong></p>
  
  <ul>
  <li>I am developing ADF pipeline. For the same, created the SQL user – “adfuser” on SQL server. This user has data reader, data writer permissions on required database.</li>
  <li><p>Now, I am trying following query under the ‘adfuser’ context. </p>
  
  <p>SELECT Col1, Col2 FROM [ReadOnly].DB.dbo.TableA.</p></li>
  </ul>
  
  <p><strong>It is throwing an error –</strong> 
  <em>Database operation failed on server 'Server name' with SQL Error Number '7416'. Error message from database execution: Access to the remote server is denied because no login-mapping exists.</em> </p>
  
  <p>Any solutions?</p>