Cant open sambapos v5 (SOLVED)


#1

Hello guys,

It is very urgent.
Cant open sambapos v5

Here is log file

Can someone help

[General Info]

Application: SambaPOS
Version:     5.1.62
Region:      en
DB:          SQ
Machine:     BUSIN-PC
User:        BUSIN
Date:        5/12/2018
Time:        5:12 PM

User Explanation:

BUSIN said ""
-----------------------------

[Exception Info 1]

Top-level Exception
Type:        System.Data.DataException
Message:     An exception occurred while initializing the database. See the InnerException for details.
Source:      EntityFramework
Stack Trace: at System.Data.Entity.Internal.InternalContext.PerformInitializationAction(Action action)
   at System.Data.Entity.Internal.InternalContext.PerformDatabaseInitialization()
   at System.Data.Entity.Internal.LazyInternalContext.<InitializeDatabase>b__4(InternalContext c)
   at System.Data.Entity.Internal.RetryAction`1.PerformAction(TInput input)
   at System.Data.Entity.Internal.LazyInternalContext.InitializeDatabaseAction(Action`1 action)
   at System.Data.Entity.Internal.LazyInternalContext.InitializeDatabase()
   at System.Data.Entity.Internal.InternalContext.ForceOSpaceLoadingForKnownEntityTypes()
   at System.Data.Entity.DbContext.System.Data.Entity.Infrastructure.IObjectContextAdapter.get_ObjectContext()
   at Samba.Infrastructure.Data.SqlData.EFWorkspace..ctor(CommonDbContext context)
   at Samba.Persistance.Data.WorkspaceFactory.Create()
   at Samba.Presentation.Services.Common.DataGeneration.DataCreationService.get_Workspace()
   at Samba.Presentation.Services.Common.DataGeneration.DataCreationService.ShouldCreateData()
   at Samba.Presentation.Services.Common.DataGeneration.DataCreationService.CreateData()
   at Samba.Presentation.Bootstrapper.InitializeShell()

