Installation Issue V5

Hi
I installed samba POs 5 on laptop and on launching it gives error:

Please restart application. Current problem saved to log file, also when i see in settings it does not show connection string. I tried to open database in SQL Management tool and it does not show any database installed. I am also copying sambasettings.txt portion

What I understood is that sambapos setup did not installed database. What should i do to fix it.

<?xml version="1.0"?><SettingsObject xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><MessagingServerPort>8080</MessagingServerPort><ConnectionString /><StartMessagingClient>false</StartMessagingClient><DefaultHtmlReportHeader>

Below is Log file

`-----------------------------
[General Info]

Application: SambaPOS
Version: 5.1.59
Region: en
DB: SQ
Machine: TAYYAB
User: Tayyab
Date: 5/25/2016
Time: 1:07 PM

User Explanation:

Tayyab said “”

[Exception Info 1]

Top-level Exception
Type: System.Data.SqlClient.SqlException
Message: Cannot open database “SambaPOS5” requested by the login. The login failed.
Login failed for user ‘Tayyab\Tayyab’.
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, TaskCompletionSource1 retry, DbConnectionOptions userOptions, DbConnectionInternal& connection) at System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection)
at System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource1 retry, DbConnectionOptions userOptions) at System.Data.ProviderBase.DbConnectionClosed.TryOpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource1 retry, DbConnectionOptions userOptions)
at System.Data.SqlClient.SqlConnection.TryOpenInner(TaskCompletionSource1 retry) at System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource1 retry)
at System.Data.SqlClient.SqlConnection.Open()
at FluentMigrator.Runner.Processors.GenericProcessorBase.EnsureConnectionIsOpen()
at FluentMigrator.Runner.Processors.SqlServer.SqlServerProcessor.Exists(String template, Object[] args)
at FluentMigrator.Runner.Processors.SqlServer.SqlServerProcessor.SchemaExists(String schemaName)
at FluentMigrator.Runner.VersionLoader.get_AlreadyCreatedVersionSchema()
at FluentMigrator.Runner.VersionLoader.LoadVersionInfo()
at FluentMigrator.Runner.VersionLoader…ctor(IMigrationRunner runner, Assembly assembly, IMigrationConventions conventions)
at FluentMigrator.Runner.MigrationRunner…ctor(Assembly assembly, IRunnerContext runnerContext, IMigrationProcessor processor)
at FluentMigrator.Runner.Initialization.TaskExecutor.Initialize()
at FluentMigrator.Runner.Initialization.TaskExecutor.Execute()
at Samba.Persistance.Data.Migrator.DoMigrate(String connectionString)
at Samba.Persistance.Data.Migrator.DoMigrate(CommonDbContext context)
at Samba.Persistance.Data.Initializer.Migrate(CommonDbContext context)
at Samba.Persistance.Data.Initializer.InitializeDatabase(DataContext context)
at System.Data.Entity.Internal.InternalContext.<>c__DisplayClassf1.<CreateInitializationAction>b__e() 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.RetryAction1.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.Persistance.Data.WorkspaceFactory.CreateReadOnly()
at Samba.Persistance.Data.Dao.CountT
at Samba.Presentation.Services.Common.DataGeneration.DataCreationService.ShouldCreateData()
at Samba.Presentation.Services.Common.DataGeneration.DataCreationService.CreateData()
at Samba.Presentation.Bootstrapper.InitializeShell()


[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
System.ComponentModel.Composition, Version=4.0.0.0
System.Configuration, Version=4.0.0.0
System.Xaml, Version=4.0.0.0
Samba.Services, Version=1.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
Samba.Infrastructure, Version=1.0.0.0
Microsoft.Practices.Prism, Version=4.0.0.0
System.Core, Version=4.0.0.0
DevExpress.Xpf.Core.v14.1, Version=14.1.11.0
Microsoft.Practices.ServiceLocation, Version=1.0.0.0
Samba.Localization, Version=1.0.0.0
FastButton, Version=1.0.0.0
Samba.Persistance, Version=1.0.0.0


[System Info]

Operating System
-Microsoft Windows 10 Home Single Language
–CodeSet = 1252
–CSDVersion =
–CurrentTimeZone = 240
–FreePhysicalMemory = 4459600
–OSArchitecture = 64-bit
–OSLanguage = 1033
–ServicePackMajorVersion = 0
–ServicePackMinorVersion = 0
–Version = 10.0.10586

Machine
-TAYYAB
–Manufacturer = LENOVO
–Model = 20266
–TotalPhysicalMemory = 8497946624
–UserName = Tayyab\Tayyab


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

[General Info]

Application: SambaPOS
Version: 5.1.59
Region: en
DB: SQ
Machine: TAYYAB
User: Tayyab
Date: 5/25/2016
Time: 1:09 PM

User Explanation:

Tayyab said “”

[Exception Info 1]

Top-level Exception
Type: System.Data.SqlClient.SqlException
Message: Cannot open database “SambaPOS5” requested by the login. The login failed.
Login failed for user ‘Tayyab\Tayyab’.
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, TaskCompletionSource1 retry, DbConnectionOptions userOptions, DbConnectionInternal& connection) at System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection)
at System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource1 retry, DbConnectionOptions userOptions) at System.Data.ProviderBase.DbConnectionClosed.TryOpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource1 retry, DbConnectionOptions userOptions)
at System.Data.SqlClient.SqlConnection.TryOpenInner(TaskCompletionSource1 retry) at System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource1 retry)
at System.Data.SqlClient.SqlConnection.Open()
at FluentMigrator.Runner.Processors.GenericProcessorBase.EnsureConnectionIsOpen()
at FluentMigrator.Runner.Processors.SqlServer.SqlServerProcessor.Exists(String template, Object[] args)
at FluentMigrator.Runner.Processors.SqlServer.SqlServerProcessor.SchemaExists(String schemaName)
at FluentMigrator.Runner.VersionLoader.get_AlreadyCreatedVersionSchema()
at FluentMigrator.Runner.VersionLoader.LoadVersionInfo()
at FluentMigrator.Runner.VersionLoader…ctor(IMigrationRunner runner, Assembly assembly, IMigrationConventions conventions)
at FluentMigrator.Runner.MigrationRunner…ctor(Assembly assembly, IRunnerContext runnerContext, IMigrationProcessor processor)
at FluentMigrator.Runner.Initialization.TaskExecutor.Initialize()
at FluentMigrator.Runner.Initialization.TaskExecutor.Execute()
at Samba.Persistance.Data.Migrator.DoMigrate(String connectionString)
at Samba.Persistance.Data.Migrator.DoMigrate(CommonDbContext context)
at Samba.Persistance.Data.Initializer.Migrate(CommonDbContext context)
at Samba.Persistance.Data.Initializer.InitializeDatabase(DataContext context)
at System.Data.Entity.Internal.InternalContext.<>c__DisplayClassf1.<CreateInitializationAction>b__e() 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.RetryAction1.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.Persistance.Data.WorkspaceFactory.CreateReadOnly()
at Samba.Persistance.Data.Dao.CountT
at Samba.Presentation.Services.Common.DataGeneration.DataCreationService.ShouldCreateData()
at Samba.Presentation.Services.Common.DataGeneration.DataCreationService.CreateData()
at Samba.Presentation.Bootstrapper.InitializeShell()


[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
System.ComponentModel.Composition, Version=4.0.0.0
System.Configuration, Version=4.0.0.0
System.Xaml, Version=4.0.0.0
Samba.Services, Version=1.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
Samba.Infrastructure, Version=1.0.0.0
Microsoft.Practices.Prism, Version=4.0.0.0
System.Core, Version=4.0.0.0
DevExpress.Xpf.Core.v14.1, Version=14.1.11.0
Microsoft.Practices.ServiceLocation, Version=1.0.0.0
Samba.Localization, Version=1.0.0.0
FastButton, Version=1.0.0.0
Samba.Persistance, Version=1.0.0.0


[System Info]

Operating System
-Microsoft Windows 10 Home Single Language
–CodeSet = 1252
–CSDVersion =
–CurrentTimeZone = 240
–FreePhysicalMemory = 4600352
–OSArchitecture = 64-bit
–OSLanguage = 1033
–ServicePackMajorVersion = 0
–ServicePackMinorVersion = 0
–Version = 10.0.10586

Machine
-TAYYAB
–Manufacturer = LENOVO
–Model = 20266
–TotalPhysicalMemory = 8497946624
–UserName = Tayyab\Tayyab


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

Looks like a windows auth username to me although didnt think username and pc name could be the same.

Did you install SQL Express or just default LocalDB?

Top-level Exception
Type: System.Data.SqlClient.SqlException
Message: Cannot open database "SambaPOS5" requested by the login. The login failed.
Login failed for user 'Tayyab\Tayyab'.

That should tell you something. The username is not able to login to your SQL database instance.

Did you install SQL Express or did you choose Local DB install?

Try deleting your sambasettings.txt file then restart SambaPOS

Had this this morning, its a relatively easy fix.

Go into your services (type services in the search)

right click your SQL instance and click properties, then click the log in tab.

From there, find, add, fix, replace… whatever… the log in permissions.

The likelihood is, for some reason the service isn’t starting with the old credentials. So far I’ve had this with 2 POS since updating to windows 10.

Matt

Hi, I choose Local DB 2014 option whicl installing samba POS 5.
Tried deleting sambasettings.txt and restarted but nothing changed.

I installed default Local DB.
Username is Tayyab Ilyas and PC Name is Tayyab

Username is sa Password is sambapos

@shahiparatharoll if you never installed SQL server on your PC and never tried to setup a SQL connection you may have a problem with your Database file. You may try to fix that as explained here.

1 Like

Following the guidelines i created 12.0 localdb instance but i don’t see sambaPOs Database in databases.

Connection issue should solved before SambaPOS can add a database in databases.

in SQL Management tool its connecting

I think sambasetting.txt file is not creating properly, i tried deleting that but still same it does not have connection string in it:

<?xml version="1.0"?><SettingsObject xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><MessagingServerPort>8080</MessagingServerPort><ConnectionString /><StartMessagingClient>false</StartMessagingClient><DefaultHtmlReportHeader>
&lt;style type='text/css'&gt; 
html
{
  font-family: 'Consolas', monospace;
  font-size: 11px;
} 

div
{
  margin:0;
}
&lt;/style&gt;</DefaultHtmlReportHeader><CurrentLanguage>en</CurrentLanguage><OverrideLanguage>false</OverrideLanguage><OverrideWindowsRegionalSettings>false</OverrideWindowsRegionalSettings><DefaultRecordLimit>100</DefaultRecordLimit><WindowScale>0</WindowScale><NavigationScale>0</NavigationScale><FooterHeight>0</FooterHeight><UseBoldFonts>false</UseBoldFonts><UseDarkTheme>false</UseDarkTheme><ValidateExitButton>false</ValidateExitButton><AllowMultipleClients>false</AllowMultipleClients><AllowCustomNavigation>false</AllowCustomNavigation><AutoMigrate>true</AutoMigrate><TokenLifeTime /><DebugRules>false</DebugRules><EnableJsDebugging>false</EnableJsDebugging><CustomSettings /></SettingsObject>

It wont need connection string if its using localdb.

According to your logs its trying to connect but cant so it knows where and how to connect but it cant. You need to fix that connection issue first.

I have no idea what to do… tried alot and everything but nothing changes.
according to the post shared above i followed the steps but at step 5, dont see any database file…

Try this, uninstall SambaPOS delete the folder that has the settings.txt file. Find and remove SQL Server localdb. You can usualy see it in add/remove program files. Then reinstall sambapos and choose localdb 2014 or you can opt to install SQL Express 2014 instead and use a connection string. I highly recommend installing full SQL its easier to troubleshoot.

If you install full sql then uncheck the localdb install option. Download and install SQL Express 2014 and follow this tutorial to set it up:

This tutorial goes with the SQL Express one it solves most issues with SQL Express

1 Like

i did all but nothing changes…tried all possible error, i am able to connect in management studio with both windows and sql authentication but sambapos still does not connects with sql server

could you please show us the screen where the SQL connection has the actual connection data? and could you please show us sambapos settings.txt file, so we can see if there is any miss spelling?

thanks