Answered by:
CRM 3.0 Upgrade - Index problem

Question
-
Hi
I have come across an usual error message while upgrading crm 3.0 to crm 4.0. Upgrade gets fail during updating indexes in sql. it shows me below message
Error| System.Exception: Action Microsoft.Crm.Setup.Server.InstallDatabaseAction failed. ---> System.Data.SqlClient.SqlException: Cannot create a row of size 8198 which is greater than the allowable maximum of 8060.
Could not create constraint. See previous errors.
Warning! The maximum key length is 900 bytes. The index 'ndx_ContactCover' has maximum length of 2020 bytes. For some combination of large values, the insert/update operation will fail.I have also tried to upgrade without this index "ndx_ContactCover" but noticed CRM 4.0 upgrade created it again during upgrade.
Please suggest me what am I missing and what else shall I do?
Thanks
Wednesday, June 16, 2010 1:20 PM
Answers
-
Hi Faisal,
I recall running into something similar. The fix we used was to first change a couple crm 3 fields from varchar to text. The text fields are stored outside the 'row' so don't count in this limit. OR decrease the size of the varchar fields in crm 3.
Alex Fagundes - www.PowerObjects.com- Marked as answer by FaisalKhan01 Monday, July 5, 2010 1:15 PM
Wednesday, June 16, 2010 2:50 PM -
check your Contact entity for any custom fields of nvarchar type and try removing some or create ntext fields instead and put the data in those fields then delete the nvarchar custom fields. This is what Alex is suggesting I believe. The fields you listed are system fields and you can not remove those. You need to remove some of your custom fields.
Regards, Donna
        Windows Live Blog
- Marked as answer by Jim Glass Jr Friday, July 2, 2010 4:10 PM
Thursday, July 1, 2010 6:22 PM
All replies
-
Hi Faisal,
I recall running into something similar. The fix we used was to first change a couple crm 3 fields from varchar to text. The text fields are stored outside the 'row' so don't count in this limit. OR decrease the size of the varchar fields in crm 3.
Alex Fagundes - www.PowerObjects.com- Marked as answer by FaisalKhan01 Monday, July 5, 2010 1:15 PM
Wednesday, June 16, 2010 2:50 PM -
Hi Alex,
Thanks for your reply. I am actually not sure which particular field causes this error. My best guess would be those fields specified in index?
ndx_ContactCover (CRM 4 version) having these index coulms
FirstName Ascending nvarchar(50) 100
LastName Ascending nvarchar(50) 100
FullName Ascending nvarchar(160) 320
YomiFirstName Ascending nvarchar(150) 300
YomiLastName Ascending nvarchar(150) 300
YomiFullName Ascending nvarchar(450) 900while
ndx_ContactCover (CRM 3 version) having these index coulms
FirstName Ascending nvarchar(50) 100
LastName Ascending nvarchar(50) 100
FullName Ascending nvarchar(160) 320
Please suggestThanks
Wednesday, June 16, 2010 3:08 PM -
check your Contact entity for any custom fields of nvarchar type and try removing some or create ntext fields instead and put the data in those fields then delete the nvarchar custom fields. This is what Alex is suggesting I believe. The fields you listed are system fields and you can not remove those. You need to remove some of your custom fields.
Regards, Donna
        Windows Live Blog
- Marked as answer by Jim Glass Jr Friday, July 2, 2010 4:10 PM
Thursday, July 1, 2010 6:22 PM -
Thanks Alex and Donna. I did the same and managed to upgrade but now the problem is I have to transfer all data again :)
Many Thanks
Monday, July 5, 2010 1:17 PM