Inner Exception 1
Type:        System.Data.Entity.Core.EntityException
Message:     The underlying provider failed on Open.
Source:      EntityFramework
Stack Trace: at System.Data.Entity.Core.EntityClient.EntityConnection.Open()
   at System.Data.Entity.Core.Objects.ObjectContext.EnsureConnection(Boolean shouldMonitorTransactions)
   at System.Data.Entity.Core.Objects.ObjectContext.ExecuteInTransaction[T](Func`1 func, IDbExecutionStrategy executionStrategy, Boolean startLocalTransaction, Boolean releaseConnectionOnSuccess)
   at System.Data.Entity.Core.Objects.ObjectContext.<>c__DisplayClass65`1.<ExecuteStoreQueryReliably>b__63()
   at System.Data.Entity.Infrastructure.DefaultExecutionStrategy.Execute[TResult](Func`1 operation)
   at System.Data.Entity.Core.Objects.ObjectContext.ExecuteStoreQueryReliably[TElement](String commandText, String entitySetName, ExecutionOptions executionOptions, Object[] parameters)
   at System.Data.Entity.Core.Objects.ObjectContext.ExecuteStoreQuery[TElement](String commandText, Object[] parameters)
   at Samba.Persistance.Data.Initializer.InitializeDatabase(DataContext context)
   at System.Data.Entity.Internal.InternalContext.<>c__DisplayClassf`1.<CreateInitializationAction>b__e()
   at System.Data.Entity.Internal.InternalContext.PerformInitializationAction(Action action)

Inner Exception 2
Type:        System.Data.SqlClient.SqlException
Message:     Cannot open database "SambaPOS5" requested by the login. The login failed.
Login failed for user 'BUSIN-PC\BUSIN'.
Source:      .Net SqlClient Data Provider
Stack Trace: at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, UInt32 waitForMultipleObjectsTimeout, Boolean allowCreate, Boolean onlyOneCheckConnection, DbConnectionOptions userOptions, DbConnectionInternal& connection)
   at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal& connection)
   at System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection)
   at System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions)
   at System.Data.ProviderBase.DbConnectionClosed.TryOpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions)
   at System.Data.SqlClient.SqlConnection.TryOpenInner(TaskCompletionSource`1 retry)
   at System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry)
   at System.Data.SqlClient.SqlConnection.Open()
   at System.Data.Entity.Infrastructure.Interception.DbConnectionDispatcher.<Open>b__36(DbConnection t, DbConnectionInterceptionContext c)
   at System.Data.Entity.Infrastructure.Interception.InternalDispatcher`1.Dispatch[TTarget,TInterceptionContext](TTarget target, Action`2 operation, TInterceptionContext interceptionContext, Action`3 executing, Action`3 executed)
   at System.Data.Entity.Infrastructure.Interception.DbConnectionDispatcher.Open(DbConnection connection, DbInterceptionContext interceptionContext)
   at System.Data.Entity.Core.EntityClient.EntityConnection.<Open>b__2()
   at System.Data.Entity.Infrastructure.DefaultExecutionStrategy.Execute(Action operation)
   at System.Data.Entity.Core.EntityClient.EntityConnection.Open()

-----------------------------

[Assembly Info]

mscorlib, Version=4.0.0.0
PresentationFramework, Version=4.0.0.0
PresentationCore, Version=4.0.0.0
System, Version=4.0.0.0
WindowsBase, Version=4.0.0.0
Samba.Services, Version=1.0.0.0
System.ComponentModel.Composition, Version=4.0.0.0
System.Configuration, Version=4.0.0.0
System.Xaml, Version=4.0.0.0
Microsoft.Practices.Prism.MefExtensions, Version=4.0.0.0
Samba.Presentation.Services, Version=1.0.0.0
Samba.Presentation.Common, Version=1.0.0.0
Samba.Domain, Version=1.0.0.0
Microsoft.Practices.Prism, Version=4.0.0.0
System.Core, Version=4.0.0.0
Samba.Infrastructure, Version=1.0.0.0
DevExpress.Xpf.Core.v14.1, Version=14.1.13.0
Microsoft.Practices.ServiceLocation, Version=1.0.0.0
Samba.Localization, Version=1.0.0.0
Samba.Persistance, Version=1.0.0.0
FastButton, Version=1.0.0.0

-----------------------------

[System Info]

Operating System
-Microsoft Windows Embedded Standard
--CodeSet = 1252
--CSDVersion = Service Pack 1
--CurrentTimeZone = 300
--FreePhysicalMemory = 2312168
--OSArchitecture = 32-bit
--OSLanguage = 1033
--ServicePackMajorVersion = 1
--ServicePackMinorVersion = 0
--Version = 6.1.7601

Machine
-BUSIN-PC
--Manufacturer = To be filled by O.E.M.
--Model = To be filled by O.E.M.
--TotalPhysicalMemory = 3658911744
--UserName = BUSIN-PC\BUSIN

-----------------------------


######################### E N D #########################
[General Info]

Application: SambaPOS
Version:     5.1.62
Region:      en
DB:          SQ
Machine:     BUSIN-PC
User:        BUSIN
Date:        5/12/2018
Time:        5:12 PM

User Explanation:

BUSIN said ""
-----------------------------

[Exception Info 1]

Top-level Exception
Type:        System.Data.DataException
Message:     An exception occurred while initializing the database. See the InnerException for details.
Source:      EntityFramework
Stack Trace: at System.Data.Entity.Internal.InternalContext.PerformInitializationAction(Action action)
   at System.Data.Entity.Internal.InternalContext.PerformDatabaseInitialization()
   at System.Data.Entity.Internal.LazyInternalContext.<InitializeDatabase>b__4(InternalContext c)
   at System.Data.Entity.Internal.RetryAction`1.PerformAction(TInput input)
   at System.Data.Entity.Internal.LazyInternalContext.InitializeDatabaseAction(Action`1 action)
   at System.Data.Entity.Internal.LazyInternalContext.InitializeDatabase()
   at System.Data.Entity.Internal.InternalContext.ForceOSpaceLoadingForKnownEntityTypes()
   at System.Data.Entity.DbContext.System.Data.Entity.Infrastructure.IObjectContextAdapter.get_ObjectContext()
   at Samba.Infrastructure.Data.SqlData.EFWorkspace..ctor(CommonDbContext context)
   at Samba.Persistance.Data.WorkspaceFactory.Create()
   at Samba.Presentation.Services.Common.DataGeneration.DataCreationService.get_Workspace()
   at Samba.Presentation.Services.Common.DataGeneration.DataCreationService.ShouldCreateData()
   at Samba.Presentation.Services.Common.DataGeneration.DataCreationService.CreateData()
   at Samba.Presentation.Bootstrapper.InitializeShell()

Inner Exception 1
Type:        System.Data.Entity.Core.EntityException
Message:     The underlying provider failed on Open.
Source:      EntityFramework
Stack Trace: at System.Data.Entity.Core.EntityClient.EntityConnection.Open()
   at System.Data.Entity.Core.Objects.ObjectContext.EnsureConnection(Boolean shouldMonitorTransactions)
   at System.Data.Entity.Core.Objects.ObjectContext.ExecuteInTransaction[T](Func`1 func, IDbExecutionStrategy executionStrategy, Boolean startLocalTransaction, Boolean releaseConnectionOnSuccess)
   at System.Data.Entity.Core.Objects.ObjectContext.<>c__DisplayClass65`1.<ExecuteStoreQueryReliably>b__63()
   at System.Data.Entity.Infrastructure.DefaultExecutionStrategy.Execute[TResult](Func`1 operation)
   at System.Data.Entity.Core.Objects.ObjectContext.ExecuteStoreQueryReliably[TElement](String commandText, String entitySetName, ExecutionOptions executionOptions, Object[] parameters)
   at System.Data.Entity.Core.Objects.ObjectContext.ExecuteStoreQuery[TElement](String commandText, Object[] parameters)
   at Samba.Persistance.Data.Initializer.InitializeDatabase(DataContext context)
   at System.Data.Entity.Internal.InternalContext.<>c__DisplayClassf`1.<CreateInitializationAction>b__e()
   at System.Data.Entity.Internal.InternalContext.PerformInitializationAction(Action action)

Inner Exception 2
Type:        System.Data.SqlClient.SqlException
Message:     Cannot open database "SambaPOS5" requested by the login. The login failed.
Login failed for user 'BUSIN-PC\BUSIN'.
Source:      .Net SqlClient Data Provider
Stack Trace: at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, UInt32 waitForMultipleObjectsTimeout, Boolean allowCreate, Boolean onlyOneCheckConnection, DbConnectionOptions userOptions, DbConnectionInternal& connection)
   at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal& connection)
   at System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection)
   at System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions)
   at System.Data.ProviderBase.DbConnectionClosed.TryOpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions)
   at System.Data.SqlClient.SqlConnection.TryOpenInner(TaskCompletionSource`1 retry)
   at System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry)
   at System.Data.SqlClient.SqlConnection.Open()
   at System.Data.Entity.Infrastructure.Interception.DbConnectionDispatcher.<Open>b__36(DbConnection t, DbConnectionInterceptionContext c)
   at System.Data.Entity.Infrastructure.Interception.InternalDispatcher`1.Dispatch[TTarget,TInterceptionContext](TTarget target, Action`2 operation, TInterceptionContext interceptionContext, Action`3 executing, Action`3 executed)
   at System.Data.Entity.Infrastructure.Interception.DbConnectionDispatcher.Open(DbConnection connection, DbInterceptionContext interceptionContext)
   at System.Data.Entity.Core.EntityClient.EntityConnection.<Open>b__2()
   at System.Data.Entity.Infrastructure.DefaultExecutionStrategy.Execute(Action operation)
   at System.Data.Entity.Core.EntityClient.EntityConnection.Open()

