title: SQL Server how to insert into a table from linked server
body: <p>I have my local database <code>prova</code> and another database <code>SOFIADR</code>. I want to insert into the table <code>Events</code> of the <code>prova</code> database the rows of data retrieved from the linked database server <code>SOFIADR</code>. The database <code>SOFIADR</code> is a linked of my local database server <code>test</code>. </p>
  
  <p>The following query in the database <code>NKSOFIA</code> works:</p>
  
  <pre><code>select *
  from ARA_01.ARA01.dbo.monodosi_tab
  </code></pre>
  
  <p>If I move into my local database <code>prova</code> and try to import data in my table <code>events</code> I write:</p>
  
  <pre><code>insert into Events (.......)
      select field1, field2 .....
      from [SOFIADR].[NKSOFIA].ARA_01.ARA01.dbo.monodosi_tab
  </code></pre>
  
  <p>But I get an error:</p>
  
  <blockquote>
    <p>Msg 117, Level 15, State 1, Line 3<br>
    The object name 'SOFIADR.NKSOFIA.ARA_01.ARA01.dbo.monodosi_tab' includes an excessive number of prefixes. Maximum capacity is 3.</p>
  </blockquote>
  
  <p>How can I do that?</p>
  
  <p><a href="https://i.stack.imgur.com/9YKUz.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/9YKUz.png" alt="enter image description here"></a></p>