Thursday, 25 August 2016

Error while Importing Contoso Data in AX 2012 R3


Description:

Getting below error while importing the Contoso Demo Data to Dynamics AX 2012 R3 with "Dynamics AX 2012 Test Data Transfer Tool (Beta)".

Command used as per below link is

https://ax.help.dynamics.com/en/wiki/walkthrough-import-demo-data-for-ax-2012-r3-by-using-the-test-data-transfer-tool/


[DP.exe IMPORT D:\DynamicsAXR3DemoData MicrosoftDynamicsAx]


Error message is:


A connection with the  Server=GGK-DYN-001 cannot be established. Please check the Server is accessible

Unhandled Exception: System.InvalidOperationException: ExecuteReader requires an open and available Connection. The connection's current state is closed.

   at System.Data.SqlClient.SqlCommand.ValidateCommand(String method, Boolean async)

   at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean asyncWrite)

   at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)

   at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)

   at Microsoft.Dynamics.AX.Dataport.Extensions.<ExecuteLater>d__10`1.MoveNext()

 in e:\bt\110700\Source\DataPort\Dataport\Library\Extensions.cs:line 230

   at Microsoft.Dynamics.AX.Dataport.SqlHelper.<GetAllDatabases>d__22.MoveNext()

 in e:\bt\110700\Source\DataPort\Dataport\Library\SqlHelper.cs:line 846

   at Microsoft.Dynamics.AX.Dataport.SqlHelper.<GetAllConnections>d__18.MoveNext

() in e:\bt\110700\Source\DataPort\Dataport\Library\SqlHelper.cs:line 800

   at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()

   at Microsoft.Dynamics.AX.Dataport.DataportApplication..ctor(String server) in

 e:\bt\110700\Source\DataPort\Dataport\Model\DataportApplication.cs:line 38

   at DP.Program.Execute(String currentDirectory, DataportDirection direction, String directory, String database, String server, DataportAction action) in e:\bt\110700\Source\DataPort\DP\Program.cs:line 108

   at DP.Program.Main(String[] args) in e:\bt\110700\Source\DataPort\DP\Program.cs:line 82


and the Data Transfer Tool stopped with below screenshot.








Solution:

Add Server name (instance name also if you have) to DP command like


[DP.exe IMPORT D:\DynamicsAXR3DemoData MicrosoftDynamicsAx GGK-DYN-001\MSDYAX]


Where GGK-DYN-001 is Server name and MSDYAX is Instance name

 And it starts importing





No comments:

Post a Comment