Copied to clipboard

Flag this post as spam?

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


  • Shane 40 posts 193 karma points
    Feb 19, 2015 @ 19:41
    Shane
    0

    Database error upgrading Umbraco

    I'm trying to upgrade from 7.0.4 to 7.2.1. After installing the new files I run the site and the installer shows me the following error. Any ideas would be welcomed.

    Error during installation

    The database failed to upgrade. ERROR: The database configuration failed with the following message: Cannot find the object "umbracoUserLogins.umbracoUserLogins_Index" because it does not exist or you do not have permissions. Please check log file for additional information (can be found in '/App_Data/Logs/UmbracoTraceLog.txt')

    Thanks

  • Sören Deger 733 posts 2844 karma points c-trib
    Feb 19, 2015 @ 19:46
    Sören Deger
    0

    Hi Shane,

    It could be a file permission problem or database permission problem.

    First, check if you have the correct file permissions (see here: https://our.umbraco.org/wiki/reference/files-and-folders/permissions)

     

    Best, Sören

  • Shane 40 posts 193 karma points
    Feb 19, 2015 @ 19:54
    Shane
    0

    Hi Sören,

    File permissions are correct. Looks to me like a database script error though. Database permissions should be fine though as it's an upgrade so surely should have correct permissions already?

    Thanks

  • Sören Deger 733 posts 2844 karma points c-trib
    Feb 19, 2015 @ 19:59
    Sören Deger
    0

    Hi Shane,

    ok, have you follow the general upgrade guide during the update?

    https://our.umbraco.org/documentation/installation/upgrading/general

     

    Have you merged the web.config after update?

    In the release notes on download page you can find this:

    Note that the only significant config file change is that the UmbracoMembershipProvider, UsersMembershipProvider and UmbracoRoleProvider have been updated in the web.config.

    Please also remove the /Install folder if you haven't done so, it is no longer used and might conflict with the new upgrader if it's still there.

     

    Hope this helps.

    Best,

    Sören

  • Shane 40 posts 193 karma points
    Feb 19, 2015 @ 20:08
    Shane
    0

    Yes I've been following the guide exactly. I get to the last step and then see attached.

  • Sören Deger 733 posts 2844 karma points c-trib
    Feb 19, 2015 @ 20:14
    Sören Deger
    0

    Please check the log file in /App_Data/Logs/UmbracoTraceLog.txt. Can you find some related error entries in this file?

    Best,

    Sören

  • Shane 40 posts 193 karma points
    Feb 19, 2015 @ 20:21
    Shane
    0

    Here's the full entry. It looks like some of the database schema is different from what it's expecting which is really strange.

     

    2015-02-19 19:23:48,312 [110] INFO  Umbraco.Core.ApplicationContext - [Thread 49] CurrentVersion different from configStatus: '7.2.1',''

    2015-02-19 19:23:48,312 [110] INFO  Umbraco.Core.ApplicationContext - [Thread 49] CurrentVersion different from configStatus: '7.2.1',''

    2015-02-19 19:23:48,312 [110] INFO  Umbraco.Web.Install.Controllers.InstallApiController - [Thread 49] Executing installation step: DatabaseUpgrade

    2015-02-19 19:23:48,312 [110] INFO  Umbraco.Web.Install.InstallSteps.DatabaseUpgradeStep - [Thread 49] Running 'Upgrade' service

    2015-02-19 19:23:48,312 [110] INFO  Umbraco.Core.DatabaseContext - [Thread 49] Database upgrade started

    2015-02-19 19:23:48,312 [110] INFO  Umbraco.Core.Persistence.Migrations.MigrationRunner - [Thread 49] Initializing database migrations

    2015-02-19 19:23:48,313 [110] INFO  Umbraco.Core.Persistence.Migrations.MigrationRunner - [Thread 49] Added UPGRADE migration 'AssignMissingPrimaryForMySqlKeys' to context

    2015-02-19 19:23:48,313 [110] INFO  Umbraco.Core.Persistence.Migrations.MigrationRunner - [Thread 49] Added UPGRADE migration 'AssignMissingPrimaryForMySqlKeys' to context

    2015-02-19 19:23:48,320 [110] INFO  Umbraco.Core.Persistence.Migrations.MigrationRunner - [Thread 49] Added UPGRADE migration 'AdditionalIndexesAndKeys' to context

    2015-02-19 19:23:48,320 [110] INFO  Umbraco.Core.Persistence.Migrations.MigrationRunner - [Thread 49] Added UPGRADE migration 'ChangePasswordColumn' to context

    2015-02-19 19:23:48,320 [110] INFO  Umbraco.Core.Persistence.Migrations.MigrationRunner - [Thread 49] Added UPGRADE migration 'AddChangeDocumentTypePermission' to context

    2015-02-19 19:23:48,320 [110] INFO  Umbraco.Core.Persistence.Migrations.MigrationRunner - [Thread 49] Added UPGRADE migration 'UpdateToNewMemberPropertyAliases' to context

    2015-02-19 19:23:48,327 [110] INFO  Umbraco.Core.Persistence.Migrations.MigrationRunner - [Thread 49] Added UPGRADE migration 'AlterDataTypePreValueTable' to context

    2015-02-19 19:23:48,343 [110] INFO  Umbraco.Core.Persistence.Migrations.MigrationRunner - [Thread 49] Added UPGRADE migration 'AddMissingForeignKeyForContentType' to context

    2015-02-19 19:23:48,349 [110] INFO  Umbraco.Core.Persistence.Migrations.MigrationRunner - [Thread 49] Added UPGRADE migration 'RemoveCmsDocumentAliasColumn' to context

    2015-02-19 19:23:48,351 [110] INFO  Umbraco.Core.Persistence.Migrations.MigrationRunner - [Thread 49] Added UPGRADE migration 'AddIndexToUmbracoNodeTable' to context

    2015-02-19 19:23:48,351 [110] INFO  Umbraco.Core.Persistence.Migrations.MigrationRunner - [Thread 49] Executing sql statement 1: DROP INDEX [umbracoUserLogins_Index] ON [umbracoUserLogins]

    2015-02-19 19:23:48,352 [110] INFO  Umbraco.Core.Persistence.UmbracoDatabase - [Thread 49]    at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)

       at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)

       at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)

       at System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async, Int32 timeout)

       at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean asyncWrite)

       at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()

       at StackExchange.Profiling.Data.ProfiledDbCommand.ExecuteNonQuery()

       at Umbraco.Core.Persistence.PetaPocoCommandExtensions.<>c__DisplayClass1.<ExecuteNonQueryWithRetry>b__0()

       at Umbraco.Core.Persistence.FaultHandling.RetryPolicy.ExecuteAction[TResult](Func`1 func)

       at Umbraco.Core.Persistence.Database.Execute(String sql, Object[] args)

    2015-02-19 19:23:48,352 [110] ERROR Umbraco.Core.DatabaseContext - [Thread 49] Database configuration failed

    System.Data.SqlClient.SqlException (0x80131904): Cannot find the object "umbracoUserLogins.umbracoUserLogins_Index" because it does not exist or you do not have permissions.

       at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)

       at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)

       at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)

       at System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async, Int32 timeout)

       at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean asyncWrite)

       at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()

       at StackExchange.Profiling.Data.ProfiledDbCommand.ExecuteNonQuery()

       at Umbraco.Core.Persistence.PetaPocoCommandExtensions.<>c__DisplayClass1.<ExecuteNonQueryWithRetry>b__0()

       at Umbraco.Core.Persistence.FaultHandling.RetryPolicy.ExecuteAction[TResult](Func`1 func)

       at Umbraco.Core.Persistence.Database.Execute(String sql, Object[] args)

       at Umbraco.Core.Persistence.Migrations.MigrationRunner.ExecuteMigrations(IMigrationContext context, Database database)

       at Umbraco.Core.Persistence.Migrations.MigrationRunner.Execute(Database database, DatabaseProviders databaseProvider, Boolean isUpgrade)

       at Umbraco.Core.DatabaseContext.UpgradeSchemaAndData()

    ClientConnectionId:923fb9a7-ba9c-49d1-b4ce-f8078f00eaa6

    2015-02-19 19:23:48,352 [110] INFO  Umbraco.Core.DatabaseContext - [Thread 49] The database schema validation produced the following summary: 

    The following columns were found in the database, but are not in the current schema:

    cmsDocument,alias

     

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

    FK_cmsContent_cmsContentType_nodeId,PK_cmsPreviewXml,PK_cmsContentPreviewXml,IX_umbracoNodeTrashed,IX_umbracoNodeParentId,IX_umbracoNodeUniqueID,IX_umbracoNodeObjectType,IX_cmsContentType,IX_cmsContentType_icon,IX_cmsTemplate_nodeId,IX_cmsContent,IX_cmsContentVersion_ContentId,IX_cmsContentVersion_VersionId,IX_cmsDocument,IX_cmsDocument_published,IX_cmsDocument_newest,IX_cmsDataType_nodeId,IX_cmsDictionary_id,IX_umbracoLanguage_languageISOCode,IX_umbracoLog,IX_cmsMacroPropertyAlias,IX_cmsMacroProperty_Alias,IX_cmsPropertyData,IX_cmsPropertyData_1,IX_cmsPropertyData_2,IX_cmsPropertyData_3,IX_cmsTags,IX_umbracoUserLogins_Index,IX_umbracoUser_userLogin,IX_cmsTaskType_alias,IX_computerName,IX_umbracoServer_isActive

     

    The following indexes were found in the database, but are not in the current schema:

    umbracoUserLogins_Index,IX_umbracoNodeUniqueID,IX_umbracoUserLogins_Index

     

     

    2015-02-19 19:23:48,352 [110] ERROR Umbraco.Web.Install.Controllers.InstallApiController - [Thread 49] 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 find the object "umbracoUserLogins.umbracoUserLogins_Index" because it does not exist or you do not have permissions.

     Please check log file for additional information (can be found in '/App_Data/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)

    2015-02-19 19:23:48,352 [110] INFO  Umbraco.Web.Install.Controllers.InstallApiController - [Thread 49] Step completed (took 40ms)

    2015-02-19 19:23:48,352 [110] ERROR Umbraco.Web.Install.Controllers.InstallApiController - [Thread 49] 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 find the object "umbracoUserLogins.umbracoUserLogins_Index" because it does not exist or you do not have permissions.

     Please check log file for additional information (can be found in '/App_Data/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)

  • Shane 40 posts 193 karma points
    Feb 19, 2015 @ 20:28
    Shane
    102

    OK it looks like it was database permissions. I've given it dbowner for the installation and that worked.

    Thanks for the help.

  • Bobi 346 posts 950 karma points
    May 03, 2018 @ 08:03
    Bobi
    0

    Hi Shane,

    I'm getting this exact error. How did you fix this exactly?

  • Sören Deger 733 posts 2844 karma points c-trib
    Feb 19, 2015 @ 20:35
    Sören Deger
    0

    Hmm... Maybe it's another problem that I have seen in the last month with updates.

    Please make this:

    1. Recycle Application Pool

    2. Clear your browser cache

    3. If you use Google Chrome press F12 to go to the developer tool. In Developer tool open tab "Resources" and open "Cookies" in this. Then you should see a cookie for your current umbraco instanze. Right click and delete this cookie.

    4. Refresh your website and check if it works now?

     

    Best,

    Sören

Please Sign in or register to post replies

Write your reply to:

Draft