This tool is designed to transfer the data between environments to create test or demo environments with the latest data.
It shouldn’t be used to import data into the production environment.
3. Goals
This tool is designed to transfer the data
between environments to create test or demo
environments with the latest data.
It shouldn’t be used to import data into the
production environment.
4. Goals (cont)
The Test Data Transfer Tool works by calling the Microsoft SQL Server
client tools bulk copy program, BCP.exe. BCP runs very quickly, thus
this tool runs faster than some other data transfer tools. The Test
Data Transfer Tool does not interact with the AOS.
You must have a CustomerSource or PartnerSource account to be
able to download the Test Data Transfer Tool installer. The installer
must be run by an administrator account.
As of today, you can download the tool from LCS (Life Cycle
Services).
5. Pre-requisites
• To be run on a system with SQL Server client tools installed.
• During import, you must run the tool directly from the
computer that is hosting the database.
• Select & Bulk Insert permissions on the SQL database and
ALTER INDEX permission on the table (this is needed if the
data violates the unique index constraints and you want index
to be
disabled automatically).
• Permission to execute SQL scripts that are executed pre- and
post export/import. These can be found in import and
export directory.
7. PROS
1. Very lightweight and simple to use tool.
2. Can be installed on any machine that has the SQL Server Client tools installed.
3. Can be handy tool in transferring the data among the different environments (for example
data transfer from production to the training environment).
4. This tool can be used to move subset of the data.
5. The tool can be used to import and export any AX entity but I found it more useful while
transferring configuration data among the environments. (for example module parameters
tables)
6. Fast when compare to other data migration tools for AX.
7. Can export or import data when an AOS instance is not running.
8. Export or import Microsoft Dynamics AX data more quickly compared to other methods.
9. Only minimal changes are made to the data that you import. This feature helps guarantee
that the data is stable over time. For example, the tool never renumbers RecIDs.
8. PROS (cont)
10. The data file format is text-based. Therefore, the data can be compared with earlier versions and
stored in a version control system.
11. The data file format is a standard format that is produced by bcp.
12. Exported data can be filtered. Therefore, specified tables, columns, or rows can be easily excluded
from the export.
13. Differences often occur during development. Because of this feature, data can often be imported
without user intervention, even when the table definitions have changed. For example, tables or fields
that have been renamed do not prevent import.
14. Entity IDs, such as table IDs, class IDs, and extended data type IDs, are updated to match the IDs of the
target system.
15. The tool reads and correctly updates the SYSTEMSEQUENCES table.
9. CONS
1.The usage of this tool requires you to have a SQL related skillset.
Since the tool is actually a wrapper on top of SQL Server Bulk Copy
Program (bcp) that’s why the expert level knowledge of the AX
database schema and T-SQL is a must.
2.Since the tool works directly on SQL Server database that’s why the
tool doesn’t make sure that your import produces a complete or
coherent database.
3.Need to have access to SQL database and can run as Admin
4.Command line and there is no UI
12. Syntax
Parameter Description Default value
Direction Parameters indicates the direction (Import/Export)
Specify IMPORT for Importing Data and EXPORT for
exporting data.
EXPORT
directory Indicates the directory
• from which to import data (or)
• To which to export data files
Defaults to current directory if not
specified
database The name of the database:
• from which to export data (or)
• To which import data in to.
AXDB
server The name of the sql server on which the database
is hosted
The current computer name
Here is the architecture of the tool. The Left side is Export process, The right side is Import process and the middle one is where the output files are created.
Export
Metadata.xml – A list of table definitions in your AX system. We need to update this file before export. There is a job that shipped with the tool. You need to import the job into AX, run the job, it will update the Metadatafile.xml with all the tables in the AOT.
DP.exe processes user input from the command line, a metadata file, and data from the AX 2012 model database , and transfers the information to three files for each table that is being exported: an .out file, an .outModel file, and an.xml file that contains SQL Server metadata
Output –
.Out file: A bcp data file that contains table data. Columns are separated by #|EOC|# and rows are separated by #|EOR|#\n
.Outmodel file: A file that contains metadata that is specific to Microsoft Dynamics AX.
This metadata includes all names and IDs of the table and its fields. This file also includes the elementType attribute, which stores the names and IDs of any Microsoft Dynamics AX tables, classes, or extended data types that are referenced by the table.
This information is used during import to match up fields that have been renamed. The information is also used to update the table IDs, class IDs, or data type IDs so that those IDs match the IDs in the target database.
Data in the .outmodel file is constructed from the Metadata.xml file. This file is generated by an X++ job that you run from Microsoft Dynamics AX on the source database.
.xml file: A bcp data file that contains sql metadata (column descriptors)
Import
Three files that result from the export process are used as input to DP.exe, along with command-line parameters. DP.exe then transfers the data to the AX 2012 database and model database in the test environment. The results of the import process are stored in an .xml file called DPLog.xml
The syntax is very simple. We can break it down to 4 component
Direction: IMPORT or EXPORT
Directory: If it is EXPORT process, it is the location of the output files that will created. If it is IMPORT process, it is also the same location where output files were created. Normally, Direcotry should be the same for both IMPORT and PROCESS
Database name:
SQL Server name