Tag Archives: configuration

Effective way to resolve all weird issues caused by users’ cache

I found these steps below are very effective to clear up weird issues after code/data migration or when users start experiencing wacky behaviors

STEP 1: Run the job below

public server static void FlushAll(Args _args)
   Args args;
   // Leave the "args" as null will skip the info messages normally shown when using menu items.


STEP 2: Delete user cache

Method 1:

  2. Log on to TS where all users use to connect to AX
  3. Search of *.AUC files and delete all these files
  4. Restart AOS

Method 2:

  1. Run this job on TS where all users use to connect to AX.
static void ClearAucFileForUsers(Args _args)
    System.Array    files;
    int             fileCount;
    int             i;
    str             nextFile;
    str             path = "C:\\Users";
    str             Finalpath;
    str             pattern = "*.auc";
    container       listOfFiles;
    int             DirCount;
    System.Array    Directories;
    int             j;
    str             nextDir;
    container       listOfDir;
    FileIOPermission    dirPermission, filePermission;
    InteropPermission   interopPermission;
    Set                 permissionSet;
    new InteropPermission(InteropKind::ClrInterop).assert();
    listOfDir = conNull();
    listOfFiles     = connull();
    Directories = System.IO.Directory::GetDirectories(path);
        DirCount = Directories.get_Length();
        for(j=0; j < DirCount; j++)
            nextDir    = Directories.GetValue(j);
            Finalpath = nextDir + "\\AppData\\Local";
            listOfDir += Finalpath;
    DirCount = conLen(listOfDir);
    while( j < conLen(listOfDir))
        Finalpath = conPeek(listOfDir,j);
            files           = System.IO.Directory::GetFiles(Finalpath, pattern);
        if (files)
            fileCount =    files.get_Length();
            for(i=0; i < fileCount; i++)
                nextFile    = files.GetValue(i);
  1. Stop and Restart AOS

STEP 3: Delete SysLastValue

static void DeleteAllLastValue(Args _args)
    SysLastValue syslastValue;   
     delete_from syslastValue;

Tags: , , , , ,

Can’t Deploy Cubes in AX

A production server was not able to deploy cubes today.  The environment is using SQL Server 2012


I saw some errors such as

  • Failed to build the OLAP cubes. Error: Failed to process the Analysis Services database Test2012 on the <ASServerName> server. Error: Errors in the back-end database access module. The provider ‘SQLNCLI10’ is not registered.
  • The following system error occurred:  Class not registered
  • Errors in the back-end database access module. The provider ‘SQLNCLI10’ is not registered.


I looked  at the DB server and found that the structure of the cube has been created – so I successfully connected to the server, but it could not go off to the database server to get the data.

To confirm the native client requirement I also looked at the Connection string already created on the AS Server as part of the Project Reporting data source

Provider=SQLNCLI10;Data Source=<DBServer> ;Initial Catalog=ProjectServer_Reporting;Integrated Security=SSPI;Persist Security Info=False.


Regardless of if you are running 2005 or 2008 or 2012 (or anywhere in between) you will need to have the 2008 Native Client installed

On the client you need to have installed the Microsoft SQL Server Native Client (SQL Server Native Client). This is a single dynamic-link library (DLL) containing both the SQL OLE DB provider and SQL ODBC driver.

The sqlncli10 provider for SQL 2008 R2 can be downloaded from here.
X86 package.
X64 package
IA64 package.

In case you have a SQL 2012 server and have received a Power Pivot sheet which want to use the SQLNCLI10 provider, you can change the data provider to use to data provider for SQL 2012: SQLNCLI11

In case you can’t selected the SQL Server Native Client 11.0. The provider is not installed on your client. The SQLNCLI11 provider for SQL 2012 can be downloaded from here:
X86 package
X64 package

That should be it. After installing the SQL Server Native Client, redeploy your cubes

1 Comment

Posted by on February 20, 2014 in BI, Installation and Configuration


Tags: , , , , , ,

Dynamics AX BI Cubes

For those who are learning about AX Cubes, these tutorials are doing very good job to help you up to speed and give you an idea what it is about and how to configure, update, view, create and modify cubes from AX.

How to configure cubes

How to update default cube definitions

How to view cube data in Microsoft Office Excel

How to create a cube

How to modify default cubes


Tags: , , , , , , ,

A CLR error occurred while invoking the scheduling engine

I came across this issue recently


The issue in this was caused by the AOS Server configuration option “Enable the hot-swapping of assemblies for each development session” being enabled on the server.

In our development environment, we enable the hot-swap feature of the Application Object Server (AOS) to use updated assembly DLL files without having to repeatedly stop and restart the AOS. Restarting the AOS terminates the connections from other developer clients, which can be an inconvenience.

This option should NOT be activated on production environments. Disabling the option resolved the issue



Tags: , , , , ,

How to find out all the AX KBs installed on your machine

A client asked me today how to find out all the KBs  were applied to one of its environments. Normally I would say go to “About Microsoft Dynamics AX” then “Show installed models”. However, in some cases not all KBs are shown in this form.

Here is another fine way you can find out :

Control Panel > Programs and Features > View installed updates



To find out more about version numbers and published patches, please use the link below. Microsoft team keeps constantly updated build numbers.

Microsoft Dynamics AX build numbers
1 Comment

Posted by on February 12, 2014 in Installation and Configuration


Tags: , , , , , , , ,

Check Installed Models Script

I’m working in an environment with 3 different AOSs. I have to maintain many models and hotfixes. Therefore, I need to find a clever way to determine whether or not a specific hotfix was installed on an environment


Use the attached script,  and then execute it in AX Management Shell and follow the prompts.


$found = $false
$server = read-host "Enter the database server that hosts your modelstore database (Default is localhost)"
if ($server -eq ''){ $server='localhost'}

$db = read-host "Enter the name of your AX model store database (Default is MicrosoftDynamicsAx)"
if ($db -eq ''){$db = 'MicrosoftDynamicsAx'}

$kb = read-host "Which KB are you attempting to install?"

while ($kb -eq '')
   $kb = read-host "You must enter a Kb to search for, try again (enter a KB now)" 

$models = Get-AxModel -server $server -database $db

foreach ($model in $models)
    $manifest = Get-AXModelManifest -Server $server -Database $db -model $model.Name 
    $details = $manifest.Details
    if (Select-String -Pattern $kb -InputObject $details)
        $found = $true

if (!$found)
    "KB " + $kb + " was not found in any installed model"
Leave a comment

Posted by on February 11, 2014 in Installation and Configuration


Tags: , , , , ,

%d bloggers like this: