Tuesday, 20 June 2017

Action Microsoft.Crm.Setup.Common.Analyzer +CollectAction failed. Fatal error during installation

When installing the Srs Data Connection (Microsoft Dynamics CRM Reporting Extensions), you may have experienced the following error:


"Action Microsoft.Crm.Setup.Common.Analyzer +CollectAction failed. Fatal error during installation OR Action Microsoft.Crm.Setup.Common.Analyzer+CollectAction failed. Fatal error during installation"

There are more than one option that you can use to fix this issue.

Solution 1

1. Check that you don't already have a version of the Srs Data Connector installed, if yes then uninstall, reboot and retry the install.

Solution 2

1. Open RegEdit and navigate to the following (please note that the GUID will vary depending on your CRM version)

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\Components\AA525E7FC7F524344B2B2650A4C6D64

2. Delete the key and Restart the Server.
3. Retry the Srs Data Connector install.

Solution 3

1. Download the latest Microsoft Dynamics CRM Server install files and attempt the install using the Srs Data Connector found within this build. This solution works if the first two did not.

Tuesday, 2 May 2017

SQL Server Reporting Services Account is a local user and is not supported

When installing the SQL Reporting Extensions for Microsoft Dynamics CRM, you may get the "SQL Server Reporting Services Account is a local user and is not supported" error.

This is easily resolved by changing the service account that the Reporting Service is using.
1. Open the Reporting Services Configuration Manager

2. Set the service account to use a dedicated account rather than the default "Report Server"

3. Shutdown the installer and then re-run, you should now see that it works fine. 


Sunday, 23 April 2017

MS CRM 2016 Install - Step by Step Instructions

Step by step instruction on how to install the latest version of Microsoft Dynamics CRM 2016 on-premise.

1. Click on the first option to trigger the server installation process. 


2. You can optionally check for updated installation components and then click next.


3. Enter your CRM License Key and click Next


4. You can change the installation directory, however I tend to leave this as the default.


5. Check which roles you want installed, as I am building a single VM I have selected both front end, back end and deployment services.


6. Ensure you have the first option selected and then specify the SQL Server you want to use for this installation. The required version of SQL is 2014 or above.


7. Browse and select the OU you want this system to reside and click next.


8. Set the service account details for each of the services, these will vary depending on which roles you selected in the previous roles selection dialog. You will also note that these are the same services from CRM 2013 and CRM 2015.


9. Specify your Organisation details and click continue.



10. After clicking next, the installation wizard will perform some checks. In most cases if you have not set the correct permissions for the service accounts, you will see something similar to the screen shot below.



It is just stating that the Application and Async service accounts need access to the performance log. To rectify this, just add the accounts to the "Performance Log Users" security group.

11. Then click the back button and then the next button to re-perform the checks. You should now see that the errors have gone. Click Next to continue.


12. Click Next on this screen, it is just to confirm that several services will be restarted.


13. Verify that you are happy with your selections and click next to perform the installation.


Note that you will need to install the reporting extensions, authoring tools and email router independently from the server install.

Thursday, 30 March 2017

How to reduce the size of the CRM Database

There are several tables within each CRM Organization database that can become very large. The size of the CRM database shouldn't be an issue within your production environment, as adequate space should be provisioned for this growth. 

These are as follows:

  • AsyncOperationBase
  • AuditBase
  • WorkflowWaitSubscriptionBase
  • PrincipleObjectBase

The problems typically occur in QA, UAT or DEV environments where you need to restore a prod like copy in order to work against real life data. Disk space can be a premium in these environments, thus having the ability to trim down the CRM database can be very useful.

You should leave the PrincipleObjectBase table alone as this deals with many aspects of record access, sharing etc.

Steps to Reduce your CRM Database size:

1. Execute the following SQL statement to remove redundant records from the AsyncOperationBase table:

IF EXISTS (SELECT name from sys.indexes
WHERE name = N'CRM_AsyncOperation_CleanupCompleted')
      DROP Index AsyncOperationBase.CRM_AsyncOperation_CleanupCompleted
GO
CREATE NONCLUSTERED INDEX CRM_AsyncOperation_CleanupCompleted
ON [dbo].[AsyncOperationBase] ([StatusCode],[StateCode],[OperationType])
GO

while(1=1)
begin
declare @DeleteRowCount int = 10000
declare @rowsAffected int
declare @DeletedAsyncRowsTable table (AsyncOperationId uniqueidentifier not null primary key)
insert into @DeletedAsyncRowsTable(AsyncOperationId)
Select top (@DeleteRowCount) AsyncOperationId from AsyncOperationBase
where 
  OperationType in (1, 9, 12, 25, 27, 10) 
  AND StateCode = 3 
  AND StatusCode in (30, 32)

 select @rowsAffected = @@rowcount 
 delete poa from PrincipalObjectAccess poa 
   join WorkflowLogBase wlb on
    poa.ObjectId = wlb.WorkflowLogId
   join @DeletedAsyncRowsTable dart on
    wlb.AsyncOperationId = dart.AsyncOperationId
delete WorkflowLogBase from WorkflowLogBase W, @DeletedAsyncRowsTable d
where 
  W.AsyncOperationId = d.AsyncOperationId             
 delete BulkDeleteFailureBase From BulkDeleteFailureBase B, @DeletedAsyncRowsTable d
where 
  B.AsyncOperationId = d.AsyncOperationId
delete BulkDeleteOperationBase From BulkDeleteOperationBase O, @DeletedAsyncRowsTable d
where 
  O.AsyncOperationId = d.AsyncOperationId
delete WorkflowWaitSubscriptionBase from WorkflowWaitSubscriptionBase WS, @DeletedAsyncRowsTable d
where 
  WS.AsyncOperationId = d.AsyncOperationID 
 delete AsyncOperationBase From AsyncOperationBase A, @DeletedAsyncRowsTable d
where 
  A.AsyncOperationId = d.AsyncOperationId
/*If not calling from a SQL job, use the WAITFOR DELAY*/
if(@DeleteRowCount > @rowsAffected)
  return
else
  WAITFOR DELAY '00:00:02.000'

end

2. Execute the following SQL statement to remove redundant records from the WorkflowWaitSubscriptionBase table:

Delete from workflowwaitsubscriptionbase 
where asyncoperationid in(Select asyncoperationidfrom AsyncOperationBase
where OperationType in (1, 9, 12, 25, 27, 10) 

AND StateCode = 3 AND StatusCode IN (30,32))

3. Delete the Audit Log partitions from within the CRM User Interface. 

Go to Settings>Auditing and then click on Audit Log Management

Select and delete each partition, the larger ones are indicated by the number of rows.

3. Finally you need to Shrink the CRM Organization SQL Database itself from within SQL Management Studio. This will recover all available space within the database file and reduce it's footprint on disk.

The summary screen will indicate how much available space will be recovered, by which the database file size also being reduced by the same amount. Then click OK and wait for the process to finish.

Action Microsoft.Crm.Setup.Common.Analyzer +CollectAction failed. Fatal error during installation

When installing the Srs Data Connection (Microsoft Dynamics CRM Reporting Extensions), you may have experienced the following error: ...