Troubleshooting Microsoft CRM Asynchronous process jobs

Posted: September 10, 2010 in Microsoft Dynamics CRM, SQL
Tags: , , , ,

1.       If any of the job’s status has changed from “Publishing” to “Unpublished”, most likely there are exceptions that caused the job to fail.

a.       Run the SQL script to understand the cause

USE Microsoft_MSCRM


SELECT Name, ErrorCode, Message, *

FROM AsyncOperation

WHERE OperationType = 7


Message column should contain more descriptive message than what is displayed in the MS CRM UI.  If this still is unclear then

b.      Enable MS CRM Tracing by following instructions from the support link

Create three registry keys

TraceEnabled = 1

TraceDirectory = <CRM InstallPath>\CRMTrace

TraceRefresh = 0

2.       Understanding how many records still needs to be processed per Duplicate Detection Rule

a.       MS CRM generates tables with random names to store match code.

USE Microsoft_MSCRM


SELECT Name, MatchingEntityMatchCodeTable, *

FROM DuplicateRule

n  Example


FROM account

WHERE accountId NOT IN (SELECT ObjectId FROM <MatchingEntityMatchCodeTable from Duplicate Rule table>)

Similarly we can troubleshoot Microsoft CRM Workflows and other Asynchronous Jobs

Below are the list of Asynchronous Job types and there values

The AsyncOperationType class exposes the following members.

Field Value Description
ActivityPropagation 6
BulkDelete 13
BulkDeleteChild 23
BulkDetectDuplicates 8
BulkEmail 2
CalculateOrgMaxStorageSize 22
CalculateOrgStorageSize 18
CleanupInactiveWorkflowAssemblies 32
CollectOrgDBStats 19
CollectOrgSizeStats 20
CollectOrgStats 16
CollectSqmData 9
DatabaseLogBackup 26
DatabaseTuning 21
DeletionService 14
Event 1
FullTextCatalogIndex 25
Import 5
ImportingFile 17
IndexManagement 15
Parse 3
PersistMatchCode 12
PublishDuplicateRule 7
QuickCampaign 11
ReindexAll 30
ShrinkDatabase 28
ShrinkLogFile 29
StorageLimitNotification 31
Transform 4
UpdateContractStates 27
UpdateStatisticIntervals 24
Workflow 10

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s