locked
CRM Update 0.1 - Upgrading error. RRS feed

  • Question

  • Hi

    Update installs ok, no errors.  However when you go to up update the organization you get the error below.  I did two tests.

    Updating an existing org, under Organizations, under version, the existing org is 7.0.0.3543.  Creating a new organization and updating, version of the new org is 7.0.0.3027.  All orgs indicate Update is available.

    Under servers Version is 7.0.0001.0129  CRM and SQL is on one box.

    Paul

    Microsoft.Crm.CrmException: Update Organization with Id=b4130b26-2e23-4801-acaa-907bd4bca4f2 failed with Exception:
    System.Exception: Error.ActionFailed Microsoft.Crm.Tools.Admin.InstallDatabaseUpdatesAction ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Data.SqlClient.SqlException: The current transaction cannot be committed and cannot support operations that write to the log file. Roll back the transaction.
    Uncommittable transaction is detected at the end of the batch. The transaction is rolled back.
       at Microsoft.Crm.Metadata.IndexAndConstraintManagementService.RecreateIndexesInternal(Dictionary`2 indexesToRecreate, IIndexMetadataProvider metadata, ISqlExecutionContext sqlContext)
       at Microsoft.Crm.Metadata.IndexAndConstraintManagementService.RecreateIndexes(IIndexMetadataProvider metadata, ISqlExecutionContext sqlContext, Func`2 recreateIndex)
       at Microsoft.Crm.Setup.IndexAndConstraintUpgradeService.RestoreIndexesAndConstraintsInternal(IIndexMetadataProvider metadata, ISqlExecutionContext sqlContext, Func`2 recreateIndex)
       at Microsoft.Crm.Setup.MetadataPatchService.ProcessIndexDiffs(IIndexDiffManager indexDiffManager, ISqlExecutionContext context, HashSet`1 newEntities)
       at Microsoft.Crm.Setup.MetadataPatchService.ProcessDiffSet(MetadataPatchDiffSet diffSet, Int32 lcid, ExecutionContext context)
       at Microsoft.Crm.Setup.MetadataPatchService.ProcessMetadataDiffFile(String targetVersion, ExecutionContext context)
       at Microsoft.Crm.Setup.DiffBuilder.UpdateMetadata(String targetVersion)
       --- End of inner exception stack trace ---
       at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
       at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
       at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
       at System.RuntimeType.InvokeMember(String name, BindingFlags bindingFlags, Binder binder, Object target, Object[] providedArgs, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParams)
       at Microsoft.Crm.Setup.Database.DllMethodAction.Execute(Guid organizationId)
       at Microsoft.Crm.Setup.Database.DatabaseInstaller.ExecuteReleases(ReleaseInfo releaseInfo, Boolean isInstall)
       at Microsoft.Crm.Setup.Database.DatabaseInstaller.Install(Int32 languageCode, String configurationFilePath, Boolean upgradeDatabase, Boolean isInstall)
       at Microsoft.Crm.Setup.Database.DatabaseInstaller.InstallUpdate(String configurationFilePath, Boolean upgradeDatabase)
       at Microsoft.Crm.Setup.Common.Update.DBUpdateDatabaseInstaller.ApplyDBUpdates(Guid orgId)
       at Microsoft.Crm.Tools.Admin.InstallDatabaseUpdatesAction.ApplyDBUpdatesInternal(Guid orgId, String orgUniqueName, String releaseFilePath, Boolean ignoreErrors)
       at Microsoft.Crm.Tools.Admin.InstallDatabaseUpdatesAction.ApplyDBUpdates(Guid orgId, String orgUniqueName, OrganizationOperationType operationType)
       at Microsoft.Crm.Tools.Admin.InstallDatabaseUpdatesAction.Do(IDictionary parameters)
       at Microsoft.Crm.Setup.Shared.CrmAction.ExecuteAction(CrmAction action, IDictionary parameters, Boolean undo)

    Thursday, April 16, 2015 8:09 PM

All replies

  • The issue appears when the update process creates the index cndx_BusinessDataLocalizedLabel. This is a known cause which is under investigation internally. Currently it seems to plan to release in CRM 2015 SP1
    Thursday, April 30, 2015 7:45 AM
  • Wilson

    Thanks for posting. I'm interested in your reply, as the original post is for a Crm OnPremise installation, whereas I thought CRM 2015 SP1 (aka v. 7.1) was going to be for Crm Online only. Do you know when this might be fixed for OnPremise ?

    David


    Microsoft CRM MVP - http://mscrmuk.blogspot.com/ http://www.excitation.co.uk

    Thursday, April 30, 2015 10:12 AM
    Moderator
  • Thanks Wilson for your reply. So, Microsoft released Update 0.1 that can be installed on-premise while organizations can't be updated ?!

    Can we get any of the benefits of this update without updating the CRM organizations ??


    Being superior is possible, just Work more and more

    Tuesday, May 5, 2015 1:05 PM
  • https://community.dynamics.com/crm/f/117/t/158085?pi51685=2#responses

    1. Make a backup of the file MetadataDiffs.xml from “C:\Program Files\Microsoft Dynamics CRM\Setup\Serviceability\Latest\Actions_Org\Install”

    2. Open the file MetadataDiffs.xml from “C:\Program Files\Microsoft Dynamics CRM\Setup\Serviceability\Latest\Actions_Org\Install”

    3. Remove the entry about the index “cndx_BusinessDataLocalizedLabel”. This is found at the very end of the file:

       <index Name="cndx_BusinessDataLocalizedLabel">

         <EntityId>4ba1569e-3c9c-4d9f-99ea-b61fb08d7f97</EntityId>

         <IsClustered>1</IsClustered>

         <IsUnique>1</IsUnique>

         <IndexType>6</IndexType>

        <IsPrimaryKey>0</IsPrimaryKey>

         <attributes>

           <attribute AttributeId="d88e1df3-b5b3-42f3-9ffa-007f22951dd4" IsSystemManaged="1" order="0" />

           <attribute AttributeId="bb23d3c8-8d18-40d3-9519-66101a8cae34" IsSystemManaged="1" order="1" />

           <attribute AttributeId="976e1053-5faa-4c3f-be6e-669acfec9d5a" IsSystemManaged="1" order="2" />

           <attribute AttributeId="e81341c4-4d4a-4977-98eb-6597fcde2cc4" IsSystemManaged="1" order="3" />

         </attributes>

       </index>

    4.Close Deployment Manager

    5. Start Deployment Manager

    6. Start the organization update from Deployment manager.

    7. Run the following query on the organization DB to manually recreate the index.

    IF EXISTS (SELECT * FROM sys.indexes WHERE name = 'cndx_BusinessDataLocalizedLabel' AND OBJECT_NAME(object_id) = 'BusinessDataLocalizedLabelBase') DROP INDEX [cndx_BusinessDataLocalizedLabel] ON [BusinessDataLocalizedLabelBase];

    IF NOT EXISTS (SELECT * FROM sys.indexes WHERE NAME = 'cndx_BusinessDataLocalizedLabel' AND OBJECT_NAME(object_id) = 'BusinessDataLocalizedLabelBase')

    BEGIN TRY

     CREATE UNIQUE CLUSTERED INDEX [cndx_BusinessDataLocalizedLabel] ON [BusinessDataLocalizedLabelBase]([ObjectId] ASC, [ObjectIdTypeCode] ASC, [ObjectColumnNumber] ASC, [LanguageId] ASC) WITH (FILLFACTOR = 80, MAXDOP = 4, SORT_IN_TEMPDB = ON, ONLINE = ON)

    END TRY

    BEGIN CATCH

     CREATE UNIQUE CLUSTERED INDEX [cndx_BusinessDataLocalizedLabel] ON [BusinessDataLocalizedLabelBase]([ObjectId] ASC, [ObjectIdTypeCode] ASC, [ObjectColumnNumber] ASC, [LanguageId] ASC) WITH (FILLFACTOR = 80, MAXDOP = 4, SORT_IN_TEMPDB = ON)

    END CATCH

    8. Restore the file MetadataDiffs.xml to its original state using the backup taken at step 1.

    • Proposed as answer by F.Kuyler Thursday, May 21, 2015 9:55 AM
    Thursday, May 21, 2015 9:54 AM