-----------------------------

[Assembly Info]

mscorlib, Version=4.0.0.0
PresentationFramework, Version=4.0.0.0
PresentationCore, Version=4.0.0.0
System, Version=4.0.0.0
WindowsBase, Version=4.0.0.0
Samba.Services, Version=1.0.0.0
System.ComponentModel.Composition, Version=4.0.0.0
System.Configuration, Version=4.0.0.0
System.Xaml, Version=4.0.0.0
Microsoft.Practices.Prism.MefExtensions, Version=4.0.0.0
Samba.Presentation.Services, Version=1.0.0.0
Samba.Presentation.Common, Version=1.0.0.0
Samba.Domain, Version=1.0.0.0
Microsoft.Practices.Prism, Version=4.0.0.0
System.Core, Version=4.0.0.0
Samba.Infrastructure, Version=1.0.0.0
DevExpress.Xpf.Core.v14.1, Version=14.1.13.0
Microsoft.Practices.ServiceLocation, Version=1.0.0.0
Samba.Localization, Version=1.0.0.0
Samba.Persistance, Version=1.0.0.0
FastButton, Version=1.0.0.0

-----------------------------

[System Info]

Operating System
-Microsoft Windows Embedded Standard
--CodeSet = 1252
--CSDVersion = Service Pack 1
--CurrentTimeZone = 300
--FreePhysicalMemory = 2312168
--OSArchitecture = 32-bit
--OSLanguage = 1033
--ServicePackMajorVersion = 1
--ServicePackMinorVersion = 0
--Version = 6.1.7601

