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
GO
SELECT Name, ErrorCode, Message, *
FROM AsyncOperation
WHERE OperationType = 7
ORDER BY CompletedOn DESC
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
http://support.microsoft.com/kb/907490
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
GO
SELECT Name, MatchingEntityMatchCodeTable, *
FROM DuplicateRule
n Example
SELECT COUNT(*)
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 |