This project has moved and is read-only. For the latest updates, please go here.

v3.1 Migration

v3.1 Migrate.png
  • Install and configure the plugin solution in CRM (v3 Setup).
  • You can let the migration tool handle disabling/enabling the correct plugin steps (Automatically Enable/Disable BinaryStorageOptions plugin checkbox) OR manual :
  • Open the Plugin Registration tool in the CRM SDK and disable all Binarage option steps.
    1. If you have any other plugins on Retrieve, RetrieveMultiple, Update? of annotation or activitymimeattachment, it is totally recommended to disable those as well. The CRM sandbox service just falls over if you don't after a while.
    2. Remember to re-enable these steps or the plugin won't work
  • Provide the server name and credentials (for AD, it uses the account that you run the migration tool as)
  • Click "Connect". This will check your connection with CRM and retrieve the BinaryStorageOptions configuration from CRM.
  • Provide your azure storage account name and the account key.
  • Pick migration direction
    • CRM -> External : Blobs will be moved to the outside storage provider
    • External -> CRM : Blobs will be moved FROM the outside storage provider back into CRM
  • Pick ThreadCount (the amount of concurrent connections (IOrganizationService) to CRM and storage provider).
  • Wait Delay : It waits every now and then to give CRM a breather.
  • Click "Migrate".
  • You can click cancel any time, it will stop as soon as it can

Notes

  • The v3.1.2 migration tool now MOVES attachments, but only copies annotation binaries externally, unless you select the "Move Annotations External" option. If you want to keep the annotation filesizes of annotations when migrating externally, do not use the "Move Annotations External" option, but you have to run the following script on your CRM sql database afterwards :
UPDATE [CRM_MSCRM].[dbo].[AnnotationBase]
SET [DocumentBody] = 'IA=='
WHERE [IsDocument] = 1

Or if the transaction logs get full when doing the update, you can try this pattern :
SET NOCOUNT ON;
 
DECLARE @id UNIQUEIDENTIFIER
DECLARE @count INT

DECLARE c CURSOR  
FOR SELECT [AnnotationId] FROM [AnnotationBase] WHERE [IsDocument] = 1

OPEN c
FETCH NEXT FROM c
INTO @id

SET @count = 0;

WHILE @@FETCH_STATUS = 0
BEGIN
	UPDATE [CRM_MSCRM].[dbo].[AnnotationBase]
	SET [DocumentBody] = 'IA=='
	WHERE [AnnotationId] = @id

	PRINT @count
	SET @count = @count + 1

	FETCH NEXT FROM c INTO @id
END

CLOSE c;
DEALLOCATE c;

Last edited Jun 9, 2016 at 10:23 PM by dawidpotgieter, version 12