title: Accessing another SQL Server from SQL Job Agent
body: <p>I have a SQL Server Agent Job on "server X."  This job is simple, and uses the following query to refresh a table (on server X) by clearing it, then re-populating it with data from a view (also on server X):</p>
  
  <pre><code>DELETE FROM [ClientList].[dbo].[LatestDownloadLogs]
  
  INSERT INTO [ClientList].[dbo].[LatestDownloadLogs] 
  SELECT * FROM [ClientList].[dbo].[latestoverview-union]
  </code></pre>
  
  <p>The "LatestDownloadLogs" table is moving to "server Y," but the "latestoverview-union" view will remain on "server X".</p>
  
  <p>Therefore what I need is something that looks like this:</p>
  
  <pre><code>DELETE FROM [server Y].[ClientList].[dbo].[LatestDownloadLogs]
  
  INSERT INTO [server Y].[ClientList].[dbo].[LatestDownloadLogs] 
  SELECT * FROM [server X].[ClientList].[dbo].[latestoverview-union]
  </code></pre>
  
  <p>Of course, it's not that easy, but hopefully that illustrates what I'm trying to accomplish.</p>