SambaPOS Database Configuration


#121

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.


My database type is wrong?
#122

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?


#123

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


#124

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


#125

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


#126

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.


#127

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.


#128

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?


#129

Go to settings and mark the Allow overwrite.


#130

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.


#131

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


#132

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


#133

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


#134

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 …

https://msdn.microsoft.com/en-us/library/ms188670.aspx


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.


#135

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


#136

Are you getting a connection error? If so can you show that full error? What version of windows? Finally is the SQL Server Browser service running on the Server?


Help with Connection String
#137

Hi @kendash what if you had to reformat the system that you used at the main license or migrate to a new server with better specs would you be able to reuse the license or activate there ?


Help with Connection String
#138

Which license are we talking about? If you mean the SambaPOS modules yes you can log in to the website and clear license keys.


#139

Thanks Ken,
SQL Server Browser is running. Message server activated using port 8080, firewalls off. Running Default instance not SAMBAPOS4 and with windows authentication not mixed.

Do i add a new login under securities in the DB for client machine?

Thanks


#140

Yes the client machine has to have permission to the database set via MSSMS you could just add the client machines windows login and give it permission instead of creating a new one. Or you can create a new one.