Microsoft Dynamics AX Support

This blog contains posts by the Microsoft Dynamics AX Support Teams Worldwide

IDMF – How to troubleshoot job status issues like Last run result = Error

Consider a scenario where you are using IDMF 2.0, but one or more of the jobs you are running error. How do you establish what went wrong, so that you can correct the problem? In the example below, I am working with IDMF 2.0 running on AX 2009, but the AX version I am using is not really relevant. Let’s start with some background information and some links that you may find useful.

1. Background

IDMF 2.0 was released in July 2014 and these days you can download the most recent build from the LCS web site in the Downloadable tools area.

MSDN Blogs  >  Microsoft Dynamics AX Solution Architecture   >  Microsoft Dynamics AX Intelligent Data Management Framework 2.0 released

http://blogs.msdn.com/b/axsa/archive/2014/07/21/idmf-2-0.aspx

We released version 2.0.33.0 on 2nd November 2015

TechNet Blogs »  Dynamics AX In-Market Engineering »  New version of Microsoft Dynamics AX Intelligent Data Management Framework (IDMF) is now available on LCS
http://blogs.technet.com/b/dynamicsaxse/archive/2015/11/03/new-version-of-microsoft-dynamics-ax-intelligent-data-management-framework-idmf-is-now-available-on-lcs.aspx

// Supported Products:

Microsoft Dynamics AX 2012 R3
Microsoft Dynamics AX 2012 R2
Microsoft Dynamics AX 2012 Feature Pack
Microsoft Dynamics AX 2012
Microsoft Dynamics AX 2009

// Main Documentation Link:

Microsoft Dynamics AX Intelligent Data Management Framework (IDMF) [AX 2012]
http://technet.microsoft.com/en-us/library/hh378082.aspx

// Installation Guide:

Installation Guide for the Microsoft Dynamics AX Intelligent Data Management Framework (IDMF) [AX 2012]
http://technet.microsoft.com/EN-US/library/hh389759.aspx  

// Using IDMF:

Using the Microsoft Dynamics AX Intelligent Data Management Framework (IDMF) [AX 2012]
http://technet.microsoft.com/EN-US/library/hh389763.aspx

// Troubleshooting IDMF:

Troubleshoot the Microsoft Dynamics AX Intelligent Data Management Framework (IDMF) [AX 2012]
https://technet.microsoft.com/EN-US/library/hh389765.aspx

// Default INSTALLATION path:

C:\Program Files\Microsoft Dynamics AX Intelligent Data Management Framework\

// Default LOG path:

C:\Program Files\Microsoft Dynamics AX Intelligent Data Management Framework\Log\

I won’t go into details about how to install IDMF here as that is covered by the links above, except to say that once you’ve created your IDMF databases, you then need to run the post-installation tasks before you can use IDMF:

On this TEST environment, we can see the AX 2009 production database, the production replica database, and the two IDMF databases that are created when you install IDMF:

2. Running IDMF jobs

When you’ve completed the installation, you will see the IDMF 2.0 interface, and you will be asked to run some specific tasks in a certain order to get IDMF up and running.

One of the first actions you will need to take is to schedule a ‘Synchronize metadata‘ job under the ‘Schedule‘ tab:



When the job has been scheduled OK, you will see it under the ‘Status‘ tab:

The IDMF jobs can have several different statuses:

————
Canceled

Error
Fail
OnHold
Pass
Pending
Running
————

Some of these are mentioned in more detail here:

Viewing the status of purge or archive jobs (IDMF) [AX 2012]
https://technet.microsoft.com/en-us/library/hh389757.aspx

So you’ve scheduled a job and tried to run it, and it appears under the ‘Status‘ tab OK. The first status that you will see is ‘Pending‘:

You may then see the job ‘Running‘:



3. Dealing with an error

What do you do if that job changes status to ‘Error‘?

Well, the first thing I suggest that you look at is the ‘Trace log‘ hyperlink

In my scenario, the Trace output looks like this:

—————————————————————————————-

Oct 30 2015 11:18AM  Source: Scheduler service   ExecutionResult: MetaSync started
Oct 30 2015 11:18AM  Source: Scheduler service   ExecutionResult: Synchronizing required procedures
Oct 30 2015 11:18AM  Source: Scheduler service   ExecutionResult: Synchronizing AOT Stats
Oct 30 2015 11:18AM  Source: Scheduler service   ExecutionResult: Completed AOT Stats
Oct 30 2015 11:18AM  Source: Scheduler service   ExecutionResult: Gathering virtual companies and their details
Oct 30 2015 11:18AM  Source: Scheduler service   ExecutionResult: Virtual company information gethered completed
Oct 30 2015 11:18AM  Source: Scheduler service   ExecutionResult: Started Creating update table query
Oct 30 2015 11:19AM  Source: Scheduler service   ExecutionResult: Finished Creating update table query
Oct 30 2015 11:19AM  Source: Scheduler service   ExecutionResult: Executing update table query
Oct 30 2015 11:19AM  Source: Scheduler service   ExecutionResult: EXCEPTION while doing meta sync :System.Data.SqlClient.SqlException (0x80131904):
Could not allocate space for object ‘sys.sysrowsets’.’clust’ in database ‘IDMFArchiveDB’ because the ‘PRIMARY’ filegroup is full.
Create disk space by deleting unneeded files, dropping objects in the filegroup, adding additional files to the filegroup, or setting autogrowth on for existing files in the filegroup.
at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
at System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async, Int32 timeout, Boolean asyncWrite)
at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean asyncWrite)
at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
at Microsoft.Dynamics.AX.DataManagement.Framework.DataAccess.IDMFDataAccess.ExecuteQuery(String sourceConn, String query)
at Microsoft.Dynamics.AX.DataManagement.Framework.MetaData.MetaDataService.SyncTables()
at Microsoft.Dynamics.AX.DataManagement.Framework.MetaData.MetaDataService.MetaSyncProcess()
at Microsoft.Dynamics.AX.DataManagement.Framework.MetaData.MetaDataService.Process()
ClientConnectionId:097160a4-9c1d-4b2a-9a69-ccad7f7dd026
Oct 30 2015 11:19AM  Source: Scheduler service   ExecutionResult: MetaSync completed with errors
—————————————————————————————-

What happens if I try to run another ‘Synchronize metadata‘ job now without resolving the error?

Well, you end up with a job that’s ‘OnHold‘:



You need to resolve the original issue first
.

In my demo, I have restricted the max file size of the IDMFArchiveDB to provoke this error, so I simply change the database file configuration so that I won’t run out of space.

Once I’ve done that, I simply restart the schedule that has a status of ‘Error’ by right-clicking on it, choosing ‘Restart schedule‘, and providing a new run date and run time when prompted:



You’ll see the job status change to ‘Pending‘ and the ‘Description‘ will say when it was ‘Restarted’:

Once the job has finished, the status will change to ‘Success‘:

In fact, in the screenshot above, we can see that the first job completed successfully, and as a result, the second job which was ‘OnHold‘ was also able to run after that, and complete successfully.

Also note that the ‘Substasks‘ in the ‘Trace’ pane have a ‘Status‘ of ‘Pass

You can now go ahead and run the other jobs, e.g. ‘Synchronize master data‘:

4. Summary

You schedule jobs under the ‘Schedule‘ tab.
You see jobs and their statuses under the ‘Status‘ tab.
Resolve any issue with jobs that ‘Error‘ then try to re-run the schedule.
Jobs that have a status of ‘OnHold‘ won’t run until preceding jobs have had their errors resolved and they’ve run successfully.