{ERROR RESOLTUION} IMPORT CRM 2011 DATABASE to CRM 2013

Recently we were in process for starting upgrade project and we have been doing multiple imports from 2011 environment to 2013 Development server. The reason we approached to do an import is to have some data along side customizations.

Recently while importing one such instance, we got the following error on log:

InnerException:

Microsoft.Crm.CrmException: Database having version 6.1.1.132 is not supported for upgraded.

at Microsoft.Crm.Setup.Database.DatabaseInstaller.ValidateUpgrade(CrmDbConnection connection, ReleaseInfo releaseInfo, Boolean throwIfNotUpgradeable)

at Microsoft.Crm.Setup.Database.DatabaseInstaller.ValidateUpgrade(DatabaseUtility database, ReleaseInfo releaseInfo, Boolean throwIfNotUpgradeable)

at Microsoft.Crm.Setup.Database.DatabaseInstaller.installInternal(Boolean isInstall)

at Microsoft.Crm.Setup.Database.DatabaseInstaller.Install(Int32 languageCode, String configurationFilePath, Boolean upgradeDatabase, Boolean isInstall)

at Microsoft.Crm.Setup.Database.DatabaseInstaller.Install(Int32 languageCode, String configurationFilePath, Boolean upgradeDatabase)

at Microsoft.Crm.Tools.Admin.InstallDatabaseAction.Do(IDictionary parameters)

at Microsoft.Crm.Setup.Shared.CrmAction.ExecuteAction(CrmAction action, IDictionary parameters, Boolean undo)

This seemed to be a very generic error and did not seem like any CRM specific one. On checking further it came up to be a case where the CRM organisation id we were trying to import was already part of configuration database (MSCRM_Config) .

Error Resolution:

Although it looks to be a big query and very complex work, in short it just updates all organisation id in your database to a new value prior to import.

Steps for Error resolution are as below:

1. Backup original database

2. Restore the original database to new one

3. Run this script on new database:

SELECT ‘ALTER TABLE ‘+QUOTENAME(name)+’ NOCHECK CONSTRAINT ALL’
FROM sysobjects WHERE xtype=’U’ and uid=1

declare @newid uniqueidentifier

select @newid = newid()

SELECT
        ‘Update ‘ + c.TABLE_SCHEMA + ‘.’ + c.TABLE_NAME + ‘ set ‘ + c.COLUMN_NAME +’ =”’ + +cast(@newid as varchar(40))+””
    FROM INFORMATION_SCHEMA.Columns c
        INNER JOIN INFORMATION_SCHEMA.Tables t
        ON c.TABLE_NAME = t.TABLE_NAME
        AND t.TABLE_TYPE = ‘BASE TABLE’
    WHERE DATA_TYPE = ‘uniqueidentifier’  and column_name=’organizationid’
SELECT ‘ALTER TABLE ‘+QUOTENAME(name)+’ CHECK CONSTRAINT ALL’
FROM sysobjects WHERE xtype=’U’ and uid=1

4. Run the Step 3 results on new database

5. Import organization from new database with different name than original organization

Hope it helps!

Advertisements

{Useful to know}CRM Forms loading too slow: Check OUT this USEFUL list

Often I hear people complaining on performance issues during form load of new versions of CRM: 2013 and 2015.

Here is a list I compiled over a time period of what should you be trying to look to increase performance apart from using Recommended hardware suggested by Microsoft.

Common configuration settings for Internet Explorer

Microsoft Dynamics CRM is a web-based application and uses Internet Explorer as the user interface to view, add, or edit information that you’ve stored in the CRM database. Make the following common Internet Explorer configuration settings to optimize your CRM experience.

Increase concurrent download sessions

By default, Internet Explorer 7 and earlier versions limit the number of files that you can download at a time to two. Internet Explorer 8 limits the number of files that you can download at a time to six.

The Microsoft Dynamics CRM application synchronously requests data to and from the CRM data center. Typically, you can easily exhaust the number of concurrent downloads when you are using CRM. To increase this limit, review KB article 282402: How do I configure Internet Explorer to download more than two files at one time.

Increase disk space for temporary Internet files

To make sure that Internet files for Microsoft Dynamics CRM are not being deleted, increase the disk space for temporary Internet files.

1.    Open Internet Explorer, and on the Tools menu, click or tap Internet Options.

2.    On the General tab, in the Browsing history section, click or tap Settings.

3.    Set the Disk space to use field to 350. The default value is 50.

4.    Click or tap OK, and then click or tap OK again.

Retain browsing history

To optimize your CRM experience, we recommend that you do not select the option to delete the browsing history when you exit from your browser. If you select this option, it deletes everything marked in your Browsing history settings, such as temporary Internet files, cookies, and history (by default, the check boxes for these options are selected). Deleting your temporary Internet files causes Internet Explorer to cache the files again, and deleting cookies signs you out of CRM.

1.    Open Internet Explorer, and on the Tools menu, click or tap Internet Options.

2.    Click or tap the General tab, and in the Browsing history section, make sure that the Delete browsing history on exit check box is cleared.

Apart from this, another useful list:

Check the below post that provides ways to optimize form load

https://community.dynamics.com/crm/f/117/t/108771.aspx Check the below post that provides ways to optimize form load

https://community.dynamics.com/crm/f/117/t/108771.aspx

1.) If this is onPrem, try setting omitVaryStar to true -> crmtipoftheday.com/…/if-form-load-is-slow-take-this-pill

2.) Enable WCF Compression -> blogs.msdn.com/…/enable-wcf-compression-to-improve-crm-2013-network-performance.aspx

3.) Use Performance Centre (Ctrl+Shift+Q) to find out the source of the bottle necks ->http://www.magnetismsolutions.com/blog/gregolsen/2014/07/21/microsoft-dynamics-crm-performance-center-form-load-analysis

4.) Use Chrome DevTools Network trace to single out the slow requests

DB Level

1.) Use SQL Server DMVs to isolate expensive queries and analyse whether you can improve performance using indexes -> blog.sqlauthority.com/…/sql-server-find-most-expensive-queries-using-dmv

1.) If this is onPrem, try setting omitVaryStar to true -> crmtipoftheday.com/…/if-form-load-is-slow-take-this-pill

2.) Enable WCF Compression -> blogs.msdn.com/…/enable-wcf-compression-to-improve-crm-2013-network-performance.aspx

3.) Use Performance Centre (Ctrl+Shift+Q) to find out the source of the bottle necks ->http://www.magnetismsolutions.com/blog/gregolsen/2014/07/21/microsoft-dynamics-crm-performance-center-form-load-analysis

4.) Use Chrome DevTools Network trace to single out the slow requests

DB Level

1.) Use SQL Server DMVs to isolate expensive queries and analyse whether you can improve performance using indexes -> blog.sqlauthority.com/…/sql-server-find-most-expensive-queries-using-dmv

This will definitely get your CRM working faster.

Hope it helps!


Check this out

Trying to Learn Dynamics CRM: Download!

Learn Dynamics CRM App on Google Play store