Where are the source files of AX stored?
Asked Answered
A

2

5

I would like to run a periodic (each 4 hour) backup of 'only' the source file of Dynamics Ax 2009, so, the XPO source file.

I'd like to know where they are stored physically.

Aeri answered 3/7, 2012 at 7:59 Comment(0)
S
9

AX7

All meta data stored as XML and methods in regular files and stored in version control.
See this overview.

AX 2012

The AX source (along with properties and compiled p-code and CIL) is stored in the model store database. In AX 2012 RTM the model store database is the same as the data database (and that is stupid). In AX 2012 R2 the model store database is in a separate database, usually named xxx_Model.

AX 2009 and below

The AX source (along with properties and compiled P-code) is stored in binary files with the AOD extension on the AOS server. There is one file for each layer.

Sorry, source files only do not exist. XPO files is an export/import format only.

The axsys.aod, which is quite large, contains most of the standard code. Corrected elements from service packs are found in the axsyp.aod file.

Your code is most likely stored the axusr.aod or axcus.aod depending on your working layer.

The naming of the files follow a pattern explained here.

Secluded answered 3/7, 2012 at 8:24 Comment(0)
C
4

It is possible to create an XPO via code, but as Jan points out, it will only be relative to your current layer. This code will create an XPO containing all definitions in the "Classes" Node;

void DEV_ExportTreeNodeExample()
{
    TreeNode treeNode;        
    #define.ExportFile(@"c:\AOTclasses.xpo")
    #define.ExportMode("w")        
    new FileIoPermission(#ExportFile, #ExportMode).assert();        
    treeNode = TreeNode::findNode(@"\Classes");
    if (treeNode != null)
    {
        treeNode.treeNodeExport(#ExportFile);
    }        
    CodeAccessPermission::revertAssert();
}

This code came from here

I suppose you could create a batch job to run the above code for any node you wish to back up, how long this would take or if there would be any other complications, I do not know.

Christenachristendom answered 3/7, 2012 at 9:49 Comment(2)
Wow, this is a great 'job'. Do you think it is modifiable to create one files per class / form ?Aeri
@Aeri Yes. Use treeNodeTraverser, here is an example; axaptapedia.com/TreeNodeTraverser, then write a file per node found.Christenachristendom

© 2022 - 2024 — McMap. All rights reserved.