3

我想使用 C# 将大量数据从 SQL Server 2008 传输到 Microsoft Dynamics 2012。有主数据和关系数据。执行此操作的最佳方法是什么?

如果我们使用 .Net Business Connecter,我们可以维护外键关系吗?

4

2 回答 2

3

查看数据迁移框架用户指南安装指南使用指南演示文件

背景资料...

这不是一条捷径,但替代方案需要 100% 了解 AX 数据模型。

AX 外键关系存储在 AX 数据字典中,但不会填充到 SQL Server 数据库中。

如果您的数据恰好是 AX 2012 数据库,那么我会推荐备份/恢复 :)

于 2012-11-01T08:15:01.413 回答
0

I totally agree with Jan on this one...

First, Data Migration Framework for now would NOT be the weapon of choice here if you need to transfer HUGE amounts of data for the following reasons:

  • It is beta and by that it still contains lots of bugs (for example when creating custom entities on a custom table that does not have the right clustered and primary index setup, the import of your data is not correct, it updates the wrong records, ...)
  • Secondly, the first step of the process is loading your data into a staging table by using SQL Server DTS packages. The package being built by Dynamics also contains validation which has it's impact on the performance
  • Next, for every record that will be read, the mapping metadata is retrieved instead of caching when reading the same type of records.

So I think you have two options here:

  • You could use the same architecture more or less as the DMF and create a staging table. Then use the SQL Server Data Export/Import wizard to import the data FAST (no validation, ...) and afterwards process the staging to real life tables (But as Jan said, that would require Ax knowledge)

  • Lastly what you could do (depending on the complexity of the data you want to import) is using a AIF Custom Service (WCF). You could expose a service with an operation that creates a record in Dynamics Ax. The benifit here is that you could use parallel processing here to speed up things. For example, at a customer site, we have BizTalk in the middle of all the traffic and BizTalk is able to perform many calls in parallel to Dynamics AX. And if your environment is Multi-AOS, it can scale up nicely.

于 2012-12-14T23:05:02.380 回答