Author Topic: Configuration backup  (Read 51154 times)

emre

  • SambaPOS Developer
  • Samba Team
  • Hero Member
  • *****
  • Posts: 1564
Re: Configuration backup
« Reply #15 on: January 31, 2012, 06:43:09 am »
Ta taam... Great job John!!!
Our support team will love this. I have to translate it to Turkish asap.

jenem

  • Full Member
  • ***
  • Posts: 154
Re: Configuration backup
« Reply #16 on: January 31, 2012, 09:09:06 am »
Hi John,

Great Job !!

Can I ask is it only for a networked database or can you use it for training on a local MSQL database?

Edgar

JohnS

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 677
Re: Configuration backup
« Reply #17 on: January 31, 2012, 09:44:53 am »
Edgar,

The script is setup for a local MSSQL database. If you need to connect to a remote database you will need to edit the MigrateDB.bat file and replace the following line

Export2sqlce "Data Source=%mssql%;Initial Catalog=SambaData2;Integrated Security=True" SambaData2.sqlce
with
Export2sqlce "Data Source=%mssql%;Initial Catalog=SambaData2;Integrated Security=False;User Id=sa;Password=sambapos;" SambaData2.sqlce

Making sure you enter the MSSQL User Id & Password you set when installing the MSSQL Instance.

Then you need to edit the SambaTrain.bat file and add the User Id & Password to the MSSQL connection string.

set mssql=D620-PC\SAMBAPOS; user id=sa; password=sambapos;


If you are running a domain controller or if all your PC's (including the MSSQL Server) have the same logins, and passwords, then you shouldn't have to change any of this. But then again it is MSSQL  ::)

** Just updated the files to reflect these notes **
« Last Edit: January 31, 2012, 10:12:31 am by JohnSCS »
SambaPOS - POS'n the World, one Terminal at a time.

JohnS

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 677
Re: Configuration backup
« Reply #18 on: January 31, 2012, 10:20:12 am »
Is there an easy way to add command line options to SambaPOS ? For example add a '/t' to tell SambaPOS that this is a training session and it displays 'Training' at the top of the screen.
Or better still '/t [terminal name]' to assign a terminal name like 'Restaurant Bar' to the top of the POS screen? Have it read the terminal name from settings and if we don't define a name when launching SambaPOS then it displays the terminal name.

OK Emre, now its your turn.

I would really like to see the above idea in action.
SambaPOS - POS'n the World, one Terminal at a time.

emre

  • SambaPOS Developer
  • Samba Team
  • Hero Member
  • *****
  • Posts: 1564
Re: Configuration backup
« Reply #19 on: January 31, 2012, 02:24:15 pm »
So what will you think about implementing an action for updating the title text? We can use it for different purposes...

I can add an additional feature to "Application Started" rule for testing command line parameters.

Maybe at a later time we can implement "start process" action for starting bat files, or executing scripts.

I don't know where we are going to :)
« Last Edit: January 31, 2012, 02:29:06 pm by emre »

JohnS

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 677
Re: Configuration backup
« Reply #20 on: January 31, 2012, 03:36:46 pm »
If we can update the title text and read the command line parameters, then I think it gives us many possibilities in the future. And right now it would give us a Training Mode Warning prompt/notification to visually identify a terminal mode.

Quote
I don't know where we are going to :)
But getting there is the fun part. Its all the little ideas, 'what ifs' that make it interesting and lead to unexpected new features.
SambaPOS - POS'n the World, one Terminal at a time.

emre

  • SambaPOS Developer
  • Samba Team
  • Hero Member
  • *****
  • Posts: 1564
Re: Configuration backup
« Reply #21 on: February 09, 2012, 01:33:00 pm »
So what will you think about implementing an action for updating the title text? We can use it for different purposes...

I can add an additional feature to "Application Started" rule for testing command line parameters.


I forgot to mention this is also implemented on 2.86. We can test the existence of /training switch on Application Started event and execute Update Sub Title action.

joe

  • Newbie
  • *
  • Posts: 9
Re: Configuration backup
« Reply #22 on: June 11, 2012, 05:04:06 pm »
Hello balitaly,
Normally we create backups before entering trial data and restore it before real usage.

I attached a SQL Script for you to clear all transaction data from database. If you run this script it will keep your settings but clear all tickets, work periods etc.

USE IT AT YOUR OWN RISK...
Take your backups before running this script. It will not generate backups. It will clear data without confirmation.


For SQL Server Express you can easily create backups and execute it with SQL Management Console.

If you are using SQL Compact Edition (CE) you can download a handy Management Tool from http://sqlcetoolbox.codeplex.com/ website.

The SQL CE database file stored under MyDocuments\SambaPOS2 folder. Create a copy of SambaData2.sdf file to create a backup

After running SQL CE Toolbox application:
  • Right click on "No SQL Connections found .... etc" title on the right and click "Add .. Connection" (First item). A popup window will appear.
  • Click [Browse] button, locate SambaData2.sdf file.
  • Click [Close] button at the bottom of the screen.
  • Popup window should disappear and you should see your database file listed under connections list.
  • Right click on the file name and click "Open SQL Editor". This will display an editor screen on the right.
  • Click "Open" from toolbar and locate script file (dtran.sqlce).
  • Click Execute...

For security reasons we didn't implemented that feature inside sambapos application but we'll implement "Training Mode" on further releases so you'll be able to enable training mode when needed.


hi there, im reading over and over again but still dont understand....
i had already backup the SambaData2.sdf  file....
but i dont know what it mean "After running SQL CE Toolbox application"
where to find this application?