Persist primary key information while copying data using Azure copy activity RRS feed

  • Question

  • Can we persist primary key information while copying data from SQL Db to Azure Sql Db using ADF copy activity?
    Monday, September 25, 2017 7:24 AM

All replies

  • you mean in terms of IDENTITY_INSERT?

    to insert the PK from the source also into an identity column in the target?


    Gerhard Brueckl
    blogging @
    working @

    Monday, September 25, 2017 7:46 AM
  • Hi Nutan, what kind of primary key information do you want persisted into Azure SQL DB?  Do you mean you would like the same primary keys on the source SQL DB to be created in the destination Azure SQL DB?
    Monday, September 25, 2017 11:40 AM
  • Hello,

    When moving data from one SQL database to another (on prem or Azure), if there is an Identity column in the source table that has a gap (e.g. the ID's are 1, 2, 4, 5), and the destination table is empty with the same structure, those values in the destination table after copy will be 1, 2, 3, 4 rather than maintaining the values.

    ADF does not have an option to keep identity values intact.

    Hope this helps.


    Alberto Morillo

    Monday, September 25, 2017 1:42 PM