Copied to clipboard

Flag this post as spam?

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


  • Simon 692 posts 1068 karma points
    Oct 20, 2016 @ 09:13
    Simon
    1

    Invalid object name 'umbracoRedirectUrl' - Database Migration

    Hi Guys,

    Lately, I have update my umbraco project from 7.4.1 to 7.5.3. Everything works fine; Frontend, CMS, etc..

    Then I wanted to backup the database in order for my colleague to use the same template. Created a .bak file and restored normally on another computer.

    But when accessing the CMS, at the beginning, it returns the following error:

    System.Data.SqlClient.SqlException (0x80131904): Invalid object name 'umbracoRedirectUrl'.
      at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
      at System.Data.SqlClient.SqlInternalConnection.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.SqlDataReader.TryConsumeMetaData()
      at System.Data.SqlClient.SqlDataReader.get_MetaData()
      at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption)
      at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, Boolean inRetry, SqlDataReader ds, Boolean describeParameterEncryptionRequest)
      at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
      at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
      at System.Data.SqlClient.SqlCommand.ExecuteScalar()
      at StackExchange.Profiling.Data.ProfiledDbCommand.ExecuteScalar() in c:\Code\github\SamSaffron\MiniProfiler\StackExchange.Profiling\Data\ProfiledDbCommand.cs:line 311
      at Umbraco.Core.Persistence.PetaPocoCommandExtensions.<>c__DisplayClassa.<ExecuteScalarWithRetry>b__9()
      at Umbraco.Core.Persistence.FaultHandling.RetryPolicy.ExecuteAction[TResult](Func`1 func)
      at Umbraco.Core.Persistence.PetaPocoCommandExtensions.ExecuteScalarWithRetry(IDbCommand command, RetryPolicy cmdRetryPolicy, RetryPolicy conRetryPolicy)
      at Umbraco.Core.Persistence.PetaPocoCommandExtensions.ExecuteScalarWithRetry(IDbCommand command, RetryPolicy retryPolicy)
      at Umbraco.Core.Persistence.PetaPocoCommandExtensions.ExecuteScalarWithRetry(IDbCommand command)
      at Umbraco.Core.Persistence.Database.ExecuteScalar[T](String sql, Object[] args)
    

    I tried also to script the database and execute normally, but the same error occurs.

    The error shows up, but then, it allows me to save normally, etc...

    But I don''t know what I am doing wrong.

    Can someone give some insight about this.

  • Simon 692 posts 1068 karma points
    Oct 21, 2016 @ 07:03
    Simon
    0

    Hi Guys,

    Anyone can give me an insight on this please?

    Thank you

  • Sebastiaan Janssen 5061 posts 15544 karma points MVP admin hq
    Oct 21, 2016 @ 07:42
  • Sebastiaan Janssen 5061 posts 15544 karma points MVP admin hq
    Oct 21, 2016 @ 07:43
    Sebastiaan Janssen
    0

    Ah different issue sorry. Try setting the Umbraco version in web.config to 7.4.1 on your colleague's machine.

  • Simon 692 posts 1068 karma points
    Oct 21, 2016 @ 07:48
    Simon
    0

    Even if it is 7.5.3?

  • Sebastiaan Janssen 5061 posts 15544 karma points MVP admin hq
    Oct 21, 2016 @ 08:24
    Sebastiaan Janssen
    0

    Yes, they need to run through the upgrade installer to get their database updated correctly.

    If you set it to 7.4.1 then the Umbraco upgrade installer will run all the migrations between version 7.4.1 and 7.5.3. For more info on how that works: https://cultiv.nl/blog/using-umbraco-migrations-to-deploy-changes/

  • Simon 692 posts 1068 karma points
    Oct 21, 2016 @ 08:27
    Simon
    0

    Hi Sebastiaan,

    It is strange tough, because I have extracted a .bak file of the database (update to 7.5.3) on my computer and now, when trying to restore, everything works fine, but showing that error at the beginning.

    So everytime we will start another project, we need to do this procedure? It is already updated to Umbraco 7.5.3.

    Any Suggestions?

    Thank you in advance.

  • Sebastiaan Janssen 5061 posts 15544 karma points MVP admin hq
    Oct 21, 2016 @ 08:34
    Sebastiaan Janssen
    0

    I don't know what to tell you, it seems not to have gone so well for you. :-)

    Have you checked that you're definitely connecting to the correct database and that the umbracoRedirectUrl table is in that database?

  • Simon 692 posts 1068 karma points
    Oct 21, 2016 @ 08:37
    Simon
    0

    On Mine, I do not have an umbracoRedirectUrl and it is not showing an errors.

  • Sebastiaan Janssen 5061 posts 15544 karma points MVP admin hq
    Oct 21, 2016 @ 08:40
    Sebastiaan Janssen
    0

    Then your upgrade didn't go well :)
    This table HAS to be there on 7.5+

    https://cultiv.nl/blog/how-to-diagnose-umbraco-upgrade-problems/

  • Emma Garland 41 posts 123 karma points MVP 7x c-trib
    Mar 31, 2017 @ 00:26
    Emma Garland
    5

    Just adding my two cents in case this helps anyone - I had this error after downloading a database from production to local. This was a previously upgraded site but the table wasn't missing - it just turned out that only this particular table was owned by a different schema to the other tables . It was websitename.umbracoRedirectUrl instead of the usual dbo.umbracoRedirectUrl.

    I altered the schema owner and it works again and shows the redirects locally.

  • Matthew Kirschner 323 posts 611 karma points
    May 02, 2017 @ 20:33
    Matthew Kirschner
    0

    Emma Garland's tip did the trick. The table is using the server's username as the schema instead of dbo.

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

    Continue discussion

Please Sign in or register to post replies