Machine
-BUSIN-PC
--Manufacturer = To be filled by O.E.M.
--Model = To be filled by O.E.M.
--TotalPhysicalMemory = 3658911744
--UserName = BUSIN-PC\BUSIN

-----------------------------


######################### E N D #########################

#2

Inner Exception 2
Type: System.Data.SqlClient.SqlException
Message: Cannot open database “SambaPOS5” requested by the login. The login failed.
Login failed for user ‘BUSIN-PC\BUSIN’.

Permissions problem.


#3

@QMcKay

Can you please advice what to do ?

What permission ? Computer has no password


#4

If this was working properly before, tell us what changed on your system.

If you have SSMS (SQL Server Management Studio), then use it to see if you can connect. If you don’t have SSMS, download and install it, then use it to try to connect.

There are 2 ways to connect to the DB using SSMS and SambaPOS:

  • Windows Authentication
  • SQL Server Authentication

Your error indicates the first type of Authentication is being used.


Database Permission issues have been covered several times on this forum. Use the Search function.

Search Google too for MS DB permissions, using the same terms as the error, for example:

Cannot open database requested by the login. The login failed. Login failed for user


#5

Just tried to log in into SQL server management studio with user ‘sa’ and password ‘sambapos’

Successfully logged in.

Tried to delete or edit sambasettings file and added database credentials. Didnt help. Sambasettings file rewrited itself.


#6

I will search in the forum for database

thanks


#7

Where is the file located?

The connection string for SQL Authentication (the ‘sa’ account) should be like:

Data Source=localhost\sqlexpress; User Id=sa; Password=PASSWORD; Database=SambaPOS5;

#8

It is located C:\ProgramData\SAMBAPOS\SambaPOS5
SambaSettings.txt

I’ve changed

I use laptop with sambapos5 to connect to server so I use same same database credentials . copied and pasted in sambasettings between connection Data Source=BUSIN-PC\SAMBAPOS5; User Id=sa; Password=PASSWORD; Database=SambaPOS5;

My database settings are as following:
Data Source=BUSIN-PC\SAMBAPOS5; User Id=sa; Password=PASSWORD; Database=SambaPOS5;

I press save text file then I launch sambapos , then sambasettings txt rewerited as default

I dont know why its not applied

What the problem …


#9

password is default : sambapos


#10

Please verify the above with the below.

Data Source=computerName_or_IPaddress\SQLserverInstanceName (NOT DB name)

Your file is likely being overwritten because it cannot connect, and SambaPOS is trying to “correct” the details for you.


#11

Do you have the DB set to allow remote connections? This can be done using SSMS.

Is the DB set to support Mixed Authentication (Windows and SQL Server Authentication)?


#12

This is from sambasettings text file

Data Source=BUSIN-PC\SAMBAPOS5; User Id=sa; Password=sambapos; Database=SAMBAPOS5;

I use SAMBAPOS5 for both DB name and SQLserverInstanceName
Computer name is BUSIN-PC

I am able to log in to sql server configuration with these credntials
I am able to launch sambapos on my noteboook

But I cant launch samba on server PC where database is installed


#13

Initially I set it up as mixed authentication


#14

I don’t know what else to tell you.

SambaPOS uses the details from the SambaSettings.txt file to connect to the DB.

Before modifying SambaSettings.txt, be sure SambaPOS is shut down.


#15

thanks @QMcKay for your time.

Sambapos itself quits after error. I do changes in sambasettings.txt while sambapos is shut down.

I am going to try to reinstall sambapos (backing up data on my notebook first )

Or i should try to reinstall everything . I dont know any solution.

If someone has any idea , please post it here.

Thanks


#16

Are you sure your instance and database are both SAMBAPOS5?
You say password is default although there is no default, you choose it, by default I guess you mean from tutorial however the tutorials usually don’t have sambapos5 as the instance name, it’s usually sqlexpress or similar.


#17

Stop the SambaPOS MessagingServer Service in Windows Services as well. Make the changes. Then start the Service, and finally start SambaPOS.


#18

Yes, I am sure. I reinstalled some time ago so I used SAMBAPOS5 as instance and db name.

Thank you


#19

I changed the DB name in Sql configuration, then stopped SambaPOS messaging server. Made changes in sambasettings.txt and then started sambapos.
It helped. Solved.

But I don’t know why this happened.

Thanks a lot.