Copied to clipboard

Flag this post as spam?

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


  • Jason Provence 12 posts 32 karma points
    Jul 28, 2014 @ 22:22
    Jason Provence
    0

    Database Issue (Very Detailed)

    On upgrading from Umbraco 6.1.6 to 7.1.4 I am receiving an error stating: 

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

    After doing much logging and poking around in the source, I've isolated it to one database call.  The call in questions is:

    SELECT [cmsPropertyData].[id], [cmsPropertyData].[contentNodeId], [cmsPropertyData].[versionId], [cmsPropertyData].[propertytypeid], [cmsPropertyData].[dataInt], [cmsPropertyData].[dataDate], [cmsPropertyData].[dataNvarchar], [cmsPropertyData].[dataNtext] FROM [cmsPropertyData] WHERE propertyTypeId in (SELECT id from cmsPropertyType where dataTypeID IN ())

    Which is being called from here:

    2014-07-28 14:56:31,577 [107] INFO  Umbraco.Core.Persistence.Migrations.MigrationRunner - [Thread 111] Added UPGRADE migration 'UpdateRelatedLinksData' to context

    with the code:

    var dtSql = new Sql().Select("nodeId").From<DataTypeDto>().Where<DataTypeDto>(dto => dto.PropertyEditorAlias == Constants.PropertyEditors.RelatedLinksAlias);

    var dataTypeIds = database.Fetch<int>(dtSql);

    var propertyData = database.Fetch<PropertyDataDto>("WHERE propertyTypeId in (SELECT id from cmsPropertyType where dataTypeID IN (@dataTypeIds))", new { dataTypeIds = dataTypeIds });

    f (!propertyData.Any()) return string.Empty;

    Soooo....dataTypeIds is null or empty....why?

    Thanks,

    Jason

  • Shannon Deminick 1526 posts 5272 karma points MVP 3x
    Jul 29, 2014 @ 05:49
    Shannon Deminick
    0

    Hi,

    If you can replicate the issue, can you please log an issue with the details on the tracker and assign to me? If you have step to reproduce that would be ideal. Since this has to do with UpdateRelatedLinksData then I'm assuming it's to do with the related links data type and some related links you have assigned.

  • Jack van Wel 2 posts 51 karma points
    Aug 07, 2014 @ 21:26
    Jack van Wel
    0

    Hi Shannon,

    I have exactly the same issue, I follow the suggestions in this thread http://our.umbraco.org/forum/getting-started/installing-umbraco/46251-Database-error-during-upgrade-to-v7?p=1 . No matter what I try 4.11 -> 7.1.4 or with steps inbetween 4.11-> 6.2.1 -> 7.1.4 both end with the same error. The database was originally started in 2007...... the 4.11.10 version runs smooth. Any suggestions would be very welcome.

    Part of the log (4.11.10 > 7.1.4):

    ClientConnectionId:3d0eb959-2bcf-484e-ac15-fd4f3b3e5ff8 2014-08-07 21:02:09,449 [9] INFO Umbraco.Core.DatabaseContext - [Thread 8] The database schema validation produced the following summary: The following tables were found in the database, but are not in the current schema: umbracoUserGroup,umbracoUser2userGroup,umbracoApp,cmsMacroPropertyType,umbracoStylesheetProperty,cmsTab,umbracoStatSession,umbracoContentData,umbracoContent,umbracoAppTree,cmsContentTypes,umbracoContentAll,umbracoStatEntry,umbracoStylesheet,cmsPropertyTypeGroup,cmsContentType2ContentType

    The following columns were found in the database, but are not in the current schema: umbracoUserGroup,id,umbracoUserGroup,userGroupName,umbracoUser2userGroup,user,umbracoUser2userGroup,userGroup,umbracoApp,sortOrder,umbracoApp,appAlias,umbracoApp,appIcon,umbracoApp,appName,umbracoApp,appInitWithTreeAlias,cmsContentType,masterContentType,cmsMacroPropertyType,id,cmsMacroPropertyType,macroPropertyTypeAlias,cmsMacroPropertyType,macroPropertyTypeRenderAssembly,cmsMacroPropertyType,macroPropertyTypeRenderType,cmsMacroPropertyType,macroPropertyTypeBaseType,umbracoStylesheetProperty,id,umbracoStylesheetProperty,stylesheetPropertyEditor,umbracoStylesheetProperty,stylesheet,umbracoStylesheetProperty,stylesheetPropertyAlias,umbracoStylesheetProperty,stylesheetPropertyName,umbracoStylesheetProperty,stylesheetPropertyValue,cmsTab,id,cmsTab,contenttypeNodeId,cmsTab,text,cmsTab,sortorder,umbracoUser,userDefaultPermissions,umbracoUser,defaultToLiveEditing,umbracoStatSession,id,umbracoStatSession,MemberId,umbracoStatSession,NewsletterId,umbracoStatSession,ReturningUser,umbracoStatSession,SessionStart,umbracoStatSession,SessionEnd,umbracoStatSession,Language,umbracoStatSession,UserAgent,umbracoStatSession,Browser,umbracoStatSession,BrowserVersion,umbracoStatSession,OperatingSystem,umbracoStatSession,Ip,umbracoStatSession,Referrer,umbracoStatSession,ReferrerKeyword,umbracoStatSession,allowCookies,umbracoStatSession,visitorId,umbracoStatSession,browserType,umbracoStatSession,isHuman,cmsPropertyType,tabId,umbracoContentData,versionId,umbracoContentData,alias,umbracoContentData,content,umbracoContent,nodeID,umbracoContent,versionID,umbracoContent,show,umbracoContent,parentID,umbracoContent,nodeUser,umbracoContent,level,umbracoContent,sortOrder,umbracoContent,contentType,umbracoContent,templateNodeId,umbracoContent,documentUser,umbracoContent,language,umbracoContent,createdate,umbracoContent,updateDate,umbracoContent,releasedate,umbracoContent,expiredate,umbracoContent,path,umbracoContent,nodeName,umbracoContent,urlName,umbracoContent,versionUserName,umbracoContent,nodeUserName,umbracoContent,alias,umbracoContent,nodeTypeName,cmsMacroProperty,macroPropertyHidden,cmsMacroProperty,macroPropertyType,umbracoAppTree,treeSilent,umbracoAppTree,treeInitialize,umbracoAppTree,treeSortOrder,umbracoAppTree,appAlias,umbracoAppTree,treeAlias,umbracoAppTree,treeTitle,umbracoAppTree,treeIconClosed,umbracoAppTree,treeIconOpen,umbracoAppTree,treeHandlerAssembly,umbracoAppTree,treeHandlerType,umbracoAppTree,action,cmsContentTypes,id,cmsContentTypes,trashed,cmsContentTypes,parentID,cmsContentTypes,nodeUser,cmsContentTypes,level,cmsContentTypes,path,cmsContentTypes,sortOrder,cmsContentTypes,uniqueID,cmsContentTypes,text,cmsContentTypes,nodeObjectType,cmsContentTypes,createDate,cmsContentTypes,pk,cmsContentTypes,nodeId,cmsContentTypes,alias,cmsContentTypes,icon,cmsContentTypes,contentTypeNodeId,cmsContentTypes,templateNodeId,cmsContentTypes,IsDefault,umbracoContentAll,nodeID,umbracoContentAll,versionID,umbracoContentAll,show,umbracoContentAll,parentID,umbracoContentAll,nodeUser,umbracoContentAll,level,umbracoContentAll,sortOrder,umbracoContentAll,contentType,umbracoContentAll,templateNodeId,umbracoContentAll,documentUser,umbracoContentAll,language,umbracoContentAll,createdate,umbracoContentAll,releaseDate,umbracoContentAll,expireDate,umbracoContentAll,updateDate,umbracoContentAll,path,umbracoContentAll,nodeName,umbracoContentAll,urlName,umbracoContentAll,documentUserName,umbracoContentAll,nodeUserName,umbracoContentAll,alias,umbracoContentAll,nodeTypeName,cmsDataType,controlId,umbracoStatEntry,SessionId,umbracoStatEntry,EntryTime,umbracoStatEntry,RefNodeId,umbracoStatEntry,NodeId,umbracoStylesheet,nodeId,umbracoStylesheet,filename,umbracoStylesheet,content,cmsContentVersion,LanguageLocale,cmsContentType,isContainer,cmsContentType,allowAtRoot,cmsDataType,propertyEditorAlias,cmsMacroProperty,editorAlias,cmsPropertyTypeGroup,id,cmsPropertyTypeGroup,parentGroupId,cmsPropertyTypeGroup,contenttypeNodeId,cmsPropertyTypeGroup,text,cmsPropertyTypeGroup,sortorder,cmsPropertyType,propertyTypeGroupId,cmsTagRelationship,propertyTypeId,cmsContentType2ContentType,parentContentTypeId,cmsContentType2ContentType,childContentTypeId,cmsContentTypeAllowedContentType,SortOrder

    The following constraints (Primary Keys, Foreign Keys and Indexes) were found in the database, but are not in the current schema: FKcmsContentumbracoNode,FKcmsContentTypeumbracoNode,FKcmsDocumentumbracoNode,FKcmsMacroPropertycmsMacroPropertyTypeid,FKcmsPropertyDataumbracoNode,FKcmsPropertyTypecmsTab,FKcmsTagRelationshipumbracoNodeid,FKcmsTaskcmsTaskType,FKumbracoNodeumbracoNode,FKumbracoUser2appumbracoUser,FKuseruserType,FKuser2userGroupuser,FKuser2userGroupuserGroup,FKumbracoNodeumbracoNodeid,FKcmsTemplatecmsTemplate,FKcmsContentumbracoNodeid,FKcmsContentVersioncmsContentnodeId,FKcmsDocumentcmsContentnodeId,FKcmsDocumentumbracoNodeid,FKcmsDocumentcmsTemplatenodeId,FKcmsContentTypeumbracoNodeid,FKcmsDocumentTypeumbracoNodeid,FKcmsDocumentTypecmsContentTypenodeId,FKcmsDocumentTypecmsTemplatenodeId,FKcmsDataTypeumbracoNodeid,FKcmsDataTypePreValuescmsDataTypenodeId,FKcmsLanguageTextcmsDictionaryid,FKumbracoDomainsumbracoNodeid,FKcmsMacroPropertycmsMacroid,FKcmsMemberTypecmsContentTypenodeId,FKcmsMemberTypeumbracoNodeid,FKcmsMembercmsContentnodeId,FKcmsMemberumbracoNodeid,FKcmsMember2MemberGroupcmsMembernodeId,FKcmsMember2MemberGroupumbracoNodeid,FKcmsContentXmlcmsContentnodeId,FKcmsPreviewXmlcmsContentnodeId,FKcmsPreviewXmlcmsContentVersionVersionId,FKcmsPropertyTypeGroupcmsPropertyTypeGroupid,FKcmsPropertyTypeGroupcmsContentTypenodeId,FKcmsPropertyTypecmsDataTypenodeId,FKcmsPropertyTypecmsContentTypenodeId,FKcmsPropertyTypecmsPropertyTypeGroupid,FKcmsPropertyDataumbracoNodeid,FKcmsPropertyDatacmsPropertyTypeid,FKumbracoRelationumbracoNode,FKumbracoRelationumbracoNode1,FKumbracoRelationumbracoRelationTypeid,FKcmsStylesheetumbracoNodeid,FKcmsTagscmsTags,FKcmsTagRelationshipcmsContent,FKcmsTagRelationshipcmsTagsid,FKcmsTagRelationshipcmsPropertyType,FKumbracoUserumbracoUserTypeid,FKcmsTaskcmsTaskTypeid,FKcmsTaskumbracoNodeid,FKcmsTaskumbracoUser,FKcmsTaskumbracoUser1,FKcmsContentType2ContentTypeumbracoNodeparent,FKcmsContentType2ContentTypeumbracoNodechild,FKcmsContentTypeAllowedContentTypecmsContentType,FKcmsContentTypeAllowedContentTypecmsContentType1,FKumbracoUser2appumbracoUserid,FKumbracoUser2NodeNotifyumbracoUserid,FKumbracoUser2NodeNotifyumbracoNodeid,FKumbracoUser2NodePermissionumbracoUserid,FKumbracoUser2NodePermissionumbracoNodeid,PKcmsTab,PKContentVersion,PKdomains,PKlanguage,PKmacro,PKmacroProperty,PKmacroPropertyType,PKstylesheetProperty,PKtemplates,PKumbracoApp,PKumbracoAppTree,PKumbracoStartSession,PKumbracoStatEntry,PKumbracoStylesheet,PKuser2userGroup,PKuserGroup,PKuserType,PKcmsTemplate,PKcmsContentVersion,PKumbracoLanguage,PKumbracoDomains,PKcmsMacro,PKcmsMacroProperty,PKcmsMember,PKcmsPropertyTypeGroup,PKcmsStylesheet,PKcmsStylesheetProperty,PKumbracoUserType,PKcmsContentType2ContentType,IXumbracoNodeTrashed,IXumbracoNodeParentId,IXumbracoNodeObjectType,IXcmsTemplatenodeId,IXcmsContent,IXcmsContentVersionContentId,IXcmsContentVersionVersionId,IXcmsDocument,IXcmsDocumentpublished,IXcmsDocumentnewest,IXcmsContentType,IXcmsContentTypeicon,IXcmsDataTypenodeId,IXcmsDictionaryid,IXumbracoLanguagelanguageISOCode,IXumbracoLog,IXcmsMacroPropertyAlias,IXcmsMacroPropertyAlias,IXcmsPropertyData,IXcmsPropertyData1,IXcmsPropertyData2,IXcmsPropertyData3,IXcmsTags,IXumbracoUserLoginsIndex,IXumbracoUseruserLogin,IXcmsTaskTypealias,IXcomputerName,IXumbracoServerisActive

    The following indexes were found in the database, but are not in the current schema: IXumbracoNodeTrashed,IXcmsTemplatenodeId,IXcmsContentVersionContentId,IXcmsContentVersionVersionId,IXcmsDocument,IXcmsDocumentpublished,IXcmsDocumentnewest,IXcmsContentType,IXcmsContentTypeicon,IXcmsDataTypenodeId,IXcmsDictionaryid,IXumbracoLanguagelanguageISOCode,IXumbracoLog,IXcmsMacroPropertyAlias,IXcmsMacroPropertyAlias,IXcmsTags,IXumbracoUserLoginsIndex,IXumbracoUseruserLogin,IXcmsTaskTypealias

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

    2014-08-07 21:02:09,449 [9] ERROR Umbraco.Web.Install.Controllers.InstallApiController - [Thread 8] 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: Incorrect syntax near ')'. 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) 2014-08-07 21:02:09,449 [9] INFO Umbraco.Web.Install.Controllers.InstallApiController - [Thread 8] Step completed (took 1668ms) 2014-08-07 21:02:09,449 [9] ERROR Umbraco.Web.Install.Controllers.InstallApiController - [Thread 8] 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: Incorrect syntax near ')'. 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)

  • Jack van Wel 2 posts 51 karma points
    Aug 08, 2014 @ 13:50
    Jack van Wel
    0

    This is where the database upgrade brakes:

    2014-08-07 21:00:22,443 [30] INFO Umbraco.Core.Persistence.Migrations.MigrationRunner - [Thread 31] Executing sql statement 99: CREATE NONCLUSTERED INDEX [IX_cmsTags] ON [cmsTags] ([tag],[group])

    This happens in both scenario's either 4.11 > 7.1.4 or 6.2.1 > 7.1.4 .

    :S

  • Kenneth Solberg 227 posts 418 karma points
    Sep 15, 2014 @ 00:18
    Kenneth Solberg
    0

    I believe it's because a datatype with the Related Content render control is missing. Try creating one and reload the site to continue the upgrade.

  • Robert 20 posts 39 karma points
    Oct 06, 2014 @ 22:31
    Robert
    0

    How can I fix it?

    Getting the same thing

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

    See the log for full details (logs can typically be found in the App_Data\Logs folder).

  • Robert 20 posts 39 karma points
    Oct 22, 2014 @ 18:59
    Robert
    0

    For users who still have trouble. 7.2 will fix the upgrade issues experienced when upgrading from v3 to v4.

Please Sign in or register to post replies

Write your reply to:

Draft