web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Suggested Answer

BYOD Data Entity Export - Trigger SQL Stored Procedure

(0) ShareShare
ReportReport
Posted on by 4

Hi,

We're exporting D365 F&O data entities to an Azure SQL database BYOD for use in other processes and Power BI reporting, and currently have SQL stored procedures which run on a recurring schedule to ETL the D365 BYOD data to our main data warehouse reporting database.

This method currently causes us issues in terms of syncing the processes to get consistent results in terms of reliability and timing of data updates in the data warehouse.

We want to use the 'Enable triggers in target database' setting in the 'Configure entity export to database' to trigger these SQL stored procedures to run the ETL processes, but can't find any instructions of what this setting actually does and how it can be used to achieve our requirement. All the Microsoft documentation says, is to switch on this setting and then nothing else about what needs to be configured on the SQL side of things, as if it will all just magically happen by itself. Unfortunately it doesn't.

pastedimage1586346610303v1.png

Is anyone else using this setting and could help us understand what config we need to do in SQL to use this functionality? Pointing us in the direction of any documentation on it would be extremely helpful, but please don't just send the link to the Microsoft BYOD document as its doesn't contain what we need. (https://docs.microsoft.com/en-us/dynamics365/fin-ops-core/dev-itpro/analytics/export-entities-to-your-own-database)

Many Thanks

Chris

I have the same question (0)
  • Suggested answer
    Sergei Minozhenko Profile Picture
    23,093 on at

    Hi Chris,

    Documentation is pointing SQL triggers (docs.microsoft.com/.../create-trigger-transact-sql)

    You can create "on insert" or\and "on update" trigger on BYOD side for a table and write the logic you want.

    I used them a lot to prepare data for different sources after export happened.

  • Chris Chatwin Profile Picture
    4 on at

    Hi Sergei,

    Thanks for your quick response. I'll do some testing of these SQL commands and see if it gives us the desired results.

    Many Thanks

    Chris

  • Suggested answer
    zhifeng Profile Picture
    on at

    Hi Chris,

    Yes, you are right there is no official documents. I quickly did some testing and capture SQL Trace here is result: 

    1. Not enable enable triggers in target database, i can didn't see command FIRE_TRIGGERS during  bulk insert  with(TABLOCK, CHECK_CONSTRAINTS)

    2. With enable triggers in target database option, i can see command FIRE_TRIGGERS((with(TABLOCK, CHECK_CONSTRAINTS, FIRE_TRIGGERS))

    And here are more details about FIRE_TRIGGERS:

    FIRE_TRIGGERS Specifies that any insert triggers defined on the destination table execute during the bulk-import operation. If triggers are defined for INSERT operations on the target table, they are fired for every completed batch.

    If FIRE_TRIGGERS is not specified, no insert triggers execute.

    FIRE_TRIGGERS

    https://docs.microsoft.com/en-us/sql/t-sql/statements/bulk-insert-transact-sql?view=sql-server-2017

    You may do more testing to verify above. 

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 592 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 478 Super User 2025 Season 2

#3
BillurSamdancioglu Profile Picture

BillurSamdancioglu 305 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans