Getting Errors upon Upgrading from 4.2 to 4.3

2 个月 前
I have version 4.2 with the Minimal theme installed (modified).  I would like to upgrade to the latest versions -> nop4.3.  I downloaded the zipped packages and created a new folder with the latest bits.  Before attempting to run the new version, I used the SQL upgrade file and tried to update the existing database from version 4.2 and was presented with the following errors from SQL management Studio.
Am I doing something wrong?  Do I need to do anything else before upgrading the Database with the SQL File?  Please advise.


(312 rows affected)
Msg 208, Level 16, State 1, Line 992
Invalid object name 'Language'.
Msg 208, Level 16, State 1, Line 1051
Invalid object name 'Setting'.
Msg 208, Level 16, State 1, Line 1059
Invalid object name 'Setting'.
Msg 208, Level 16, State 1, Line 1067
Invalid object name 'Setting'.
Msg 208, Level 16, State 6, Procedure DeleteGuests, Line 3 [Batch Start Line 1090]
Invalid object name 'DeleteGuests'.
Msg 208, Level 16, State 1, Line 1167
Invalid object name 'Setting'.
Msg 208, Level 16, State 1, Line 1176
Invalid object name 'Setting'.
Msg 208, Level 16, State 1, Line 1184
Invalid object name 'Setting'.
Msg 208, Level 16, State 1, Line 1192
Invalid object name 'Setting'.
Msg 4902, Level 16, State 1, Line 1202
Cannot find the object "Order" because it does not exist or you do not have permissions.
Msg 4902, Level 16, State 1, Line 1209
Cannot find the object "Discount" because it does not exist or you do not have permissions.
Msg 4902, Level 16, State 1, Line 1215
Cannot find the object "RewardPointsHistory" because it does not exist or you do not have permissions.
Msg 208, Level 16, State 6, Procedure ProductLoadAllPaged, Line 3 [Batch Start Line 1397]
Invalid object name 'ProductLoadAllPaged'.
Msg 208, Level 16, State 6, Procedure DeleteGuests, Line 3 [Batch Start Line 2001]
Invalid object name 'DeleteGuests'.
Msg 4902, Level 16, State 1, Line 2089
Cannot find the object "GenericAttribute" because it does not exist or you do not have permissions.
Msg 208, Level 16, State 1, Line 2095
Invalid object name 'Setting'.
Msg 208, Level 16, State 1, Line 2103
Invalid object name 'Setting'.
Msg 208, Level 16, State 1, Line 2111
Invalid object name 'Setting'.
Msg 208, Level 16, State 1, Line 2119
Invalid object name 'Setting'.
Msg 208, Level 16, State 1, Line 2127
Invalid object name 'Setting'.
Msg 208, Level 16, State 1, Line 2135
Invalid object name 'Setting'.
Msg 208, Level 16, State 6, Procedure ProductLoadAllPaged, Line 3 [Batch Start Line 2140]
Invalid object name 'ProductLoadAllPaged'.

(0 rows affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)
Msg 208, Level 16, State 1, Line 2930
Invalid object name 'Setting'.
Msg 208, Level 16, State 1, Line 2938
Invalid object name 'Setting'.

(168 rows affected)
Caution: Changing any part of an object name could break scripts and stored procedures.

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)
Msg 208, Level 16, State 1, Line 3034
Invalid object name 'Setting'.
Msg 208, Level 16, State 1, Line 3057
Invalid object name 'ActivityLogType'.
Msg 208, Level 16, State 1, Line 3071
Invalid object name 'Setting'.
Msg 208, Level 16, State 1, Line 3128
Invalid object name 'Setting'.
Msg 208, Level 16, State 1, Line 3146
Invalid object name 'Setting'.
Msg 208, Level 16, State 1, Line 3154
Invalid object name 'Setting'.
Msg 208, Level 16, State 1, Line 3162
Invalid object name 'Setting'.
Msg 208, Level 16, State 1, Line 3175
Invalid object name 'Setting'.
Msg 208, Level 16, State 1, Line 3183
Invalid object name 'Setting'.
Msg 208, Level 16, State 1, Line 3191
Invalid object name 'Setting'.
Msg 208, Level 16, State 1, Line 3199
Invalid object name 'Setting'.
Msg 208, Level 16, State 1, Line 3207
Invalid object name 'Setting'.
Msg 208, Level 16, State 1, Line 3215
Invalid object name 'Setting'.
Msg 208, Level 16, State 1, Line 3223
Invalid object name 'Setting'.
Msg 208, Level 16, State 1, Line 3231
Invalid object name 'Setting'.

(7 rows affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)
Msg 208, Level 16, State 1, Line 3257
Invalid object name 'Country'.
Msg 4902, Level 16, State 1, Line 3265
Cannot find the object "RewardPointsHistory" because it does not exist or you do not have permissions.
Msg 208, Level 16, State 1, Line 3270
Invalid object name 'Setting'.
Msg 208, Level 16, State 1, Line 3278
Invalid object name 'Setting'.
Msg 208, Level 16, State 1, Line 3286
Invalid object name 'Setting'.
Msg 208, Level 16, State 1, Line 3295
Invalid object name 'Setting'.
Msg 208, Level 16, State 1, Line 3303
Invalid object name 'Setting'.
Msg 208, Level 16, State 1, Line 3311
Invalid object name 'Setting'.

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)

(1 row affected)
2 个月 前
No you dont have to do anything to the database before upgrade
I assume you ran the upgrade from here https://github.com/nopSolutions/nopCommerce/releases/download/release-4.30/nopCommerce_4.30_UpgradeScripts.zip

webzest wrote:

Cannot find the object "Order" because it does not exist or you do not have permissions.
Cannot find the object "Discount" because it does not exist or you do not have permissions.
Cannot find the object "RewardPointsHistory" because it does not exist or you do not have permissions.


Given these errors and the tables should exist (you can check) it could be the permission problem

Does it create a new Database ?
2 个月 前
If I simply use a fresh installation of nop4.3 and run it to connect to the existing database from version nop4.2, I get the following error:

An unhandled exception occurred while processing the request.
SqlException: Invalid column name 'CreatedOrUpdatedDateUTC'.
System.Data.SqlClient.SqlConnection.OnError(SqlException exception, bool breakConnection, Action<Action> wrapCloseInAction)

Stack Query Cookies Headers Routing
SqlException: Invalid column name 'CreatedOrUpdatedDateUTC'.
System.Data.SqlClient.SqlConnection.OnError(SqlException exception, bool breakConnection, Action<Action> wrapCloseInAction)
System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, bool breakConnection, Action<Action> wrapCloseInAction)
System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, bool callerHasConnectionLock, bool asyncClose)
System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, out bool dataReady)
System.Data.SqlClient.SqlDataReader.TryConsumeMetaData()
System.Data.SqlClient.SqlDataReader.get_MetaData()
System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, string resetOptionsString)
System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, bool returnStream, bool async, int timeout, out Task task, bool asyncWrite, SqlDataReader ds)
System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, bool returnStream, TaskCompletionSource<object> completion, int timeout, out Task task, bool asyncWrite, string method)
System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, bool returnStream, string method)
System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior)
System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior)
System.Data.Common.DbCommand.ExecuteReader(CommandBehavior behavior)
LinqToDB.Data.DbCommandProcessor.DbCommandProcessorExtensions.ExecuteReaderExt(IDbCommand cmd, CommandBehavior commandBehavior)
LinqToDB.Data.DataConnection.ExecuteReader(IDbCommand command, CommandBehavior commandBehavior)
LinqToDB.Data.DataConnection.ExecuteReader(CommandBehavior commandBehavior)
LinqToDB.DataContext+QueryRunner.ExecuteReader()
LinqToDB.Linq.QueryRunner.ExecuteQuery<T>(Query query, IDataContext dataContext, Mapper<T> mapper, Expression expression, object[] ps, int queryNumber)+MoveNext()
System.Collections.Generic.List<T>..ctor(IEnumerable<T> collection)
System.Linq.Enumerable.ToList<TSource>(IEnumerable<TSource> source)
Nop.Core.Caching.MemoryCacheManager.Get<T>(CacheKey key, Func<T> acquire) in MemoryCacheManager.cs
+
                return acquire();
Nop.Services.Caching.Extensions.IQueryableExtensions.ToCachedList<T>(IQueryable<T> query, CacheKey cacheKey) in IQueryableExtensions.cs
+
            return cacheKey == null ? query.ToList() : CacheManager.Get(cacheKey, query.ToList);
Nop.Services.Common.GenericAttributeService.GetAttributesForEntity(int entityId, string keyGroup) in GenericAttributeService.cs
+
            var attributes = query.ToCachedList(key);
Nop.Services.Common.GenericAttributeService.GetAttribute<TPropType>(BaseEntity entity, string key, int storeId, TPropType defaultValue) in GenericAttributeService.cs
+
            var props = GetAttributesForEntity(entity.Id, keyGroup);
Nop.Web.Framework.WebWorkContext.get_WorkingLanguage() in WebWorkContext.cs
+
                var customerLanguageId = _genericAttributeService.GetAttribute<int>(CurrentCustomer,
Nop.Web.Framework.Globalization.CultureMiddleware.SetWorkingCulture(IWebHelper webHelper, IWorkContext workContext) in CultureMiddleware.cs
+
            var culture = new CultureInfo(workContext.WorkingLanguage.LanguageCulture);
Nop.Web.Framework.Globalization.CultureMiddleware.Invoke(HttpContext context, IWebHelper webHelper, IWorkContext workContext) in CultureMiddleware.cs
+
            SetWorkingCulture(webHelper, workContext);
Microsoft.AspNetCore.Builder.UseMiddlewareExtensions+<>c__DisplayClass4_1.<UseMiddleware>b__2(HttpContext context)
Microsoft.AspNetCore.Localization.RequestLocalizationMiddleware.Invoke(HttpContext context)
Microsoft.AspNetCore.Session.SessionMiddleware.Invoke(HttpContext context)
Microsoft.AspNetCore.Session.SessionMiddleware.Invoke(HttpContext context)
Nop.Services.Installation.InstallUrlMiddleware.Invoke(HttpContext context, IWebHelper webHelper) in InstallUrlMiddleware.cs
+
            await _next(context);
Nop.Services.Common.KeepAliveMiddleware.Invoke(HttpContext context, IWebHelper webHelper) in KeepAliveMiddleware.cs
+
            await _next(context);
Microsoft.AspNetCore.ResponseCompression.ResponseCompressionMiddleware.Invoke(HttpContext context)
Microsoft.AspNetCore.Diagnostics.StatusCodePagesMiddleware.Invoke(HttpContext context)
Microsoft.AspNetCore.Diagnostics.StatusCodePagesMiddleware.Invoke(HttpContext context)
Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware.<Invoke>g__Awaited|6_0(ExceptionHandlerMiddleware middleware, HttpContext context, Task task)
Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware.HandleException(HttpContext context, ExceptionDispatchInfo edi)
Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware.<Invoke>g__Awaited|6_0(ExceptionHandlerMiddleware middleware, HttpContext context, Task task)
Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware.Invoke(HttpContext context)
2 个月 前
webzest wrote:
existing database from version nop4.2

If you mean a v42 database that has not ben upgraded then that wont work
If you mean a v42 database that has been upgraded - then maybe you need to fix you permissions and try running that upgrade again

Otherwise is there a chance that the v42 database is not a standard database ?
2 个月 前
Thank you for the direction; the main issue derived from an initial mis installation of the database.  The schema belonged to the user instead of DBO, so everything was confused.  Once I corrected the schema, everything started to fall into place.