DB Tables names on v4.2 fresh installation

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
5 năm cách đây
Hi,

I have another strange issue regarding a fresh installation of v4.20 nopcommerce store, all the tables within the db have a prefix of NT AUTHORITY \ NETWORK SERVICE instead of dbo, (see image below) is there any reason why this would be? The frontend store does work so can't see any issues using the default theme, but when I install a new theme I do receive a error on the home see error log below, not sure if these are related but it is causing me a headache, any help would be much appreciated as always. This is not an existing DB that needs to be upgraded with scripts.



Invalid object name 'nop_splitstring_to_table'
System.Data.SqlClient.SqlException (0x80131904): Invalid object name 'nop_splitstring_to_table'.
   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.SqlDataReader.TryConsumeMetaData()
   at System.Data.SqlClient.SqlDataReader.get_MetaData()
   at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)
   at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, SqlDataReader ds)
   at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior)
   at Microsoft.EntityFrameworkCore.Storage.Internal.RelationalCommand.Execute(IRelationalConnection connection, DbCommandMethod executeMethod, IReadOnlyDictionary`2 parameterValues)
   at Microsoft.EntityFrameworkCore.Storage.Internal.RelationalCommand.ExecuteReader(IRelationalConnection connection, IReadOnlyDictionary`2 parameterValues)
   at Microsoft.EntityFrameworkCore.Query.Internal.QueryingEnumerable`1.Enumerator.BufferlessMoveNext(DbContext _, Boolean buffer)
   at Microsoft.EntityFrameworkCore.SqlServer.Storage.Internal.SqlServerExecutionStrategy.Execute[TState,TResult](TState state, Func`3 operation, Func`3 verifySucceeded)
   at Microsoft.EntityFrameworkCore.Query.Internal.QueryingEnumerable`1.Enumerator.MoveNext()
   at Microsoft.EntityFrameworkCore.Query.Internal.LinqOperatorProvider._TrackEntities[TOut,TIn](IEnumerable`1 results, QueryContext queryContext, IList`1 entityTrackingInfos, IList`1 entityAccessors)+MoveNext()
   at Microsoft.EntityFrameworkCore.Query.Internal.LinqOperatorProvider.ExceptionInterceptor`1.EnumeratorExceptionInterceptor.MoveNext()
   at System.Collections.Generic.List`1.AddEnumerable(IEnumerable`1 enumerable)
   at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
   at Majako.Plugin.Theme.Unishop.Services.ThemeUnishopService.SearchProducts(Int32 pageIndex, Int32 pageSize, IList`1 categoryIds, Int32 manufacturerId, Int32 storeId, Int32 vendorId, Int32 warehouseId, Nullable`1 productType, Boolean visibleIndividuallyOnly, Boolean markedAsNewOnly, Nullable`1 featuredProducts, Nullable`1 priceMin, Nullable`1 priceMax, Int32 productTagId, String keywords, Boolean searchDescriptions, Boolean searchManufacturerPartNumber, Boolean searchSku, Boolean searchProductTags, Int32 languageId, IList`1 filteredSpecs, MajakoProductSortingEnum orderBy, Boolean showHidden, Nullable`1 overridePublished)
   at Majako.Plugin.Theme.Unishop.Components.HomepageProductWidgetsViewComponent.get_BestRated()
   at Majako.Plugin.Theme.Unishop.Components.HomepageProductWidgetsViewComponent.Invoke()
   at lambda_method(Closure , Object , Object[] )
   at Microsoft.AspNetCore.Mvc.ViewComponents.DefaultViewComponentInvoker.InvokeSyncCore(ObjectMethodExecutor executor, ViewComponentContext context)
   at Microsoft.AspNetCore.Mvc.ViewComponents.DefaultViewComponentInvoker.InvokeAsync(ViewComponentContext context)
   at StackExchange.Profiling.Internal.ProfilingViewComponentInvoker.InvokeAsync(ViewComponentContext context) in C:\projects\dotnet\src\MiniProfiler.AspNetCore.Mvc\Internal\ProfilingViewComponentInvoker.cs:line 30
   at Microsoft.AspNetCore.Mvc.ViewComponents.DefaultViewComponentHelper.InvokeCoreAsync(ViewComponentDescriptor descriptor, Object arguments)
   at AspNetCore.Themes_Unishop_Views_Home_Index.ExecuteAsync() in C:\inetpub\wwwroot\_dev\matakki.com\Themes\Unishop\Views\Home\Index.cshtml:line 16
   at Microsoft.AspNetCore.Mvc.Razor.RazorView.RenderPageCoreAsync(IRazorPage page, ViewContext context)
   at Microsoft.AspNetCore.Mvc.Razor.RazorView.RenderPageAsync(IRazorPage page, ViewContext context, Boolean invokeViewStarts)
   at Microsoft.AspNetCore.Mvc.Razor.RazorView.RenderAsync(ViewContext context)
   at Microsoft.AspNetCore.Mvc.ViewFeatures.ViewExecutor.ExecuteAsync(ViewContext viewContext, String contentType, Nullable`1 statusCode)
   at Microsoft.AspNetCore.Mvc.ViewFeatures.ViewExecutor.ExecuteAsync(ActionContext actionContext, IView view, ViewDataDictionary viewData, ITempDataDictionary tempData, String contentType, Nullable`1 statusCode)


Kind regards

Nick
5 năm cách đây
Simply means your login doesn't have dbo permissions. Speak to your host :)
5 năm cách đây
Looks like you have SSMS access, check that your db login has its Default Schema set to [dbo]
(right click Security/Logins/{your user}, and check the User Mapping tab)

Alter Schema:
https://docs.microsoft.com/en-us/sql/t-sql/statements/alter-schema-transact-sql?view=sql-server-ver15
https://support.managed.com/kb/a100/how-to-change-schema-of-mssql-tables-stored-procedures-and-views-all-at-the-same-time.aspx

If it's a fresh install and you don't need any data, I would just create a new database after I confirmed the Default Schema was set for the login.
5 năm cách đây
Thanks for all your replies to the issue, in the end it was a permissions issue on the db user, for some reason a sub-domain user doesn't have the same permissions as the main domain, I couldn't work out why that was so I just used the main domain as the db-user and it fixed.

Many thanks again
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.