Click here to Skip to main content
15,867,594 members
Articles / Database Development / SQL Server / SQL Server 2008

Dynamics AX Data Maintenance & Migration Tips

Rate me:
Please Sign up or sign in to vote.
5.00/5 (1 vote)
29 Jun 2012CPOL5 min read 19.1K   5   3
Maintenance of Definition's in multiple Dynamics AX Environments

Introduction

This article is intended primarily for intermediate Microsoft Dynamics AX users who are familiar with AX User Interface. The Goal of this article is to help the users by providing the tips on maintaining/moving “Definition Groups” between different Dynamics AX environments. The focus of this article is not the data, but to advise/teach on maintaining the same “Definitions” across different AX environments.

Basically the DAT/DEF is used to Export/Import data between AX AOS Servers. In general, Microsoft Dynamics AX data import/export is used to move data from a staging environment to another environment. Definition groups identify groups of tables that can be imported or exported when you use Microsoft Dynamics AX data import/export under System Administration. Definition groups must be set up before you export data, but are not required when you import data.

To the best of knowledge know such article was found which explains/focuses on how to export the Definition file along with the predefined list of tables and criteria, a Setup that was created and want to carry it to other Environments without recreating it.

Note : List of tables and "Criteria’s" and "Ranges" selected on each table under a definition group are stored in the SYSEXPIMPTABLEQUERY table.

SQL
SELECT GROUPID, QUERYRANGE, QUERYPACKED FROM SYSEXPIMPTABLEQUERY

Follow the steps here.

LogIn into AX : The user should have AX "System Adminstrator" Role to navaigate to the below screen.

Navigate to System administration | Common | Data export/import

Note : Here in the below demonstration Trans and Ex_def are used as sample names, this could be replaced with any name of users choice. In the below example Trans Definition is exported using Ex_def group. Exporting the definition groups is possible by using another Definition group.

Lets assume that you have some tables already defined in the group named “Trans” as an example shown in the below Image and wanted to export that definition file to another AX environment.

To export the above definition file with the same set of Tables and criteria's, you need to create another definition file which can do the trick to export it for us. So create a new definition group as "Ex_def" and save the description as “Export Definitions” so that it is clear in understanding the purpose of it.

See that all the check boxes under "Options" tab and "Include table groups" tab are unchecked. This way you are not loading any tables into this new definition. The user should see a new record like the one shown in the below image. Click “Select tables” from menu bar.

Select tables” will take the user to the screen as shown below.

In “Select tables” Form just type the “Name of the table” Column as “SysExpImpGroup” in it. And check or select the box “Apply criteria” column and click the “Export criteria” from the Menu bar on the top of the form.

Clicking on “Export criteria” should take you to the below screen.

This Form helps in creating a query on SysExpImpGroup table(Define import/export groups). Select the name of the definition (ex : "Trans") from the dropdown in the "Criteria" column which was intended to move into another AX environment and click OK button at the bottom of the form.

This should take you back to "Select tables" Form. Then select the checkbox under “Specify related tables” as shown in the below screen and click on the “Select related tables” on the top of the Form menu bar.



Clicking the “Select related tables” will present you with the following form with a list of tables.

Do not modify anything in this form, leave that as it is and close it. You should see the entire above displayed tables back in the “Select tables” Form as shown in the below image.



System administration | Common | Data export/import | Export to

This will take you to the "Export Options" Form as shown in the below Image.

In “Export Options” form, Select the Ex_Def from the "Definition group“ dropdown and select the Binary from the "File type" dropdown and pass the name of the output File as Trans.dat. This exported file contains all the tables and criteria’s & ranges information when selected Binary Format as "File Type" output instead of Comma. Import this DAT and DEF files into new AX Environment. You should see the definition group with the same name Trans in the new AX environment as well. It will have all the Table names, Ranges and criteria’s intact. This avoids the user to recreate/redo them from scratch again and saves a lot of time to the developers.

Note: If the file is exported in Comma format then you will only be able to get the Tables information, but not the ranges and Criteria's. Hope Microsoft fixes this in the near future.

Importing the DAT/DEF files could also be done through command line using an XML file as Input to AX32.exe.

XML file should be some thing like this.

XML
<?xml version="1.0" encoding="utf-8"?>
         <AxaptaAutoRun exitWhenDone="true" version="6.0"> 
  <DataImport companyId="DAT" file="C:\tfs\AxCore.dat" definitionGroupId="AxCore"/>             
</AxaptaAutoRun>

Note : Aviod spaces in the Parameter values in XML file.

Run the below command line in Command Prompt window.

ax32.exe -internal=noModalBoxes -StartupCmd=AutoRun_C:\tfs\AxCoreAutoRun.xml

References

The below link might also be useful to the AX developers

http://blogs.bojensen.eu/?p=527

Conclusion

The above mentioned demonstration of steps determine that exporting the Definition groups which holds the List of tables along with criteria's and ranges could also be migrated to different AX environments easily.

I would dedicate this article to all my well-wishers, friends and colleagues. My special thanks to Richard Ward, John Reed and Todd Oberman.

Hope this article will serve the purpose. Any suggestions or corrections are most welcome.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Technical Lead
United States United States
Mr. Kanumukula is a IT-Professional and has been in the industry since 1997.
• Around 15+ years of experience in the areas of system design & architecture, application programming, development, testing, deployments, execution with implementations & Roll-outs of business applications in cloud/on-premise.
• Experience with Dynamics 365 for F&O/Dynamics AX, D365 for Business Central/NAV,(Inc -Visual Studio.Net, X++, AL, C#, CSide, SharePoint, SQLServer, SFDC, Power-BI, Power Apps, Dataverse/Common Data Service, CRM, SSIS/SSRS/SSAS, BizTalk, IOT, IIOT, JAVA, AWS, GCP, Azure, API, etc)
• Experience in managing Operations & Data Center maintenance both on-premise & cloud hosting, infrastructure/applications assessments & build systems.
• Experience in ERP upgrades, Mulesoft API's,MS Dynamics 365,Azure administration & hosting, LCS-Life Cycle Services.
• Experience with Commitment to Quality, technical quality assurance(before, during & after development). Create partnership with project manager to give technical assistance regarding important decisions.
• Well-Versed with Agile, SCRUM & CMMI process & methodologies to support rapid iterative Quality software development.

A highly motivated, self-starter & problem solver with multi-tasking skills, Had managed and served through an established process to get the job done in a timely and efficient manner with an eye on every detail during ERP-implementations. Flexible to work under stress and have ability to prioritize workload and stay organized in a fast-paced environment.

Learned & adapted to new technologies & tools at ease, aggressively delivered tasks on-demand at a fast-pace satisfying the needs of product owners, product development, program managers, Vendors, Higher Management, Internal/External Clients.

Have a proactive & positive attitude with a willingness to do what it takes to complete the job. Self-managed work style within a team environment. Extremely detail & Customer service oriented.

Comments and Discussions

 
QuestionMessage Closed Pin
29-Jun-12 15:22
jhgjhgjghjfyy29-Jun-12 15:22 
AnswerMessage Closed Pin
29-Jun-12 15:44
Venkat Chaitanya Kanumukula29-Jun-12 15:44 
Message Closed
GeneralRe: ====== http://www.clothes8.org ====== Pin
OriginalGriff29-Jun-12 19:08
mveOriginalGriff29-Jun-12 19:08 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.