title: Using Identity Insert on a linked server
body: <p>I have created a linked server object in SQL management studio on our on premise SQL box and I can insert into it as following syntax:</p>
  
  <pre><code>insert into [Azure].[budget].dbo.Bill 
  </code></pre>
  
  <p>I want to set identity insert and have tried the following:</p>
  
  <pre><code>SET IDENTITY_INSERT [Azure].[budget].dbo.Bill ON
  insert into [Azure].[budget].dbo.Bill 
  </code></pre>
  
  <p>This is yielding the error that there are too many prefixes. Why can I insert into it without the identity insert and is it possible to do this any other way?</p>
  
  <p>I have then changed the identity insert part to be SP as follows:</p>
  
  <pre><code>EXEC [Azure].[budget].dbo.sp_executesql N'SET IDENTITY_INSERT Bill ON'
  insert into [Azure].[budget].dbo.Bill 
  </code></pre>
  
  <p>But I am getting a warning about not having permission on the BillID field</p>