Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Greg Fyans 140 posts 342 karma points
    Aug 09, 2017 @ 11:12
    Greg Fyans
    0

    "Cannot insert duplicate key row in object dbo.umbracoNode" upgrading 7.5.x to 7.6.x

    I'm trying to upgrade from 7.5.9 to 7.6.5, but I'm receiving the following error during the upgrade wizard:

    The database failed to upgrade. ERROR: The database configuration failed with the following message: Cannot insert duplicate key row in object 'dbo.umbracoNode' with unique index 'IXumbracoNodeuniqueID'. The duplicate key value is (c7cc078b-6fdc-390a-a864-c27b17da2ca9). The statement has been terminated. Please check log file for additional information (can be found in '/App_Data/Logs/UmbracoTraceLog.txt')

    That unique ID does not exist in the umbracoNode table, before or after trying to run the upgrade. If I run it again, I get the same error with the same unique ID.

    The umbracoTraceLog doesn't tell me much more other than where the exception is being thrown:

    2017-08-09 12:11:00,356 [81] ERROR Umbraco.Web.Install.Controllers.InstallApiController - Installation step DatabaseUpgrade failed. System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> Umbraco.Web.Install.InstallException: The database failed to upgrade. ERROR: The database configuration failed with the following message: Cannot insert duplicate key row in object 'dbo.umbracoNode' with unique index 'IXumbracoNodeuniqueID'. The duplicate key value is (c7cc078b-6fdc-390a-a864-c27b17da2ca9). The statement has been terminated. Please check log file for additional information (can be found in '/AppData/Logs/UmbracoTraceLog.txt') at Umbraco.Web.Install.InstallSteps.DatabaseUpgradeStep.Execute(Object model) --- 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 Umbraco.Web.Install.Controllers.InstallApiController.ExecuteStep(InstallSetupStep step, JToken instruction) at Umbraco.Web.Install.Controllers.InstallApiController.PostPerformInstall(InstallInstructions installModel) 2017-08-09 12:11:00,356 [81] INFO Umbraco.Web.Install.Controllers.InstallApiController - Step completed (took 10722ms) 2017-08-09 12:11:00,357 [81] ERROR Umbraco.Web.Install.Controllers.InstallApiController - An error occurred during installation step DatabaseUpgrade System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> Umbraco.Web.Install.InstallException: The database failed to upgrade. ERROR: The database configuration failed with the following message: Cannot insert duplicate key row in object 'dbo.umbracoNode' with unique index 'IXumbracoNodeuniqueID'. The duplicate key value is (c7cc078b-6fdc-390a-a864-c27b17da2ca9). The statement has been terminated. Please check log file for additional information (can be found in '/AppData/Logs/UmbracoTraceLog.txt') at Umbraco.Web.Install.InstallSteps.DatabaseUpgradeStep.Execute(Object model) --- 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 Umbraco.Web.Install.Controllers.InstallApiController.ExecuteStep(InstallSetupStep step, JToken instruction) at Umbraco.Web.Install.Controllers.InstallApiController.PostPerformInstall(InstallInstructions installModel)

    Any ideas? I'm at a loss here.

  • Greg Fyans 140 posts 342 karma points
    Aug 09, 2017 @ 11:41
    Greg Fyans
    0

    OK, I decided to drop the index just to get things moving, and now I get a different error:

    The database failed to upgrade. ERROR: The database configuration failed with the following message: The default schema does not exist. Please check log file for additional information (can be found in '/App_Data/Logs/UmbracoTraceLog.txt')

    And in the logfile:

    2017-08-09 12:36:47,820 [119] INFO Umbraco.Core.DatabaseContext - The database schema validation produced the following summary: The following tables were found in the database, but are not in the current schema: UFFieldConditions,UFFieldConditionRules,UFFieldSettings,UFFormStates,UFPrevalues,UFPrevalueSources,UFPrevalueSourceSettings,UFRecordFields,UFRecordDataBit,UFRecordDataDateTime,UFRecordDataInteger,UFRecordDataLongString,UFRecordDataString,UFRecords,MediaProtectIndex,UFSettings,MediaProtectAccess,UFUserFormSecurity,UFUserSecurity,UFWorkflowExecutionStates,UFWorkflows,UFWorkflowsToForms,umbracoDeployChecksum,umbracoDeployDependency,ConciergeLockUnLock,icUrlTracker,MediaProtectLog,UFForms,UFDataSources,UFDataSourceMappings,UFPages,UFFieldsets,UFFields,umbracoLock

    The following columns were found in the database, but are not in the current schema: UFFieldConditions,Id,UFFieldConditions,Field,UFFieldConditions,Enabled,UFFieldConditions,ActionType,UFFieldConditions,LogicType,UFFieldConditionRules,Id,UFFieldConditionRules,FieldCondition,UFFieldConditionRules,Field,UFFieldConditionRules,Operator,UFFieldConditionRules,Value,UFFieldSettings,Field,UFFieldSettings,Key,UFFieldSettings,Value,UFFormStates,State,UFPrevalues,Id,UFPrevalues,Field,UFPrevalues,Value,UFPrevalues,SortOrder,UFPrevalueSources,Id,UFPrevalueSources,Name,UFPrevalueSources,Type,UFPrevalueSourceSettings,PrevalueProvider,UFPrevalueSourceSettings,Key,UFPrevalueSourceSettings,Value,UFRecordFields,Key,UFRecordFields,FieldId,UFRecordFields,Record,UFRecordFields,Alias,UFRecordFields,DataType,UFRecordDataBit,Id,UFRecordDataBit,Key,UFRecordDataBit,Value,UFRecordDataDateTime,Id,UFRecordDataDateTime,Key,UFRecordDataDateTime,Value,UFRecordDataInteger,Id,UFRecordDataInteger,Key,UFRecordDataInteger,Value,UFRecordDataLongString,Id,UFRecordDataLongString,Key,UFRecordDataLongString,Value,UFRecordDataString,Id,UFRecordDataString,Key,UFRecordDataString,Value,UFRecords,Id,UFRecords,Form,UFRecords,Created,UFRecords,Updated,UFRecords,CurrentPage,UFRecords,UmbracoPageId,UFRecords,IP,UFRecords,MemberKey,UFRecords,UniqueId,UFRecords,State,UFRecords,RecordData,MediaProtectIndex,IndexId,MediaProtectIndex,NodeId,MediaProtectIndex,UmbracoFolder,MediaProtectIndex,IndexDateTime,UFSettings,Id,UFSettings,Key,UFSettings,Value,MediaProtectAccess,Id,MediaProtectAccess,NodeGuid,MediaProtectAccess,LoginNodeGuid,MediaProtectAccess,NoAccessNodeGuid,MediaProtectAccess,ProtectionType,MediaProtectAccess,UserName,MediaProtectAccess,Roles,MediaProtectAccess,LastUpdateDate,UFUserFormSecurity,User,UFUserFormSecurity,Form,UFUserFormSecurity,HasAccess,UFUserFormSecurity,SecurityType,UFUserFormSecurity,AllowInEditor,UFUserFormSecurity,Id,UFUserSecurity,User,UFUserSecurity,ManageDataSources,UFUserSecurity,ManagePreValueSources,UFUserSecurity,ManageWorkflows,UFUserSecurity,ManageForms,UFUserSecurity,Id,UFWorkflowExecutionStates,Workflow,UFWorkflowExecutionStates,State,UFWorkflowExecutionStates,Form,UFWorkflows,Id,UFWorkflows,Name,UFWorkflows,Type,UFWorkflows,SortOrder,UFWorkflows,Active,UFWorkflows,Form,UFWorkflows,ExecutesOn,UFWorkflowsToForms,Workflow,UFWorkflowsToForms,Form,umbracoDeployChecksum,id,umbracoDeployChecksum,entityType,umbracoDeployChecksum,entityGuid,umbracoDeployChecksum,entityPath,umbracoDeployChecksum,localChecksum,umbracoDeployChecksum,compositeChecksum,umbracoDeployDependency,sourceId,umbracoDeployDependency,targetId,umbracoDeployDependency,mode,ConciergeLockUnLock,ticketId,ConciergeLockUnLock,nodeId,ConciergeLockUnLock,userId,ConciergeLockUnLock,Datestamp,ConciergeLockUnLock,Status,ConciergeLockUnLock,Comment,icUrlTracker,Id,icUrlTracker,OldUrl,icUrlTracker,OldUrlQueryString,icUrlTracker,OldRegex,icUrlTracker,RedirectRootNodeId,icUrlTracker,RedirectNodeId,icUrlTracker,RedirectUrl,icUrlTracker,RedirectHttpCode,icUrlTracker,RedirectPassThroughQueryString,icUrlTracker,ForceRedirect,icUrlTracker,Notes,icUrlTracker,Is404,icUrlTracker,Referrer,icUrlTracker,Inserted,MediaProtectLog,LogId,MediaProtectLog,MediaId,MediaProtectLog,Path,MediaProtectLog,Protected,MediaProtectLog,UserName,MediaProtectLog,UserIP,MediaProtectLog,LogDateTime,UFForms,Id,UFForms,Name,UFForms,Created,UFForms,ManualApproval,UFForms,GotoPageOnSubmit,UFForms,MessageOnSubmit,UFForms,DataSource,UFForms,ShowValidationSummary,UFForms,HideFieldValidation,UFForms,RequiredErrorMessage,UFForms,InvalidErrorMessage,UFForms,FieldIndicationType,UFForms,Indicator,UFForms,Archived,UFForms,StoreRecordsLocally,UFForms,DisableDefaultStylesheet,UFForms,Entries,UFForms,Views,UFDataSources,Id,UFDataSources,Type,UFDataSources,Name,UFDataSourceMappings,DataSource,UFDataSourceMappings,DataSourceField,UFDataSourceMappings,Form,UFDataSourceMappings,PrevalueTable,UFDataSourceMappings,PrevalueKeyField,UFDataSourceMappings,PrevalueValueField,UFDataSourceMappings,DataType,UFDataSourceMappings,DefaultValue,UFPages,Id,UFPages,Form,UFPages,SortOrder,UFPages,Caption,UFFieldsets,Id,UFFieldsets,Page,UFFieldsets,SortOrder,UFFieldsets,Caption,UFFields,Id,UFFields,Fieldset,UFFields,Fieldtype,UFFields,PreValueProvider,UFFields,RegEx,UFFields,Mandatory,UFFields,SortOrder,UFFields,Caption,UFFields,DataSourceField,UFFields,ToolTip,UFFields,DefaultValue,UFFields,RequiredErrorMessage,UFFields,InvalidErrorMessage,cmsMacro,uniqueId,cmsMacroProperty,uniquePropertyId,umbracoRelationType,typeUniqueId,umbracoLock,id,umbracoLock,value,umbracoLock,name

    The following constraints (Primary Keys, Foreign Keys and Indexes) were found in the database, but are not in the current schema: FKcmsContentumbracoNode,FKcmsContentTypeumbracoNode,FKcmsContentVersioncmsContent,FKcmsContentXmlcmsContent,FKcmsDataTypeumbracoNode,FKcmsDataTypePreValuescmsDataType,FKcmsDocumentcmsContent,FKcmsDocumentcmsTemplate,FKcmsDocumentumbracoNode,FKcmsDocumentTypecmsContentType,FKcmsDocumentTypecmsTemplate,FKcmsDocumentTypeumbracoNode,FKcmsLanguageTextcmsDictionary,FKcmsMacroPropertycmsMacro,FKcmsMembercmsContent,FKcmsMemberumbracoNode,FKcmsMember2MemberGroupcmsMember,FKcmsMember2MemberGroupumbracoNode,FKcmsMemberTypecmsContentType,FKcmsMemberTypeumbracoNode,FKcmsPreviewXmlcmsContent,FKcmsPreviewXmlcmsContentVersion,FKcmsPropertyDatacmsPropertyType,FKcmsPropertyDataumbracoNode,FKcmsPropertyTypecmsContentType,FKcmsPropertyTypecmsDataType,FKcmsPropertyTypecmsTab,FKcmsTabcmsContentType,FKcmsTagRelationshipumbracoNodeid,FKcmsTaskcmsTaskType,FKcmsTaskumbracoNode,FKUFDataSourceMappingsUFDataSources,FKUFDataSourceMappingsUFForms,FKUFFieldUFFieldsets,FKUFFieldConditionRulesUFFieldConditions,FKUFFieldConditionRulesUFFields,FKUFFieldConditionsUFFields,FKUFFieldsetsUFPages,FKUFFieldSettingsUFFields,FKUFPagesUFForms,FKUFPrevaluesUFFields,FKUFPrevalueSettingsUFPrevalueProviders,FKUFRecordDataBitUFRecordFieldsKey,FKUFRecordDataDateTimeUFRecordFieldsKey,FKUFRecordDataIntegerUFRecordFieldsKey,FKUFRecordDataLongStringUFRecordFieldsKey,FKUFRecordDataStringUFRecordFieldsKey,FKUFWorkflowExecutionStatesUFFormStates,FKUFWorkflowsUFForms,FKumbracoDeployDependencyumbracoDeployChecksumid1,FKumbracoDeployDependencyumbracoDeployChecksumid2,FKumbracoDomainsumbracoNode,FKumbracoExternalLoginumbracoUserid,FKumbracoNodeumbracoNode,FKumbracoRelationumbracoRelationType,FKumbracoUser2NodeNotifyumbracoNode,FKumbracoUser2NodeNotifyumbracoUser,FKumbracoUser2NodePermissionumbracoNode,FKumbracoUser2NodePermissionumbracoUser,FKuseruserType,FKumbracoNodeumbracoNodeid,FKcmsContentTypeumbracoNodeid,FKcmsContentumbracoNodeid,FKcmsContentVersioncmsContentnodeId,FKcmsDocumentumbracoNodeid,FKcmsDocumentcmsContentnodeId,FKcmsDocumentcmsTemplatenodeId,FKcmsDocumentTypeumbracoNodeid,FKcmsDocumentTypecmsContentTypenodeId,FKcmsDocumentTypecmsTemplatenodeId,FKcmsDataTypeumbracoNodeid,FKcmsDataTypePreValuescmsDataTypenodeId,FKcmsLanguageTextcmsDictionaryid,FKumbracoDomainsumbracoNodeid,FKcmsMacroPropertycmsMacroid,FKcmsMemberTypecmsContentTypenodeId,FKcmsMemberTypeumbracoNodeid,FKcmsMembercmsContentnodeId,FKcmsMemberumbracoNodeid,FKcmsMember2MemberGroupcmsMembernodeId,FKcmsMember2MemberGroupumbracoNodeid,FKcmsContentXmlcmsContentnodeId,FKcmsPreviewXmlcmsContentnodeId,FKcmsPreviewXmlcmsContentVersionVersionId,FKcmsPropertyTypeGroupcmsContentTypenodeId,FKcmsPropertyTypecmsDataTypenodeId,FKcmsPropertyTypecmsContentTypenodeId,FKcmsPropertyTypecmsPropertyTypeGroupid,FKcmsPropertyDataumbracoNodeid,FKcmsPropertyDatacmsPropertyTypeid,FKumbracoRelationumbracoRelationTypeid,FKcmsTagRelationshipcmsTagsid,FKumbracoUserumbracoUserTypeid,FKcmsTaskcmsTaskTypeid,FKcmsTaskumbracoNodeid,FKcmsContentType2ContentTypeumbracoNodeparent,FKcmsContentType2ContentTypeumbracoNodechild,FKumbracoUser2appumbracoUserid,FKumbracoUser2NodeNotifyumbracoUserid,FKumbracoUser2NodeNotifyumbracoNodeid,FKumbracoUser2NodePermissionumbracoUserid,FKumbracoUser2NodePermissionumbracoNodeid,FKumbracoRedirectUrlumbracoNodeuniqueID,PKcmsConte3213E83F434ECFAF,PKMediaPro5E54864868487DD7,PKcmsTab,PKConciergeLockUnLock,PKdomains,PKicUrlTracker,PKlanguage,PKmacro,PKmacroProperty,PKMediaProtectAccess,PKMediaProtectIndex,PKtemplates,PKUFDataSourceMappings,PKUFDataSources,PKUFField,PKUFFieldConditionRules,PKUFFieldConditions,PKUFFieldsets,PKUFForms,PKUFFormStates,PKUFPages,PKUFPrevalueProviders,PKUFPrevalues,PKUFPrevalueSettings,PKUFRecordDataBit,PKUFRecordDataDateTime,PKUFRecordDataInteger,PKUFRecordDataLongString,PKUFRecordDataString,PKUFRecordFields,PKUFRecords,PKUFUserFormSecurity,PKUFUserSecurity,PKUFWorkflowExecutionStates,PKUFWorkflows,PKUFWorkflowsToForms,PKumbracoDeployChecksum,PKumbracoDeployDependency,PKumbracoMigrations,PKuserType,PKcmsTemplate,PKcmsContentVersion,PKumbracoLanguage,PKumbracoDomains,PKcmsMacro,PKcmsMacroProperty,PKcmsPropertyTypeGroup,PKumbracoUserType,PKumbracoMigration,PKumbracoLock,IXcmsContentVersion,IXcmsDataType,IXcmsDictionary,IXcmsTaskType,IXcmsTemplate,IXumbracoUser,IXumbracoNodeTrashed,IXumbracoNodeParentId,IXumbracoNodePath,IXumbracoNodeUniqueID,IXumbracoNodeObjectType,IXcmsContentTypeicon,IXcmsTemplatenodeId,IXcmsContentVersionContentId,IXcmsContentVersionVersionId,IXcmsDocumentpublished,IXcmsDocumentnewest,IXcmsDataTypenodeId,IXcmsDictionaryid,IXumbracoLanguagelanguageISOCode,IXumbracoLog,IXcmsMacroUniqueId,IXcmsMacroPropertyAlias,IXcmsMacroPropertyUniquePropertyId,IXcmsMacroPropertyAlias,IXcmsMemberLoginName,IXcmsPropertyTypeGroupUniqueID,IXcmsPropertyTypeUniqueID,IXcmsPropertyData1,IXcmsPropertyData2,IXcmsPropertyData3,IXumbracoRelationTypeUniqueId,IXumbracoRelationTypename,IXumbracoRelationTypealias,IXumbracoRelationparentChildType,IXcmsTags,IXumbracoUseruserLogin,IXcmsTaskTypealias,IXumbracoUser2NodePermissionnodeId,IXcomputerName,IXumbracoServerisActive,IXumbracoAccessnodeId,IXumbracoAccessRule,IXumbracoMigration,IXumbracoRedirectUrl

    The following indexes were found in the database, but are not in the current schema: IXIcon,IXcmsContentVersion,IXcmsDataType,IXcmsDictionary,IXcmsMacroAlias,IXcmsPropertyData,IXcmsTaskType,IXcmsTemplate,IXicUrlTracker,IXIndexNodeId,IXIndexUmbracoFolder,IXumbracoDeployChecksum,IXumbracoUser,IXumbracoNodePath,IXumbracoNodeUniqueID,IXcmsContentTypeicon,IXcmsTemplatenodeId,IXcmsContentVersionVersionId,IXcmsDataTypenodeId,IXumbracoLanguagelanguageISOCode,IXcmsMacroUniqueId,IXcmsMacroPropertyAlias,IXcmsMacroPropertyUniquePropertyId,IXcmsMemberLoginName,IXumbracoRelationTypeUniqueId,IXumbracoRelationTypename,IXumbracoRelationTypealias,IXumbracoRelationparentChildType,IXumbracoUseruserLogin,IXcmsTaskTypealias,IXumbracoUser2NodePermissionnodeId,IXumbracoMigration

    The following unknown constraints (Primary Keys, Foreign Keys and Indexes) were found in the database, but are not in the current schema: cmsTags_cmsTagRelationship

    2017-08-09 12:36:47,820 [119] ERROR Umbraco.Web.Install.Controllers.InstallApiController - Installation step DatabaseUpgrade failed. System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> Umbraco.Web.Install.InstallException: The database failed to upgrade. ERROR: The database configuration failed with the following message: The default schema does not exist. Please check log file for additional information (can be found in '/AppData/Logs/UmbracoTraceLog.txt') at Umbraco.Web.Install.InstallSteps.DatabaseUpgradeStep.Execute(Object model) --- 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 Umbraco.Web.Install.Controllers.InstallApiController.ExecuteStep(InstallSetupStep step, JToken instruction) at Umbraco.Web.Install.Controllers.InstallApiController.PostPerformInstall(InstallInstructions installModel) 2017-08-09 12:36:47,821 [119] INFO Umbraco.Web.Install.Controllers.InstallApiController - Step completed (took 18665ms) 2017-08-09 12:36:47,821 [119] ERROR Umbraco.Web.Install.Controllers.InstallApiController - An error occurred during installation step DatabaseUpgrade System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> Umbraco.Web.Install.InstallException: The database failed to upgrade. ERROR: The database configuration failed with the following message: The default schema does not exist. Please check log file for additional information (can be found in '/AppData/Logs/UmbracoTraceLog.txt') at Umbraco.Web.Install.InstallSteps.DatabaseUpgradeStep.Execute(Object model) --- 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 Umbraco.Web.Install.Controllers.InstallApiController.ExecuteStep(InstallSetupStep step, JToken instruction) at Umbraco.Web.Install.Controllers.InstallApiController.PostPerformInstall(InstallInstructions installModel)

    Progress. I think.

  • Greg Fyans 140 posts 342 karma points
    Aug 09, 2017 @ 11:57
    Greg Fyans
    101

    I changed the default schema of my DB user to 'dbo' and that has fixed that other issue.

    So for me I had to:

    1. Drop the IXumbracoNodeuniqueID index
    2. Make sure the default schema for my DB user was set to dbo

    And that is me now working.

    Of course I've no idea if dropping that index or changing the scheme will have any knock on effects, but I guess I'll find out soon enough.

Please Sign in or register to post replies

Write your reply to:

Draft