locked
Azure Data Factory does not fire SQL trigger on insertion RRS feed

  • Question

  • I did recent (3 weeks) experiment that seems to indicate that Azure Data Factory Copy Operation to an Azure SQL Database does not fire SQL trigger associated to the destination table / view.

    Did not find any option to have the SQL trigger fireing.

    What do I miss ?

    Tuesday, April 28, 2020 10:27 AM

Answers

All replies

  • As I understand, you're saying that ADF copies data to SQL table but associated sql trigger (to insert/update some data) isn't triggering. 

    Does it work when you manually insert data to that table using INSERT INTO ? 


    If the response helped, do "Mark as answer" and upvote it
    - Vaibhav

    Thursday, April 30, 2020 1:53 PM
  • Yes my SQL trigger worked perfectly for insertion under SSMS, but was not fired by ADF.

    I suspect they are using a Bulk Insert operation which disable triggers.


    • Edited by D. Pavot Thursday, April 30, 2020 3:11 PM
    Thursday, April 30, 2020 3:11 PM
  • Yes my SQL trigger worked perfectly for insertion under SSMS, but was not fired by ADF.

    I suspect they are using a Bulk Insert operation which disable triggers.


    Yes, ADF uses bulk insert to copy to SQL

    https://docs.microsoft.com/en-us/azure/data-factory/connector-sql-server#append-data

    Edit - Maybe, if possible, you can have the trigger code in SP and use SP activity after copy activity.


    If the response helped, do "Mark as answer" and upvote it
    - Vaibhav



    Thursday, April 30, 2020 3:18 PM
  • Usefull link, thanks a lot.
    Friday, May 1, 2020 8:10 AM