title: Cannot insert into table with identity column from linked server
body: <p>I have the following table:</p>
  <pre><code>  use db_name;
    create table dbo.tbl_name(
    id_col int identity(1,1),
    col1 varchar(20),
    col2 varchar(50)
    );
  </code></pre>
  <p>into which I can insert values without issue:</p>
  <pre><code>insert into dbo.tbl_name
  select
  col1,
  col2
  from dbo.other_tbl_name;
  </code></pre>
  <p>The issue arises when I attempt to insert into the table from a linked server:</p>
  <pre><code>insert into [server_name].db_name.dbo.tbl_name
  select
  col1,
  col2
  from dbo.other_tbl_name;
  </code></pre>
  <p>This gives the following error message:</p>
  <blockquote>
  <p>Column name or number of supplied values does not match table
  definition</p>
  </blockquote>
  <p>If I try to set <code>identity_insert</code> on so I can include the identity column in the insert I get the error message:</p>
  <blockquote>
  <p>Cannot find the object
  &quot;server_name.db_name.dbo.tbl_name&quot; because
  it does not exist or you do not have permissions.</p>
  </blockquote>
  <p>which is somewhat misleading, given that I can select from the table and even issue <code>update</code> statements. I guess I don't have permission to set <code>identity_insert</code> on from the linked server, though I can do it on the server itself directly with the same credentials.</p>
  <p>So how can I insert into this table from the linked server?</p>