Refresh database (To-Do list for Data Management BYOD export jobs)

This post will explain what is needed to be performed in target environment when you are planning for refresh database (RDB) process when you use bring your own database (BYOD) export both in source and target environments. In addition, it will clarify how you can re-configure BYOD in target environment after RDB process.

When you use BYOD export in both environments that you are planning for RDB, it is important to take backup of BYOD configuration of target environment so that you can apply it the environment after RDB process. In this regards, following checklist can be used to avoid failing of BYOD export jobs in target environment (e.g. UAT). Please follow To-Do list for task that can be done for RDB process https://dynfotech.com/2021/09/04/refresh-database-to-do-list/ .

Checklist (before RDB):

  • Inform users (D365FO team, data warehouse team, CE team) about RDB start time well in advance.
  • Take a backup of connection string for target environment BYOD entity store (Workspaces > Data management > Configure entity export to database).
  • Create a template of each BYOD data project and export them in your local PC or SharePoint (Workspaces > Data management > Templates). These templates can be imported to the target environment after the RDB.
  • Export published entities to the target environment BYOD in Excel via Excel add-In.
  • Export active BYOD batch jobs in target environment with their recurrence setup.
  •  Stop active BYOD batch jobs controlled or update active period so that they will be stopped before RDB.

Checklist (after RDB):

After RDB, connection string from source environment does not work in target environment and you can evaluate to this delete this BYOD entity store.

Note: You will get an error message by validating the connection string: “The ConnectionString property has not been initialized.The connection string should be of format Data Source=serverName;Initial Catalog=databaseName;Integrated Security=False;User ID=userid;Password=***”.

In order to delete this BYOD entity store (i.e. connection string); you need to perform the following task:

  1. Make sure that BYOD batch jobs are not running and have “Withhold” status.
  2. Just-In-Time access to target environment database via connecting to SQL Server using SSMS via LCS (i.e. No downtime is needed).
  3. Purge “Job history” table and related tables by running SQL Query on AX db. This will cleanup records that are stale in staging and execution history tables For example:
    • DMFSTAGINGVALIDATIONLOG
    • DMFSTAGINGLOGDETAILS
    • DMFSTAGINGLOG
    • DMFSTAGINGEXECUTIONERRORS
    • DMFDEFINITIONGROUPEXECUTIONHISTORY
    • DMFEXECUTION
    • DMFDefinitionGroupExecution
  4. Truncate “DMFPublishedEntity” table to drop entities that has been published to the source environment entity store in target environment by running SQL Query on AX db.

Note: After running the truncate query, those entities which have “Published = Yes” will be updated to “Published = No”

  1. Delete all data projects on data management or just delete those relating to source environment BYOD data source.
  1. Delete BYOD entity store connection string.
  1. Delete old BYOD batch jobs (i.e. source environment BYOD batch jobs).
  2. Refresh entity list on the target environment (Workspaces > Data management > Framework parameters):
  1. When the entity list has been refreshed, configure an entity export option for the target environment and then publish the required entities against it.

Note: You need to define correct connection string for target environment.

Note: Click on validate on the BYOD entity store to makes sure that the connection is working.

Useful links:

https://docs.microsoft.com/en-us/dynamics365/fin-ops-core/dev-itpro/analytics/export-entities-to-your-own-database https://docs.microsoft.com/en-us/dynamics365/fin-ops-core/dev-itpro/sysadmin/cleanuproutines

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s