MS SQL Replication (Merge) and Licensing Check

Hi

I’m busy looking into using the replication feature of MS SQL to backup our till to:
1x laptop to be usable as an instant backup in case the till fails (it is using an i5 2400, so is on it’s last legs and showing it)
1x VM on my personal computer at home so I can easily make changes and then merge them into the main till

On the VM I’ll have a VPN connection to the till over the internet which I will turn on to ‘sync’ with the till initially, then turn off the VPN, make my changes and test, then turn the VPN back on to sync back to the till once I’m satisfied everything is okay. This is to replace our current backup system, which is to use DB Tools to back up to a dropbox folder. The reason for the change are:

  1. The till can sometimes be very slow when saving the backup and whilst dropbox is syncing
  2. I’ve had to reduce backup frequency due to this, as Replication only transfers changes and using a Pull Subscription means most of the processing is done on the VM I’m hoping this will be less likely to cause a slow down of the till so that I can increase my Replication frequency.
  3. Using a Merge Replication means that I don’t need to worry about only restoring certain tables and wiping out sales data
  4. After a recent hard drive death it took way too long to reinstall windows, MS SQL, sambapos and then restore the database. Having a system always on standby would be much easier and we have an old laptop which would do.

My main question is, is this okay as far as licencing goes? I’m only using the one database and only one ‘Live’ till at a time. The database will get transferred off site to the VM in my home, but the only use for that copy is to make changes and test things with the advantage of being able to use real test data, it’s not acting as a ‘Live’ system.

One thing that may trip me up in all this is that I’ve noticed that all the Replication examples on the net use a different name for the Subscribers copy of the database. Does anyone know if this is mandatory, or if so is there a way of programmatically getting the name of the database within SambaPOS (such as a variable or something). I ask this as we have a few SQL scripts which are launched via ‘Process Start’ and a .bat file, and the database name is passes to the bat file as an argument. This is just hardcoded with the database name as it is on the till at the moment, but if I could use a variable, then I could just pass the value of that to the bat file.

Fingers crossed that will all be okay, but thought it best to ask.
Alex

Well for ease of explanation we describe it as “one license per database” but the license permits use on a single location. If a business have 10 branches but works on a single database by replication or by direct internet connection they’ll still need 10 licenses. I hope it makes sense.

Using it for backup purposes is fine. However if you connect to that database from your home frequently our fraud detection system may raise a flag as it may look like a multiple location use from a single location license. As we don’t have access to your data due to privacy reasons we can’t determine the intention of use.

Try {REPORT SQL DETAILS:SELECT DB_NAME() as DBName:F.DBName}

1 Like

Thank you so much for your quick reply. That is great news, thank you,I’ll give it a go and see what happens. If your fraud detection system does kick in, do I just clear the keys and stop replicating anymore, or is it possible to get the flag removed?

Thank you very much for that piece of code, quite a life saver.
Alex

A separate team building licensing related software so I don’t have detailed info about that. I guess it blacklists the community portal account because it banned me once. :slight_smile:

If you need detailed info you can talk with @tayfun through support@sambapos.com.