Thursday, December 12, 2013

IN Place CRM Upgrade 4.0 to 2011


IN Place Upgrade of CRM 4.0 to CRM 2011:


Active Directory related check


The following Active Directory groups are added as per CRM isntalltion. When the Active Directory domain is set to Native Mode, this group must be of the type Domain Local Security or Universal Security. So we have to check the present level of CRM 4.0 environment

Group
Description
PrivReportingGroup
Privileged Microsoft Dynamics CRM user group for reporting functions. This group is created during Microsoft Dynamics CRM Server Setup and configured during Microsoft Dynamics CRM Reporting Extensions Setup.
PrivUserGroup
Privileged Microsoft Dynamics CRM user group for special administrative functions; including CRMAppPool identity (domain user or Network Service). The users who configure Microsoft Dynamics CRM Server 2011 must be added to this group.
SQLAccessGroup
All server processes/service accounts that require access to SQL Server; including CRMAppPool identity (domain user or Network Service). Members of this group have db_owner permission on the Microsoft Dynamics CRM databases.
ReportingGroup
All Microsoft Dynamics CRM users are included in this group. This group is updated automatically as users are added and removed from Microsoft Dynamics CRM. By default, all Microsoft Dynamics CRM Reporting Services reports grant Browse permission to this group.

 

How to Check this?
1.      Get the GroupId’s using below SQL command on

use MSCRM_CONFIG

go

select '<GUID='+CAST(PrivilegeReportGroupId as Varchar(50))+'>' [PrivilegeReportGroupId],

'<GUID='+CAST(PrivilegeUserGroupId as Varchar(50))+'>'[PrivilegeUserGroupId],

'<GUID='+CAST(ReportingGroupId as Varchar(50))+'>'[ReportingGroupId],

'<GUID='+CAST(UserGroupId as Varchar(50))+'>'[UserGroupId],

'<GUID='+CAST(SqlAccessGroupId  as Varchar(50))+'>' [SqlAccessGroupId]

FROM ConfigSettings

 
2.      Check the Status of Group in AD using LDP.exe or AD search functionality

3.      If there is any change please update the level.


Data base check


Maximum number of attributes exceeded


If you have more than 1023 attributes defined for an entity, you must delete the additional attributes before you run the upgrade. The upgrade will fail with the following message if you have more than 1023 attributes.

CREATE VIEW failed because column 'column_name' in view 'view_name' exceeds the maximum of 1024 columns.

 

SELECT COUNT(*)

FROM INFORMATION_SCHEMA.COLUMNS

WHERE table_catalog = 'organization_MSCRM' -- the database

    AND table_schema = 'dbo' -- or whatever your schema is

    AND table_name = 'incident' -- select speecific table

Remove custom database objects


The Microsoft Dynamics CRM databases often change from one major release to the next because of database redesign. For example, the deletion service changed significantly from Microsoft Dynamics CRM 4.0 to Microsoft Dynamics CRM 2011 and Microsoft SQL Server procedures or database objects that depend on the Microsoft Dynamics CRM 4.0 deletion service job will not work after the upgrade.

We suggest that, if you have added custom database objects such as triggers, statistics, stored procedures, and certain indexes, you remove those objects from the configuration and organization databases. In many cases, Microsoft Dynamics CRM Server Setup displays a warning when these objects are detected.

How to Check this?

use <orgname>_MSCRM

go

select type,* from sys.objects Where type='p' and name not like 'p_%'

select type,* from sys.objects Where type = 'TR'

Data base cleanup


Clean Asynoperationbase Table. This will improve Upgrade performance


How to do this?

Run this Query against <ORGCRM>_mscrm
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

 

declare @DeleteRowCount int

Select @DeleteRowCount = 2000

declare @DeletedAsyncRowsTable table (AsyncOperationId uniqueidentifier not null primary key)

declare @continue int, @rowCount int

select @continue = 1

while (@continue = 1)

begin     

begin tran     

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, 31,32)    

       Select @rowCount = 0

      Select @rowCount = count(*) from @DeletedAsyncRowsTable

      select @continue = case when @rowCount <= 0 then 0 else 1 end     

        if (@continue = 1)        begin

            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 WorkflowWaitSubscriptionBase from WorkflowWaitSubscriptionBase WS, @DeletedAsyncRowsTable d

 where WS.AsyncOperationId = d.AsyncOperationID

            delete AsyncOperationBase From AsyncOperationBase A, @DeletedAsyncRowsTable d

            where A.AsyncOperationId = d.AsyncOperationId            

            delete @DeletedAsyncRowsTable     

