SambaPOS Database Configuration

my installation of sambapos is in SQ multi user mode.
does that mean there is a SQL express working already?
I am in the process of downloading one anyway but I wanted to make sure that I’m not doing it for naught.
Also, I’ve left the data connection string empty, but there is neither .txt or.sdf file saved on the computer… Will this be worked out naturally with installation of SQL express?
thanks

By default SambaPOS4 wants you to install LocalDB copy of SQL EXpress. If you chose localdb install option then yes it has a Local instance of SQL Express but it does not have the full SQL Express.

There is not much difference other than if you want total complete control over the db you should look into installing full blown SQL EXpress

If you want to switch from Local DB install to SQL Express its as easy as running a backup of your LocalDB instance then linking your SambaPOS to the new instance from your SQL EXpress install and loading that backup you made.

To link to your new SQL EXpress install you would use the connection string.

thanks for the clarification. that makes perfect sense.
how do I create a back up from the current set up.
and once I install the full blown sql express - for possibly adding another pc to work off the data base later on, how would I load from the back up file? thanks for the help

Thats the thing you would not need to load a backup on anyother PC you simply just connect it to that DB via Connection String. You can designate terminals via Settings > Terminals.

You would only need to load the backup ONCE for migration from LocalDB to SQL EXPress full.

What I mean is any additional computer connecting to that DB does not need a backup loaded you just connect it via Connection String and set your Terminals from Settings > Terminals and set each computers terminal name in Settings > Local Settings

yes, the back up of the current instance so I can load it onto sql express the first time. got it. so how do I create this back up of the current instance?

You can either use MSSMS (Microsoft SQL Server Management Studio) or use Database Backups tool from Market Place.

If you use MSSMS then your Server Name would be (LocalDb)\v11.0

Once connected its as easy as selecting Databases > SambaPOS4 right click it and choose Tasks > Backup

Structure of the database for LocalDb might be slightly different I am not sure if it names it SambaPOS4 or not. I should install a localDb version just to check that some day.

if I install the sql express and redirect the data connection string, would the current instance be still intact and be automatically backed up via sql express?

It would run independantly. It would not be auto backed up no.

I’ve typed in test.sdf in connection string and restarted sambapos. now I get error message saying that it cannot be found and the program terminates. I mistakenly thought that typing in such would autogenerate a .sdf file. how do I reverse this? I’m not able to get into the program

Why would you want a .sdf file? This is only if your running CE.

go to c:\programdata\sambapos

delete sambasettings.txt

enable seeing hidden to see that dir

so I’ve made a back up file, installed and ran from sql serve, and, now, trying to restore to backup database. the restoration gets aborted with this message. what could be the problem? any help would be much appreciated.

It means exactly what it says. It does not have permission to that dir. Move the zip file outside of your user dir then try.

moved the zip file to c:/programdata/sambapos/sambapos4/ and tried to restore from zip file. I get a different error message.


in between creating the back up and stringing to sql server, nothing has changed. could I get another pointer in the right direction?

Go to settings and mark the Allow overwrite.

I’ve tried that already with no success. I’ve got a longer different error message with that trial.

perhaps I messed up installing sql server? or incorrectly entered data connection string? I’ve referred to the installing sql server tutorial and replicated the steps. For local settings I’ve referred to this tutorial.

I moved 9 posts to a new topic: Help with Connection String

I moved a post to an existing topic: Help with Connection String

Hi Emre,

Issue - Cant connect to server PC from a client PC.
My circumstance;
I initially installed Samba using SQLEXPRESS 2008
I didnt not use named instance then (SQLEXPRESS)
Authentication is windows authentication
I have also setup 4 android tabs using direction on this platform, all tabs are working.

Now i want to add another Point of Sale PC (running windows). After going through the step by step database configuration tuitorial, i did the following;

  1. Went to services and turned SQL Server browser to automatic
  2. Enabled “Named Pipes” and “TCP/IP” all under protocols for SQLEXPRESS
  3. Run from the programme files “Message Server Tool” and updated port to 8080
  4. Used the same port number for “TCP/IP” under client protocol
  5. Disabled windows and antivirus firewalls

On the other hand i have not been able to do the following

  1. Change instance name from SQLEXPRESS to SAMBAPOS4
  2. Change authentication to mixed

These are the details for my connection string
Data Source=Server-PC\SQLEXPRESS ( I also tried using the PC’s IP)
Database=“Name of database file as shown under databases in SQL Management Studio”

These are my question;

  1. Should i backup and install SQLExpress 2012 so i can change instance name and authentication type?
  2. If not, what should have been done that i havent done?
  3. On the server PC, the network icon shows “Network 4” whilst on client PC is “Network 2”. Both Computers are on “Work Network” and from the client PC the server is visible and can be opened (showing all shared USB printers, can also issue test print from client PC as well). Can the different network names be the cause? If yes, how do i get client PC show same network name (Network 4)

Thanks, I know you can help

If there is no other way to change the Authentication Type, then yes you could backup the DB, uninstall SQL Express, re-install it with Mixed Authentication, then restore the DB. I recommend that you use the most recent SQL Express 2014.

Here is how to change to Mixed Mode using SSMS …

You will then need to (or should) create a password for the sa Account …


The Instance Name is not particularly important, so long as you know what it is. I always have had my Instance as SQLEXPRESS since that is the default, and I host more than 1 DB on the DB Engine, some of which have nothing to do with SambaPOS. IMO, I do not recommend changing it from default to SAMBAPOS during install, but hey, that’s just me.

Check this value in SSMS as well…


No, this would not cause your issue. Those names are completely arbitrary. What is important is that your computers can all see the “Work Network” and any of the Computers and USB Printer shares being viewable indicates your network is functioning “properly”.

Ensure the Message Server Service is only running on the Master machine. Only 1 computer should be serving, while the others are clients/slaves.

Thanks Q MCKAY,
I have done as you suggested. Challenge persist. Tried connecting from client machine with the “sa” credentials and with blank credential as well, non worked.

Do I have to;

  1. Create a new login in the DB for the client PC?
  2. Does “Terminal Name” under local settings matter?

Thanks