Friday 23 January 2015

How to import Contoso Demo Data to Dynamics Ax 2012 R3.

The setup contoso demo data for Dynamics Ax 2012 R3 is different from previous version. I remember, I used .dat file to load demo data into Dynamics Ax 2012 R2. Now DynamicsAX2012R3DemoData.exe available partner Resource.
03-Demo setup
DynamicsAX2012R3DemoData.exe extracted files round 15 GB. Extracted folder contains three types of files. According to MSDN
  • Xml (A bcp data file that contains table data. Columns are separated by #|EOC|#. Rows are separated by #|EOR|#\n.)
  • Out (A bcp data file that contains the table metadata (column descriptions).
  • OutModel (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)
Installation of Test Data Transfer Tool:
The MSDN Described The Import export with Test Data Transfer Tool (beta) as follow.
IC665318


Test Data transfer Tool is available on partner resource.
Go on following link

04-InformationSource

On login I found download page
05-download

There will be zip file downloaded.  On running I found following installation wizard.

11-Beta Setup

12-Beta Setup next

Setup run will be generated as following
06-folderDetail

Import Data Into Dynamics Ax 2012 R3 instance:
And import MetaDataXMLGenerator.xpo in dynamics Ax.
07-ImportGenerator

This xpo imports results a job inside job node under AOT.

08-Job



This job will generate Metadata.xml. This Metadata.xml will be created in window temporary folder.
Path of file in metadata.xml can be get from infobox which will appear after successful run of job.
13-metaFile

if you lost infobox,You can get temporary folder path with following command echo %temp%. where you can get Metadata.xml
Copied metadata.xml into [list] folder of test tool Data folder. If it already exists then overwrite it.
15-copy meta data

Now open command prompt. Go to directory where Test import tool is extracted.
Run the following command
DP.exe IMPORT “E:\Contoso_Demo_Data\DynamicsAXR3DemoData” MicrosoftDynamicsAx

Please update path according to your installation.
05-download09-Command Prompt

After running the command, you will find following window which describe the process by remaining table to number data, and number of error occurs during import.
10-Remaining

This process takes hours and hours with respect to your machine. After completion, I found demo data inside my dynamics Ax 2012 R3.

14-DataAppear

Thursday 22 January 2015

Dynamics AX 2012 R3 Demo database restore/ Contoso DB restore in Dynamics AX 2012 R3

1)      Download demo data from partner source
2)      Extract It,  at some location let’s assume our path to extract it is C:\R3DemoData
3)      As It will get extracted it will created a subfolder, under directory which is specified in step#2 i.e. C:\R3DemoData \DynamicsAXR3DemoData\
It will take almost 15 GB to expand/ extract
4)      Download Test Data transfer Tool from information source; here goes the path for it.
5)      Install this tool i.e. Test Data transfer Tool
6)      Open Dynamics AX and Press Ctrl+D to Open AOT. Remember if you do not have license file you would not be able to open AOT. It’s must to load license file and sync DB, before you can access AOT.
7)      Import an XPO File, named as MetadataXMLGenerator.xpo
This file can be found at the installation location of Test Data transfer Tool. Commonly under normal circumstances it would be available at following path
C:\Program Files (x86)\Microsoft Dynamics AX 2012 Test Data Transfer Tool (Beta)
8)      After you import the XPO, go to Jobs, you will see a job created, in the AOT. The name of job will be MetadataXMLGenrator. Run this job and wait until you get an info message like this
“Metadata xml file is created and here is full path to filec:\UsersSMCSER\AppData\Local\Temp\MetaData.xml”

Copy the whole message of infolog and paste it somewhere in notepad etc. It’s important
9)      Stop Dynamics AOS Service.
10)   Copy a file on following path
File Name: MetaData.xml
File from: path mentioned in step#8
File to: Test Data transfer Tool installation path\List
Typically as C:\Program Files (x86)\Microsoft Dynamics AX 2012 Test Data Transfer Tool (Beta)\[Lists]
11)   Open CMD, and Run as Administrator
12)   Run the following command
      DP.exe IMPORT “PATH  OF EXTRATCED DB WHICH IS DISCUSSED IN STEP 2 AND 3. USE PATH OF STEP 3; SEE EXAMPLE BELOW” MicrosoftDynamicsAx
DP.exe IMPORT “C:\R3DemoData \DynamicsAXR3DemoData\” MicrosoftDynamicsAx

Note: if you are getting connection error for database, try command as under
dp.exe import C:\R3DemoData \DynamicsAXR3DemoData\ MicrosoftDynamicsAX

13)  That’s all, it may ask you some option, as Y/Y and n/N. and it will keep on showing you status that how many tables are remaining and how many got error during import, as shown below. At this moment you may have rest or coffee until it’s done :)