end      

commit

end

DROP INDEX AsyncOperationBase.CRM_AsyncOperation_CleanupCompleted


Change/run deletion service


Change deletion service. This will improve Upgrade performance


How to do this?


USE MSCRM_CONFIG

UPDATE dbo.ScaleGroupOrganizationMaintenanceJobs

SET NextRunTime = getdate()

WHERE OperationType = 14

 Note: This is important make sure this service has been run properly. Otherwise all deleted records became in active state after Upgrade

Use

dbo.ScaleGroupOrganizationMaintenanceJobs to check the status of this service


Increase Timeout


Increase Timeout. It will dilimit the chances of Failure on Upgrade


How to do this?

 

Method 1: Add the OLEDBTimeout and the ExtendedTimeout registry subkeys to increase the time-out values
Warning Serious problems might occur if you modify the registry incorrectly by using Registry Editor or by using another method. These problems might require that you reinstall your operating system. Microsoft cannot guarantee that these problems can be solved. Modify the registry at your own risk.
1. Click Start, click Run, type regedit, and then click OK.
2. Locate the following registry subkey:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSCRM
3. Right-click MSCRM, point to New, and then click DWORD Value to create a new DWORD value.
4. Rename the DWORD value to the following value:
OLEDBTimeout
NOTE: This value is case sensitive
5. Right-click the DWORD value, and then click Modify.
6. In the Edit DWORD Value dialog box, type 86400 in the Value data box, click Decimal in the Base option, and then click OK.
Note According to the requirement of the computer that is running SQL server and the number of customization files, the value can be larger than 86400. The value of 86400 is equivalent to 24 hours. This should only be done temporarily or as a troubleshooting step. The recommended value of this is between 30 and 300. Leaving this setting too high can result in performance issues.
7. Right-click MSCRM, point to New, and then click DWORD Value to create a new DWORD value.
8. Rename the DWORD value to the following value:
ExtendedTimeout
9. Right-click the DWORD value, and then click Modify.
10. In the Edit DWORD Value dialog box, type 1000000 in the Value data box, and then click OK.
Notes
In the Value data box, you can type a value that is larger than 1,000,000. However, do not type a value that is larger than 2,147,483,647. This is hexadecimal 0x7FFFFFFF.
Important: If this key already exists, notice the current value. After you have completed the import or the upgrade for Microsoft Dynamics CRM, set the value of this key back to the original value or delete the key if it did not previously exist. The default OLEDBTimeout value is 30 seconds.
Method 2: Modify the parameters in two different Web.config files
1. Click Start, click All Programs, click Administrative Tools, and then click Internet Information Services (IIS) Manager.
2. Expand the server name, and then expand Web Sites.
3. Right-click the Microsoft CRM v3.0 Web site or the Microsoft CRM v4.0 Web site, and then click Open.
4. Right-click the Web.config file, click Open With, and then click Notepad.
5. In Notepad, locate the following line.
<httpRuntime executionTimeout="300" maxRequestLength="8192"/>
6. Change executionTimeout="3600" and change maxRequestLength="20000".
7. Save and then close the Web.config file.
8. In the directory in which you opened the Web.config file, open the MSCRMServices folder.
9. Right-click the Web.config file, click Open With, and then click Notepad.
10. In Notepad, locate the following line.
<httpRuntime maxRequestLength="8192"/>
11. Change maxRequestLength="20000".
12. Save and then close the Web.config file.
Important: After completing the action that requires the above changes to the web.config file, these parameters should be reset to their default values.


Verify /Remove Plugins


Plug-in registration verification


