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...
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.
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.
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:
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.
Hi Guys,
Anyone can give me an insight on this please?
Thank you
See if this fixes your problem: https://our.umbraco.org/forum/using-umbraco-and-getting-started/79396-nuget-update-to-75#comment-253929
Ah different issue sorry. Try setting the Umbraco version in web.config to 7.4.1 on your colleague's machine.
Even if it is 7.5.3?
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/
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.
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?On Mine, I do not have an umbracoRedirectUrl and it is not showing an errors.
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/
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.
Emma Garland's tip did the trick. The table is using the server's username as the schema instead of dbo.
is working on a reply...
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