You're likely aware that the Dynamics CRM 2011 Asynchronous Service regularly executes multiple internal maintenance jobs for each organization (database) and that these are scheduled initially at the time of organization creation on default frequencies (daily, monthly, etc.). Hopefully, you're also aware of the need to reschedule these jobs to execute during non-peak usage hours so as to minimize impact on system performance. If not, I urge you to review our previous blog post that discusses a tool created by one of our team members for this exact purpose, the CRM 2011 Maintenance Job Editor (http://crmjobeditor.codeplex.com).
Earlier we took an in-depth look at one of the more intriguing maintenance jobs in particular, the Deletion Service. But what about those other jobs? For those curious types like myself, here are the juicy details:
UPDATE: The DeletionService and ReindexAll operations were modified slightly in the UR12 release. Additional details have been noted in the table below
UPDATE #2: The DeletionService operation was modified again in the UR16 release. The table has been updated to reflect this change.
Maintenance Job |
Operation Code |
Purpose |
Default Frequency |
DeletionService |
14 |
In CRM 4.0, this operation had a more prominent role in that it was responsible for all physical data deletion which occurred asynchronously, but that role has been greatly diminished in 2011 since all entity data is physically deleted immediately. It now performs periodic cleanup of artifacts that were previously associated to deleted entity records such as matchcode, sync subscription, and POA records as well as the deleted object tracking records themselves.
UR12: With the UR12 release, the DeletionService maintenance operation now cleans up subscription tracking records for deleted metadata objects as they expire. UR16: With the UR16 release, the DeletionService maintenance operation added a step to cleanup orphaned attachment records. |
Daily |
IndexingManagement |
15 |
Validates that system-managed indexes exist for all entities and recreates any missing indexes. |
Daily |
ReindexAll |
30 |
Reorganizes/rebuilds fragmented indexes depending on the amount of fragmentation, and performs a DBCC SHRINKDATABASE command to release unused physical drive space for both database and transaction log files. The latter works well for CRM Online organizations where drive space allocation is governed, but for on-premise environments we generally recommend postponing this job to essentially disable it (next run 1/1/2099) and opt for implementing your own index maintenance routine that does not shrink the physical files.
UR12: With the UR12 release, this maintenance job has been modified to no longer shrink the database/log files as part of the operation. Thus any on-premise installation can now assess the necessity of this job based on the merits of your index maintenance strategy alone. |
Daily |
CleanupInactiveWorkflowAssemblies |
31 |
Seeks custom workflow assemblies that are no longer referenced in workflow rules or in-process jobs. Those unreferenced assemblies are then deleted. Consider the scenario where you register version 2.0 of a custom workflow assembly. You may update your rules to reference the new version, but some in-progress jobs may still be referencing version 1.0. Once those jobs have completed, this maintenance job will clean up the version 1.0 assembly that is no longer referenced by rules/jobs. |
Daily |
AuditPartitionCreation |
41 |
Alters the partitioning scheme for the auditbase table (SQL Enterprise only). |
Monthly |
CheckForLanguagePackUpdates |
42 |
Detects upgrades to language (MUI) packs and schedules additional async operations to perform individual language provisioning. |
Daily |
(UR10+) RefreshRowCountSnapshots |
46 |
Refreshes the Record Count snapshot statistics leveraged in UR10's enhanced query plans. |
Daily |
(UR10+) RefreReadSharingSnapshots |
47 |
Refreshes the POA read snapshot statistics leveraged in UR10's enhanced query plans. |
Daily |
Remember, since the above jobs are technically internal operations, they are subject to change without notice. We'll do our best to keep this article updated on any changes we identify in future updates. If you'd like to see the Deployment SDK extended to provide API's for managing the above operations, please make your voice heard by signing up for Dynamics Suggestions on Microsoft Connect and vote for this feature here! And, while you're on Dynamics Suggestions take some time to vote on other feedback or create feedback of your own.
Austin Jones