Before upgrading from Microsoft Dynamics CRM 4.0, you must verify that the same plug-in assembly has not been registered multiple times with the same or different metadata fields (AssemblyName, MajorVersion#, MinorVersion#, PublicKeyToken, Culture).

You can use the Plug-in Registration Tool for Microsoft Dynamics CRM 2011 to verify plug-in assembly registration information. The Plug-in Registration tool is provided as a source code sample in the Tools folder of the Microsoft Dynamics CRM SDK download. Review the instructions provided in the Tools/PluginRegistration/Readme.docx file for more information about the tool and how to build it.

How to find all plugins?

SELECT Name, CASE SourceType
         WHEN 0 THEN 'Database' WHEN 1 THEN 'Disk' WHEN 2 THEN 'GAC' END AS 'Location' FROM PluginAssembly
WHERE Name NOT LIKE 'CompiledWorkflow%'

 

Un Install SRS Connector


·         Uninstall Microsoft Dynamics CRM 4.0 Connector for SQL Server Reporting Services if it is installed on the same computer where Microsoft Dynamics CRM Server 2011 is installed.

Tasks to perform before the upgrade


·         Recommended that you apply the Latest Update Rollup for Microsoft Dynamics CRM 4.0.

·         Log on to your domain as a user who has administrator-level permission.

·         Make sure that the Microsoft Dynamics CRM server that you are upgrading is connected to the Internet.

·         Increase Paging Memory if you are using Virtual Machine

To run the upgrade, follow these steps


Log on to your domain as a user who has administrator-level permission.

·         Make sure that the Microsoft Dynamics CRM server that you are upgrading is connected to the Internet..

·         Uninstall Microsoft Dynamics CRM 4.0 Connector for SQL Server Reporting Services if it is installed on the same computer where Microsoft Dynamics CRM Server 2011 is installed.

 

1.     In the folder where the Microsoft Dynamics CRM files are located, move to the Server\amd64 folder, and then double-click SetupServer.exe.



2.     On the Welcome to Microsoft Dynamics CRM Setup page, we recommend that you click Get updates for Microsoft Dynamics CRM, to make sure that Setup has the most recent installation files. Click Next.

3.     On the Product Key Information page, type your product key in the Product key boxes, and then click Next.

4.      On the License Agreement page, review the information and if you accept the license agreement, click I accept this license agreement, and then click I Accept.

5.     If Setup detects that components are missing, the Install Required Components page appears.

·         If you have already installed the required components, this page will not appear.

·         If you have not installed the required components listed, you can install them now. Click Install. When the components are installed, the status column will change from Not Installed to Installed, and you can click Next to continue.



6.      On the Upgrade to Microsoft Dynamics CRM 2011 page, click Next to upgrade Microsoft Dynamics CRM.

 


Use service accounts for different services to Run. It is recommend to not use administrator for all services.

Tips:

·         Application Service. This service runs the Microsoft Dynamics CRM web application that is used to connect users to CRM data.

·         Deployment Web Service . Manages the deployment by using the methods described in the Microsoft Dynamics CRM 2011 Deployment Software Development Kit, such as create an organization or remove a Deployment Administrator role from a user.

·         Sandbox Processing Service . Enables an isolated environment to allow for the execution of custom code, such as plug-ins. This isolated environment reduces the possibility of custom code affecting the operation of the organizations in the Microsoft Dynamics CRM deployment.

·         Asynchronous Processing Service. Processes queued asynchronous events, such as bulk e-mail or data import.

 

Permission required to successful Upgrade for Service accounts

All Service account should have Domain Users membership

Asynchronous Service and Sandbox Processing Service “performance Log Users security group”

If you select to run the ASP.NET service under a domain user account that is not a domain administrator or a local administrator, you must set a local security policy after you install Microsoft Dynamics CRM Server 2011 for the ASP.NET service to work correctly. Ie you have to give permission to these accounts to run service locally by using group policy edit.

7.     On the Specify E-mail Router Settings page, in the E-mail Router server name box, type the name of the computer where the E-mail Router will be installed. This computer will route Microsoft Dynamics CRM e-mail messages. If you will not install the E-mail Router you can leave this box blank. However, if you install the E-mail Router later you must add the computer where the E-mail Router service is running when you use Local System, or if you use a domain user account, the account, to the PrivUserGroup security group. Click Next.


9.     On the Organization Upgrade page, verify the display name and unique name of the organization, and then click Next.



10.  On the Select Microsoft Update OptIn page, you must select either of the following options. For more information about the legal terms and privacy with Microsoft Update licensing see Windows Update FAQ.

·         Use Microsoft Update when I check for updates (recommended). By selecting this option, Microsoft Dynamics CRM Server 2011 will use the Microsoft Update settings on the computer.

·         I don’t want to use Microsoft update. You should only select this option if the computer uses another method to install updates such as by using Microsoft Windows Server Update Services (WSUS).

11.  The System Checks page appears. This page is a summary of all requirements and recommendations for a successful installation. Errors must be resolved before installation can continue. If no errors, or only warnings appear, you can continue with the installation. To do this, click Next.



12.  The Service Disruption Warning page appears. This page lists all services that will be stopped or restarted during Setup.






 

Note: All Marked items will change according to the environment details

13.  Review the Ready to Upgrade the Application page, click Back to correct any errors. When you are ready to continue, click Upgrade.

When Setup completes successfully, the Microsoft Dynamics CRM Server Setup completed page appears. If the Reporting Server instance that you specified during this Setup points to the local computer where Microsoft Dynamics CRM is installed, Setup provides an option to invoke Microsoft Dynamics CRM Reporting Extensions Setup.

14.  To install Microsoft Dynamics CRM Reporting Extensions on the computer now, select the Launch Microsoft Dynamics CRM Reporting Extensions Setup check box. Click Finish.

 



Note: make a close look on the memory usage and Disk Usage

Tip:

If Disk Usage is high and probability of out of space, Restrict SQL growth in fixed and define maximum growth of Log file in SQL server

 

To install the CRM Reporting Extensions, locate the Microsoft Dynamics CRM installation files, and follow these steps:

1.     In the ..\Server\amd64\SrsDataConnector folder, double-click SetupSrsDataConnector.exe.
 
2.     On the Welcome to Microsoft Dynamics CRM Reporting Extensions Setup page, select whether you want to update Microsoft Dynamics CRM Server Setup. We recommend that, if updates are available, you let Setup download the latest version. To do this, click Update installation files, wait until the update process is complete, and then click Next.
3.     On the License Agreement page, review the information and, if you accept the license agreement, click I accept this license agreement, and then click I Accept.
4.     If Setup detects that components are missing, the Install Required Components page appears.
a.     If you have already installed the required components, this page will not appear.
b.     If you have not installed the required components listed, you can install them now. Click Install. When the components are installed, the status column will change from Missing to Installed, and you can click Next to continue.
5.     On the Specify Configuration Database Server page, if you are using the default instance of the SQL Server, enter the name of the computer that is running SQL Server and contains the Microsoft Dynamics CRM configuration database that is named MSCRM_CONFIG, and then click Next.
 

6.      On the Specify SSRS Instance Name page, select a Microsoft SQL Server Reporting Services instance that will be used for Microsoft Dynamics CRM reporting, and then click Next.
 
 

7.     On the Select Microsoft Update OptIn page, select whether you want to use Microsoft Update for checking for updates for your Microsoft products, and click Next. We recommend that you use the Microsoft Update to check for updates because this keeps your computer up-to-date and secure.
8.     On the Select Installation Location page, click Browse, and select a path where you want to install CRM Reporting Extensions, and then click Next.
9.     The System Checks page appears. This page is a summary of the requirements for a successful CRM Reporting Extensions installation. Errors must be corrected before installation can continue. All errors must be resolved. If no errors or only warnings appear, you can continue with the installation. To do this, click Next.

Tip: It would be better to use separate service account for Reporting service. Otherwise some warning will populate in system Checkup
10.  Review the Ready to Install Microsoft Dynamics CRM Reporting Extensions page, and then click Back to correct any errors. When you are ready to continue, click Install.

11.  When Setup completes successfully, the Microsoft Dynamics CRM Reporting Extensions Setup Completed page appears. Click Finish.

12.  Install Report Authoring Extension

The reports will be published for the default organization.

 

Roll Up Installation

Install Update Rollup 6

 
Note: It might require Restart of the Server


 
 

Install Roll Up CRM 2011 rollup 15



 
 


Email Router Setup

 
 

Common Error’s

Error
---------------------------
Microsoft Dynamics CRM Setup
---------------------------
Action Microsoft.Crm.Setup.Server.GrantConfigDBDatabaseAccessAction failed.
The login already has an account under a different user name.
---------------------------
Retry   Cancel  
---------------------------
 
Resolution:
Usually this will be some duplicate account in database as well as server. Remove account from database and retry
 
Error:
Plugin is able to remove using Plugin registration tool which had a dependency error
Resolution: delete step manually and delete plugin assembly
    update PluginType
    set DeletionStateCode=2
    where Typename='AuditTrail.Plugin'
 

No comments: