AxBuild.exe compilation error

Yesterday when i try to compile my AX 2012 R3 with AxBuild.Exe, i was getting the following error

“Object Server 01:  Can not create default Keyset. Error code -2146893809”.

Here i was running the command prompt as an Adminitrator and user has the access to AX database. After going through some of sites online i found out that, the issue has been caused by user permission.

The AOS was running under different user account and i was trying to run the compilation with other user account.

When I log off this user and logged in as the same user under which the AOS service is running and then started the compilation. And this the compilation is successful.



AX2012 R3 demo data transfer tool not detecting the database

Hello Friends,

Today i have tried to import the demo data into my AX 2012 R3 instance. But the test data transfer tool is not detecting my database. It is always showing that no databases found, even though the database exists and i am able to view my AX console without any issues.

After 2 hours of debugging, i found the following query

SELECT NAME FROM sys.sysdatabases where sid != 0x01 and version is not null AND DATABASEPROPERTYEX(name,’status’) = ‘ONLINE’ order by crdate desc

The tool is searching for the databases which are not created by sa user. But some how my database was created by the user sa when i was installing the AX. Because of this issue i am unable to import the demo data to AX instance.

Then i have executed the following steps to resolve my issue.

  • Make a back up of the AX database
  • Delete the existing database
  • Login to SQL management studio with windows authentication and restore the same database from the back up file,
  • Give the required user permissions to the database (if applicable).

Done. Now i am able to import the demo data successfully.

Getting Vendor addresses based on Address type in AX 2012 R2/R3

The following query gets the vendor addresses

 select ROW_NUMBER() over (partition by v.accountNum order by dpl.isprimary desc, lpa.recid) as AddressNumber,v.ACCOUNTNUM,lpa.ADDRESS,llr.NAME from VENDTABLE V
 where llr.TYPE=10 — Can be any type as per requirement

AX 2012 CU7 faster compilation

To perform the faster compilation of AX, follow the steps below

Go to following server configuration window

“Control Panel\System and Security\Administrative Tools\Microsoft Dynamics AX 2012 Server Configuration.lnk”

Enable the feature hot swapping assemblies

Go to command prompt (open as Administrator) enter the following command

axbuild.exe  xppcompileall  /s=01 /altbin=”C:\Program Files\Microsoft Dynamics AX\60\Server\MicrosoftDynamicsAX\bin”

/s=01  is AX instance number as you seen in the above window

/altbin  is the AX server deployment location